flatui3-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +102 -0
  5. data/Rakefile +1 -0
  6. data/app/assets/fonts/Flat-UI-Icons.dev.svg +140 -0
  7. data/app/assets/fonts/Flat-UI-Icons.eot +0 -0
  8. data/app/assets/fonts/Flat-UI-Icons.svg +140 -0
  9. data/app/assets/fonts/Flat-UI-Icons.ttf +0 -0
  10. data/app/assets/fonts/Flat-UI-Icons.woff +0 -0
  11. data/app/assets/fonts/icomoon-session.json +1 -0
  12. data/app/assets/fonts/lato/lato-black-webfont.eot +0 -0
  13. data/app/assets/fonts/lato/lato-black-webfont.svg +4691 -0
  14. data/app/assets/fonts/lato/lato-black-webfont.ttf +0 -0
  15. data/app/assets/fonts/lato/lato-black-webfont.woff +0 -0
  16. data/app/assets/fonts/lato/lato-bold-webfont.eot +0 -0
  17. data/app/assets/fonts/lato/lato-bold-webfont.svg +5085 -0
  18. data/app/assets/fonts/lato/lato-bold-webfont.ttf +0 -0
  19. data/app/assets/fonts/lato/lato-bold-webfont.woff +0 -0
  20. data/app/assets/fonts/lato/lato-bolditalic-webfont.eot +0 -0
  21. data/app/assets/fonts/lato/lato-bolditalic-webfont.svg +4514 -0
  22. data/app/assets/fonts/lato/lato-bolditalic-webfont.ttf +0 -0
  23. data/app/assets/fonts/lato/lato-bolditalic-webfont.woff +0 -0
  24. data/app/assets/fonts/lato/lato-italic-webfont.eot +0 -0
  25. data/app/assets/fonts/lato/lato-italic-webfont.svg +4514 -0
  26. data/app/assets/fonts/lato/lato-italic-webfont.ttf +0 -0
  27. data/app/assets/fonts/lato/lato-italic-webfont.woff +0 -0
  28. data/app/assets/fonts/lato/lato-light-webfont.eot +0 -0
  29. data/app/assets/fonts/lato/lato-light-webfont.svg +4691 -0
  30. data/app/assets/fonts/lato/lato-light-webfont.ttf +0 -0
  31. data/app/assets/fonts/lato/lato-light-webfont.woff +0 -0
  32. data/app/assets/fonts/lato/lato-regular-webfont.eot +0 -0
  33. data/app/assets/fonts/lato/lato-regular-webfont.svg +4691 -0
  34. data/app/assets/fonts/lato/lato-regular-webfont.ttf +0 -0
  35. data/app/assets/fonts/lato/lato-regular-webfont.woff +0 -0
  36. data/app/assets/images/demo/browser-2x.png +0 -0
  37. data/app/assets/images/demo/browser-author.jpg +0 -0
  38. data/app/assets/images/demo/browser-pic-1.jpg +0 -0
  39. data/app/assets/images/demo/browser-pic-2.jpg +0 -0
  40. data/app/assets/images/demo/browser-pic-3.jpg +0 -0
  41. data/app/assets/images/demo/browser-pic-4.jpg +0 -0
  42. data/app/assets/images/demo/browser-pic-5.jpg +0 -0
  43. data/app/assets/images/demo/browser-pic-6.jpg +0 -0
  44. data/app/assets/images/demo/browser.png +0 -0
  45. data/app/assets/images/demo/html-icon.png +0 -0
  46. data/app/assets/images/demo/logo-mask-2x.png +0 -0
  47. data/app/assets/images/demo/logo-mask.png +0 -0
  48. data/app/assets/images/demo/video.jpg +0 -0
  49. data/app/assets/images/exaple-image.jpg +0 -0
  50. data/app/assets/images/favicon.ico +0 -0
  51. data/app/assets/images/footer/logo.png +0 -0
  52. data/app/assets/images/icons/png/Book.png +0 -0
  53. data/app/assets/images/icons/png/Calendar.png +0 -0
  54. data/app/assets/images/icons/png/Chat.png +0 -0
  55. data/app/assets/images/icons/png/Clipboard.png +0 -0
  56. data/app/assets/images/icons/png/Compas.png +0 -0
  57. data/app/assets/images/icons/png/Gift-Box.png +0 -0
  58. data/app/assets/images/icons/png/Infinity-Loop.png +0 -0
  59. data/app/assets/images/icons/png/Mail.png +0 -0
  60. data/app/assets/images/icons/png/Map.png +0 -0
  61. data/app/assets/images/icons/png/Pensils.png +0 -0
  62. data/app/assets/images/icons/png/Pocket.png +0 -0
  63. data/app/assets/images/icons/png/Retina-Ready.png +0 -0
  64. data/app/assets/images/icons/png/Toilet-Paper.png +0 -0
  65. data/app/assets/images/icons/png/Watches.png +0 -0
  66. data/app/assets/images/icons/svg/book.svg +1 -0
  67. data/app/assets/images/icons/svg/calendar.svg +1 -0
  68. data/app/assets/images/icons/svg/chat.svg +1 -0
  69. data/app/assets/images/icons/svg/clipboard.svg +1 -0
  70. data/app/assets/images/icons/svg/clocks.svg +9 -0
  71. data/app/assets/images/icons/svg/compas.svg +1 -0
  72. data/app/assets/images/icons/svg/gift-box.svg +1 -0
  73. data/app/assets/images/icons/svg/loop.svg +5 -0
  74. data/app/assets/images/icons/svg/mail.svg +1 -0
  75. data/app/assets/images/icons/svg/map.svg +1 -0
  76. data/app/assets/images/icons/svg/paper-bag.svg +1 -0
  77. data/app/assets/images/icons/svg/pencils.svg +1 -0
  78. data/app/assets/images/icons/svg/retina.svg +1 -0
  79. data/app/assets/images/icons/svg/toilet-paper.svg +1 -0
  80. data/app/assets/images/login/icon.png +0 -0
  81. data/app/assets/images/login/imac-2x.png +0 -0
  82. data/app/assets/images/login/imac.png +0 -0
  83. data/app/assets/images/switch/mask-square.png +0 -0
  84. data/app/assets/images/switch/mask.png +0 -0
  85. data/app/assets/images/tile/ribbon-2x.png +0 -0
  86. data/app/assets/images/tile/ribbon.png +0 -0
  87. data/app/assets/images/todo/done-2x.png +0 -0
  88. data/app/assets/images/todo/done.png +0 -0
  89. data/app/assets/images/todo/search-2x.png +0 -0
  90. data/app/assets/images/todo/search.png +0 -0
  91. data/app/assets/images/todo/todo-2x.png +0 -0
  92. data/app/assets/images/todo/todo.png +0 -0
  93. data/app/assets/images/video/fullscreen-2x.png +0 -0
  94. data/app/assets/images/video/fullscreen.png +0 -0
  95. data/app/assets/images/video/pause-2x.png +0 -0
  96. data/app/assets/images/video/pause.png +0 -0
  97. data/app/assets/images/video/play-2x.png +0 -0
  98. data/app/assets/images/video/play.png +0 -0
  99. data/app/assets/images/video/poster.jpg +0 -0
  100. data/app/assets/images/video/volume-full-2x.png +0 -0
  101. data/app/assets/images/video/volume-full.png +0 -0
  102. data/app/assets/images/video/volume-off-2x.png +0 -0
  103. data/app/assets/images/video/volume-off.png +0 -0
  104. data/app/assets/javascripts/bootstrap-select.js +412 -0
  105. data/app/assets/javascripts/bootstrap-switch.js +251 -0
  106. data/app/assets/javascripts/bootstrap-typeahead.js +335 -0
  107. data/app/assets/javascripts/flatui-checkbox.js +112 -0
  108. data/app/assets/javascripts/flatui-radio.js +141 -0
  109. data/app/assets/javascripts/flatui.js +9 -0
  110. data/app/assets/javascripts/html5shiv.js +8 -0
  111. data/app/assets/javascripts/icon-font-ie7.js +57 -0
  112. data/app/assets/javascripts/jquery-ui-1.10.3.min.js +6 -0
  113. data/app/assets/javascripts/jquery.placeholder.js +157 -0
  114. data/app/assets/javascripts/jquery.stacktable.js +54 -0
  115. data/app/assets/javascripts/jquery.tagsinput.js +355 -0
  116. data/app/assets/javascripts/jquery.ui.touch-punch.min.js +11 -0
  117. data/app/assets/stylesheets/flatui.less +45 -0
  118. data/flatui3-rails.gemspec +25 -0
  119. data/lib/flatui3-rails.rb +1 -0
  120. data/lib/flatui3/rails.rb +7 -0
  121. data/lib/flatui3/rails/engine.rb +13 -0
  122. data/lib/flatui3/rails/version.rb +5 -0
  123. data/lib/generators/flatui3/override/override_generator.rb +15 -0
  124. data/lib/generators/flatui3/override/templates/flatui_and_overrides.less +49 -0
  125. data/vendor/toolkit/flat-ui/flat-ui.less +45 -0
  126. data/vendor/toolkit/flat-ui/fonts.less +65 -0
  127. data/vendor/toolkit/flat-ui/icon-font.less +128 -0
  128. data/vendor/toolkit/flat-ui/mixins.less +365 -0
  129. data/vendor/toolkit/flat-ui/modules/buttons.less +231 -0
  130. data/vendor/toolkit/flat-ui/modules/caret.less +31 -0
  131. data/vendor/toolkit/flat-ui/modules/checkbox-and-radio.less +104 -0
  132. data/vendor/toolkit/flat-ui/modules/dropdown.less +225 -0
  133. data/vendor/toolkit/flat-ui/modules/footer.less +75 -0
  134. data/vendor/toolkit/flat-ui/modules/forms.less +127 -0
  135. data/vendor/toolkit/flat-ui/modules/input-icons.less +71 -0
  136. data/vendor/toolkit/flat-ui/modules/login.less +111 -0
  137. data/vendor/toolkit/flat-ui/modules/navbar.less +487 -0
  138. data/vendor/toolkit/flat-ui/modules/pager.less +49 -0
  139. data/vendor/toolkit/flat-ui/modules/pagination.less +153 -0
  140. data/vendor/toolkit/flat-ui/modules/palette.less +64 -0
  141. data/vendor/toolkit/flat-ui/modules/progress-bars.less +36 -0
  142. data/vendor/toolkit/flat-ui/modules/select.less +143 -0
  143. data/vendor/toolkit/flat-ui/modules/share.less +41 -0
  144. data/vendor/toolkit/flat-ui/modules/switch.less +150 -0
  145. data/vendor/toolkit/flat-ui/modules/tagsinput.less +117 -0
  146. data/vendor/toolkit/flat-ui/modules/tile.less +54 -0
  147. data/vendor/toolkit/flat-ui/modules/todo.less +107 -0
  148. data/vendor/toolkit/flat-ui/modules/tooltip.less +55 -0
  149. data/vendor/toolkit/flat-ui/modules/type.less +126 -0
  150. data/vendor/toolkit/flat-ui/modules/ui-slider.less +62 -0
  151. data/vendor/toolkit/flat-ui/modules/video.less +458 -0
  152. data/vendor/toolkit/flat-ui/scaffolding.less +46 -0
  153. data/vendor/toolkit/flat-ui/spaces.less +172 -0
  154. data/vendor/toolkit/flat-ui/variables.less +167 -0
  155. metadata +248 -0
