affichageDate(value) {
     if (value == "limite") {
         var elem: any = this.dom.query('#choixDate');
         this.dom.setAttribute(elem, "style", "display:true;");
     } else {
         var elem: any = this.dom.query('#choixDate');
         this.dom.setAttribute(elem, "style", "display:none;");
     }
 }
Example #2
0
 protected meta (name: string): HTMLElement {
     let meta: HTMLElement;
     meta = DOM.query(`meta[${this.attribute}='${name}]'`);
     if (meta === null) {
         meta = DOM.createElement('meta');
         meta.setAttribute(this.attribute, name);
         this.head.appendChild(meta);
     }
     return meta;
 }
Example #3
0
	show (type, content) {

		var notification = this._dom.createElement('div');
		notification.innerHTML = content;
		notification.classList.add('df-notification', type);


		var notificationEl = this._dom.query('body').appendChild(notification);

		setTimeout(function(argument) {
			notificationEl.remove();
		}, 4000)
	}
Example #4
0
 constructor()
 {
   this._dom = new BrowserDomAdapter();
   this._body = this._dom.query("body");
   this._injector = angular.element(this._body).injector();
   this._globalScope = angular.element(this._body).scope();
 }
    afficherMotDePasse(id: number) {
        let motDePasse: string = this.utilisateurService.getUserById(id)["mdp"];
        var elem: any = this.dom.query('#affiche' + id);
        if (this.dom.getAttribute(elem, "class") == "no") {
            this.dom.setAttribute(elem, "class", "yes");
            this.dom.setAttribute(this.dom.query("#eyeLogo" + id), "class", "fa fa-eye-slash");
            this.dom.setText(elem, motDePasse);
        } else {
            this.dom.setAttribute(elem, "class", "no");
            this.dom.setAttribute(this.dom.query("#eyeLogo" + id), "class", "fa fa-eye");
            this.dom.setText(elem, "**********");
        }

    }
	ngAfterViewInit() {
		this.DOM.on(this.el, this.analyticsOn, (event: any) => this.eventTrack(event))
	}
Example #7
0
 constructor () {
     this.head = DOM.query('head');
 }
import {provide} from "angular2/core";
import {BrowserDomAdapter} from 'angular2/platform/browser';
import {it, describe, expect, inject, beforeEachProviders, 
	   beforeEach, TestComponentBuilder, injectAsync} from "angular2/testing";
import {Observable} from "rxjs";
import {Movie} from "../app/models/Movie";
import {MovieList} from "../app/list/movie-list";
import {MovieService} from "../app/services/MovieService";
import {HTTP_PROVIDERS, Http} from "angular2/http";
import {Router} from "angular2/router";

BrowserDomAdapter.makeCurrent();

class FakeService extends MovieService {
	
	constructor() {
		super(null);
	}
	
	getAll() {	
		let movies = [[
			new Movie(1, "", 1, 1),
			new Movie(1, "", 1, 1),
			new Movie(1, "", 1, 1) 
		]];
		return Observable.from(movies);
	}
	
}

describe("The MovieList component", () => {
 monCompteColor(colorMenu: string) {
     this.dom.setAttribute(this.dom.query("#cssmenu"), "class", colorMenu);
     let link = ['MonCompte', { colorMenu: colorMenu }];
     this._router.navigate(link);
     return;
 }
 setTimeout( () =>
 {
     this._dom.setStyle( this._elementRef.nativeElement, 'opacity', '1' );
 }, 100 );