adminpanel 2.1.7 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +11 -3
  3. data/Gemfile +3 -27
  4. data/adminpanel.gemspec +24 -23
  5. data/app/assets/images/adminpanel/loguito.png +0 -0
  6. data/app/assets/javascripts/adminpanel/bootstrap-wysihtml5-4pre.js +120 -120
  7. data/app/assets/javascripts/adminpanel/spinner.js.coffee +6 -6
  8. data/app/assets/stylesheets/adminpanel/bootstrap-wysihtml5.css +21 -75
  9. data/app/controllers/adminpanel/analytics_controller.rb +34 -2
  10. data/app/controllers/adminpanel/application_controller.rb +7 -6
  11. data/app/controllers/adminpanel/categories_controller.rb +0 -1
  12. data/app/controllers/adminpanel/galleries_controller.rb +0 -1
  13. data/app/controllers/adminpanel/permissions_controller.rb +14 -0
  14. data/app/controllers/adminpanel/rols_controller.rb +10 -0
  15. data/app/controllers/adminpanel/sections_controller.rb +11 -14
  16. data/app/controllers/adminpanel/sessions_controller.rb +45 -11
  17. data/app/controllers/adminpanel/users_controller.rb +2 -4
  18. data/app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb +31 -0
  19. data/app/controllers/concerns/adminpanel/analytics/twitter_analytics.rb +25 -0
  20. data/app/controllers/concerns/adminpanel/facebook_actions.rb +7 -5
  21. data/app/controllers/concerns/adminpanel/rest_actions.rb +12 -0
  22. data/app/controllers/concerns/adminpanel/twitter_actions.rb +40 -0
  23. data/app/helpers/adminpanel/adminpanel_form_builder.rb +21 -14
  24. data/app/helpers/adminpanel/analytics_helper.rb +22 -2
  25. data/app/helpers/adminpanel/application_helper.rb +2 -2
  26. data/app/helpers/adminpanel/breadcrumbs_helper.rb +8 -6
  27. data/app/helpers/adminpanel/router_helper.rb +4 -0
  28. data/app/helpers/adminpanel/sessions_helper.rb +2 -2
  29. data/app/helpers/adminpanel/shared_pages_helper.rb +3 -3
  30. data/{lib/generators/adminpanel/initialize/templates → app/models}/ability.rb +18 -6
  31. data/app/models/adminpanel/analytic.rb +1 -0
  32. data/app/models/adminpanel/auth.rb +4 -1
  33. data/app/models/adminpanel/permission.rb +52 -0
  34. data/app/models/adminpanel/rol.rb +35 -0
  35. data/app/models/adminpanel/user.rb +8 -8
  36. data/app/models/concerns/adminpanel/base.rb +4 -0
  37. data/app/models/concerns/adminpanel/facebook.rb +1 -1
  38. data/app/models/concerns/adminpanel/twitter.rb +27 -0
  39. data/app/views/adminpanel/analytics/{_widget_task_statistics.html.erb → _fb_statistic_widget.html.erb} +0 -0
  40. data/app/views/adminpanel/analytics/_header.html.erb +8 -2
  41. data/app/views/adminpanel/analytics/_instagram_details_modal.html.erb +55 -0
  42. data/app/views/adminpanel/analytics/_instagram_media.html.erb +25 -0
  43. data/app/views/adminpanel/analytics/_tweet.html.erb +32 -0
  44. data/app/views/adminpanel/analytics/_twitter_reply_modal.html.erb +41 -0
  45. data/app/views/adminpanel/analytics/fb.html.erb +6 -6
  46. data/app/views/adminpanel/analytics/instagram.html.erb +65 -0
  47. data/app/views/adminpanel/analytics/twitter.html.erb +89 -0
  48. data/app/views/adminpanel/sections/edit.html.erb +2 -5
  49. data/app/views/layouts/_side_menu.html.erb +3 -3
  50. data/app/views/layouts/admin.html.erb +2 -2
  51. data/app/views/shared/_delete_icon_button.html.erb +1 -1
  52. data/app/views/shared/_edit_icon_button.html.erb +1 -1
  53. data/app/views/shared/_fb_icon_button.html.erb +1 -1
  54. data/app/views/shared/_form_fields.html.erb +1 -1
  55. data/app/views/shared/_new_resource_button.html.erb +1 -2
  56. data/app/views/shared/_twitter_icon_button.html.erb +26 -0
  57. data/app/views/shared/_twitter_publish_modal.html.erb +40 -0
  58. data/app/views/shared/index.html.erb +5 -3
  59. data/app/views/shared/show.html.erb +7 -3
  60. data/config/initializers/twitter-oauth.rb +15 -0
  61. data/config/locales/en.yml +1 -1
  62. data/config/locales/es.yml +20 -1
  63. data/config/routes.rb +25 -5
  64. data/lib/adminpanel.rb +3 -0
  65. data/lib/adminpanel/engine.rb +19 -5
  66. data/lib/adminpanel/version.rb +1 -1
  67. data/lib/generators/adminpanel/initialize/initialize_generator.rb +0 -11
  68. data/lib/generators/adminpanel/initialize/templates/adminpanel_setup.rb +12 -0
  69. data/lib/generators/adminpanel/initialize/templates/create_adminpanel_tables.rb +74 -46
  70. data/lib/generators/adminpanel/resource/resource_generator_helper.rb +1 -1
  71. data/lib/generators/adminpanel/resource/templates/adminpanel_resource_template.rb +1 -1
  72. data/lib/tasks/adminpanel/adminpanel.rake +5 -5
  73. data/test/dummy/app/models/adminpanel/item.rb +1 -1
  74. data/test/dummy/app/models/adminpanel/mug.rb +1 -0
  75. data/test/dummy/app/models/adminpanel/photo.rb +4 -0
  76. data/test/dummy/app/models/adminpanel/product.rb +7 -1
  77. data/test/dummy/app/models/adminpanel/salesman.rb +1 -0
  78. data/test/dummy/app/views/layouts/application.html.erb +0 -1
  79. data/test/dummy/db/schema.rb +9 -2
  80. data/test/dummy/test/fixtures/adminpanel/permissions.yml +42 -0
  81. data/test/dummy/test/fixtures/adminpanel/rols.yml +28 -0
  82. data/test/dummy/test/fixtures/adminpanel/salesmen.yml +1 -0
  83. data/test/dummy/test/fixtures/adminpanel/users.yml +49 -1
  84. data/test/features/shared/resource/index_test.rb +1 -0
  85. data/test/features/shared/ui/action_exclution_test.rb +1 -0
  86. data/test/helpers/breadcrumbs_helper_test.rb +34 -0
  87. data/test/helpers/router_helper_test.rb +21 -0
  88. data/test/helpers/shared_pages_helper_test.rb +35 -0
  89. data/test/models/ability_test.rb +52 -0
  90. data/test/models/adminpanel/gallery_test.rb +0 -2
  91. data/test/models/adminpanel/user_test.rb +1 -1
  92. data/test/support/shared_database.rb +11 -0
  93. data/test/support/view_case.rb +34 -0
  94. data/test/tasks/adminpanel_rake_test.rb +5 -2
  95. data/test/test_helper.rb +1 -41
  96. metadata +191 -200
  97. data/app/assets/javascripts/adminpanel/jquery.facybox.js +0 -395
  98. data/app/assets/stylesheets/adminpanel/facybox.css +0 -146
  99. data/app/models/adminpanel/group.rb +0 -6
  100. data/test/dummy/Rakefile +0 -7
  101. data/test/dummy/app/models/ability.rb +0 -31
  102. data/test/dummy/test/fixtures/adminpanel/groups.yml +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29da0ab7934a207e655ae798422d487cf95aa113
4
- data.tar.gz: 162367dba7e94eacd6d246a6829d2d1a71ca44c7
3
+ metadata.gz: f84a209292db49342941725abd3f75e4f12c3058
4
+ data.tar.gz: 41a69bde0bfab0a8b24bee98a6ca75564966a51e
5
5
  SHA512:
6
- metadata.gz: a362a95b1f340f7ce1b1a0c3a4d0fefb37f1aab00bd408ed96252f80b401bee2a4666b2faf33743ebbb839b5d846d4a0523da3848da9bd548283ac9d06926664
7
- data.tar.gz: 785958fa8f8db09d066e7579b5bea0b957fdf865a79832711a16619119c8b5679356b18abee964c3d54b61919385555912f9450c6957386433e5b6bd1745f0f3
6
+ metadata.gz: 20fdceadae757d3108d236257263300231dda0f5ef36814e03bbadea1d39ad571fb986858080efacfbe9d3fd4e89be064b3aff62430eb9d8c3219d940a9da6d9
7
+ data.tar.gz: 2214f3c49105376a9397952a80384ed292a116064fd1dce0248d4796c4ae5d0874c19e414feb5f0b318bc02a2aa44c3c489a5ca73063b7a70ce984447f239e24
data/.travis.yml CHANGED
@@ -1,7 +1,15 @@
1
1
  language: ruby