@@ -0,0 +1,54 @@
1
+ /**
2
+ * MODIFIED CAUSE WE NEEDED OUR OWN MARKUP
3
+ * stacktable.js
4
+ * Author & copyright (c) 2012: John Polacek
5
+ * Dual MIT & GPL license
6
+ *
7
+ * Page: http://johnpolacek.github.com/stacktable.js
8
+ * Repo: https://github.com/johnpolacek/stacktable.js/
9
+ *
10
+ * jQuery plugin for stacking tables on small screens
11
+ *
12
+ */
13
+ ;(function($) {
14
+
15
+ $.fn.stacktable = function(options) {
16
+ var $tables = this,
17
+ defaults = {id:'stacktable',hideOriginal:false},
18
+ settings = $.extend({}, defaults, options),
19
+ stacktable;
20
+
21
+ return $tables.each(function() {
22
+ var $stacktable = $('<table class="'+settings.id+'"><tbody></tbody></table>');
23
+ if (typeof settings.myClass !== undefined) $stacktable.addClass(settings.myClass);
24
+ var markup = '';
25
+ $table = $(this);
26
+ $topRow = $table.find('tr').eq(0);
27
+ $table.find('tr').each(function(index,value) {
28
+ var zebra = "";
29
+ if (index % 2 === 0) {
30
+ zebra = "even";
31
+ } else {
32
+ zebra = "odd";
33
+ }
34
+ markup += '<tr class="' + zebra + '">';
35
+ $(this).find('td').each(function(index,value) {
36
+ if ($(this).html() !== ''){
37
+ markup += '<tr class="' + zebra + '">';
38
+ if ($topRow.find('td,th').eq(index).html()){
39
+ markup += '<td>'+$topRow.find('td,th').eq(index).html()+'</td>';
40
+ } else {
41
+ markup += '<td></td>';
42
+ }
43
+ markup += '<td>'+$(this).html()+'</td>';
44
+ markup += '</tr>';
45
+ }
46
+ });
47
+ });
48
+ $stacktable.append($(markup));
49
+ $table.before($stacktable);
50
+ if (settings.hideOriginal) $table.hide();
51
+ });
52
+ };
53
+
54
+ }(jQuery));
@@ -0,0 +1,355 @@
1
+ /*
2
+
3
+ jQuery Tags Input Plugin 1.3.3
4
+
5
+ Copyright (c) 2011 XOXCO, Inc
6
+
7
+ Documentation for this plugin lives here:
8
+ http://xoxco.com/clickable/jquery-tags-input
9
+
10
+ Licensed under the MIT license:
11
+ http://www.opensource.org/licenses/mit-license.php
12
+
13
+ ben@xoxco.com
14
+
15
+ */
16
+
17
+ (function($) {
18
+
19
+ var delimiter = new Array();
20
+ var tags_callbacks = new Array();
21
+ $.fn.doAutosize = function(o){
22
+ var minWidth = $(this).data('minwidth'),
23
+ maxWidth = $(this).data('maxwidth'),
24
+ val = '',
25
+ input = $(this),
26
+ testSubject = $('#'+$(this).data('tester_id'));
27
+
28
+ if (val === (val = input.val())) {return;}
29
+
30
+ // Enter new content into testSubject
31
+ var escaped = val.replace(/&/g, '&amp;').replace(/\s/g,' ').replace(/</g, '&lt;').replace(/>/g, '&gt;');
32
+ testSubject.html(escaped);
33
+ // Calculate new width + whether to change
34
+ var testerWidth = testSubject.width(),
35
+ newWidth = (testerWidth + o.comfortZone) >= minWidth ? testerWidth + o.comfortZone : minWidth,
36
+ currentWidth = input.width(),
37
+ isValidWidthChange = (newWidth < currentWidth && newWidth >= minWidth)
38
+ || (newWidth > minWidth && newWidth < maxWidth);
39
+
40
+ // Animate width
41
+ if (isValidWidthChange) {
42
+ input.width(newWidth);
43
+ }
44
+
45
+
46
+ };
47
+ $.fn.resetAutosize = function(options){
48
+ // alert(JSON.stringify(options));
49
+ var minWidth = $(this).data('minwidth') || options.minInputWidth || $(this).width(),
50
+ maxWidth = $(this).data('maxwidth') || options.maxInputWidth || ($(this).closest('.tagsinput').width() - options.inputPadding),
51
+ val = '',
52
+ input = $(this),
53
+ testSubject = $('<tester/>').css({
54
+ position: 'absolute',
55
+ top: -9999,
56
+ left: -9999,
57
+ width: 'auto',
58
+ fontSize: input.css('fontSize'),
59
+ fontFamily: input.css('fontFamily'),
60
+ fontWeight: input.css('fontWeight'),
61
+ letterSpacing: input.css('letterSpacing'),
62
+ whiteSpace: 'nowrap'
63
+ }),
64
+ testerId = $(this).attr('id')+'_autosize_tester';
65
+ if(! $('#'+testerId).length > 0){
66
+ testSubject.attr('id', testerId);
67
+ testSubject.appendTo('body');
68
+ }
69
+
70
+ input.data('minwidth', minWidth);
71
+ input.data('maxwidth', maxWidth);
72
+ input.data('tester_id', testerId);
73
+ input.css('width', minWidth);
74
+ };
75
+
76
+ $.fn.addTag = function(value,options) {
77
+ options = jQuery.extend({focus:false,callback:true},options);
78
+ this.each(function() {
79
+ var id = $(this).attr('id');
80
+
81
+ var tagslist = $(this).val().split(delimiter[id]);
82
+ if (tagslist[0] == '') {
83
+ tagslist = new Array();
84
+ }
85
+
86
+ value = jQuery.trim(value);
87
+
88
+ if (options.unique) {
89
+ var skipTag = $(this).tagExist(value);
90
+ if(skipTag == true) {
91
+ //Marks fake input as not_valid to let styling it
92
+ $('#'+id+'_tag').addClass('not_valid');
93
+ }
94
+ } else {
95
+ var skipTag = false;
96
+ }
97
+
98
+ if (value !='' && skipTag != true) {
99
+ $('<span>').addClass('tag').append(
100
+ $('<span>').text(value).append('&nbsp;&nbsp;'),
101
+ $('<a class="tagsinput-remove-link">', {
102
+ href : '#',
103
+ title : 'Remove tag',
104
+ text : ''
105
+ }).click(function () {
106
+ return $('#' + id).removeTag(escape(value));
107
+ })
108
+ ).insertBefore('#' + id + '_addTag');
109
+
110
+ tagslist.push(value);
111
+
112
+ $('#'+id+'_tag').val('');
113
+ if (options.focus) {
114
+ $('#'+id+'_tag').focus();
115
+ } else {
116
+ $('#'+id+'_tag').blur();
117
+ }
118
+
119
+ $.fn.tagsInput.updateTagsField(this,tagslist);
120
+
121
+ if (options.callback && tags_callbacks[id] && tags_callbacks[id]['onAddTag']) {
122
+ var f = tags_callbacks[id]['onAddTag'];
123
+ f.call(this, value);
124
+ }
125
+ if(tags_callbacks[id] && tags_callbacks[id]['onChange'])
126
+ {
127
+ var i = tagslist.length;
128
+ var f = tags_callbacks[id]['onChange'];
129
+ f.call(this, $(this), tagslist[i-1]);
130
+ }
131
+ }
132
+
133
+ });
134
+
135
+ return false;
136
+ };
137
+
138
+ $.fn.removeTag = function(value) {
139
+ value = unescape(value);
140
+ this.each(function() {
141
+ var id = $(this).attr('id');
142
+
143
+ var old = $(this).val().split(delimiter[id]);
144
+
145
+ $('#'+id+'_tagsinput .tag').remove();
146
+ str = '';
147
+ for (i=0; i< old.length; i++) {
148
+ if (old[i]!=value) {
149
+ str = str + delimiter[id] +old[i];
150
+ }
151
+ }
152
+
153
+ $.fn.tagsInput.importTags(this,str);
154
+
155
+ if (tags_callbacks[id] && tags_callbacks[id]['onRemoveTag']) {
156
+ var f = tags_callbacks[id]['onRemoveTag'];
157
+ f.call(this, value);
158
+ }
159
+ });
160
+
161
+ return false;
162
+ };
163
+
164
+ $.fn.tagExist = function(val) {
165
+ var id = $(this).attr('id');
166
+ var tagslist = $(this).val().split(delimiter[id]);
167
+ return (jQuery.inArray(val, tagslist) >= 0); //true when tag exists, false when not
168
+ };
169
+
170
+ // clear all existing tags and import new ones from a string
171
+ $.fn.importTags = function(str) {
172
+ id = $(this).attr('id');
173
+ $('#'+id+'_tagsinput .tag').remove();
174
+ $.fn.tagsInput.importTags(this,str);
175
+ }
176
+
177
+ $.fn.tagsInput = function(options) {
178
+ var settings = jQuery.extend({
179
+ interactive:true,
180
+ defaultText:'',
181
+ minChars:0,
182
+ width:'',
183
+ height:'',
184
+ autocomplete: {selectFirst: false },
185
+ 'hide':true,
186
+ 'delimiter':',',
187
+ 'unique':true,
188
+ removeWithBackspace:true,
189
+ placeholderColor:'#666666',
190
+ autosize: true,
191
+ comfortZone: 20,
192
+ inputPadding: 6*2
193
+ },options);
194
+
195
+ this.each(function() {
196
+ if (settings.hide) {
197
+ $(this).hide();
198
+ }
199
+ var id = $(this).attr('id');
200
+ if (!id || delimiter[$(this).attr('id')]) {
201
+ id = $(this).attr('id', 'tags' + new Date().getTime()).attr('id');
202
+ }
203
+
204
+ var data = jQuery.extend({
205
+ pid:id,
206
+ real_input: '#'+id,
207
+ holder: '#'+id+'_tagsinput',
208
+ input_wrapper: '#'+id+'_addTag',
209
+ fake_input: '#'+id+'_tag'
210
+ },settings);
211
+
212
+ delimiter[id] = data.delimiter;
213
+
214
+ if (settings.onAddTag || settings.onRemoveTag || settings.onChange) {
215
+ tags_callbacks[id] = new Array();
216
+ tags_callbacks[id]['onAddTag'] = settings.onAddTag;
217
+ tags_callbacks[id]['onRemoveTag'] = settings.onRemoveTag;
218
+ tags_callbacks[id]['onChange'] = settings.onChange;
219
+ }
220
+
221
+ var containerClass = $('#'+id).attr('class').replace('tagsinput', '');
222
+ var markup = '<div id="'+id+'_tagsinput" class="tagsinput '+containerClass+'"><div class="tagsinput-add-container" id="'+id+'_addTag"><div class="tagsinput-add"></div>';
223
+
224
+ if (settings.interactive) {
225
+ markup = markup + '<input id="'+id+'_tag" value="" data-default="'+settings.defaultText+'" />';
226
+ }
227
+
228
+ markup = markup + '</div></div>';
229
+
230
+ $(markup).insertAfter(this);
231
+
232
+ $(data.holder).css('width',settings.width);
233
+ $(data.holder).css('min-height',settings.height);
234
+ $(data.holder).css('height','100%');
235
+
236
+ if ($(data.real_input).val()!='') {
237
+ $.fn.tagsInput.importTags($(data.real_input),$(data.real_input).val());
238
+ }
239
+ if (settings.interactive) {
240
+ $(data.fake_input).val($(data.fake_input).attr('data-default'));
241
+ $(data.fake_input).css('color',settings.placeholderColor);
242
+ $(data.fake_input).resetAutosize(settings);
243
+
244
+ $(data.holder).bind('click',data,function(event) {
245
+ $(event.data.fake_input).focus();
246
+ });
247
+
248
+ $(data.fake_input).bind('focus',data,function(event) {
249
+ if ($(event.data.fake_input).val()==$(event.data.fake_input).attr('data-default')) {
250
+ $(event.data.fake_input).val('');
251
+ }
252
+ $(event.data.fake_input).css('color','#000000');
253
+ });
254
+
255
+ if (settings.autocomplete_url != undefined) {
256
+ autocomplete_options = {source: settings.autocomplete_url};
257
+ for (attrname in settings.autocomplete) {
258
+ autocomplete_options[attrname] = settings.autocomplete[attrname];
259
+ }
260
+
261
+ if (jQuery.Autocompleter !== undefined) {
262
+ $(data.fake_input).autocomplete(settings.autocomplete_url, settings.autocomplete);
263
+ $(data.fake_input).bind('result',data,function(event,data,formatted) {
264
+ if (data) {
265
+ $('#'+id).addTag(data[0] + "",{focus:true,unique:(settings.unique)});
266
+ }
267
+ });
268
+ } else if (jQuery.ui.autocomplete !== undefined) {
269
+ $(data.fake_input).autocomplete(autocomplete_options);
270
+ $(data.fake_input).bind('autocompleteselect',data,function(event,ui) {
271
+ $(event.data.real_input).addTag(ui.item.value,{focus:true,unique:(settings.unique)});
272
+ return false;
273
+ });
274
+ }
275
+
276
+
277
+ } else {
278
+ // if a user tabs out of the field, create a new tag
279
+ // this is only available if autocomplete is not used.
280
+ $(data.fake_input).bind('blur',data,function(event) {
281
+ var d = $(this).attr('data-default');
282
+ if ($(event.data.fake_input).val()!='' && $(event.data.fake_input).val()!=d) {
283
+ if( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) )
284
+ $(event.data.real_input).addTag($(event.data.fake_input).val(),{focus:true,unique:(settings.unique)});
285
+ } else {
286
+ $(event.data.fake_input).val($(event.data.fake_input).attr('data-default'));
287
+ $(event.data.fake_input).css('color',settings.placeholderColor);
288
+ }
289
+ return false;
290
+ });
291
+
292
+ }
293
+ // if user types a comma, create a new tag
294
+ $(data.fake_input).bind('keypress',data,function(event) {
295
+ if (event.which==event.data.delimiter.charCodeAt(0) || event.which==13 ) {
296
+ event.preventDefault();
297
+ if( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) )
298
+ $(event.data.real_input).addTag($(event.data.fake_input).val(),{focus:true,unique:(settings.unique)});
299
+ $(event.data.fake_input).resetAutosize(settings);
300
+ return false;
301
+ } else if (event.data.autosize) {
302
+ $(event.data.fake_input).doAutosize(settings);
303
+
304
+ }
305
+ });
306
+ //Delete last tag on backspace
307
+ data.removeWithBackspace && $(data.fake_input).bind('keydown', function(event)
308
+ {
309
+ if(event.keyCode == 8 && $(this).val() == '')
310
+ {
311
+ event.preventDefault();
312
+ var last_tag = $(this).closest('.tagsinput').find('.tag:last').text();
313
+ var id = $(this).attr('id').replace(/_tag$/, '');
314
+ last_tag = last_tag.replace(/[\s\u00a0]+x$/, '');
315
+ $('#' + id).removeTag(escape(last_tag));
316
+ $(this).trigger('focus');
317
+ }
318
+ });
319
+ $(data.fake_input).blur();
320
+
321
+ //Removes the not_valid class when user changes the value of the fake input
322
+ if(data.unique) {
323
+ $(data.fake_input).keydown(function(event){
324
+ if(event.keyCode == 8 || String.fromCharCode(event.which).match(/\w+|[áéíóúÁÉÍÓÚñÑ,/]+/)) {
325
+ $(this).removeClass('not_valid');
326
+ }
327
+ });
328
+ }
329
+ } // if settings.interactive
330
+ });
331
+
332
+ return this;
333
+
334
+ };
335
+
336
+ $.fn.tagsInput.updateTagsField = function(obj,tagslist) {
337
+ var id = $(obj).attr('id');
338
+ $(obj).val(tagslist.join(delimiter[id]));
339
+ };
340
+
341
+ $.fn.tagsInput.importTags = function(obj,val) {
342
+ $(obj).val('');
343
+ var id = $(obj).attr('id');
344
+ var tags = val.split(delimiter[id]);
345
+ for (i=0; i<tags.length; i++) {
346
+ $(obj).addTag(tags[i],{focus:false,callback:false});
347
+ }
348
+ if(tags_callbacks[id] && tags_callbacks[id]['onChange'])
349
+ {
350
+ var f = tags_callbacks[id]['onChange'];
351
+ f.call(obj, obj, tags[i]);
352
+ }
353
+ };
354
+
355
+ })(jQuery);
@@ -0,0 +1,11 @@
1
+ /*
2
+ * jQuery UI Touch Punch 0.2.2
3
+ *
4
+ * Copyright 2011, Dave Furfero
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ *
7
+ * Depends:
8
+ * jquery.ui.widget.js
9
+ * jquery.ui.mouse.js
10
+ */
11
+ (function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);
@@ -0,0 +1,45 @@
1
+ // Flat UI main stylesheet that aggregates all modules
2
+
3
+ // Loading custom fonts
4
+ //@import url("https://fonts.googleapis.com/css?family=Lato:400,700,700italic,900,400italic,300");
5
+ @import "flat-ui/fonts";
6
+ @import "flat-ui/icon-font";
7
+
8
+ // Loading config with variables (changing them leads to changing a color scheme)
9
+ @import "flat-ui/variables";
10
+
11
+ // Utility mixins for greater good
12
+ @import "flat-ui/mixins";
13
+
14
+ @import "flat-ui/scaffolding";
15
+
16
+ // Modules
17
+ @import "flat-ui/modules/type";
18
+ @import "flat-ui/modules/buttons";
19
+ @import "flat-ui/modules/caret";
20
+ @import "flat-ui/modules/navbar";
21
+ @import "flat-ui/modules/select";
22
+ @import "flat-ui/modules/forms";
23
+ @import "flat-ui/modules/input-icons";
24
+ @import "flat-ui/modules/checkbox-and-radio";
25
+ @import "flat-ui/modules/tagsinput";
26
+ @import "flat-ui/modules/progress-bars";
27
+ @import "flat-ui/modules/ui-slider";
28
+ @import "flat-ui/modules/pager";
29
+ @import "flat-ui/modules/pagination";
30
+ @import "flat-ui/modules/tooltip";
31
+ @import "flat-ui/modules/dropdown";
32
+ @import "flat-ui/modules/switch";
33
+ @import "flat-ui/modules/share";
34
+
35
+ // Examples
36
+ @import "flat-ui/modules/palette";
37
+ @import "flat-ui/modules/tile";
38
+ @import "flat-ui/modules/todo";
39
+ @import "flat-ui/modules/video";
40
+ @import "flat-ui/modules/login";
41
+
42
+ @import "flat-ui/modules/footer";
43
+
44
+ // Spaces
45
+ @import "flat-ui/spaces";