├── css ├── forms.css ├── smoothness │ ├── images │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ └── jquery-ui-1.8.14.custom.css ├── style.css ├── tasks.css └── main.css ├── js ├── .idea │ ├── .name │ ├── encodings.xml │ ├── vcs.xml │ ├── modules.xml │ ├── js.iml │ ├── misc.xml │ └── workspace.xml ├── angular-services.js ├── angular-formatters.js ├── lib │ ├── jquery.maskedinput-1.3.min.js │ ├── date.format.js │ ├── jquery.maskedinput-1.3.js │ ├── underscore-min.js │ └── jquery.xcolor.js └── angular-widgets.js ├── images └── stars.png ├── index.html ├── json └── employees.json ├── docs ├── widgets.html └── widgets │ ├── map.html │ ├── enter.html │ ├── button.html │ ├── progress.html │ ├── emblem.html │ ├── masked.html │ ├── datepicker.html │ ├── toggle.html │ ├── autocomplete.html │ └── selectable.html └── angular-contrib.sublime-project /css/forms.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/.idea/.name: -------------------------------------------------------------------------------- 1 | js -------------------------------------------------------------------------------- /images/stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/images/stars.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twarogowski/angular-contrib/HEAD/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /js/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /js/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /js/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /js/.idea/js.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /js/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | http://www.w3.org/1999/xhtml 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | angular tests 5 | 6 | 7 | 8 |

angular tests

9 | 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /json/employees.json: -------------------------------------------------------------------------------- 1 | [{id:1, firstName: 'Łukasz', lastName: 'Twarogowski'}, 2 | {id:2, firstName: 'Aleksander', lastName: 'Barnaś'}, 3 | {id:3, firstName: 'Marcin', lastName: 'Wasilewicz'}, 4 | {id:4, firstName: 'Paweł', lastName: 'Poradzki'}, 5 | {id:5, firstName: 'Radek', lastName: 'Tereszczuk'}, 6 | {id:6, firstName: 'Paweł', lastName: 'Twarogowski'}, 7 | {id:7, firstName: 'Tomasz', lastName: 'Wacławski'}, 8 | {id:8, firstName: 'Arek', lastName: 'Gembara'}, 9 | {id:9, firstName: 'Jakub', lastName: 'Ciołkowski'}] -------------------------------------------------------------------------------- /docs/widgets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | angular widgets 5 | 6 | 7 | 8 |

angular widgets

9 | 10 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 0px; 3 | margin:0px; 4 | font: 16px Verdana, Helvetica, Arial, sans-serif; 5 | } 6 | 7 | a 8 | { 9 | padding:0px 3px; 10 | color: #333333; 11 | background-color:#eeeeee; 12 | border:solid 1px #dddddd; 13 | text-decoration:none; 14 | } 15 | 16 | a:hover 17 | { 18 | color: #000000; 19 | background-color:#dddddd; 20 | border:solid 1px #bbbbbb; 21 | } 22 | 23 | div#header 24 | { 25 | background-color:#dddddd; 26 | margin:0px; 27 | padding:0px 15px; 28 | } 29 | 30 | div#subheader 31 | { 32 | background-color:#eeeeee; 33 | padding:0px 15px; 34 | margin:0px; 35 | margin-top:-21px; 36 | color:#999999; 37 | } 38 | 39 | div#content 40 | { 41 | padding:15px; 42 | } 43 | 44 | div#footer 45 | { 46 | position:fixed; 47 | bottom:0px; 48 | width:100%; 49 | background-color:#dddddd; 50 | text-align:center; 51 | font-size:10px; 52 | color:#888888; 53 | line-height:1.4em; 54 | opacity:.6; 55 | 56 | } 57 | 58 | h1, h3 59 | { 60 | line-height:1.6em; 61 | } 62 | 63 | table.grid, table.grid tr td 64 | { 65 | border: solid 1px #999999; 66 | border-collapse:collapse; 67 | padding:3px; 68 | } 69 | 70 | table.grid tr th 71 | { 72 | background-color:#eeeeee; 73 | text-align:center; 74 | font-weight:bold; 75 | border: solid 1px #000000; 76 | border-collapse:collapse; 77 | 78 | } 79 | 80 | -------------------------------------------------------------------------------- /docs/widgets/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:map widget 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

ui:map widget

18 | 19 |
map1
20 | 21 | 22 |
map1
23 | 24 | 25 |
map2
26 | 27 | 28 |
29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/widgets/enter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:enter directive 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 43 | 44 | 45 |

ui:enter directive

46 | 47 | alert1: 48 | 49 | list: 50 |
51 | {{i.name}} x 52 | 53 |
54 | 55 | 56 |
57 |
58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /js/angular-services.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The MIT License 3 | * 4 | * Copyright (c) 2011 Łukasz Twarogowski, Axiom Computing, axiomcomputing.pl 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | 26 | 27 | // autocompletePresets service 28 | // simple service for storing options (presets for different ui:autocomplete instances 29 | // methods: 30 | // get(name) - gets a preset object for a given name 31 | // add(options) - merges current presets with given argument 32 | // add(name, opt1, opt2, ...) - adds a new set of options for a given name. opt_ parameters may be a string 33 | // (refering to another preset by its name) or an object graph. all opt_ parameters are merged. 34 | angular.service('autocompletePresets', function() { 35 | var presets = {}; 36 | return { 37 | add: function(name){ 38 | if(!arguments.length) 39 | return; 40 | else if(arguments.length == 1 && angular.isObject(name)) 41 | $.extend(presets, name); 42 | else if(arguments.length > 1){ 43 | var preset = {}, obj; 44 | for (var i = 1; i < arguments.length; i++) { 45 | if(angular.isObject(arguments[i])) 46 | obj = arguments[i]; 47 | else if(angular.isString(arguments[i])) 48 | obj = this.get(arguments[i]) || {}; 49 | $.extend(preset, obj); 50 | }; 51 | presets[name] = preset; 52 | } 53 | }, 54 | get: function(name){ 55 | if(!name) 56 | return null; 57 | return presets[name]; 58 | } 59 | }; 60 | }); -------------------------------------------------------------------------------- /docs/widgets/button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:button widget 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 33 | 34 | 35 |

ui:button widget

36 | 37 |
38 | a button 39 | another button 40 | icon button 41 | another icon button 42 | 43 | two icons button 44 | 45 |
46 |
47 | disabled button: another icon button 48 |
49 | 50 | button list: 51 |
52 | {{i}} 53 |
54 | 55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/widgets/progress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:progress widget 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 40 | 41 | 42 |

ui:progress widget

43 |
prg1 44 | 45 | 46 |
47 |
prg2 48 | 49 | 50 |
51 |
prg3 52 | 53 | 54 |
55 |
56 |
57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /js/angular-formatters.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The MIT License 3 | * 4 | * Copyright (c) 2011 Łukasz Twarogowski, Axiom Computing, axiomcomputing.pl 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | 26 | 27 | // for testing only: shows in a bound datepicker a year ahead from given date 28 | angular.formatter('nextYear', { 29 | parse: function(value){ 30 | var v = new Date(value.valueOf()); 31 | v.setYear(v.getFullYear()-1); 32 | return v; 33 | }, 34 | format: function(value){ 35 | var v = new Date(value.valueOf()); 36 | v.setYear(v.getFullYear()+1); 37 | return v; 38 | } 39 | }); 40 | 41 | // for testing only: displays in a bound datepicker a date with a specified amount of months added to it 42 | angular.formatter('addDate', { 43 | parse: function(value, years, months, days){ 44 | var v = new Date(value.getFullYear() - parseFloat(years || 0), value.getMonth() - parseFloat(months || 0), value.getDate() - parseFloat(days || 0)); 45 | return v 46 | }, 47 | format: function(value, years, months, days){ 48 | var v = new Date(value.getFullYear() + parseFloat(years || 0), value.getMonth() + parseFloat(months || 0), value.getDate() + parseFloat(days || 0)); 49 | return v 50 | } 51 | }); 52 | 53 | angular.formatter('addNumber', { 54 | parse: function(value, number){ 55 | return value + number; 56 | }, 57 | format: function(value, number){ 58 | return value - number; 59 | } 60 | }); 61 | 62 | angular.formatter('emblem', { 63 | parse: function(value, symbol){ 64 | return value == (symbol || ''); 65 | }, 66 | format: function(value, symbol){ 67 | return value ? symbol : ''; 68 | } 69 | }); 70 | 71 | angular.formatter('not', { 72 | parse: function(value){ 73 | return !(value || false); 74 | }, 75 | format: function(value){ 76 | return !(value || false); 77 | } 78 | }); -------------------------------------------------------------------------------- /docs/widgets/emblem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:emblem widget 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

ui:emblem widget

17 | 18 |
star1
19 | 20 |
excl1
21 | 22 |
stars2
23 | 24 |
stars4
25 | 26 |
all1
27 | 28 |
29 | 30 |
star1
31 | 32 |
excl1
33 | 34 |
stars2
35 | 36 |
stars4
37 | 38 |
all1
39 | 40 |
41 | 42 |
isStarred1
43 | 44 |
isEmpty1
45 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /js/lib/jquery.maskedinput-1.3.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Masked Input plugin for jQuery 3 | Copyright (c) 2007-2011 Josh Bush (digitalbush.com) 4 | Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) 5 | Version: 1.3 6 | */ 7 | (function(a){var b=(a.browser.msie?"paste":"input")+".mask",c=window.orientation!=undefined;a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn"},a.fn.extend({caret:function(a,b){if(this.length!=0){if(typeof a=="number"){b=typeof b=="number"?b:a;return this.each(function(){if(this.setSelectionRange)this.setSelectionRange(a,b);else if(this.createTextRange){var c=this.createTextRange();c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select()}})}if(this[0].setSelectionRange)a=this[0].selectionStart,b=this[0].selectionEnd;else if(document.selection&&document.selection.createRange){var c=document.selection.createRange();a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length}return{begin:a,end:b}}},unmask:function(){return this.trigger("unmask")},mask:function(d,e){if(!d&&this.length>0){var f=a(this[0]);return f.data(a.mask.dataName)()}e=a.extend({placeholder:"_",completed:null},e);var g=a.mask.definitions,h=[],i=d.length,j=null,k=d.length;a.each(d.split(""),function(a,b){b=="?"?(k--,i=a):g[b]?(h.push(new RegExp(g[b])),j==null&&(j=h.length-1)):h.push(null)});return this.trigger("unmask").each(function(){function v(a){var b=f.val(),c=-1;for(var d=0,g=0;db.length)break}else l[d]==b.charAt(g)&&d!=i&&(g++,c=d);if(!a&&c+1=i)u(),a||f.val(f.val().substring(0,c+1));return i?d:j}function u(){return f.val(l.join("")).val()}function t(a,b){for(var c=a;c=k&&e.completed.call(f)}}return!1}}function r(a){var b=a.which;if(b==8||b==46||c&&b==127){var d=f.caret(),e=d.begin,g=d.end;g-e==0&&(e=b!=46?o(e):g=n(e-1),g=b==46?n(g):g),t(e,g),p(e,g-1);return!1}if(b==27){f.val(m),f.caret(0,v());return!1}}function q(a){for(var b=a,c=e.placeholder;b=0&&!h[a]);return a}function n(a){while(++a<=k&&!h[a]);return a}var f=a(this),l=a.map(d.split(""),function(a,b){if(a!="?")return g[a]?e.placeholder:a}),m=f.val();f.data(a.mask.dataName,function(){return a.map(l,function(a,b){return h[b]&&a!=e.placeholder?a:null}).join("")}),f.attr("readonly")||f.one("unmask",function(){f.unbind(".mask").removeData(a.mask.dataName)}).bind("focus.mask",function(){m=f.val();var b=v();u();var c=function(){b==d.length?f.caret(0,b):f.caret(b)};(a.browser.msie?c:function(){setTimeout(c,0)})()}).bind("blur.mask",function(){v(),f.val()!=m&&f.change()}).bind("keydown.mask",r).bind("keypress.mask",s).bind(b,function(){setTimeout(function(){f.caret(v(!0))},0)}),v()})}})})(jQuery) -------------------------------------------------------------------------------- /docs/widgets/masked.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:masked widget 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 33 | 44 | 45 | 46 |

ui:masked widget

47 | 48 |
msk1 [9999]: 49 |
50 | 51 |
msk1a [9999] - allow invalid: 52 |
53 | 54 |
msk2 [999-999-999]: 55 |
56 | 57 |
msk3 [(99) 999-999-999? / 999]: 58 |
59 | 60 |
msk4 [aaaa]: 61 |
62 | 63 |
msk5 [aaa999999]: 64 |
65 | 66 | 67 |
68 |
69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /docs/widgets/datepicker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:datepicker widget 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 31 | 32 | 33 | 34 |

ui:datepicker widget

35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
49 |
50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/widgets/toggle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:toggle widget 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 28 | 29 | 30 |

ui:toggle widget

31 | 32 | 33 |
34 | a button 35 | 36 |
37 | 38 |
39 | another button 40 | 41 |
42 | 43 |
44 | icon button 45 | 46 |
47 | 48 |
49 | another icon button 50 | 51 |
52 | 53 |
54 | 55 | 56 |
57 | 58 |
59 | two icons button 60 | 61 |
62 |
63 | inversion: 64 |
65 | check me 66 | uncheck me 67 | 68 |
69 | 70 |
71 |
72 | disabled toggle: another icon button 73 | 74 |
75 | 76 |
77 | simple list: 78 |
79 | 80 | press 81 | 82 | 83 |
84 |
85 |
86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /css/tasks.css: -------------------------------------------------------------------------------- 1 | .ui-widget { 2 | font-family: Verdana,Arial,sans-serif; 3 | font-size: .7em; 4 | } 5 | 6 | body{ 7 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 8 | } 9 | 10 | 11 | input, textarea{ 12 | border:1px solid #888888; 13 | -webkit-border-radius: 3px; 14 | -khtml-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | padding:4px; 18 | } 19 | 20 | input:focus, textarea:focus { 21 | outline:none; 22 | border-color:#7eaadd; 23 | box-shadow:0 0 10px #9ecaed; 24 | } 25 | 26 | textarea{ 27 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 28 | } 29 | 30 | h1{ 31 | font-family:verdana, arial; 32 | font-size:40px; 33 | text-transform:uppercase; 34 | margin:0px 0px 10px 30px; 35 | } 36 | 37 | .json{ 38 | border:1px solid #888888; 39 | font-size:9px; 40 | background-color: #eeeeee; 41 | padding:10px; 42 | margin:10px; 43 | clear:both; 44 | } 45 | 46 | 47 | table.list 48 | { 49 | border-collapse:collapse; 50 | margin:0px; 51 | } 52 | 53 | table.list tbody tr:hover 54 | { 55 | background-color: #eeeeee; 56 | cursor: pointer; 57 | } 58 | 59 | div#form{ 60 | border:3px solid #EEEEEE; 61 | padding:10px; 62 | } 63 | 64 | 65 | .selected 66 | { 67 | background-color: #ffdddd; 68 | } 69 | 70 | .progress-body 71 | { 72 | -webkit-border-radius: 5px; 73 | -khtml-border-radius: 5px; 74 | -moz-border-radius: 5px; 75 | border-radius: 5px; 76 | border:1px solid #333333; 77 | height:14px; 78 | width:150px; 79 | margin:3px; 80 | position:relative; 81 | } 82 | 83 | .progress-bar 84 | { 85 | background: #444; /* for non-css3 browsers */ 86 | 87 | width:43%; 88 | height:100%; 89 | position:absolute; 90 | top:0px; 91 | left:0px; 92 | z-index:1; 93 | } 94 | 95 | .progress-text 96 | { 97 | position:absolute; 98 | top:0px; 99 | left:0px; 100 | z-index:2; 101 | text-align:center; 102 | font-size:.7em; 103 | width:100%; 104 | vertical-align: middle; 105 | } 106 | 107 | .emblem 108 | { 109 | width:14px; 110 | height:14px; 111 | background: url(/images/stars.png) -90px 0px no-repeat; 112 | } 113 | 114 | .emblem-star 115 | { 116 | background: url(/images/stars.png) -30px 0px no-repeat; 117 | } 118 | 119 | .emblem-star-blue 120 | { 121 | background: url(/images/stars.png) -60px 0px no-repeat; 122 | } 123 | 124 | .emblem-star-red 125 | { 126 | background: url(/images/stars.png) -0px 0px no-repeat; 127 | } 128 | 129 | .emblem-star-green 130 | { 131 | background: url(/images/stars.png) -45px 0px no-repeat; 132 | } 133 | 134 | .emblem-excl-yellow 135 | { 136 | background: url(/images/stars.png) -30px -15px no-repeat; 137 | } 138 | 139 | .emblem-excl 140 | { 141 | background: url(/images/stars.png) 0px -15px no-repeat; 142 | } 143 | 144 | .emblem-ok 145 | { 146 | background: url(/images/stars.png) -45px -15px no-repeat; 147 | } 148 | 149 | .emblem-info 150 | { 151 | background: url(/images/stars.png) -60px -15px no-repeat; 152 | } 153 | 154 | .tokens 155 | { 156 | font-size: 11px; 157 | border:2px solid #888888; 158 | -webkit-border-radius: 3px; 159 | -khtml-border-radius: 3px; 160 | -moz-border-radius: 3px; 161 | border-radius: 3px; 162 | padding:4px; 163 | margin:2px; 164 | clear:both; 165 | display:block; 166 | cursor: text; 167 | } 168 | 169 | .token 170 | { 171 | border:1px solid #888888; 172 | background-color: #cccccc; 173 | -webkit-border-radius: 2px; 174 | -khtml-border-radius: 2px; 175 | -moz-border-radius: 2px; 176 | border-radius: 2px; 177 | padding:1px; 178 | margin:2px; 179 | float:left; 180 | } 181 | 182 | #add-token, #add-token2{ 183 | display:inline-block; 184 | padding: 0px; 185 | margin: 0px; 186 | } 187 | 188 | 189 | 190 | #add-token:focus, #add-token2:focus{ 191 | border: none; 192 | box-shadow:0 0 0; 193 | } 194 | 195 | .tokens::after { 196 | content: "."; 197 | display: block; 198 | height: 0; 199 | clear: both; 200 | visibility: hidden; 201 | } -------------------------------------------------------------------------------- /docs/widgets/autocomplete.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:autocomplete widget 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 54 | 55 | 56 | 57 |

ui:autocomplete widget

58 | 59 |
employee1:
60 | 61 |
employee1 (delay 1200ms):
62 | 63 |
employee2 (no highlight):
64 |
employee3 (clear input):
65 |
66 | presets: 67 |
employee4 - employee:
68 |
employee6 - fast:
69 |
employee7 - slow:
70 | employees list: 71 |
72 | {{i.firstName}} {{i.lastName}} x 73 | 74 |
75 | 76 | wages: 77 |
78 | {{i.firstName}} {{i.lastName}} x 79 | 80 |
81 | 82 | 83 |
84 |
85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /js/lib/date.format.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Date Format 1.2.3 3 | * (c) 2007-2009 Steven Levithan 4 | * MIT license 5 | * 6 | * Includes enhancements by Scott Trenda 7 | * and Kris Kowal 8 | * 9 | * Accepts a date, a mask, or a date and a mask. 10 | * Returns a formatted version of the given date. 11 | * The date defaults to the current date/time. 12 | * The mask defaults to dateFormat.masks.default. 13 | */ 14 | 15 | var dateFormat = function () { 16 | var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g, 17 | timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, 18 | timezoneClip = /[^-+\dA-Z]/g, 19 | pad = function (val, len) { 20 | val = String(val); 21 | len = len || 2; 22 | while (val.length < len) val = "0" + val; 23 | return val; 24 | }; 25 | 26 | // Regexes and supporting functions are cached through closure 27 | return function (date, mask, utc) { 28 | var dF = dateFormat; 29 | 30 | // You can't provide utc if you skip other args (use the "UTC:" mask prefix) 31 | if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { 32 | mask = date; 33 | date = undefined; 34 | } 35 | 36 | // Passing date through Date applies Date.parse, if necessary 37 | date = date ? new Date(date) : new Date; 38 | if (isNaN(date)) throw SyntaxError("invalid date"); 39 | 40 | mask = String(dF.masks[mask] || mask || dF.masks["default"]); 41 | 42 | // Allow setting the utc argument via the mask 43 | if (mask.slice(0, 4) == "UTC:") { 44 | mask = mask.slice(4); 45 | utc = true; 46 | } 47 | 48 | var _ = utc ? "getUTC" : "get", 49 | d = date[_ + "Date"](), 50 | D = date[_ + "Day"](), 51 | m = date[_ + "Month"](), 52 | y = date[_ + "FullYear"](), 53 | H = date[_ + "Hours"](), 54 | M = date[_ + "Minutes"](), 55 | s = date[_ + "Seconds"](), 56 | L = date[_ + "Milliseconds"](), 57 | o = utc ? 0 : date.getTimezoneOffset(), 58 | flags = { 59 | d: d, 60 | dd: pad(d), 61 | ddd: dF.i18n.dayNames[D], 62 | dddd: dF.i18n.dayNames[D + 7], 63 | m: m + 1, 64 | mm: pad(m + 1), 65 | mmm: dF.i18n.monthNames[m], 66 | mmmm: dF.i18n.monthNames[m + 12], 67 | yy: String(y).slice(2), 68 | yyyy: y, 69 | h: H % 12 || 12, 70 | hh: pad(H % 12 || 12), 71 | H: H, 72 | HH: pad(H), 73 | M: M, 74 | MM: pad(M), 75 | s: s, 76 | ss: pad(s), 77 | l: pad(L, 3), 78 | L: pad(L > 99 ? Math.round(L / 10) : L), 79 | t: H < 12 ? "a" : "p", 80 | tt: H < 12 ? "am" : "pm", 81 | T: H < 12 ? "A" : "P", 82 | TT: H < 12 ? "AM" : "PM", 83 | Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""), 84 | o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), 85 | S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10] 86 | }; 87 | 88 | return mask.replace(token, function ($0) { 89 | return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); 90 | }); 91 | }; 92 | }(); 93 | 94 | // Some common format strings 95 | dateFormat.masks = { 96 | "default": "ddd mmm dd yyyy HH:MM:ss", 97 | shortDate: "m/d/yy", 98 | mediumDate: "mmm d, yyyy", 99 | longDate: "mmmm d, yyyy", 100 | fullDate: "dddd, mmmm d, yyyy", 101 | shortTime: "h:MM TT", 102 | mediumTime: "h:MM:ss TT", 103 | longTime: "h:MM:ss TT Z", 104 | isoDate: "yyyy-mm-dd", 105 | isoTime: "HH:MM:ss", 106 | isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", 107 | isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" 108 | }; 109 | 110 | // Internationalization strings 111 | dateFormat.i18n = { 112 | dayNames: [ 113 | "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 114 | "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" 115 | ], 116 | monthNames: [ 117 | "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 118 | "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" 119 | ] 120 | }; 121 | 122 | // For convenience... 123 | Date.prototype.format = function (mask, utc) { 124 | return dateFormat(this, mask, utc); 125 | }; 126 | 127 | -------------------------------------------------------------------------------- /docs/widgets/selectable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui:selectable directive 5 | 6 | 7 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 129 | 130 | 131 |

ui:selectable directive

132 | 133 |
134 | 135 |

cities (list):

136 |
    137 |
  • 138 |
    {{i.name}}
    139 |
    {{i.state}}, pop.: {{i.population}}
    140 |
  • 141 |
142 |
143 |
144 | 145 |

cities (grid):

146 |
147 |
148 | 149 |
{{i.name}}
150 |
state: {{i.state}}
151 |
pop:: {{i.population}}
152 |
153 |
154 |
155 | 156 | 157 |
158 |
159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | .ui-widget { 2 | font-family: Verdana,Arial,sans-serif; 3 | font-size: .7em; 4 | } 5 | 6 | body{ 7 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 8 | padding:0px; 9 | margin:20px; 10 | background-color: #DDD; 11 | background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 950, from(#fff), to(#bbb)); 12 | background-image: -moz-radial-gradient(center 45deg, circle closest-corner, #fff, #bbb); 13 | } 14 | 15 | 16 | input, textarea{ 17 | border:1px solid #888888; 18 | -webkit-border-radius: 3px; 19 | -khtml-border-radius: 3px; 20 | -moz-border-radius: 3px; 21 | border-radius: 3px; 22 | padding:4px; 23 | } 24 | 25 | input:focus, textarea:focus { 26 | outline:none; 27 | border-color:#7eaadd; 28 | box-shadow:0 0 10px #9ecaed; 29 | } 30 | 31 | textarea{ 32 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 33 | } 34 | 35 | h1{ 36 | font-size:45px; 37 | margin:60px 20px; 38 | color:#444; 39 | text-shadow: #777 0px 0px 4px; 40 | text-align:center; 41 | } 42 | 43 | footer 44 | { 45 | display:block; 46 | width:100%; 47 | position:fixed; 48 | text-align:center; 49 | bottom:0px; 50 | left:0px; 51 | color:#999; 52 | text-shadow: #ccc 0px 0px 2px; 53 | font-size:11px; 54 | padding:5px 0px; 55 | } 56 | 57 | footer a 58 | { 59 | text-decoration:none; 60 | color:#777; 61 | 62 | 63 | } 64 | 65 | ul.items li 66 | { 67 | margin:5px; 68 | } 69 | 70 | ul.items li a 71 | { 72 | text-decoration:none; 73 | color:#444; 74 | text-shadow: #777 0px 0px 1px; 75 | padding:0px 3px; 76 | margin:5px; 77 | background-color:#ccc; 78 | border:solid 1px #bbb; 79 | } 80 | 81 | ul.items li a:hover 82 | { 83 | color:#333; 84 | text-shadow: #555 0px 0px 3px; 85 | background-color:#bbb; 86 | border:solid 1px #aaa; 87 | } 88 | 89 | 90 | 91 | .json{ 92 | border:1px solid #888888; 93 | font-size:9px; 94 | background-color: #eeeeee; 95 | padding:10px; 96 | margin:10px; 97 | clear:both; 98 | } 99 | 100 | 101 | table.list 102 | { 103 | border-collapse:collapse; 104 | margin:0px; 105 | } 106 | 107 | table.list tbody tr:hover 108 | { 109 | background-color: #eeeeee; 110 | cursor: pointer; 111 | } 112 | 113 | div#form{ 114 | border:3px solid #EEEEEE; 115 | padding:10px; 116 | } 117 | 118 | 119 | .selected 120 | { 121 | background-color: #ffdddd; 122 | } 123 | 124 | .progress-body 125 | { 126 | -webkit-border-radius: 5px; 127 | -khtml-border-radius: 5px; 128 | -moz-border-radius: 5px; 129 | border-radius: 5px; 130 | border:1px solid #333333; 131 | height:14px; 132 | width:150px; 133 | margin:3px; 134 | position:relative; 135 | } 136 | 137 | .progress-bar 138 | { 139 | background: #444; /* for non-css3 browsers */ 140 | 141 | width:43%; 142 | height:100%; 143 | position:absolute; 144 | top:0px; 145 | left:0px; 146 | z-index:1; 147 | } 148 | 149 | .progress-text 150 | { 151 | position:absolute; 152 | top:0px; 153 | left:0px; 154 | z-index:2; 155 | text-align:center; 156 | font-size:.7em; 157 | width:100%; 158 | vertical-align: middle; 159 | } 160 | 161 | .emblem 162 | { 163 | width:14px; 164 | height:14px; 165 | background: url(../images/stars.png) -90px 0px no-repeat; 166 | } 167 | 168 | .emblem-star 169 | { 170 | background: url(../images/stars.png) -30px 0px no-repeat; 171 | } 172 | 173 | .emblem-star-blue 174 | { 175 | background: url(../images/stars.png) -60px 0px no-repeat; 176 | } 177 | 178 | .emblem-star-red 179 | { 180 | background: url(../images/stars.png) -0px 0px no-repeat; 181 | } 182 | 183 | .emblem-star-green 184 | { 185 | background: url(../images/stars.png) -45px 0px no-repeat; 186 | } 187 | 188 | .emblem-excl-yellow 189 | { 190 | background: url(../images/stars.png) -30px -15px no-repeat; 191 | } 192 | 193 | .emblem-excl 194 | { 195 | background: url(../images/stars.png) 0px -15px no-repeat; 196 | } 197 | 198 | .emblem-ok 199 | { 200 | background: url(../images/stars.png) -45px -15px no-repeat; 201 | } 202 | 203 | .emblem-info 204 | { 205 | background: url(../images/stars.png) -60px -15px no-repeat; 206 | } 207 | 208 | .tokens 209 | { 210 | font-size: 11px; 211 | border:2px solid #888888; 212 | -webkit-border-radius: 3px; 213 | -khtml-border-radius: 3px; 214 | -moz-border-radius: 3px; 215 | border-radius: 3px; 216 | padding:4px; 217 | margin:2px; 218 | clear:both; 219 | display:block; 220 | cursor: text; 221 | } 222 | 223 | .token 224 | { 225 | border:1px solid #888888; 226 | background-color: #cccccc; 227 | -webkit-border-radius: 2px; 228 | -khtml-border-radius: 2px; 229 | -moz-border-radius: 2px; 230 | border-radius: 2px; 231 | padding:1px; 232 | margin:2px; 233 | float:left; 234 | } 235 | 236 | #add-token, #add-token2{ 237 | display:inline-block; 238 | padding: 0px; 239 | margin: 0px; 240 | } 241 | 242 | 243 | 244 | #add-token:focus, #add-token2:focus{ 245 | border: none; 246 | box-shadow:0 0 0; 247 | } 248 | 249 | .tokens::after { 250 | content: "."; 251 | display: block; 252 | height: 0; 253 | clear: both; 254 | visibility: hidden; 255 | } 256 | 257 | div.new{ 258 | display:inline; 259 | border:1px solid #A66363; 260 | -webkit-border-radius: 3px; 261 | -khtml-border-radius: 3px; 262 | -moz-border-radius: 3px; 263 | background-color: #B07F7F; 264 | color:#fff; 265 | font-size:10px; 266 | padding:1px 3px; 267 | box-shadow:0 0 4px #A66363; 268 | vertical-align: middle; 269 | } 270 | -------------------------------------------------------------------------------- /js/lib/jquery.maskedinput-1.3.js: -------------------------------------------------------------------------------- 1 | /* 2 | Masked Input plugin for jQuery 3 | Copyright (c) 2007-2011 Josh Bush (digitalbush.com) 4 | Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) 5 | Version: 1.3 6 | */ 7 | (function($) { 8 | var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask"; 9 | var iPhone = (window.orientation != undefined); 10 | 11 | $.mask = { 12 | //Predefined character definitions 13 | definitions: { 14 | '9': "[0-9]", 15 | 'a': "[A-Za-z]", 16 | '*': "[A-Za-z0-9]" 17 | }, 18 | dataName:"rawMaskFn" 19 | }; 20 | 21 | $.fn.extend({ 22 | //Helper Function for Caret positioning 23 | caret: function(begin, end) { 24 | if (this.length == 0) return; 25 | if (typeof begin == 'number') { 26 | end = (typeof end == 'number') ? end : begin; 27 | return this.each(function() { 28 | if (this.setSelectionRange) { 29 | this.setSelectionRange(begin, end); 30 | } else if (this.createTextRange) { 31 | var range = this.createTextRange(); 32 | range.collapse(true); 33 | range.moveEnd('character', end); 34 | range.moveStart('character', begin); 35 | range.select(); 36 | } 37 | }); 38 | } else { 39 | if (this[0].setSelectionRange) { 40 | begin = this[0].selectionStart; 41 | end = this[0].selectionEnd; 42 | } else if (document.selection && document.selection.createRange) { 43 | var range = document.selection.createRange(); 44 | begin = 0 - range.duplicate().moveStart('character', -100000); 45 | end = begin + range.text.length; 46 | } 47 | return { begin: begin, end: end }; 48 | } 49 | }, 50 | unmask: function() { return this.trigger("unmask"); }, 51 | isMaskValid: function(){ 52 | return $(this).data('mask-isvalid'); 53 | }, 54 | mask: function(mask, settings) { 55 | if (!mask && this.length > 0) { 56 | var input = $(this[0]); 57 | return input.data($.mask.dataName)(); 58 | } 59 | settings = $.extend({ 60 | placeholder: "_", 61 | completed: null 62 | }, settings); 63 | 64 | var defs = $.mask.definitions; 65 | var tests = []; 66 | var partialPosition = mask.length; 67 | var firstNonMaskPos = null; 68 | var len = mask.length; 69 | 70 | $.each(mask.split(""), function(i, c) { 71 | if (c == '?') { 72 | len--; 73 | partialPosition = i; 74 | } else if (defs[c]) { 75 | tests.push(new RegExp(defs[c])); 76 | if(firstNonMaskPos==null) 77 | firstNonMaskPos = tests.length - 1; 78 | } else { 79 | tests.push(null); 80 | } 81 | }); 82 | 83 | return this.trigger("unmask").each(function() { 84 | var input = $(this); 85 | var buffer = $.map(mask.split(""), function(c, i) { if (c != '?') return defs[c] ? settings.placeholder : c }); 86 | var focusText = input.val(); 87 | 88 | function seekNext(pos) { 89 | while (++pos <= len && !tests[pos]); 90 | return pos; 91 | }; 92 | function seekPrev(pos) { 93 | while (--pos >= 0 && !tests[pos]); 94 | return pos; 95 | }; 96 | 97 | function shiftL(begin,end) { 98 | if(begin<0) 99 | return; 100 | for (var i = begin,j = seekNext(end); i < len; i++) { 101 | if (tests[i]) { 102 | if (j < len && tests[i].test(buffer[j])) { 103 | buffer[i] = buffer[j]; 104 | buffer[j] = settings.placeholder; 105 | } else 106 | break; 107 | j = seekNext(j); 108 | } 109 | } 110 | writeBuffer(); 111 | input.caret(Math.max(firstNonMaskPos, begin)); 112 | }; 113 | 114 | function shiftR(pos) { 115 | for (var i = pos, c = settings.placeholder; i < len; i++) { 116 | if (tests[i]) { 117 | var j = seekNext(i); 118 | var t = buffer[i]; 119 | buffer[i] = c; 120 | if (j < len && tests[j].test(t)) 121 | c = t; 122 | else 123 | break; 124 | } 125 | } 126 | }; 127 | 128 | function keydownEvent(e) { 129 | var k=e.which; 130 | 131 | //backspace, delete, and escape get special treatment 132 | if(k == 8 || k == 46 || (iPhone && k == 127)){ 133 | var pos = input.caret(), 134 | begin = pos.begin, 135 | end = pos.end; 136 | 137 | if(end-begin==0){ 138 | begin=k!=46?seekPrev(begin):(end=seekNext(begin-1)); 139 | end=k==46?seekNext(end):end; 140 | } 141 | clearBuffer(begin, end); 142 | shiftL(begin,end-1); 143 | isValid(); //twarogowski 144 | 145 | return false; 146 | } else if (k == 27) {//escape 147 | input.val(focusText); 148 | input.caret(0, checkVal()); 149 | return false; 150 | } 151 | }; 152 | 153 | function keypressEvent(e) { 154 | var k = e.which, 155 | pos = input.caret(); 156 | if (e.ctrlKey || e.altKey || e.metaKey || k<32) {//Ignore 157 | return true; 158 | } else if (k) { 159 | if(pos.end-pos.begin!=0){ 160 | clearBuffer(pos.begin, pos.end); 161 | shiftL(pos.begin, pos.end-1); 162 | isValid(); //twarogowski 163 | } 164 | 165 | var p = seekNext(pos.begin - 1); 166 | if (p < len) { 167 | var c = String.fromCharCode(k); 168 | if (tests[p].test(c)) { 169 | shiftR(p); 170 | buffer[p] = c; 171 | writeBuffer(); 172 | var next = seekNext(p); 173 | input.caret(next); 174 | isValid(); //twarogowski 175 | if (settings.completed && next >= len) 176 | settings.completed.call(input); 177 | } 178 | } 179 | return false; 180 | } 181 | }; 182 | 183 | function clearBuffer(start, end) { 184 | for (var i = start; i < end && i < len; i++) { 185 | if (tests[i]) 186 | buffer[i] = settings.placeholder; 187 | } 188 | }; 189 | 190 | function writeBuffer() { return input.val(buffer.join('')).val(); }; 191 | 192 | function isValid(){ 193 | var test = input.val(); 194 | var lastMatch = -1; 195 | for (var i = 0, pos = 0; i < len; i++) { 196 | if (tests[i]) { 197 | buffer[i] = settings.placeholder; 198 | while (pos++ < test.length) { 199 | var c = test.charAt(pos - 1); 200 | if (tests[i].test(c)) { 201 | buffer[i] = c; 202 | lastMatch = i; 203 | break; 204 | } 205 | } 206 | if (pos > test.length) 207 | break; 208 | } else if (buffer[i] == test.charAt(pos) && i!=partialPosition) { 209 | pos++; 210 | lastMatch = i; 211 | } 212 | } 213 | var valid = (lastMatch + 1 >= partialPosition); 214 | input.data('mask-isvalid',valid); 215 | return valid; 216 | } 217 | 218 | function checkVal(allow) { 219 | //try to place characters where they belong 220 | var test = input.val(); 221 | var lastMatch = -1; 222 | for (var i = 0, pos = 0; i < len; i++) { 223 | if (tests[i]) { 224 | buffer[i] = settings.placeholder; 225 | while (pos++ < test.length) { 226 | var c = test.charAt(pos - 1); 227 | if (tests[i].test(c)) { 228 | buffer[i] = c; 229 | lastMatch = i; 230 | break; 231 | } 232 | } 233 | if (pos > test.length) 234 | break; 235 | } else if (buffer[i] == test.charAt(pos) && i!=partialPosition) { 236 | pos++; 237 | lastMatch = i; 238 | } 239 | } 240 | if (!allow && lastMatch + 1 < partialPosition) { 241 | input.val(""); 242 | clearBuffer(0, len); 243 | } else if (allow || lastMatch + 1 >= partialPosition) { 244 | writeBuffer(); 245 | if (!allow) input.val(input.val().substring(0, lastMatch + 1)); 246 | } 247 | return (partialPosition ? i : firstNonMaskPos); 248 | }; 249 | 250 | input.data($.mask.dataName,function(){ 251 | return $.map(buffer, function(c, i) { 252 | return tests[i]&&c!=settings.placeholder ? c : null; 253 | }).join(''); 254 | }) 255 | 256 | if (!input.attr("readonly")) 257 | input 258 | .one("unmask", function() { 259 | input 260 | .unbind(".mask") 261 | .removeData($.mask.dataName); 262 | }) 263 | .bind("focus.mask", function() { 264 | focusText = input.val(); 265 | var pos = checkVal(); 266 | writeBuffer(); 267 | var moveCaret=function(){ 268 | if (pos == mask.length) 269 | input.caret(0, pos); 270 | else 271 | input.caret(pos); 272 | }; 273 | ($.browser.msie ? moveCaret:function(){setTimeout(moveCaret,0)})(); 274 | }) 275 | .bind("blur.mask", function() { 276 | checkVal(); 277 | if (input.val() != focusText) 278 | input.change(); 279 | }) 280 | .bind("keydown.mask", keydownEvent) 281 | .bind("keypress.mask", keypressEvent) 282 | .bind(pasteEventName, function() { 283 | setTimeout(function() { input.caret(checkVal(true)); }, 0); 284 | }); 285 | 286 | checkVal(); //Perform initial check for existing values 287 | }); 288 | } 289 | }); 290 | })(jQuery); 291 | -------------------------------------------------------------------------------- /js/lib/underscore-min.js: -------------------------------------------------------------------------------- 1 | // Underscore.js 1.1.6 2 | // (c) 2011 Jeremy Ashkenas, DocumentCloud Inc. 3 | // Underscore is freely distributable under the MIT license. 4 | // Portions of Underscore are inspired or borrowed from Prototype, 5 | // Oliver Steele's Functional, and John Resig's Micro-Templating. 6 | // For all details and documentation: 7 | // http://documentcloud.github.com/underscore 8 | (function(){var p=this,C=p._,m={},i=Array.prototype,n=Object.prototype,f=i.slice,D=i.unshift,E=n.toString,l=n.hasOwnProperty,s=i.forEach,t=i.map,u=i.reduce,v=i.reduceRight,w=i.filter,x=i.every,y=i.some,o=i.indexOf,z=i.lastIndexOf;n=Array.isArray;var F=Object.keys,q=Function.prototype.bind,b=function(a){return new j(a)};typeof module!=="undefined"&&module.exports?(module.exports=b,b._=b):p._=b;b.VERSION="1.1.6";var h=b.each=b.forEach=function(a,c,d){if(a!=null)if(s&&a.forEach===s)a.forEach(c,d);else if(b.isNumber(a.length))for(var e= 9 | 0,k=a.length;e=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a, 13 | c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};h(a,function(a,b,f){b=c?c.call(d,a,b,f):a;bd?1:0}),"value")};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.zip=function(){for(var a=f.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c), 16 | e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}};b.keys=F||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)l.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a, 20 | b.identity)};b.functions=b.methods=function(a){return b.filter(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a){h(f.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){h(f.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,c){if(a===c)return!0;var d=typeof a;if(d!= 21 | typeof c)return!1;if(a==c)return!0;if(!a&&c||a&&!c)return!1;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return!1;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return!1;if(a.length&&a.length!==c.length)return!1;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return!1; 22 | for(var f in a)if(!(f in c)||!b.isEqual(a[f],c[f]))return!1;return!0};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(l.call(a,c))return!1;return!0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=n||function(a){return E.call(a)==="[object Array]"};b.isArguments=function(a){return!(!a||!l.call(a,"callee"))};b.isFunction=function(a){return!(!a||!a.constructor||!a.call||!a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)}; 23 | b.isNumber=function(a){return!!(a===0||a&&a.toExponential&&a.toFixed)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===!0||a===!1};b.isDate=function(a){return!(!a||!a.getTimezoneOffset||!a.setUTCFullYear)};b.isRegExp=function(a){return!(!a||!a.test||!a.exec||!(a.ignoreCase||a.ignoreCase===!1))};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.noConflict=function(){p._=C;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e= 24 | 0;e/g,interpolate:/<%=([\s\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings;d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate|| 25 | null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";d=new Function("obj",d);return c?d(c):d};var j=function(a){this._wrapped=a};b.prototype=j.prototype;var r=function(a,c){return c?b(a).chain():a},H=function(a,c){j.prototype[a]=function(){var a=f.call(arguments);D.call(a,this._wrapped);return r(c.apply(b,a),this._chain)}};b.mixin(b);h(["pop","push","reverse","shift","sort", 26 | "splice","unshift"],function(a){var b=i[a];j.prototype[a]=function(){b.apply(this._wrapped,arguments);return r(this._wrapped,this._chain)}});h(["concat","join","slice"],function(a){var b=i[a];j.prototype[a]=function(){return r(b.apply(this._wrapped,arguments),this._chain)}});j.prototype.chain=function(){this._chain=!0;return this};j.prototype.value=function(){return this._wrapped}})(); 27 | -------------------------------------------------------------------------------- /js/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 76 | 77 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 110 | 111 | 112 | 1310156913729 113 | 1310156913729 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 151 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /angular-contrib.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "auto_complete": 3 | { 4 | "selected_items": 5 | [ 6 | [ 7 | "ve", 8 | "vertical" 9 | ], 10 | [ 11 | "ali", 12 | "align" 13 | ], 14 | [ 15 | "ver", 16 | "vertical: vertical-align: type" 17 | ], 18 | [ 19 | "he", 20 | "height" 21 | ], 22 | [ 23 | "bot", 24 | "bottom" 25 | ], 26 | [ 27 | "mar", 28 | "margin: margin: all" 29 | ], 30 | [ 31 | "a", 32 | "align" 33 | ], 34 | [ 35 | "i", 36 | "isString" 37 | ], 38 | [ 39 | "dis", 40 | "display: display: block" 41 | ], 42 | [ 43 | "s", 44 | "size" 45 | ], 46 | [ 47 | "back", 48 | "background: background-color: hex" 49 | ], 50 | [ 51 | "parse", 52 | "parseExpr" 53 | ], 54 | [ 55 | "wi", 56 | "width" 57 | ], 58 | [ 59 | "sty", 60 | "style" 61 | ], 62 | [ 63 | "bor", 64 | "border: border-width: size" 65 | ], 66 | [ 67 | "div", 68 | "div" 69 | ], 70 | [ 71 | "li", 72 | "list: list-style-type: other" 73 | ], 74 | [ 75 | "display", 76 | "display: display: block" 77 | ], 78 | [ 79 | "backgro", 80 | "background: background-color: hex" 81 | ], 82 | [ 83 | "border", 84 | "border: border-width: size" 85 | ], 86 | [ 87 | "h4", 88 | "h4" 89 | ], 90 | [ 91 | "ch", 92 | "checkbox" 93 | ], 94 | [ 95 | "but", 96 | "buttonOptions" 97 | ], 98 | [ 99 | "hover", 100 | "hover (pseudo-class)" 101 | ], 102 | [ 103 | "overflo", 104 | "overflow: overflow: type" 105 | ], 106 | [ 107 | "margin", 108 | "margin: margin-right: length" 109 | ], 110 | [ 111 | "posi", 112 | "position: position: type" 113 | ], 114 | [ 115 | "hei", 116 | "height: (property)" 117 | ], 118 | [ 119 | "width", 120 | "width: (property)" 121 | ], 122 | [ 123 | "bod", 124 | "body (element)" 125 | ], 126 | [ 127 | "for", 128 | "for: for (…) {…}" 129 | ], 130 | [ 131 | "ex", 132 | "expression" 133 | ], 134 | [ 135 | "item", 136 | "itemExpr" 137 | ], 138 | [ 139 | "at", 140 | "attrName" 141 | ], 142 | [ 143 | "padd", 144 | "padding: padding: all" 145 | ], 146 | [ 147 | "font", 148 | "font: font: size font" 149 | ], 150 | [ 151 | "ja", 152 | "javascript" 153 | ], 154 | [ 155 | "text", 156 | "text" 157 | ], 158 | [ 159 | "ty", 160 | "type" 161 | ], 162 | [ 163 | "backgrou", 164 | "background: background-color: hex" 165 | ], 166 | [ 167 | "si", 168 | "size" 169 | ], 170 | [ 171 | "ul", 172 | "ul" 173 | ], 174 | [ 175 | "h1", 176 | "h1" 177 | ], 178 | [ 179 | "lo", 180 | "load" 181 | ], 182 | [ 183 | "label", 184 | "label" 185 | ], 186 | [ 187 | "pi", 188 | "pinDraggable" 189 | ], 190 | [ 191 | "attrEx", 192 | "attrExpr" 193 | ], 194 | [ 195 | "attr", 196 | "attrExpr" 197 | ], 198 | [ 199 | "att", 200 | "attrExpr" 201 | ], 202 | [ 203 | "backgr", 204 | "background: background-color: hex" 205 | ], 206 | [ 207 | "tex", 208 | "text" 209 | ], 210 | [ 211 | "bo", 212 | "bold" 213 | ], 214 | [ 215 | "fon", 216 | "font: font-family: family" 217 | ], 218 | [ 219 | "fun", 220 | "fun: Function" 221 | ] 222 | ] 223 | }, 224 | "buffers": 225 | [ 226 | { 227 | "file": "/opt/node/apps/angular-contrib/js/angular-widgets.js", 228 | "settings": 229 | { 230 | "buffer_size": 18561, 231 | "line_ending": "Unix" 232 | } 233 | }, 234 | { 235 | "file": "/opt/node/apps/angular-contrib/docs/widgets/masked.html", 236 | "settings": 237 | { 238 | "buffer_size": 1964, 239 | "line_ending": "Unix" 240 | } 241 | }, 242 | { 243 | "file": "/opt/node/apps/angular-contrib/js/lib/jquery.maskedinput-1.3.js", 244 | "settings": 245 | { 246 | "buffer_size": 6823, 247 | "line_ending": "Unix" 248 | } 249 | } 250 | ], 251 | "build_system": "", 252 | "command_palette": 253 | { 254 | "height": 192, 255 | "selected_items": 256 | [ 257 | [ 258 | "clo", 259 | "File: Close All" 260 | ], 261 | [ 262 | "sa", 263 | "File: Save All" 264 | ], 265 | [ 266 | "save", 267 | "File: Save All" 268 | ], 269 | [ 270 | "close", 271 | "File: Close All" 272 | ], 273 | [ 274 | "sav", 275 | "File: Save All" 276 | ], 277 | [ 278 | "", 279 | "Snippet: Lorem ipsum" 280 | ] 281 | ], 282 | "width": 467 283 | }, 284 | "distraction_free": 285 | { 286 | "menu_visible": true, 287 | "show_minimap": false, 288 | "show_tabs": false, 289 | "side_bar_visible": false, 290 | "status_bar_visible": false 291 | }, 292 | "file_history": 293 | [ 294 | "/home/lukasz/Switch_Scrpts_/CountI.xml", 295 | "/home/lukasz/Switch_Scrpts_/CountI.js", 296 | "/home/lukasz/Switch_Scrpts_/CountI.sfixture", 297 | "/opt/node/apps/angular-contrib/docs/widgets/progress.html", 298 | "/opt/node/apps/angular-contrib/docs/widgets/map.html", 299 | "/opt/node/apps/angular-contrib/docs/widgets/masked.html", 300 | "/opt/node/apps/angular-contrib/css/main.css", 301 | "/opt/node/apps/angular-contrib/docs/widgets.html", 302 | "/opt/node/apps/angular-contrib/index.html", 303 | "/opt/node/apps/angular-contrib/docs/widgets/button.html", 304 | "/opt/node/apps/angular-contrib/js/angular-formatters.js", 305 | "/opt/node/apps/angular-contrib/js/angular-services.js", 306 | "/opt/node/apps/angular-contrib/js/angular-widgets.js", 307 | "/opt/node/apps/angular-contrib/docs/widgets/autocomplete.html", 308 | "/opt/node/apps/angular-contrib/docs/widgets/datepicker.html", 309 | "/opt/node/apps/angular-contrib/docs/widgets/emblem.html", 310 | "/opt/node/apps/angular-contrib/docs/widgets/enter.html", 311 | "/opt/node/apps/angular-contrib/docs/widgets/selectable.html", 312 | "/opt/node/apps/angular-contrib/docs/widgets/toggle.html", 313 | "/opt/node/apps/twarogowski.github.com/css/main.css", 314 | "/opt/node/apps/angular-contrib/css/tasks.css", 315 | "/opt/node/apps/angular-contrib/json/employees.json", 316 | "/opt/node/apps/angular-contrib/autocomplete.html", 317 | "/opt/node/apps/angular-contrib/selectable.html", 318 | "/opt/node/apps/twarogowski.github.com/index.html", 319 | "/opt/node/apps/angular-contrib/emblem.html", 320 | "/opt/node/apps/angular-contrib/button.html", 321 | "/opt/node/apps/angular-contrib/enter.html", 322 | "/opt/node/apps/angular-contrib/map.html", 323 | "/opt/node/apps/angular-contrib/progress.html", 324 | "/opt/node/apps/angular-contrib/toggle.html", 325 | "/opt/node/apps/angular-contrib/datepicker.html", 326 | "/etc/nginx/nginx.conf", 327 | "/opt/node/apps/Invoices/public/javascripts/task-controller.js", 328 | "/opt/node/apps/Invoices/public/javascripts/angular-services.js", 329 | "/opt/node/apps/Invoices/public/javascripts/angular-formatters.js", 330 | "/opt/node/apps/Invoices/public/tests/angular/progress.html", 331 | "/opt/node/apps/Invoices/public/tests/angular/selectable.html", 332 | "/opt/node/apps/Invoices/public/javascripts/angular-widgets.js", 333 | "/opt/node/apps/Invoices/public/tests/angular/toggle.html", 334 | "/opt/node/apps/Invoices/public/tests/angular/button.html", 335 | "/opt/node/apps/Invoices/public/stylesheets/tasks.css", 336 | "/home/lukasz/.config/sublime-text-2/Packages/Default/Base File.sublime-settings", 337 | "/home/lukasz/.config/sublime-text-2/Packages/User/Base File.sublime-settings", 338 | "/opt/node/apps/Invoices/public/tests/angular/emblem.html", 339 | "/opt/node/apps/Invoices/public/tests/angular/index.html", 340 | "/opt/node/apps/Invoices/public/javascripts/angular-0.9.16.min.js", 341 | "/home/lukasz/.gvfs/ftp as axiomcom on axiomcomputing.pl/public_html/bolesc.pl/index.html", 342 | "/opt/node/apps/Invoices/public/tests/angular/autocomplete.html", 343 | "/opt/node/apps/Invoices/public/tests/angular/datepicker.html", 344 | "/opt/node/apps/Invoices/public/tests/angular/enter.html", 345 | "/opt/node/apps/Invoices/public/tests/angular/map.html", 346 | "/opt/node/apps/Invoices/public/tasks.html", 347 | "/opt/node/apps/Invoices/public/index.html", 348 | "/opt/node/apps/Invoices/push.sh", 349 | "/opt/node/apps/Invoices/public/javascripts/angular-0.9.16.js", 350 | "/opt/node/apps/Invoices/public/stylesheets/style.css", 351 | "/opt/node/apps/Invoices/controllers/task.js", 352 | "/opt/node/apps/Invoices/controllers/customer.js", 353 | "/opt/node/apps/Invoices/public/angular-datepicker-tests.html", 354 | "/opt/node/apps/Invoices/public/images/stars.png", 355 | "/opt/node/apps/Invoices/public/cache.manifest_", 356 | "/opt/node/apps/Invoices/public/cache.manifest", 357 | "/opt/node/apps/Invoices/public/stylesheets/smoothness/jquery-ui-1.8.13.custom.css", 358 | "/home/lukasz/.config/sublime-text-2/Packages/Zen/Default.sublime-keymap", 359 | "/home/lukasz/.config/sublime-text-2/Packages/Zen/zencoding/tags", 360 | "/home/lukasz/.config/sublime-text-2/Packages/Zen/README.txt", 361 | "/home/lukasz/.config/sublime-text-2/Packages/Default/Global.sublime-settings", 362 | "/opt/node/apps/Invoices/public/stylesheets/forms.css", 363 | "/opt/node/apps/Invoices/public/javascripts/jquery-1.6.min.js", 364 | "/opt/node/apps/Invoices/model/model.js" 365 | ], 366 | "find_in_files": 367 | { 368 | "include_history": 369 | [ 370 | ], 371 | "location_history": 372 | [ 373 | ] 374 | }, 375 | "find_state": 376 | { 377 | "case_sensitive": false, 378 | "find_history": 379 | [ 380 | " href=\"/stylesheets/", 381 | "