2
+
2
3
  rvm:
3
- - 2.1.1
4
+ - 2.1
5
+
6
+ sudo: false
7
+
8
+ cache: bundler
9
+
4
10
  env:
5
- - RAILS=4.0.4
6
- - RAILS=4.1.0
11
+ - RAILS=4.0.8
7
12
  - RAILS=4.1.1
13
+ - RAILS=4.1.2
14
+ - RAILS=4.1.3
15
+ - RAILS=4.1.4
data/Gemfile CHANGED
@@ -1,32 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in adminpanel.gemspec
4
- # gemspec
5
-
6
- gem 'rails', '>= 4.0.0', '<= 4.1.1'
7
- gem 'carrierwave', '~> 0.10.0'
8
- gem 'rmagick', '2.13.2', require: false
9
- gem 'jquery-rails', '~> 3.1.0'
10
- gem 'bcrypt', '~> 3.1.7'
11
- gem 'rails-i18n', '~> 4.0.2'
12
- gem 'inherited_resources', '~> 1.4.1'
13
- gem 'google-api-client', '~> 0.7.1'
14
- gem 'cancancan', '>= 1.7.1', '<= 1.8'
15
- gem 'faker', '>= 1.3.0'
16
- gem 'turbolinks', '>= 2.2.2'
17
- gem 'font-awesome-rails', '>= 4.0.3.1'
18
- gem 'koala', '>= 1.9.0', '<= 2.0.0'
3
+ gemspec :development_group => :test
19
4
 
20
5
  group :assets do
21
- gem 'coffee-script', require: true
22
- gem 'sass-rails', '>= 4.0.3', require: true
23
- end
24
-
25
- group :development, :test do
26
- gem 'minitest', '>= 5.3.4', '<= 6.0.0'
27
- gem 'sqlite3', '>= 1.3.9', '<= 2.0.0', :platform => [:ruby, :mswin, :mingw]
28
- gem 'minitest-emoji', '2.0.0'
29
- gem 'minitest-capybara', '>= 0.6.1', '<= 1.0.0'
30
- # gem 'mocha'
31
- gem 'poltergeist', '>= 1.5.1', '<= 2.0.0'
6
+ gem 'sass-rails', '~> 4.0'
7
+ gem 'coffee-rails', '~> 4.0.1'
32
8
  end
data/adminpanel.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Adminpanel::VERSION
9
9
  spec.authors = ['Jose Ramon Camacho', 'Victor Camacho']
10
10
  spec.email = ['info@codn.mx']
11
- spec.description = %q{Gem that makes the CMS for a site a breeze!, supports facebook sharing and analytics integration}
11
+ spec.description = %q{Gem that makes the CMS for a site a breeze!, supports facebook sharing, twitter, instagram and analytics integration}
12
12
  spec.summary = %q{Made with <3 by CoDN}
13
13
  spec.homepage = 'https://github.com/joseramonc/adminpanel'
14
14
  spec.license = 'MIT'
@@ -20,29 +20,30 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = '>= 2.0.0'
22
22
 
23
- spec.requirements << 'rmagick, v 2.13.2'
23
+ spec.requirements << 'rmagick, -v 2.13.2'
24
24
 
25
- spec.add_runtime_dependency 'rails', '>= 4.0.0', '<= 4.1.1'
26
- spec.add_runtime_dependency 'carrierwave', '>= 0.10.0', '<= 1.0.0'
27
- spec.add_runtime_dependency 'rmagick', '2.13.2'
28
- spec.add_runtime_dependency 'jquery-rails', '>= 3.1.0', '<= 4.0.0'
29
- spec.add_runtime_dependency 'turbolinks', '>= 2.2.2', '<= 3.0.0'
30
- spec.add_runtime_dependency 'bcrypt', '>= 3.1.7', '<= 4.0.0'
31
- spec.add_runtime_dependency 'rails-i18n', '>= 4.0.2', '<= 4.1.0'
32
- spec.add_runtime_dependency 'inherited_resources', '>= 1.4.1', '<= 2.0.0'
33
- spec.add_runtime_dependency 'cancancan', '>= 1.7', '<= 2.0.0'
34
- spec.add_runtime_dependency 'google-api-client', '>= 0.7.1', '<= 1.0.0'
35
- spec.add_runtime_dependency 'faker', '>= 1.3.0', '<= 2.0.0'
36
- spec.add_runtime_dependency 'sass-rails', '>= 4.0.3', '<= 4.1.0'
37
- spec.add_runtime_dependency 'font-awesome-rails', '>= 4.0.3.1', '<= 4.1.0'
38
- spec.add_runtime_dependency 'koala', '>= 1.9.0', '<= 2.0.0'
39
- spec.add_runtime_dependency 'coffee-script', '>= 2.2.0', '<= 3.0.0'
25
+ spec.add_runtime_dependency 'rails', '>= 4.0.0','<= 4.1.4'
26
+ spec.add_runtime_dependency 'rmagick', '2.13.2'
27
+ spec.add_runtime_dependency 'bcrypt', '~> 3.1', '>= 3.1.7'
28
+ spec.add_runtime_dependency 'carrierwave', '~> 0.10', '>= 0.10.0'
29
+ spec.add_runtime_dependency 'rails-i18n', '~> 4.0'
30
+ spec.add_runtime_dependency 'inherited_resources', '~> 1.5'
31
+ spec.add_runtime_dependency 'cancancan', '~> 1.8'
32
+ spec.add_runtime_dependency 'google-api-client', '0.7.1'
33
+ spec.add_runtime_dependency 'faker', '~> 1.3', '>= 1.3.0'
34
+ spec.add_runtime_dependency 'font-awesome-rails', '~> 4.1', '>= 4.1.0'
35
+ spec.add_runtime_dependency 'koala', '1.9.0'
36
+ spec.add_runtime_dependency 'twitter', '5.11.0'
37
+ spec.add_runtime_dependency 'omniauth-twitter', '1.0.1'
38
+ spec.add_runtime_dependency 'instagram', '1.1.1'
40
39
 
41
- spec.add_development_dependency 'sqlite3', '>= 1.3.9', '<= 2.0.0'
42
- spec.add_development_dependency 'minitest', '>= 5.3.4', '<= 6.0.0'
43
- spec.add_development_dependency 'minitest-emoji', '2.0.0'
44
- spec.add_development_dependency 'minitest-capybara', '>= 0.6.1', '<= 1.0.0'
40
+ spec.add_development_dependency 'jquery-rails', '~> 3.0.0', '>= 3.0.0'
41
+ spec.add_development_dependency 'turbolinks', '~> 2.2.2', '>= 2.2.2'
42
+
43
+ spec.add_development_dependency 'sqlite3', '~> 1.3', '1.3.9'
44
+ spec.add_development_dependency 'minitest', '5.3.5'
45
+ spec.add_development_dependency 'minitest-emoji', '2.0.0'
46
+ spec.add_development_dependency 'minitest-capybara','~> 0.7', '>= 0.7.1'
45
47
  # spec.add_development_dependency 'mocha'
