it-logica-application-backbone 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.20
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(c){var b,e,a=[],d=window;c.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return p}if(!j){return tinyMCE.get(p[0].id)}p.css("visibility","hidden");function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);s.onInit.add(function(){var x,y=v;p.css("visibility","");if(v){if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}}})});c.each(r,function(t,s){s.render()})}if(!d.tinymce&&!e&&(g=j.script_url)){e=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}d.tinyMCEPreInit=d.tinyMCEPreInit||{base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!d.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");c.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}c.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;e=2;if(j.script_loaded){j.script_loaded()}o();c.each(a,function(q,r){r()})}})}else{if(e===1){a.push(o)}else{o()}}return p};c.extend(c.expr[":"],{tinymce:function(g){return !!(g.id&&tinyMCE.get(g.id))}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==b){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(d.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(d.tinymce)&&(l.is(":tinymce")))}var j={};c.each(["text","html","val"],function(n,l){var o=j[l]=c.fn[l],m=(l==="text");c.fn[l]=function(s){var p=this;if(!g(p)){return o.apply(p,arguments)}if(s!==b){k.call(p.filter(":tinymce"),s);o.apply(p.not(":tinymce"),arguments);return p}else{var r="";var q=arguments;(m?p:p.eq(0)).each(function(u,v){var t=h(v);r+=t?(m?t.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):t.getContent()):o.apply(c(v),q)});return r}}});c.each(["append","prepend"],function(n,m){var o=j[m]=c.fn[m],l=(m==="prepend");c.fn[m]=function(q){var p=this;if(!g(p)){return o.apply(p,arguments)}if(q!==b){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.apply(p.not(":tinymce"),arguments);return p}}});c.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=c.fn[l];c.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=c.fn.attr;c.fn.attr=function(n,p){var m=this;if((!n)||(n!=="value")||(!g(m))){if(p!==b){return j.attr.call(m,n,p)}else{return j.attr.call(m,n)}}if(p!==b){k.call(m.filter(":tinymce"),p);j.attr.call(m.not(":tinymce"),n,p);return m}else{var o=m[0],l=h(o);return l?l.getContent():j.attr.call(c(o),n,p)}}}})(jQuery);
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "it-logica-application-backbone"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.20"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ladas"]
|
@@ -126,6 +126,7 @@ Gem::Specification.new do |s|
|
|
126
126
|
"app/assets/javascripts/backbone_js/jquery.iframe-transport.js",
|
127
127
|
"app/assets/javascripts/backbone_js/jquery.jstree.js",
|
128
128
|
"app/assets/javascripts/backbone_js/jquery.multiselect.min.js",
|
129
|
+
"app/assets/javascripts/backbone_js/jquery.tinymce.js",
|
129
130
|
"app/assets/javascripts/backbone_js/jquery.ui.datepicker-cs.js",
|
130
131
|
"app/assets/javascripts/backbone_js/jquery.ui.widget.js",
|
131
132
|
"app/assets/javascripts/backbone_js/ladas_form_submitter.js",
|
@@ -27,6 +27,48 @@ module Initializers
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
+
|
31
|
+
|
32
|
+
# monkey patch for control of right timestamp when updating a model, in the case that somebody updatedd it in the time beetween show the form and update the form
|
33
|
+
# it will yell it was updated by another user
|
34
|
+
module ActiveRecord
|
35
|
+
# = Active Record Persistence
|
36
|
+
module Persistence
|
37
|
+
|
38
|
+
def update_attributes(attributes, options = {})
|
39
|
+
if timestamp_control = attributes.delete(:control_against_overwrite_by_another_user)
|
40
|
+
if self.attributes['updated_at'] > timestamp_control
|
41
|
+
errors[:base] << I18n.t('activerecord.errors.messages.control_against_overwrite_by_another_user')
|
42
|
+
return false
|
43
|
+
end
|
44
|
+
end
|
45
|
+
with_transaction_returning_status do
|
46
|
+
self.assign_attributes(attributes, options)
|
47
|
+
save
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def update_attributes!(attributes, options = {})
|
52
|
+
if timestamp_control = attributes.delete(:control_against_overwrite_by_another_user)
|
53
|
+
if self.attributes['updated_at'] > timestamp_control
|
54
|
+
errors[:base] << I18n.t('activerecord.errors.messages.control_against_overwrite_by_another_user')
|
55
|
+
return false
|
56
|
+
end
|
57
|
+
end
|
58
|
+
with_transaction_returning_status do
|
59
|
+
self.assign_attributes(attributes, options)
|
60
|
+
save!
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
30
72
|
#
|
31
73
|
#
|
32
74
|
#class ActiveRecord::Base
|
@@ -43,39 +85,4 @@ end
|
|
43
85
|
#class ApplicationController
|
44
86
|
# include ControllerMixins::RendererInstanceMethods
|
45
87
|
#end
|
46
|
-
#
|
47
|
-
#
|
48
|
-
## monkey patch for control of right timestamp when updating a model, in the case that somebody updatedd it in the time beetween show the form and update the form
|
49
|
-
## it will yell it was updated by another user
|
50
|
-
#module ActiveRecord
|
51
|
-
# # = Active Record Persistence
|
52
|
-
# module Persistence
|
53
|
-
#
|
54
|
-
# def update_attributes(attributes, options = {})
|
55
|
-
# if timestamp_control = attributes.delete(:control_against_overwrite_by_another_user)
|
56
|
-
# if self.attributes['updated_at'] > timestamp_control
|
57
|
-
# errors[:base] << I18n.t('activerecord.errors.messages.control_against_overwrite_by_another_user')
|
58
|
-
# return false
|
59
|
-
# end
|
60
|
-
# end
|
61
|
-
# with_transaction_returning_status do
|
62
|
-
# self.assign_attributes(attributes, options)
|
63
|
-
# save
|
64
|
-
# end
|
65
|
-
# end
|
66
|
-
#
|
67
|
-
# def update_attributes!(attributes, options = {})
|
68
|
-
# if timestamp_control = attributes.delete(:control_against_overwrite_by_another_user)
|
69
|
-
# if self.attributes['updated_at'] > timestamp_control
|
70
|
-
# errors[:base] << I18n.t('activerecord.errors.messages.control_against_overwrite_by_another_user')
|
71
|
-
# return false
|
72
|
-
# end
|
73
|
-
# end
|
74
|
-
# with_transaction_returning_status do
|
75
|
-
# self.assign_attributes(attributes, options)
|
76
|
-
# save!
|
77
|
-
# end
|
78
|
-
# end
|
79
|
-
#
|
80
|
-
# end
|
81
|
-
#end
|
88
|
+
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: it-logica-application-backbone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-07-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
16
|
-
requirement: &
|
16
|
+
requirement: &80189480 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *80189480
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rdoc
|
27
|
-
requirement: &
|
27
|
+
requirement: &80189050 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '3.12'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *80189050
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &80188670 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.1.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *80188670
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &80187790 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.8.4
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *80187790
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: simplecov
|
60
|
-
requirement: &
|
60
|
+
requirement: &80533820 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *80533820
|
69
69
|
description: longer description of your gem
|
70
70
|
email: ladislav.smola@it-logica.cz
|
71
71
|
executables: []
|
@@ -183,6 +183,7 @@ files:
|
|
183
183
|
- app/assets/javascripts/backbone_js/jquery.iframe-transport.js
|
184
184
|
- app/assets/javascripts/backbone_js/jquery.jstree.js
|
185
185
|
- app/assets/javascripts/backbone_js/jquery.multiselect.min.js
|
186
|
+
- app/assets/javascripts/backbone_js/jquery.tinymce.js
|
186
187
|
- app/assets/javascripts/backbone_js/jquery.ui.datepicker-cs.js
|
187
188
|
- app/assets/javascripts/backbone_js/jquery.ui.widget.js
|
188
189
|
- app/assets/javascripts/backbone_js/ladas_form_submitter.js
|
@@ -535,7 +536,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
535
536
|
version: '0'
|
536
537
|
segments:
|
537
538
|
- 0
|
538
|
-
hash:
|
539
|
+
hash: 907753233
|
539
540
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
540
541
|
none: false
|
541
542
|
requirements:
|