elrte 0.0.4 → 0.0.5

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.
@@ -0,0 +1,61 @@
1
+ Elrte Rails
2
+ ===========
3
+
4
+ Requirments
5
+ -----------
6
+
7
+ * Rails 3.1+ (need asset pipline, feel free to help me add 3.0 support)
8
+ * Gem [el_finder](https://github.com/phallstrom/el_finder) (in gem dependencies)
9
+
10
+ Installation
11
+ ------------
12
+
13
+ Include gem into to your Gemfile
14
+
15
+ gem 'elrte'
16
+
17
+ Install gems from gemfile
18
+
19
+ $ bundle install
20
+
21
+ Generate gem files
22
+
23
+ $ rails generate elrte:install
24
+
25
+ Require javascript file (in application.js or may be in active_admin.js)
26
+
27
+ //= require elrte
28
+
29
+ Also if include jquery if you need
30
+
31
+ //= require jquery
32
+ //= require jquery-ui
33
+
34
+ Require stylesheet file (in application.css or may be in active_admin.css)
35
+
36
+ @import 'elrte';
37
+
38
+ Add class 'editor' to needed fields and you will see WYSIWYG elfinder editor instead of textareas
39
+
40
+ Help
41
+ ==
42
+
43
+ Need your feasible help. Feel free to add issue about found bugs, send me pull request with fixes.
44
+
45
+ Related projects
46
+ ==
47
+
48
+ * [Elrte demo](http://elrte.org/demo)
49
+ * [Elfinder demo](http://elfinder.org/)
50
+ * [elRTE on Github](https://github.com/Studio-42/elRTE)
51
+ * [https://github.com/phallstrom/el_finder](https://github.com/phallstrom/el_finder) by [phallstrom](https://github.com/phallstrom)
52
+
53
+ Contributing
54
+ ==
55
+
56
+ 1. Fork it.
57
+ 2. Create a branch (git checkout -b critical_bug)
58
+ 3. Commit your changes (git commit -am "Fixed critical bug")
59
+ 4. Push to the branch (git push origin critical_bug)
60
+ 5. Create an Issue with a link to your branch
61
+ 6. Wait
@@ -1,5 +1,3 @@
1
- //= require jquery
2
- //= require jquery-ui
3
1
  //= require elrte/elrte.min
4
2
  //= require elfinder/elfinder.min
5
3
  //= require elrte/toolbar
@@ -1,3 +1,3 @@
1
1
  module Elrte
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -55,7 +55,7 @@ g<j.childNodes.length;g++){if(typeof(h)=="function"){if(h(j.childNodes[g])){retu
55
55
  var t=parseInt(a(this).attr("rowspan")||1);var r=f(k);for(var v=0;v<t;v++){for(var o=0;o<p;o++){var q=k+v;if(!a.isArray(h[q])){h[q]=[]}var u=o==0&&v==0?this:(v==0?o:"-");h[q][r+o]=u}}g=Math.max(g,h[k].length)})})}return h};this.indexesOfCell=function(j,h){for(var f=0;f<h.length;f++){for(var g=0;g<h[f].length;g++){if(h[f][g]==j){return[f,g]}}}};this.fixTable=function(q){if(q&&q.nodeName=="TABLE"){var h=a(q);var p=this.tableMatrix(q);var f=0;a.each(p,function(){f=Math.max(f,this.length)});if(f==0){return h.remove()
56
56
  }for(var k=0;k<p.length;k++){var g=p[k].length;if(g==0){h.find("tr").eq(k).remove()}else{if(g<f){var j=f-g;var o=h.find("tr").eq(k);for(i=0;i<j;i++){o.append("<td>&nbsp;</td>")}}}}}};this.tableColumn=function(h,g,o){h=this.selfOrParent(h,/^TD|TH$/);var j=this.selfOrParent(h,/^TABLE$/);ret=[];info={offset:[],delta:[]};if(h&&j){o&&this.fixTable(j);var u=this.tableMatrix(j);var v=false;var t;for(var f=0;f<u.length;f++){for(var q=0;q<u[f].length;q++){if(u[f][q]==h){t=q;v=true;break}}if(v){break}}if(t>=0){for(var f=0;
57
57
  f<u.length;f++){var k=u[f][t]||null;if(k){if(k.nodeName){ret.push(k);if(g){info.delta.push(0);info.offset.push(t)}}else{var p=parseInt(k);if(!isNaN(p)&&u[f][t-p]&&u[f][t-p].nodeName){ret.push(u[f][t-p]);if(g){info.delta.push(p);info.offset.push(t)}}}}}}}return !g?ret:{column:ret,info:info}}}})(jQuery);(function(a){elRTE.prototype.filter=function(c){var b=this,f=a("<span/>").addClass("elrtetesturl").appendTo(document.body)[0];this.url=(typeof(f.currentStyle)!="undefined"?f.currentStyle.backgroundImage:document.defaultView.getComputedStyle(f,null)["backgroundImage"]).replace(/^url\((['"]?)([\s\S]+\/)[\s\S]+\1\)$/i,"$2");
58
- a(f).remove();this.rte=c;this.xhtml=/xhtml/i.test(c.options.doctype);this.boolAttrs=c.utils.makeObject("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(","));this.tagRegExp=/<(\/?)([\w:]+)((?:\s+[a-z\-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*\/?>/g;this.openTagRegExp=/<([\w:]+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*\/?>/g;this.attrRegExp=/(\w+)(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^\s]+))?/g;this.scriptRegExp=/<script([^>]*)>([\s\S]*?)<\/script>/gi;
58
+ a(f).remove();this.rte=c;this.xhtml=/xhtml/i.test(c.options.doctype);this.boolAttrs=c.utils.makeObject("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(","));this.tagRegExp=/<(\/?)([\w:]+)((?:\s+[a-z\-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*\/?>/g;this.openTagRegExp=/<([\w:]+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*\/?>/g;this.attrRegExp=/([\w\-]+)(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^\s]+))?/g;this.scriptRegExp=/<script([^>]*)>([\s\S]*?)<\/script>/gi;
59
59
  this.styleRegExp=/(<style([^>]*)>[\s\S]*?<\/style>)/gi;this.linkRegExp=/(<link([^>]+)>)/gi;this.cdataRegExp=/<!\[CDATA\[([\s\S]+)\]\]>/g;this.objRegExp=/<object([^>]*)>([\s\S]*?)<\/object>/gi;this.embRegExp=/<(embed)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*>/gi;this.paramRegExp=/<(param)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*>/gi;this.iframeRegExp=/<iframe([^>]*)>([\s\S]*?)<\/iframe>/gi;this.yMapsRegExp=/<div\s+([^>]*id\s*=\s*('|")?YMapsID[^>]*)>/gi;this.gMapsRegExp=/<iframe\s+([^>]*src\s*=\s*"http:\/\/maps\.google\.\w+[^>]*)>([\s\S]*?)<\/iframe>/gi;
60
60
  this.videoHostRegExp=/^(http:\/\/[\w\.]*)?(youtube|vimeo|rutube).*/i;this.serviceClassRegExp=/<(\w+)([^>]*class\s*=\s*"[^>]*elrte-[^>]*)>\s*(<\/\1>)?/gi;this.pagebreakRegExp=/<(\w+)([^>]*style\s*=\s*"[^>]*page-break[^>]*)>\s*(<\/\1>)?/gi;this.pbRegExp=new RegExp("<!-- pagebreak -->","gi");this.allowTags=c.options.allowTags.length?c.utils.makeObject(c.options.allowTags):null;this.denyTags=c.options.denyTags.length?c.utils.makeObject(c.options.denyTags):null;this.denyAttr=c.options.denyAttr?c.utils.makeObject(c.options.denyAttr):null;
61
61
  this.pasteDenyAttr=c.options.pasteDenyAttr?c.utils.makeObject(c.options.pasteDenyAttr):null;this.fontSize=["medium","xx-small","small","medium","large","x-large","xx-large"];this.fontFamily={"sans-serif":/^(arial|tahoma|verdana)$/i,serif:/^(times|times new roman)$/i,monospace:/^courier$/i};this.scripts={};this._chains={};a.each(this.chains,function(g){b._chains[g]=[];a.each(this,function(h,j){typeof(b.rules[j])=="function"&&b._chains[g].push(b.rules[j])})});this.proccess=function(h,g){g=a.trim(g).replace(/^\s*(&nbsp;)+/gi,"").replace(/(&nbsp;|<br[^>]*>)+\s*$/gi,"");
metadata CHANGED
@@ -1,74 +1,90 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: elrte
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
4
5
  prerelease:
5
- version: 0.0.4
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Anton Zaytsev
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-01-03 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2013-02-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: rails
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
23
21
  version: 3.1.0
24
22
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: jquery-rails
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.1.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: jquery-rails
32
+ requirement: !ruby/object:Gem::Requirement
30
33
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
34
37
  version: 1.0.0
35
38
  type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: sass
39
39
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.0.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: sass
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
45
53
  version: 3.1.0
46
54
  type: :runtime
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: el_finder
50
55
  prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
52
57
  none: false
53
- requirements:
54
- - - ">"
55
- - !ruby/object:Gem::Version
56
- version: "0"
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 3.1.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: el_finder
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>'
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
57
70
  type: :runtime
58
- version_requirements: *id004
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>'
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
59
78
  description: Provides WYSIWYG editor Elrte for Rails
60
- email:
79
+ email:
61
80
  - info@antonzaytsev.com
62
81
  executables: []
63
-
64
82
  extensions: []
65
-
66
83
  extra_rdoc_files: []
67
-
68
- files:
84
+ files:
69
85
  - .gitignore
70
86
  - Gemfile
71
- - README.rdoc
87
+ - README.md
72
88
  - Rakefile
73
89
  - app/assets/images/elrte-toolbar.png
74
90
  - app/assets/images/google-maps.png
@@ -226,32 +242,28 @@ files:
226
242
  - vendor/assets/stylesheets/elrte/elrte-inner.css.scss
227
243
  - vendor/assets/stylesheets/elrte/elrte.min.css.scss
228
244
  - vendor/assets/stylesheets/elrte/smoothness/jquery-ui-1.8.13.custom.css.scss
229
- homepage: ""
245
+ homepage: ''
230
246
  licenses: []
231
-
232
247
  post_install_message:
233
248
  rdoc_options: []
234
-
235
- require_paths:
249
+ require_paths:
236
250
  - lib
237
- required_ruby_version: !ruby/object:Gem::Requirement
251
+ required_ruby_version: !ruby/object:Gem::Requirement
238
252
  none: false
239
- requirements:
240
- - - ">="
241
- - !ruby/object:Gem::Version
242
- version: "0"
243
- required_rubygems_version: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ! '>='
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ required_rubygems_version: !ruby/object:Gem::Requirement
244
258
  none: false
245
- requirements:
246
- - - ">="
247
- - !ruby/object:Gem::Version
248
- version: "0"
259
+ requirements:
260
+ - - ! '>='
261
+ - !ruby/object:Gem::Version
262
+ version: '0'
249
263
  requirements: []
250
-
251
264
  rubyforge_project: elrte
252
- rubygems_version: 1.8.12
265
+ rubygems_version: 1.8.24
253
266
  signing_key:
254
267
  specification_version: 3
255
268
  summary: Provides WYSIWYG editor Elrte for Rails
256
269
  test_files: []
257
-
@@ -1,33 +0,0 @@
1
- == Elrte Rails
2
-
3
- == Requirments
4
-
5
- * Rails 3.1 (need asset pipline, feel free to help me add 3.0 support)
6
- * gem {el_finder}[https://github.com/phallstrom/el_finder]
7
-
8
- == Installation
9
-
10
- 1 Add "gem 'eltre'" to Gemfile
11
- 2 call "bundle install" in your terminal to install gem
12
- 3 call "rails g eltre:install" to generate needed files
13
- 4 add "//= require elrte" in needed javascript file (application.js or may be active_admin.js)
14
- 5 add "@import 'elrte';" in needed stylesheet file (application.css.scss or may be active_admin.css.scss)
15
- 6 add class 'editor' to needed field and check eltre editor instead of it with elfinder support
16
-
17
- == Help
18
-
19
- Need your feasible help. Feel free to add issue about found bugs, send me pull request with fixes.
20
-
21
- == Related projects
22
-
23
- * {elRTE on Github}[https://github.com/Studio-42/elRTE]
24
- * {https://github.com/phallstrom/el_finder}[https://github.com/phallstrom/el_finder] by {phallstrom}[https://github.com/phallstrom]
25
-
26
- == Contributing
27
-
28
- 1 Fork it.
29
- 2 Create a branch (git checkout -b critical_bug)
30
- 3 Commit your changes (git commit -am "Fixed critical bug")
31
- 4 Push to the branch (git push origin critical_bug)
32
- 5 Create an Issue with a link to your branch
33
- 6 Wait