46
- spec.add_development_dependency 'poltergeist', '>= 1.5.1', '<= 2.0.0'
47
- # spec.add_development_dependency 'minitest-debugger'
48
+ spec.add_development_dependency 'poltergeist', '~> 1.5', '>= 1.5.1'
48
49
  end
@@ -3244,143 +3244,143 @@ rangy.createModule("DomUtil", function(api, module) {
3244
3244
  });
3245
3245
  });
3246
3246
  /*
3247
- Base.js, version 1.1a
3248
- Copyright 2006-2010, Dean Edwards
3249
- License: http://www.opensource.org/licenses/mit-license.php
3247
+ Base.js, version 1.1a
3248
+ Copyright 2006-2010, Dean Edwards
3249
+ License: http://www.opensource.org/licenses/mit-license.php
3250
3250
  */
3251
3251
 
3252
3252
  var Base = function() {
3253
- // dummy
3253
+ // dummy
3254
3254
  };
3255
3255
 
3256
3256
  Base.extend = function(_instance, _static) { // subclass
3257
- var extend = Base.prototype.extend;
3257
+ var extend = Base.prototype.extend;
3258
3258
 
3259
- // build the prototype
3260
- Base._prototyping = true;
3261
- var proto = new this;
3262
- extend.call(proto, _instance);
3259
+ // build the prototype
3260
+ Base._prototyping = true;
3261
+ var proto = new this;
3262
+ extend.call(proto, _instance);
3263
3263
  proto.base = function() {
3264
3264
  // call this method from any other method to invoke that method's ancestor
3265
3265
  };
3266
- delete Base._prototyping;
3267
-
3268
- // create the wrapper for the constructor function
3269
- //var constructor = proto.constructor.valueOf(); //-dean
3270
- var constructor = proto.constructor;
3271
- var klass = proto.constructor = function() {
3272
- if (!Base._prototyping) {
3273
- if (this._constructing || this.constructor == klass) { // instantiation
3274
- this._constructing = true;
3275
- constructor.apply(this, arguments);
3276
- delete this._constructing;
3277
- } else if (arguments[0] != null) { // casting
3278
- return (arguments[0].extend || extend).call(arguments[0], proto);
3279
- }
3280
- }
3281
- };
3282
-
3283
- // build the class interface
3284
- klass.ancestor = this;
3285
- klass.extend = this.extend;
3286
- klass.forEach = this.forEach;
3287
- klass.implement = this.implement;
3288
- klass.prototype = proto;
3289
- klass.toString = this.toString;
3290
- klass.valueOf = function(type) {
3291
- //return (type == "object") ? klass : constructor; //-dean
3292
- return (type == "object") ? klass : constructor.valueOf();
3293
- };
3294
- extend.call(klass, _static);
3295
- // class initialisation
3296
- if (typeof klass.init == "function") klass.init();
3297
- return klass;
3266
+ delete Base._prototyping;
3267
+
3268
+ // create the wrapper for the constructor function
3269
+ //var constructor = proto.constructor.valueOf(); //-dean
3270
+ var constructor = proto.constructor;
3271
+ var klass = proto.constructor = function() {
3272
+ if (!Base._prototyping) {
3273
+ if (this._constructing || this.constructor == klass) { // instantiation
3274
+ this._constructing = true;
3275
+ constructor.apply(this, arguments);
3276
+ delete this._constructing;
3277
+ } else if (arguments[0] != null) { // casting
3278
+ return (arguments[0].extend || extend).call(arguments[0], proto);
3279
+ }
3280
+ }
3281
+ };
3282
+
3283
+ // build the class interface
3284
+ klass.ancestor = this;
3285
+ klass.extend = this.extend;
3286
+ klass.forEach = this.forEach;
3287
+ klass.implement = this.implement;
3288
+ klass.prototype = proto;
3289
+ klass.toString = this.toString;
3290
+ klass.valueOf = function(type) {
3291
+ //return (type == "object") ? klass : constructor; //-dean
3292
+ return (type == "object") ? klass : constructor.valueOf();
3293
+ };
3294
+ extend.call(klass, _static);
3295
+ // class initialisation
3296
+ if (typeof klass.init == "function") klass.init();
3297
+ return klass;
3298
3298
  };
3299
3299
 
3300
3300
  Base.prototype = {
3301
- extend: function(source, value) {
3302
- if (arguments.length > 1) { // extending with a name/value pair
3303
- var ancestor = this[source];
3304
- if (ancestor && (typeof value == "function") && // overriding a method?
3305
- // the valueOf() comparison is to avoid circular references
3306
- (!ancestor.valueOf || ancestor.valueOf() != value.valueOf()) &&
3307
- /\bbase\b/.test(value)) {
3308
- // get the underlying method
3309
- var method = value.valueOf();
3310
- // override
3311
- value = function() {
3312
- var previous = this.base || Base.prototype.base;
3313
- this.base = ancestor;
3314
- var returnValue = method.apply(this, arguments);
3315
- this.base = previous;
3316
- return returnValue;
3317
- };
3318
- // point to the underlying method
3319
- value.valueOf = function(type) {
3320
- return (type == "object") ? value : method;
3321
- };
3322
- value.toString = Base.toString;
3323
- }
3324
- this[source] = value;
3325
- } else if (source) { // extending with an object literal
3326
- var extend = Base.prototype.extend;
3327
- // if this object has a customised extend method then use it
3328
- if (!Base._prototyping && typeof this != "function") {
3329
- extend = this.extend || extend;
3330
- }
3331
- var proto = {toSource: null};
3332
- // do the "toString" and other methods manually
3333
- var hidden = ["constructor", "toString", "valueOf"];
3334
- // if we are prototyping then include the constructor
3335
- var i = Base._prototyping ? 0 : 1;
3336
- while (key = hidden[i++]) {
3337
- if (source[key] != proto[key]) {
3338
- extend.call(this, key, source[key]);
3339
-
3340
- }
3341
- }
3342
- // copy each of the source object's properties to this object
3343
- for (var key in source) {
3344
- if (!proto[key]) extend.call(this, key, source[key]);
3345
- }
3346
- }
3347
- return this;
3348
- }
3301
+ extend: function(source, value) {
3302
+ if (arguments.length > 1) { // extending with a name/value pair
3303
+ var ancestor = this[source];
3304
+ if (ancestor && (typeof value == "function") && // overriding a method?
3305
+ // the valueOf() comparison is to avoid circular references
3306
+ (!ancestor.valueOf || ancestor.valueOf() != value.valueOf()) &&
3307
+ /\bbase\b/.test(value)) {
3308
+ // get the underlying method
3309
+ var method = value.valueOf();
3310
+ // override
3311
+ value = function() {
3312
+ var previous = this.base || Base.prototype.base;
3313
+ this.base = ancestor;
3314
+ var returnValue = method.apply(this, arguments);
3315
+ this.base = previous;
3316
+ return returnValue;
3317
+ };
3318
+ // point to the underlying method
3319
+ value.valueOf = function(type) {
3320
+ return (type == "object") ? value : method;
3321
+ };
3322
+ value.toString = Base.toString;
3323
+ }
3324
+ this[source] = value;
3325
+ } else if (source) { // extending with an object literal
3326
+ var extend = Base.prototype.extend;
3327
+ // if this object has a customised extend method then use it
3328
+ if (!Base._prototyping && typeof this != "function") {
3329
+ extend = this.extend || extend;
3330
+ }
3331
+ var proto = {toSource: null};
3332
+ // do the "toString" and other methods manually
3333
+ var hidden = ["constructor", "toString", "valueOf"];
3334
+ // if we are prototyping then include the constructor
3335
+ var i = Base._prototyping ? 0 : 1;
3336
+ while (key = hidden[i++]) {
3337
+ if (source[key] != proto[key]) {
3338
+ extend.call(this, key, source[key]);
3339
+
3340
+ }
3341
+ }
3342
+ // copy each of the source object's properties to this object
3343
+ for (var key in source) {
3344
+ if (!proto[key]) extend.call(this, key, source[key]);
3345
+ }
3346
+ }
3347
+ return this;
3348
+ }
3349
3349
  };
