From 0dfc96c879fd3f51884aeac15b2d20f3ab3110cb Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Mon, 12 May 2014 12:23:18 +0200 Subject: [PATCH 1/5] Update CONTRIBUTORS.md Added ocLazyLoad entry --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 74c0363b0..52d08fd66 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -221,6 +221,7 @@ All definitions files include a header with the author and editors, so at some p * [notify.js](https://github.com/alexgibson/notify.js) (by [soundTricker](https://github.com/soundTricker)) * [NProgress](https://github.com/rstacruz/nprogress) (by [Judah Gabriel Himango](https://github.com/judahgabriel)) * [Numeral.js](https://github.com/adamwdraper/Numeral-js) (by [Vincent Bortone](https://github.com/vbortone/)) +* [ocLazyLoad](https://github.com/ocombe/ocLazyLoad) (by [Roland Zwaga](https://github.com/rolandzwaga/)) * [OpenLayers](https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/)) * [Optimist](https://github.com/substack/node-optimist) (by [Carlos Ballesteros Velasco](https://github.com/soywiz)) * [Passport](http://passportjs.org/) (by [Hiroki Horiuchi](https://github.com/horiuchi/)) From a27ca9eadb45ddec2b3228f451ed881ab8b4b42a Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Mon, 12 May 2014 12:24:24 +0200 Subject: [PATCH 2/5] Update CONTRIBUTORS.md removed oclazyload again (wrong branch) --- CONTRIBUTORS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 52d08fd66..74c0363b0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -221,7 +221,6 @@ All definitions files include a header with the author and editors, so at some p * [notify.js](https://github.com/alexgibson/notify.js) (by [soundTricker](https://github.com/soundTricker)) * [NProgress](https://github.com/rstacruz/nprogress) (by [Judah Gabriel Himango](https://github.com/judahgabriel)) * [Numeral.js](https://github.com/adamwdraper/Numeral-js) (by [Vincent Bortone](https://github.com/vbortone/)) -* [ocLazyLoad](https://github.com/ocombe/ocLazyLoad) (by [Roland Zwaga](https://github.com/rolandzwaga/)) * [OpenLayers](https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/)) * [Optimist](https://github.com/substack/node-optimist) (by [Carlos Ballesteros Velasco](https://github.com/soywiz)) * [Passport](http://passportjs.org/) (by [Hiroki Horiuchi](https://github.com/horiuchi/)) From 2f7080ea0533da583bdd4d58c8e296552261be5a Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Sat, 14 Jun 2014 17:52:32 +0200 Subject: [PATCH 3/5] fixed $setValidity() signature. --- angularjs/angular.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index ec8c5cb5b..92a02eef8 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -203,6 +203,7 @@ declare module ng { $error: any; $addControl(control: ng.INgModelController): void; $removeControl(control: ng.INgModelController): void; + $setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void; $setDirty(): void; $setPristine(): void; } @@ -302,13 +303,17 @@ declare module ng { // WindowService // see http://docs.angularjs.org/api/ng.$window /////////////////////////////////////////////////////////////////////////// - interface IWindowService extends Window {} + interface IWindowService extends Window { + [key: string]: any; + } /////////////////////////////////////////////////////////////////////////// // BrowserService // TODO undocumented, so we need to get it from the source code /////////////////////////////////////////////////////////////////////////// - interface IBrowserService {} + interface IBrowserService { + [key: string]: any; + } /////////////////////////////////////////////////////////////////////////// // TimeoutService From 626a765e5c996dd226c7732d0edbd64aa16a517b Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Sun, 15 Jun 2014 12:21:55 +0200 Subject: [PATCH 4/5] Added definitions and tests for timelinejs (https://github.com/NUKnightLab/TimelineJS) --- timelinejs/timelinejs-tests.ts | 41 ++++++++++ timelinejs/timelinejs.d.ts | 136 +++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 timelinejs/timelinejs-tests.ts create mode 100644 timelinejs/timelinejs.d.ts diff --git a/timelinejs/timelinejs-tests.ts b/timelinejs/timelinejs-tests.ts new file mode 100644 index 000000000..da6aef966 --- /dev/null +++ b/timelinejs/timelinejs-tests.ts @@ -0,0 +1,41 @@ +/** + * Created by Roland on 6/15/2014. + */ +/// + +var timelineSource:knightlab.ITimelineModel = { + timeline: { + headline: 'Test Headline', + type: 'default', + text: 'Test Text', + asset: { + media: 'http://www.vertex42.com/ExcelArticles/Images/timeline/Timeline-for-Benjamin-Franklin.gif', + credit: 'http://www.vertex42.com', + caption: 'Test Caption' + }, + date: [ + { + startDate: '2011,12,09', + endDate: '2011,12,10', + headline: 'Test Date Headline', + text: 'Test test test test' + }, + { + startDate: '2012,12,09', + endDate: '2012,12,10', + headline: 'Test Date Headline 2', + text: 'Test2 test2 test2 test2' + } + ] + } +}; + +var source:knightlab.ITimeLineConfiguration = { + width: '100%', + height: '100%', + type: 'timeline', + embed_id: 'test', + source: timelineSource +}; + +createStoryJS(source); \ No newline at end of file diff --git a/timelinejs/timelinejs.d.ts b/timelinejs/timelinejs.d.ts new file mode 100644 index 000000000..6101b93aa --- /dev/null +++ b/timelinejs/timelinejs.d.ts @@ -0,0 +1,136 @@ +// Type definitions for timelinejs +// Project: https://github.com/NUKnightLab/TimelineJS +// Definitions by: Roland Zwaga +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare function createStoryJS(config:knightlab.ITimeLineConfiguration):void; + +declare module knightlab { + + export interface ITimeLineConfiguration { + width: string; + height: string; + /* + * path to json/ or link to googlespreadsheet + * source Should be either the path to the JSON resource to load, or a JavaScript object corresponding to the + * Timeline model. + * + * Here is an example using a data object: + * + * var dataObject = {timeline: {headline: "Headline", type: ... }} + * createStoryJS({ + * type: 'timeline', + * width: '800', + * height: '600', + * source: dataObject, + * embed_id: 'my-timeline' + * }); + * If source is a string, we will try to automatically recognize resources that are Twitter searches, Google + * Spreadsheets or Storify stories. Failing that, we assume the source is either JSON or JSONP. If string + * matches on .jsonp, we will treat it as JSONP, otherwise, we will append ?callback=onJSONP_Data. + */ + source: any; + type?: string; + /* + * Optional use a different div id for embed + */ + embed_id?: string; + /* + * Optional start at latest date + */ + start_at_end?: boolean; + /* + * Optional start at specific slide + */ + start_at_slide?: string; + /* + * Optional tweak the default zoom level + */ + start_zoom_adjust?: string; + /* + * Optional location bar hashes + */ + hash_bookmark?: boolean; + /* + * Optional font + */ + font?: string; + /* + * Optional debug to console + */ + debug?: boolean; + /* + * Optional language + */ + lang?: string; + /* + * Optional path to css + */ + css?: string; + /* + * Optional path to js + */ + js?: string; + /* + * required in order to use maptype + */ + gmap_key?: string; + /* + * Stamen Maps: + * toner + * toner-lines + * toner-labels + * watercolor + * sterrain + * + * Google Maps: + * ROADMAP + * TERRAIN + * HYBRID + * SATELLITE + * + * OpenStreetMap: + * osm + */ + maptype?: string; + } + + export interface ITimelineModel { + timeline:ITimeLine; + } + + export interface ITimeLine { + headline?:string; + type?:string; + text?:string; + asset?:ITimeLineAsset; + date?:ITimelineDate[]; + era?:ITimelineEra[]; + } + + export interface ITimeLineAsset { + media:string; + thumbnail?:string; + credit:string; + caption:string; + } + + export interface ITimelineDate extends ITimelineEra { + classname?:string; + asset?:ITimeLineAsset; + } + + export interface ITimelineEra { + /* + * format example: 2011,12,10 + */ + startDate:string; + /* + * format example: 2011,12,10 + */ + endDate:string; + headline:string; + text:string; + tag?:string; + } +} \ No newline at end of file From 8f4bfa0a9acf61dd79611104ed6285dcaf4abfb4 Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Sun, 15 Jun 2014 12:24:44 +0200 Subject: [PATCH 5/5] Added entry for TimelineJS --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4c2fbc8e1..9e0c76e96 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -301,6 +301,7 @@ All definitions files include a header with the author and editors, so at some p * [Teechart](http://www.steema.com) (by [Steema](http://www.steema.com)) * [text-buffer](https://github.com/atom/text-buffer) (by [vvakame](https://github.com/vvakame)) * [three.js](http://mrdoob.github.com/three.js/) (by [Kon](http://phyzkit.net/)) +* [TimelineJS](https://github.com/NUKnightLab/TimelineJS) (by [Roland Zwaga](https://github.com/rolandzwaga)) * [Toastr](https://github.com/CodeSeven/toastr) (by [Boris Yankov](https://github.com/borisyankov)) * [trunk8](https://github.com/rviscomi/trunk8) (by [Blake Niemyjski](https://github.com/niemyjski)) * [TweenJS](http://www.createjs.com/#!/TweenJS) (by [Pedro Ferreira](https://bitbucket.org/drk4))