refinerycms 0.9.6.15 → 0.9.6.16

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.6.15
1
+ 0.9.6.16
@@ -25,5 +25,5 @@ Refinery::Initializer.run do |config|
25
25
  }
26
26
 
27
27
  # Specify your application's gem requirements here. See the example below:
28
- # config.gem "refinerycms-portfolio", :lib => "portfolio", :version => "~> 0.9.3.7"
28
+ # config.gem "refinerycms-portfolio", :lib => "portfolio", :version => "~> 0.9.3.8"
29
29
  end
@@ -35,21 +35,22 @@ init_modal_dialogs = function(){
35
35
  $('a[href*="dialog=true"]').each(function(i, anchor)
36
36
  {
37
37
  $(anchor).click(function(e){
38
- iframe = $("<iframe id='dialog_iframe' src='" + $(this).attr('href') + "'></iframe>");
38
+ iframe = $("<iframe id='dialog_iframe' src='" + $(this).attr('href') + "&amp;app_dialog=true" + "'></iframe>");
39
39
  iframe.dialog({
40
40
  title: $(anchor).attr('title') || $(anchor).attr('name') || $(anchor).html() || null,
41
41
  modal: true,
42
42
  resizable: false,
43
43
  autoOpen: true,
44
44
  width: (parseInt($(anchor.href.match("width=([0-9]*)")).last().get(0))||928),
45
- height: (parseInt($(anchor.href.match("height=([0-9]*)")).last().get(0))||473),
46
- beforeclose: function(){$(document.body).removeClass('hide-overflow')}
45
+ height: (parseInt($(anchor.href.match("height=([0-9]*)")).last().get(0))||473)/*,
46
+ beforeclose: function(){
47
+ $(document.body).removeClass('hide-overflow');
48
+ }*/
47
49
  });
48
50
  if ($.browser.msie) {
49
51
  iframe.css({'margin':'-2px 2px 2px -2px'});
50
- // iframe..css('overflow: hidden');
51
52
  }
52
- $(document.body).addClass('hide-overflow');
53
+ //$(document.body).addClass('hide-overflow');
53
54
  e.preventDefault();
54
55
  });
55
56
  });
@@ -204,16 +205,13 @@ var link_dialog = {
204
205
  },
205
206
 
206
207
  init_close: function(){
207
- $('#TB_title .close_dialog, #dialog_container .close_dialog').click(function(e) {
208
- e.preventDefault();
209
-
210
- // if we're in a frame
211
- if(parent && typeof(parent.tb_remove) == "function"){
212
- parent.tb_remove();
213
-
214
- } // if we're not in a frame
215
- else if(typeof(tb_remove) == 'function'){
216
- tb_remove();
208
+ $('#dialog-form-actions #cancel_button').click(function(e){
209
+ if (parent && typeof(parent.$) == "function") {
210
+ // parent.$(document.body).removeClass('hide-overflow');
211
+ parent.$('.ui-dialog').dialog('close').remove();
212
+ } else {
213
+ $('.ui-dialog').dialog('close').remove();
214
+ // $(document.body).removeClass('hide-overflow');
217
215
  }
218
216
  });
219
217
  },
@@ -516,30 +514,25 @@ var image_dialog = {
516
514
  this.callback(img_selected);
517
515
  }
518
516
 
519
- if(parent && typeof(parent.tb_remove) == "function"){
520
- parent.tb_remove();
521
- }
522
-
517
+ this.close_dialog(e);
523
518
  }
524
519
 
525
- , cancel_image_dialog: function(e) {
526
- e.preventDefault();
527
- // if we're in a frame
528
- if(parent && typeof(parent.tb_remove) == "function"){
529
- parent.tb_remove();
530
-
531
- } // if we're not in a frame
532
- else if(typeof(tb_remove) == 'function'){
533
- tb_remove();
520
+ , close_dialog: function(e) {
521
+ if (parent && typeof(parent.$) == "function") {
522
+ // parent.parent.$(document.body).removeClass('hide-overflow');
523
+ parent.$('.ui-dialog').dialog('close').remove();
524
+ } else {
525
+ $('.ui-dialog').dialog('close').remove();
526
+ // $(document.body).removeClass('hide-overflow');
534
527
  }
528
+
529
+ e.preventDefault();
535
530
  }
536
531
 
537
532
  , init_actions: function(){
538
533
  var _this = this;
539
534
  $('#dialog-form-actions #submit_button').click($.proxy(_this.submit_image_choice, _this));
540
- $('#dialog-form-actions #cancel_button, #TB_title .close_dialog, #dialog_container .close_dialog').click(
541
- $.proxy(_this.cancel_image_dialog, _this)
542
- );
535
+ $('#dialog-form-actions #cancel_button').click($.proxy(_this.close_dialog, _this));
543
536
  }
544
537
  }
545
538
 
@@ -643,6 +636,7 @@ var image_picker = {
643
636
  .hide();
644
637
  $(this.options.field).val('');
645
638
  $(this.options.no_image_message).show();
639
+ $(this.options.remove_image_button).hide();
646
640
  $(this).hide();
647
641
  }
648
642
 
@@ -830,7 +830,6 @@ WYMeditor.editor.prototype.init = function() {
830
830
 
831
831
  //enable the skin
832
832
  this.loadSkin();
833
-
834
833
  }
835
834
  };
836
835
 
@@ -1537,6 +1536,9 @@ WYMeditor.editor.prototype.listen = function() {
1537
1536
  for(var i=0; i < images.length; i++) {
1538
1537
  $(images[i]).bind("mousedown", this.mousedown);
1539
1538
  }
1539
+
1540
+ // ensure links can't be navigated to.
1541
+ $(this._doc).find('a[href]').click(function(e){e.preventDefault();});
1540
1542
  };
1541
1543
 
1542
1544
  WYMeditor.editor.prototype.mousedown = function(evt) {
@@ -1762,6 +1764,9 @@ WYMeditor.editor.prototype.close_dialog = function(e, cancelled) {
1762
1764
 
1763
1765
  $("#" + wym._options.dialogId).dialog("close").remove();
1764
1766
 
1767
+ // ensure links can't be navigated to.
1768
+ $(this._doc).find('a[href]').click(function(e){e.preventDefault();});
1769
+
1765
1770
  if (e) {
1766
1771
  e.preventDefault();
1767
1772
  }
@@ -4151,6 +4156,7 @@ WYMeditor.WymClassExplorer.prototype.initIframe = function(iframe) {
4151
4156
 
4152
4157
  //init designMode
4153
4158
  this._doc.designMode="on";
4159
+
4154
4160
  try{
4155
4161
  // (bermi's note) noticed when running unit tests on IE6
4156
4162
  // Is this really needed, it trigger an unexisting property on IE6
@@ -1167,7 +1167,6 @@ ul#plugins li {
1167
1167
  right: 0px;
1168
1168
  bottom: 0px;
1169
1169
  width: auto !important;
1170
- height: auto !important;
1171
1170
  opacity: .75;
1172
1171
  filter:Alpha(Opacity=75);
1173
1172
  background: #000;
@@ -8,7 +8,7 @@
8
8
  <%= f.hidden_field field, :id => "current_image_id_#{randomiser}" -%>
9
9
 
10
10
  <div id='current_image_container_<%= randomiser %>'<%= " style='display: none'" if toggle_image_display %> style="margin-top: 10px;">
11
- <a id='current_image_link_<%= randomiser %>' href="<%= insert_admin_images_url %>?dialog=true&amp;modal=true&amp;titlebar=true&amp;callback=image_picker_<%= randomiser %>_changed&amp;KeepThis=true&amp;TB_iframe=true&amp;width=958&amp;height=510" style='border: 0px' title='Change <%= description.titleize %>' name='Change <%= description.titleize %>' class='dialog'>
11
+ <a id='current_image_link_<%= randomiser %>' href="<%= insert_admin_images_url(:dialog => true, :callback => "image_picker_#{randomiser}_changed", :width => 958, :height => 510) %>" style='border: 0px' title='Change <%= description.titleize %>' name='Change <%= description.titleize %>' class='dialog'>
12
12
  <% unless image.nil? -%>
13
13
  <%= image_fu image, nil, {:class => "brown_border", :id => "current_picked_image_#{randomiser}"} %>
14
14
  <% else -%>
@@ -1,20 +1,7 @@
1
1
  <% use_caching = RefinerySetting.find_or_set(:use_resource_caching, false) -%>
2
2
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml">
4
- <head>
5
- <%= stylesheet_link_tag 'refinery/refinery' %>
6
- <% if (using_google_libs = RefinerySetting.find_or_set(:use_google_ajax_libraries, true)) and !local_request? -%>
7
- <script type='text/javascript' src="http://www.google.com/jsapi"></script>
8
- <script type='text/javascript'>
9
- google.load("jquery", "1.4");
10
- google.load("jqueryui", "1.8");
11
- </script>
12
- <% end %>
13
- <%= javascript_include_tag('jquery.js', 'jquery-ui-1.8rc1.min.js', :cache => (use_caching ? "cache/libraries" : false)) if !using_google_libs or local_request? %>
14
- <%= javascript_include_tag 'refinery/admin', :cache => (use_caching ? "cache/admin_dialog" : false) %>
15
- <%= yield :head %>
16
- <%= javascript_include_tag "http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js" if RefinerySetting.find_or_set(:show_firebug_lite, false) -%>
17
- </head>
4
+ <%= render :partial => "/admin/head" %>
18
5
  <body id='dialog_container' class='dialog'>
19
6
  <div id="flash_container">
20
7
  <%= render :partial => '/shared/message' %>
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 9
8
8
  - 6
9
- - 15
10
- version: 0.9.6.15
9
+ - 16
10
+ version: 0.9.6.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Resolve Digital
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-03-01 00:00:00 +13:00
20
+ date: 2010-03-02 00:00:00 +13:00
21
21
  default_executable:
22
22
  dependencies: []
23
23