caboose-cms 0.5.32 → 0.5.34

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDRjYjJmMmMyM2RkZDIxYzViZjFhOTk4ODEzYTJhYjNjMzZiMzQzNw==
4
+ YTUyNTVlMGUwODZmNWZhZWI3MzY4NDFkMGU2Y2QzOTQ3OGNkZWJiYw==
5
5
  data.tar.gz: !binary |-
6
- NzYyZjIxMjY3Njk0ZjM4YzEzZmZmMTVlN2ExZWY5ZmYwOGI0ZGExMw==
6
+ YjNiNjhiMzgxYmQyMGY1MTU1ZTM4MmNhZWExMDA2NjUxOWFlZWNhMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzY0ZWQ2ZjU4YmRlMjM2MTg0Nzk3ODE3ZmU0ODIxOTZmMWE5ZDU0YmQ4ZmUx
10
- MzFlMTA4OGUzODg1OTNmOWY5M2NiYmI4YmU1MTdmMWQyYzBiNWI2MWE1OTdi
11
- MzY2NjdlMmUwZGM3NGY1NjJhYjJhZjBhYWZiYmRhZWUxZmRiMDg=
9
+ MjJlMjcwNjZiY2QxMjYyYjgxZTNjODBiNjJmNWZkZmI5ODE4Nzc3NWZlMWQ3
10
+ ZTM2ZDI1YWIwNDE4ZDhjYjI4N2U5ZmU3ZWM1MzVmZjZmZTA4NzIxN2M3YTgx
11
+ YWJlOTc0MWRiMWFhNTg0YjU3MTczYTlmMmJjYmY2MGI2ODcxYjg=
12
12
  data.tar.gz: !binary |-
13
- NjVjNjIyMTY0NGM2MjllMzBjMTBmNjc3OGVhMjI1YjQ1ZGVkZWFmNzIxZTll
14
- MzE5MjE3ODJhM2U4MDlhYzgwOTBkNTQ2NGMxNzllYmNlYmFjYTMxODgxYTM5
15
- NjA0ZTdiNmYwN2ViZGZhNWJmMTkxMjFiZWE2MjFlZjk0M2NkYzI=
13
+ ZmFiNDhiYzAxYmUwOTMzODFhNGMxYWVhMzFkNDZmNTE0MDllMmFmZDcxNWE2
14
+ YWY4Mjc1MDY5OGEwNzhlNzllY2IwNjZiZjYwZDFlNjExYWMzNmI3OTA1YjJi
15
+ M2FhNTMzOTM1OGYzMjE1OTYyOGFhN2UxOTUyMWMwMjg3ZDZlMWM=
@@ -132,27 +132,56 @@ PageContentController.prototype = {
132
132
 
133
133
  move_block_up: function(block_id)
134
134
  {
135
- var that = this;
135
+ var that = this;
136
+ this.loadify($('#block_' + block_id + '_move_up_handle span'));
136
137
  $.ajax({
137
138
  url: '/admin/pages/' + this.page_id + '/blocks/' + block_id + '/move-up',
138
139
  type: 'put',
139
140
  success: function(resp) {
141
+ that.stop_loadify();
140
142
  if (resp.success) that.render_blocks();
141
143
  }
142
144
  });
143
145
  },
144
146
 
145
147
  move_block_down: function(block_id)
146
- {
147
- var that = this;
148
+ {
149
+ var that = this;
150
+ this.loadify($('#block_' + block_id + '_move_down_handle span'));
148
151
  $.ajax({
149
152
  url: '/admin/pages/' + this.page_id + '/blocks/' + block_id + '/move-down',
150
153
  type: 'put',
151
154
  success: function(resp) {
155
+ that.stop_loadify();
152
156
  if (resp.success) that.render_blocks();
153
157
  }
154
158
  });
155
159
  },
160
+
161
+ loadify: function(el)
162
+ {
163
+ var that = this;
164
+ if (el.hasClass('ui-icon-arrowrefresh-1-e')) el.removeClass('ui-icon-arrowrefresh-1-e').addClass('ui-icon-arrowrefresh-1-s');
165
+ else if (el.hasClass('ui-icon-arrowrefresh-1-s')) el.removeClass('ui-icon-arrowrefresh-1-s').addClass('ui-icon-arrowrefresh-1-w');
166
+ else if (el.hasClass('ui-icon-arrowrefresh-1-w')) el.removeClass('ui-icon-arrowrefresh-1-w').addClass('ui-icon-arrowrefresh-1-n');
167
+ else if (el.hasClass('ui-icon-arrowrefresh-1-n')) el.removeClass('ui-icon-arrowrefresh-1-n').addClass('ui-icon-arrowrefresh-1-e');
168
+ else el.addClass('ui-icon-arrowrefresh-1-e');
169
+ this.loadify_el = el;
170
+ this.loadify_timer = setTimeout(function() { that.loadify(el); }, 200);
171
+ },
172
+
173
+ stop_loadify: function()
174
+ {
175
+ if (this.loadify_el)
176
+ {
177
+ this.loadify_el.removeClass('ui-icon-arrowrefresh-1-e')
178
+ .removeClass('ui-icon-arrowrefresh-1-s')
179
+ .removeClass('ui-icon-arrowrefresh-1-w')
180
+ .removeClass('ui-icon-arrowrefresh-1-n');
181
+ }
182
+ if (this.loadify_timer)
183
+ clearTimeout(this.loadify_timer);
184
+ },
156
185
 
157
186
  /*****************************************************************************
158
187
  Block Rendering
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.32'
2
+ VERSION = '0.5.34'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.32
4
+ version: 0.5.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry