From 790dca65ae53d6ee95cdfcefb2666f169a588e7c Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Sun, 22 Nov 2015 22:18:02 +0500 Subject: [PATCH 01/11] added definations for lobibox --- lobibox/lobibox.d.ts | 197 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 lobibox/lobibox.d.ts diff --git a/lobibox/lobibox.d.ts b/lobibox/lobibox.d.ts new file mode 100644 index 000000000..3ae7ebaef --- /dev/null +++ b/lobibox/lobibox.d.ts @@ -0,0 +1,197 @@ +// Type definitions for lobibox 1.0.1 +// Project: https://github.com/arboshiki/lobibox +// Definitions by: Sabeeh Ul Hussnain +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare var Lobibox: LobiboxModule.LobiboxStatic; +declare module "Lobibox" { + export = Lobibox; +} +declare module LobiboxModule { + interface MessageBoxesDefault { + title? : string; + horizontalOffset?: number; + width? : number; + height? : string; // Height is automatically given calculated by width + closeButton? : boolean; // Show close button or not + draggable? : boolean; // Make messagebox draggable + customBtnClass? : string; // Class for custom buttons + modal? : boolean; + debug? : boolean; + buttonsAlign? : string; // Position where buttons should be aligned + closeOnEsc? : boolean; // Close messagebox on Esc press + delayToRemove? : number; + baseClass? : string; + showClass? : string; + hideClass? : string; + msg? : string; + + // methods + hide? (): MessageBoxesDefault; + show? (): MessageBoxesDefault; + setWidth? (width?: number): MessageBoxesDefault; + setHeight? (height?: number): MessageBoxesDefault; + setSize? (width?: number, height?: number): MessageBoxesDefault; + setPosition? (left?: number|string, top?: number): MessageBoxesDefault; + setTitle? (title?: string): MessageBoxesDefault; + getTitle? (): string; + + // events + // when messagebox show is called but before it is actually shown + onShow? (lobibox:LobiboxStatic): void ; + // after messagebox is shown + shown? (lobibox:LobiboxStatic): void; + // when messagebox remove method is called but before it is actually hidden + beforeClose? (lobibox:LobiboxStatic): void; + // after messagebox is hidden + closed? (lobibox:LobiboxStatic): void; + } + + interface MessageBoxesOptions extends MessageBoxesDefault { + bodyClass? : string; + modalClasses? : { + 'error'? : string, + 'success'? : string, + 'info'? : string, + 'warning'? : string, + 'confirm'? : string, + 'progress'? : string, + 'prompt'? : string, + 'default'? : string, + 'window'? : string + }, + buttonsAlign?: any; + buttons?: { + ok?: { + 'class'?: string, + text?: string, + closeOnClick?: boolean + }, + cancel?: { + 'class'?: string, + text?: string, + closeOnClick?: boolean + }, + yes?: { + 'class'?: string, + text?: string, + closeOnClick?: boolean + }, + no?: { + 'class'?: string, + text?: string, + closeOnClick?: boolean + } + }; + callback? (lobibox:any, type:string); + } + interface ConfirmOptions extends MessageBoxesOptions { + title? : string; + width? : number; + iconClass? : string; + } + + interface PromptOptions extends MessageBoxesOptions, PromptMethods { + width?: number; + attrs?: any; // Object of any valid attribute of input field + value?: string; // Value which is given to textfield when messagebox is created + multiline?: boolean; // Set this true for multiline prompt + lines?: number; // This works only for multiline prompt. Number of lines + type?: string; // Prompt type. Available types (text|number|color) + label?: string; // Set some text which will be shown exactly on top of textfield + } + interface AlertOptions extends MessageBoxesOptions { + warning?: { + title?: string, + iconClass?: string // Change warning alert icon globally + }; + info?:{ + title?: string, + iconClass?: string // Change info alert icon globally + }; + success?: { + title?: string, + iconClass?: string // Change success alert icon globally + }; + error?: { + title?: string, + iconClass?: string // Change error alert icon globally + }; + } + interface ProgressOptions extends MessageBoxesOptions, ProgressMethods, ProgressEvents { + width? : number; + showProgressLabel? : boolean; // Show percentage of progress + label? : string; // Show progress label + progressTpl? : boolean; //Template of progress bar + + //Events + progressUpdated? : any; + progressCompleted? : any; + } + interface WindowOptions extends MessageBoxesOptions { + width? : number; + height? : any; + content? : string; // HTML Content of window + url? : string; // URL which will be used to load content + draggable? : boolean; // Override default option + autoload? : boolean; // Auto load from given url when window is created + loadMethod? : string; // Ajax method to load content + showAfterLoad? : boolean; // Show window after content is loaded or show and then load content + params? : {}; // Parameters which will be send by ajax for loading content + } + interface ProgressEvents { + progressUpdated? (lobibox:LobiboxStatic): void; + progressComplete? (lobibox:LobiboxStatic): void; + } + interface PromptMethods { + setValue? (val?:string): PromptMethods; + getValue? (): string; + } + interface ProgressMethods { + setProgress? (progress:number): ProgressMethods; + getProgress? (): number; + } + + interface NotifyDefault { + title?: boolean; // Title of notification. If you do not include the title in options it will automatically takes its value + //from Lobibox.notify.OPTIONS object depending of the type of the notifications or set custom string. Set this false to disable title + size?: string; // normal, mini, large + soundPath?: string; // The folder path where sounds are located + soundExt?: string; // Default extension for all sounds + showClass?: string; // Show animation class. + hideClass?: string; // Hide animation class. + icon?: boolean; // Icon of notification. Leave as is for default icon or set custom string + msg?: string; // Message of notification + img?: string; // Image source string + closable?: boolean; // Make notifications closable + delay?: number; // Hide notification after this time (in miliseconds) + delayIndicator?: boolean; // Show timer indicator + closeOnClick?: boolean; // Close notifications by clicking on them + width?: number; // Width of notification box + sound?: boolean; // Sound of notification. Set this false to disable sound. Leave as is for default sound or set custom soud path + position?: string; // Place to show notification. Available options: "top left", "top right", "bottom left", "bottom right" + } + interface NotifyOptions extends NotifyDefault, NotifyMethods { + 'class'?: string; //You can override options for large notifications from here + large?: {width?: number}; //You can override options for small notifications from here + mini?: {'class'?: string}; //Default options of different style notifications + success?: {'class'?: string, 'title'?: string,'icon'?: string,sound?: string}; + error?: {'class'?: string, 'title'?: string,'icon'?: string,sound?: string}; + warning?: {'class'?: string, 'title'?: string,'icon'?: string,sound?: string}; + info?: {'class'?: string, 'title'?: string,'icon'?: string,sound?: string}; + } + + interface NotifyMethods { + remove? (); + } + + interface LobiboxStatic { + base: {OPTIONS: MessageBoxesOptions, DEFAULTS: MessageBoxesDefault}; + alert: {(type: string, options?: AlertOptions), DEFAULTS: AlertOptions}; + prompt: {(type: string, options?: PromptOptions), DEFAULTS: PromptOptions}; + confirm: {(options?: ConfirmOptions), DEFAULTS: ConfirmOptions}; + progress: {(options: ProgressOptions), DEFAULTS: ProgressOptions}; + window: {(options: WindowOptions), DEFAULTS: WindowOptions}; + notify: {(type: string, options?: NotifyOptions), DEFAULTS?: NotifyDefault,OPTIONS?:NotifyOptions}; + } +} From f7c659b988a242220f3e82105957fa053c264b76 Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Sun, 22 Nov 2015 22:52:27 +0500 Subject: [PATCH 02/11] lobibox test code --- lobibox/lobibox.js-test.ts | 134 +++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 lobibox/lobibox.js-test.ts diff --git a/lobibox/lobibox.js-test.ts b/lobibox/lobibox.js-test.ts new file mode 100644 index 000000000..4a14edf47 --- /dev/null +++ b/lobibox/lobibox.js-test.ts @@ -0,0 +1,134 @@ +/** + * Created by itboy on 11/22/2015. + */ + /// + /// + + //extending default parameters +Lobibox.notify.DEFAULTS = $.extend({}, Lobibox.notify.DEFAULTS, { + //override any options from default options + delay: false, + soundPath: '/libraries/lobibox/sounds/', + size: 'mini' +}); + +// notify +Lobibox.notify("error", {msg: "Hello world"}); +Lobibox.notify("success", {msg: "Hello world"}); +Lobibox.notify("warning", {msg: "Hello world"}); +Lobibox.notify("info", {msg: "Hello world"}); + +// alert +Lobibox.alert("error", {msg: "Hello world"}); +Lobibox.alert("success", {msg: "Hello world"}); +Lobibox.alert("warning", {msg: "Hello world"}); +Lobibox.alert("info", {msg: "Hello world"}); + +//alert with more options +Lobibox.alert('error', { + msg: 'This is an error message', + //buttons: ['ok', 'cancel', 'yes', 'no'], + //Or more powerfull way + buttons: { + ok: { + 'class': 'btn btn-info', + closeOnClick: false + }, + cancel: { + 'class': 'btn btn-danger', + closeOnClick: false + }, + yes: { + 'class': 'btn btn-success', + closeOnClick: false + }, + no: { + 'class': 'btn btn-warning', + closeOnClick: false + }, + custom: { + 'class': 'btn btn-default', + text: 'Custom' + } + }, + callback: function (lobibox, type) { + var btnType; + if (type === 'no') { + btnType = 'warning'; + } else if (type === 'yes') { + btnType = 'success'; + } else if (type === 'ok') { + btnType = 'info'; + } else if (type === 'cancel') { + btnType = 'error'; + } + Lobibox.notify(btnType, { + size: 'mini', + msg: 'This is ' + btnType + ' message' + }); + } +}); + +// confirm +Lobibox.confirm({ + msg: "Are you ok", +}); + +// prompt +Lobibox.prompt("text", { + title: 'Please enter username', + //Attributes of + attrs: { + placeholder: "Username" + } +}); + +// progress +Lobibox.progress({ + title: 'Please wait', + label: 'Uploading files...', + onShow: function ($this) { + var i = 0; + var inter = setInterval(function () { + window.console.log(i); + if (i > 100) { + clearInterval(inter); + } + i = i + 0.1; + $this.setProgress(i); + }, 10); + } +}); + +// window +Lobibox.window({ + title: 'Window title', + //Available types: string, jquery object, function + content: function () { + return $('.container'); + }, + url: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.css', + autoload: false, + loadMethod: 'GET', + //Load parameters + params: { + param1: 'Lorem', + param2: 'Ipsum' + }, + buttons: { + load: { + text: 'Load from url' + }, + close: { + text: 'Close', + closeOnClick: true + } + }, + callback: function ($this, type, ev) { + if (type === 'load') { + $this.load(function () { + //Do something when content is loaded + }); + } + } +}); From 53fba494cd604075a86f161829963ca08871f213 Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Sun, 22 Nov 2015 22:54:34 +0500 Subject: [PATCH 03/11] added definations for lobibox --- lobibox/lobibox.d.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lobibox/lobibox.d.ts b/lobibox/lobibox.d.ts index 3ae7ebaef..a68be8368 100644 --- a/lobibox/lobibox.d.ts +++ b/lobibox/lobibox.d.ts @@ -38,13 +38,13 @@ declare module LobiboxModule { // events // when messagebox show is called but before it is actually shown - onShow? (lobibox:LobiboxStatic): void ; + onShow? (lobibox:any): void ; // after messagebox is shown - shown? (lobibox:LobiboxStatic): void; + shown? (lobibox:any): void; // when messagebox remove method is called but before it is actually hidden - beforeClose? (lobibox:LobiboxStatic): void; + beforeClose? (lobibox:any): void; // after messagebox is hidden - closed? (lobibox:LobiboxStatic): void; + closed? (lobibox:any): void; } interface MessageBoxesOptions extends MessageBoxesDefault { @@ -81,7 +81,8 @@ declare module LobiboxModule { 'class'?: string, text?: string, closeOnClick?: boolean - } + }, + custom?: any, }; callback? (lobibox:any, type:string); } From 924aba24b25b21f9c38f2b8c65a201eaf5584927 Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Sun, 22 Nov 2015 23:38:23 +0500 Subject: [PATCH 04/11] definitions for lobibox errors fixed --- lobibox/lobibox.d.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lobibox/lobibox.d.ts b/lobibox/lobibox.d.ts index a68be8368..2a951451f 100644 --- a/lobibox/lobibox.d.ts +++ b/lobibox/lobibox.d.ts @@ -82,9 +82,8 @@ declare module LobiboxModule { text?: string, closeOnClick?: boolean }, - custom?: any, - }; - callback? (lobibox:any, type:string); + }|any; + callback? (lobibox:any, type:string, ev: any): void; } interface ConfirmOptions extends MessageBoxesOptions { title? : string; @@ -132,7 +131,7 @@ declare module LobiboxModule { interface WindowOptions extends MessageBoxesOptions { width? : number; height? : any; - content? : string; // HTML Content of window + content? : any; // HTML Content of window url? : string; // URL which will be used to load content draggable? : boolean; // Override default option autoload? : boolean; // Auto load from given url when window is created @@ -183,16 +182,16 @@ declare module LobiboxModule { } interface NotifyMethods { - remove? (); + remove? (): any; } interface LobiboxStatic { base: {OPTIONS: MessageBoxesOptions, DEFAULTS: MessageBoxesDefault}; - alert: {(type: string, options?: AlertOptions), DEFAULTS: AlertOptions}; - prompt: {(type: string, options?: PromptOptions), DEFAULTS: PromptOptions}; - confirm: {(options?: ConfirmOptions), DEFAULTS: ConfirmOptions}; - progress: {(options: ProgressOptions), DEFAULTS: ProgressOptions}; - window: {(options: WindowOptions), DEFAULTS: WindowOptions}; - notify: {(type: string, options?: NotifyOptions), DEFAULTS?: NotifyDefault,OPTIONS?:NotifyOptions}; + alert: {(type: string, options?: T): LobiboxStatic, DEFAULTS: AlertOptions}; + prompt: {(type: string, options?: T): LobiboxStatic, DEFAULTS: PromptOptions}; + confirm: {(options?: ConfirmOptions): T, DEFAULTS: ConfirmOptions}; + progress: {(options: ProgressOptions): T, DEFAULTS: ProgressOptions}; + window: {(options: WindowOptions): T, DEFAULTS: WindowOptions}; + notify: {(type: string, options?: NotifyOptions): T, DEFAULTS?: NotifyDefault,OPTIONS?:NotifyOptions}; } } From 2440326118730fd8ec352217dc43cd6688955eb0 Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Sun, 22 Nov 2015 23:39:01 +0500 Subject: [PATCH 05/11] lobibox test code updated --- lobibox/lobibox.js-test.ts | 224 +++++++++++++++++++------------------ 1 file changed, 114 insertions(+), 110 deletions(-) diff --git a/lobibox/lobibox.js-test.ts b/lobibox/lobibox.js-test.ts index 4a14edf47..6060ac175 100644 --- a/lobibox/lobibox.js-test.ts +++ b/lobibox/lobibox.js-test.ts @@ -5,130 +5,134 @@ /// //extending default parameters -Lobibox.notify.DEFAULTS = $.extend({}, Lobibox.notify.DEFAULTS, { - //override any options from default options - delay: false, - soundPath: '/libraries/lobibox/sounds/', - size: 'mini' -}); +class LobiboxTest { + static test() { + Lobibox.notify.DEFAULTS = $.extend({}, Lobibox.notify.DEFAULTS, { + //override any options from default options + delay: false, + soundPath: '/libraries/lobibox/sounds/', + size: 'mini' + }); // notify -Lobibox.notify("error", {msg: "Hello world"}); -Lobibox.notify("success", {msg: "Hello world"}); -Lobibox.notify("warning", {msg: "Hello world"}); -Lobibox.notify("info", {msg: "Hello world"}); + Lobibox.notify("error", {msg: "Hello world"}); + Lobibox.notify("success", {msg: "Hello world"}); + Lobibox.notify("warning", {msg: "Hello world"}); + Lobibox.notify("info", {msg: "Hello world"}); // alert -Lobibox.alert("error", {msg: "Hello world"}); -Lobibox.alert("success", {msg: "Hello world"}); -Lobibox.alert("warning", {msg: "Hello world"}); -Lobibox.alert("info", {msg: "Hello world"}); + Lobibox.alert("error", {msg: "Hello world"}); + Lobibox.alert("success", {msg: "Hello world"}); + Lobibox.alert("warning", {msg: "Hello world"}); + Lobibox.alert("info", {msg: "Hello world"}); //alert with more options -Lobibox.alert('error', { - msg: 'This is an error message', - //buttons: ['ok', 'cancel', 'yes', 'no'], - //Or more powerfull way - buttons: { - ok: { - 'class': 'btn btn-info', - closeOnClick: false - }, - cancel: { - 'class': 'btn btn-danger', - closeOnClick: false - }, - yes: { - 'class': 'btn btn-success', - closeOnClick: false - }, - no: { - 'class': 'btn btn-warning', - closeOnClick: false - }, - custom: { - 'class': 'btn btn-default', - text: 'Custom' - } - }, - callback: function (lobibox, type) { - var btnType; - if (type === 'no') { - btnType = 'warning'; - } else if (type === 'yes') { - btnType = 'success'; - } else if (type === 'ok') { - btnType = 'info'; - } else if (type === 'cancel') { - btnType = 'error'; - } - Lobibox.notify(btnType, { - size: 'mini', - msg: 'This is ' + btnType + ' message' + Lobibox.alert('error', { + msg: 'This is an error message', + //buttons: ['ok', 'cancel', 'yes', 'no'], + //Or more powerfull way + buttons: { + ok: { + 'class': 'btn btn-info', + closeOnClick: false + }, + cancel: { + 'class': 'btn btn-danger', + closeOnClick: false + }, + yes: { + 'class': 'btn btn-success', + closeOnClick: false + }, + no: { + 'class': 'btn btn-warning', + closeOnClick: false + }, + custom: { + 'class': 'btn btn-default', + text: 'Custom' + } + }, + callback: function (lobibox, type) { + var btnType; + if (type === 'no') { + btnType = 'warning'; + } else if (type === 'yes') { + btnType = 'success'; + } else if (type === 'ok') { + btnType = 'info'; + } else if (type === 'cancel') { + btnType = 'error'; + } + Lobibox.notify(btnType, { + size: 'mini', + msg: 'This is ' + btnType + ' message' + }); + } }); - } -}); // confirm -Lobibox.confirm({ - msg: "Are you ok", -}); + Lobibox.confirm({ + msg: "Are you ok", + }); // prompt -Lobibox.prompt("text", { - title: 'Please enter username', - //Attributes of - attrs: { - placeholder: "Username" - } -}); + Lobibox.prompt("text", { + title: 'Please enter username', + //Attributes of + attrs: { + placeholder: "Username" + } + }); // progress -Lobibox.progress({ - title: 'Please wait', - label: 'Uploading files...', - onShow: function ($this) { - var i = 0; - var inter = setInterval(function () { - window.console.log(i); - if (i > 100) { - clearInterval(inter); + Lobibox.progress({ + title: 'Please wait', + label: 'Uploading files...', + onShow: function ($this) { + var i = 0; + var inter = setInterval(function () { + window.console.log(i); + if (i > 100) { + clearInterval(inter); + } + i = i + 0.1; + $this.setProgress(i); + }, 10); } - i = i + 0.1; - $this.setProgress(i); - }, 10); - } -}); + }); // window -Lobibox.window({ - title: 'Window title', - //Available types: string, jquery object, function - content: function () { - return $('.container'); - }, - url: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.css', - autoload: false, - loadMethod: 'GET', - //Load parameters - params: { - param1: 'Lorem', - param2: 'Ipsum' - }, - buttons: { - load: { - text: 'Load from url' - }, - close: { - text: 'Close', - closeOnClick: true - } - }, - callback: function ($this, type, ev) { - if (type === 'load') { - $this.load(function () { - //Do something when content is loaded - }); - } + Lobibox.window({ + title: 'Window title', + //Available types: string, jquery object, function + content: function () { + return $('.container'); + }, + url: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.css', + autoload: false, + loadMethod: 'GET', + //Load parameters + params: { + param1: 'Lorem', + param2: 'Ipsum' + }, + buttons: { + load: { + text: 'Load from url' + }, + close: { + text: 'Close', + closeOnClick: true + } + }, + callback: function ($this, type, ev) { + if (type === 'load') { + $this.load(function () { + //Do something when content is loaded + }); + } + } + }); } -}); +} From 8b698cb8bb9f94b34168f613afe9cf171d69e65f Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Sun, 22 Nov 2015 23:48:55 +0500 Subject: [PATCH 06/11] updated lobibox test code --- lobibox/lobibox.js-test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lobibox/lobibox.js-test.ts b/lobibox/lobibox.js-test.ts index 6060ac175..b4fea7a14 100644 --- a/lobibox/lobibox.js-test.ts +++ b/lobibox/lobibox.js-test.ts @@ -1,12 +1,14 @@ /** * Created by itboy on 11/22/2015. */ - /// + /// /// - //extending default parameters + // run test by calling + // LobiboxTest.test(); class LobiboxTest { static test() { + //extending default parameters Lobibox.notify.DEFAULTS = $.extend({}, Lobibox.notify.DEFAULTS, { //override any options from default options delay: false, From 52b9b36e5dd45a8d58b43b4e4b3d0be6b59d90ee Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Sun, 22 Nov 2015 23:59:47 +0500 Subject: [PATCH 07/11] updated lobibox test code --- lobibox/lobibox.js-test.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lobibox/lobibox.js-test.ts b/lobibox/lobibox.js-test.ts index b4fea7a14..bd0ff33d2 100644 --- a/lobibox/lobibox.js-test.ts +++ b/lobibox/lobibox.js-test.ts @@ -4,11 +4,11 @@ /// /// - // run test by calling - // LobiboxTest.test(); + + //Run test : LobiboxTest.test() class LobiboxTest { static test() { - //extending default parameters + // extending default parameters Lobibox.notify.DEFAULTS = $.extend({}, Lobibox.notify.DEFAULTS, { //override any options from default options delay: false, @@ -55,8 +55,8 @@ class LobiboxTest { text: 'Custom' } }, - callback: function (lobibox, type) { - var btnType; + callback: function (lobibox:any, type:string):any { + let btnType:string = ""; if (type === 'no') { btnType = 'warning'; } else if (type === 'yes') { @@ -91,9 +91,9 @@ class LobiboxTest { Lobibox.progress({ title: 'Please wait', label: 'Uploading files...', - onShow: function ($this) { + onShow: function ($this:any):void { var i = 0; - var inter = setInterval(function () { + var inter = setInterval(function ():void { window.console.log(i); if (i > 100) { clearInterval(inter); @@ -108,7 +108,7 @@ class LobiboxTest { Lobibox.window({ title: 'Window title', //Available types: string, jquery object, function - content: function () { + content: function ():any { return $('.container'); }, url: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.css', @@ -128,9 +128,9 @@ class LobiboxTest { closeOnClick: true } }, - callback: function ($this, type, ev) { + callback: function ($this:any, type:string, ev:any):void { if (type === 'load') { - $this.load(function () { + $this.load(function ():any { //Do something when content is loaded }); } From e020d6b8a1a7c30d1678e2b75cd3ed15e95ae37b Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Mon, 23 Nov 2015 00:00:11 +0500 Subject: [PATCH 08/11] definitions for lobibox errors fixed --- lobibox/lobibox.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lobibox/lobibox.d.ts b/lobibox/lobibox.d.ts index 2a951451f..d8a7588d5 100644 --- a/lobibox/lobibox.d.ts +++ b/lobibox/lobibox.d.ts @@ -83,7 +83,7 @@ declare module LobiboxModule { closeOnClick?: boolean }, }|any; - callback? (lobibox:any, type:string, ev: any): void; + callback? (lobibox:any, type?:string, ev?: any): void; } interface ConfirmOptions extends MessageBoxesOptions { title? : string; From 3ea58099e4095399e4c1c79177876637dd3bbf99 Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Fri, 27 Nov 2015 08:38:28 +0500 Subject: [PATCH 09/11] test updated and file renamed --- lobibox/{lobibox.js-test.ts => lobibox.js-tests.ts} | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) rename lobibox/{lobibox.js-test.ts => lobibox.js-tests.ts} (97%) diff --git a/lobibox/lobibox.js-test.ts b/lobibox/lobibox.js-tests.ts similarity index 97% rename from lobibox/lobibox.js-test.ts rename to lobibox/lobibox.js-tests.ts index bd0ff33d2..c5fe295a8 100644 --- a/lobibox/lobibox.js-test.ts +++ b/lobibox/lobibox.js-tests.ts @@ -5,7 +5,7 @@ /// - //Run test : LobiboxTest.test() + //Run test : LobiboxTest.test() after window load event class LobiboxTest { static test() { // extending default parameters @@ -138,3 +138,7 @@ class LobiboxTest { }); } } + +window.onload = (): void => { + Notify.error("test"); +}; From 33663d7a9ff040cbe309c8607c0e540adeaaca71 Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Fri, 27 Nov 2015 08:41:41 +0500 Subject: [PATCH 10/11] test updated and file renamed --- lobibox/lobibox.js-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lobibox/lobibox.js-tests.ts b/lobibox/lobibox.js-tests.ts index c5fe295a8..78637114a 100644 --- a/lobibox/lobibox.js-tests.ts +++ b/lobibox/lobibox.js-tests.ts @@ -140,5 +140,5 @@ class LobiboxTest { } window.onload = (): void => { - Notify.error("test"); + LobiboxTest.test(); }; From 59917025e03fac6bafdbcbfe5555c42ff8b3570e Mon Sep 17 00:00:00 2001 From: Sabeeh Ul Hussnain Date: Tue, 8 Dec 2015 22:33:30 +0500 Subject: [PATCH 11/11] file renamed --- lobibox/{lobibox.js-tests.ts => lobibox-tests.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lobibox/{lobibox.js-tests.ts => lobibox-tests.ts} (100%) diff --git a/lobibox/lobibox.js-tests.ts b/lobibox/lobibox-tests.ts similarity index 100% rename from lobibox/lobibox.js-tests.ts rename to lobibox/lobibox-tests.ts