3350
3350
 
3351
3351
  // initialise
3352
3352
  Base = Base.extend({
3353
- constructor: function() {
3354
- this.extend(arguments[0]);
3355
- }
3353
+ constructor: function() {
3354
+ this.extend(arguments[0]);
3355
+ }
3356
3356
  }, {
3357
- ancestor: Object,
3358
- version: "1.1",
3359
-
3360
- forEach: function(object, block, context) {
3361
- for (var key in object) {
3362
- if (this.prototype[key] === undefined) {
3363
- block.call(context, object[key], key, object);
3364
- }
3365
- }
3366
- },
3367
-
3368
- implement: function() {
3369
- for (var i = 0; i < arguments.length; i++) {
3370
- if (typeof arguments[i] == "function") {
3371
- // if it's a function, call it
3372
- arguments[i](this.prototype);
3373
- } else {
3374
- // add the interface using the extend method
3375
- this.prototype.extend(arguments[i]);
3376
- }
3377
- }
3378
- return this;
3379
- },
3380
-
3381
- toString: function() {
3382
- return String(this.valueOf());
3383
- }
3357
+ ancestor: Object,
3358
+ version: "1.1",
3359
+
3360
+ forEach: function(object, block, context) {
3361
+ for (var key in object) {
3362
+ if (this.prototype[key] === undefined) {
3363
+ block.call(context, object[key], key, object);
3364
+ }
3365
+ }
3366
+ },
3367
+
3368
+ implement: function() {
3369
+ for (var i = 0; i < arguments.length; i++) {
3370
+ if (typeof arguments[i] == "function") {
3371
+ // if it's a function, call it
3372
+ arguments[i](this.prototype);
3373
+ } else {
3374
+ // add the interface using the extend method
3375
+ this.prototype.extend(arguments[i]);
3376
+ }
3377
+ }
3378
+ return this;
3379
+ },
3380
+
3381
+ toString: function() {
3382
+ return String(this.valueOf());
3383
+ }
3384
3384
  });/**
3385
3385
  * Detect browser support for specific features
3386
3386
  */
@@ -9457,7 +9457,7 @@ wysihtml5.views.Textarea = wysihtml5.views.View.extend(
9457
9457
  // Array (or single string) of stylesheet urls to be loaded in the editor's iframe
9458
9458
  stylesheets: [],
9459
9459
  // Placeholder text to use, defaults to the placeholder attribute on the textarea element
9460
- placeholderText: undef,
9460
+ placeholderText: 'Lorem ipsum dolor sit amec',
9461
9461
  // Whether the rich text editor should be rendered on touch devices (wysihtml5 >= 0.3.0 comes with basic support for iOS 5)
9462
9462
  supportTouchDevices: true
9463
9463
  };
@@ -1,11 +1,11 @@
1
- $(document).on 'click', 'a.accordion-toggle', ->
1
+ $(document).on 'click', 'a.spinner-link', ->
2
2
  $( this ).attr 'data-clicked', true
3
3
 
4
4
  $(document).on 'page:fetch', ->
5
- $('a.accordion-toggle[data-clicked="true"]').children('i:first').toggleClass('hidden')
6
- $('a.accordion-toggle[data-clicked="true"]').prepend '<i class="fa fa-spinner fa-spin"></i>'
5
+ $('a.spinner-link[data-clicked="true"]').children('i:first').toggleClass('hidden')
6
+ $('a.spinner-link[data-clicked="true"]').prepend '<i class="fa fa-spinner fa-spin"></i>'
7
7
 
8
8
  $(document).on 'page:restore', ->
9
- $('a.accordion-toggle[data-clicked="true"]').children('i:first').remove()
10
- $('a.accordion-toggle[data-clicked="true"]').children('i:first').toggleClass 'hidden'
11
- $('a.accordion-toggle[data-clicked="true"]').data 'clicked', false
9
+ $('a.spinner-link[data-clicked="true"]').children('i:first').remove()
10
+ $('a.spinner-link[data-clicked="true"]').children('i:first').toggleClass 'hidden'
11
+ $('a.spinner-link[data-clicked="true"]').data 'clicked', false
@@ -1,102 +1,48 @@
1
1
  ul.wysihtml5-toolbar {
2
- margin: 0;
3
- padding: 0;
4
- display: block;
2
+ margin: 0;
3
+ padding: 0;
4
+ display: block;
5
5
  }
6
6
 
7
7
  ul.wysihtml5-toolbar::after {
8
- clear: both;
9
- display: table;
10
- content: "";
8
+ clear: both;
9
+ display: table;
10
+ content: "";
11
11
  }
12
12
 
13
13
  ul.wysihtml5-toolbar > li {
14
- float: left;
15
- display: list-item;
16
- list-style: none;
17
- margin: 0 5px 10px 0;
14
+ float: left;
15
+ display: list-item;
16
+ list-style: none;
17
+ margin: 0 5px 10px 0;
18
18
  }
19
19
 
20
20
  ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] {
21
- font-weight: bold;
21
+ font-weight: bold;
22
22
  }
23
23
 
24
24
  ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] {
25
- font-style: italic;
25
+ font-style: italic;
26
26
  }
27
27
 
28
28
  ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] {
29
- text-decoration: underline;
29
+ text-decoration: underline;
30
30
  }
31
31
 
32
32
  ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
33
- background-image: none;
34
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
35
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
36
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
37
- background-color: #E6E6E6;
38
- background-color: #D9D9D9;
39
- outline: 0;
33
+ background-image: none;
34
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
35
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
36
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
37
+ background-color: #E6E6E6;
38
+ background-color: #D9D9D9;
39
+ outline: 0;
40
40
  }
41
41
 
42
42
  ul.wysihtml5-commands-disabled .dropdown-menu {
43
- display: none !important;
44
- }
45
-
46
- ul.wysihtml5-toolbar div.wysihtml5-colors {
47
- display:block;
48
- width: 50px;
49
- height: 20px;
50
- margin-top: 2px;
51
- margin-left: 5px;
52
- position: absolute;
53
- pointer-events: none;
43
+ display: none !important;
54
44
  }
55
45
 
56
46
  ul.wysihtml5-toolbar a.wysihtml5-colors-title {
57
47
  padding-left: 70px;
58
48
  }
59
-
60
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] {
61
- background: black !important;
62
- }
63
-
64
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] {
65
- background: silver !important;
66
- }
67
-
68
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] {
69
- background: gray !important;
70
- }
71
-
72
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] {
73
- background: maroon !important;
74
- }
75
-
76
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] {
77
- background: red !important;
78
- }
79
-
80
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] {
81
- background: purple !important;
82
- }
83
-
84
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] {
85
- background: green !important;
86
- }
87
-
88
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] {
89
- background: olive !important;
90
- }
91
-
92
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] {
93
- background: navy !important;
94
- }
95
-
96
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] {
97
- background: blue !important;
98
- }
99
-
100
- ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] {
101
- background: orange !important;
102
- }