radiant-filter_toolbars-extension 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module RadiantFilterToolbarsExtension
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  SUMMARY = %q{WYSIWYG Toolbar for Radiant CMS}
4
4
  DESCRIPTION = %q{Adds a WYSIWYG toolbar for the textile and markdown filters.}
5
5
  URL = "https://github.com/jsntv200/radiant-filter_toolbars-extension"
@@ -41,11 +41,11 @@ FilterToolBars.Markdown = Object.extend({
41
41
  },
42
42
 
43
43
  link: function() {
44
- var selection = this.getSelection() || 'Link Text',
45
- response = prompt('Enter Full URL: (http:// or mailto:)', '');
44
+ var selection = FilterToolBars.textarea.getSelection() || 'Link Text',
45
+ response = prompt('Enter Full URL: (http://, mailto: or /local/path)', '');
46
46
 
47
- if (response && response.match(/^((f|ht)tps?|mailto)/)) {
48
- FilterToolBars.textarea.replaceSelection('[' + selection + '](' + response.replace(/^(?!(f|ht)tps?:\/\/)/, 'http://') + ')');
47
+ if (response && response.match(/^((f|ht)tps?|mailto|\/)/)) {
48
+ FilterToolBars.textarea.replaceSelection('[' + selection + '](' + response + ')');
49
49
  }
50
50
  },
51
51
 
@@ -37,10 +37,10 @@ FilterToolBars.Textile = Object.extend({
37
37
 
38
38
  link: function() {
39
39
  var selection = FilterToolBars.textarea.getSelection() || 'Link Text',
40
- response = prompt('Enter Full URL: (http:// or mailto:)', '');
40
+ response = prompt('Enter Full URL: (http://, mailto: or /local/path)', '');
41
41
 
42
- if (response && response.match(/^((f|ht)tps?|mailto)/)) {
43
- FilterToolBars.textarea.replaceSelection('"' + selection + '":' + response.replace(/^(?!(f|ht)tps?:\/\/)/, 'http://'));
42
+ if (response && response.match(/^((f|ht)tps?|mailto|\/)/)) {
43
+ FilterToolBars.textarea.replaceSelection('"' + selection + '":' + response);
44
44
  }
45
45
  },
46
46
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-filter_toolbars-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
9
+ - 4
10
+ version: 1.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Taylor
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-19 00:00:00 +10:00
18
+ date: 2011-10-14 00:00:00 +11:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  requirements: []
79
79
 
80
80
  rubyforge_project:
81
- rubygems_version: 1.5.0
81
+ rubygems_version: 1.5.3
82
82
  signing_key:
83
83
  specification_version: 3
84
84
  summary: WYSIWYG Toolbar for Radiant CMS