Aqua Page Builder - Version 1.1.5

Version Description

Download this release

Release Info

Developer syamilmj
Plugin Icon wp plugin Aqua Page Builder
Version 1.1.5
Comparing to
See all releases

Code changes from version 1.1.4 to 1.1.5

aqua-page-builder.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Aqua Page Builder
5
  * Plugin URI: http://aquagraphite.com/page-builder
6
  * Description: Fast, lightweight and intuitive drag-and-drop page builder.
7
- * Version: 1.1.4
8
  * Author: Syamil MJ
9
  * Author URI: http://aquagraphite.com
10
  * Domain Path: /languages/
4
  * Plugin Name: Aqua Page Builder
5
  * Plugin URI: http://aquagraphite.com/page-builder
6
  * Description: Fast, lightweight and intuitive drag-and-drop page builder.
7
+ * Version: 1.1.5
8
  * Author: Syamil MJ
9
  * Author URI: http://aquagraphite.com
10
  * Domain Path: /languages/
assets/javascripts/aqpb-fields.js CHANGED
@@ -155,43 +155,51 @@ jQuery(document).ready(function($){
155
 
156
  // Visual Editor Block
157
  $('ul.blocks').bind('sortstart', function(event, ui) {
158
- if( ui.item.hasClass('block-aq_editor_block') ) {
159
- textareaID = $(ui.item).find('.wp-editor-area').attr('id');
160
- try { tinyMCE.execCommand('mceRemoveEditor', false, textareaID); } catch(e){
161
- console.log(e);
 
 
162
  }
163
  }
164
  });
165
 
166
  $('ul.blocks').bind('sortstop', function(event, ui) {
167
- if( ui.item.hasClass('block-aq_editor_block') ) {
168
- textareaID = $(ui.item).find('.wp-editor-area').attr('id');
169
- try {
170
- tinyMCE.execCommand('mceAddEditor', false, textareaID);
171
- tinyMCE.execCommand('mceAddControls', false, textareaID);
172
- } catch(e){
173
- console.log(e);
 
 
174
  }
175
  }
176
  });
177
 
178
  $('ul.blocks .ui-resizable').bind('resizestart', function(event, ui) {
179
- if( ui.element.hasClass('block-aq_editor_block') ) {
180
- textareaID = $(ui.item).find('.wp-editor-area').attr('id');
181
- try { tinyMCE.execCommand('mceRemoveEditor', false, textareaID); } catch(e){
182
- console.log(e);
 
 
183
  }
184
  }
185
  });
186
 
187
  $('ul.blocks .ui-resizable').bind('resizestop', function(event, ui) {
188
- if( ui.element.hasClass('block-aq_editor_block') ) {
189
- textareaID = $(ui.item).find('.wp-editor-area').attr('id');
190
- try {
191
- tinyMCE.execCommand('mceAddEditor', false, textareaID);
192
- tinyMCE.execCommand('mceAddControls', false, textareaID);
193
- } catch(e){
194
- console.log(e);
 
 
195
  }
196
  }
197
  });
155
 
156
  // Visual Editor Block
157
  $('ul.blocks').bind('sortstart', function(event, ui) {
158
+ if( ui != null ){
159
+ if( ui.item.hasClass('block-aq_editor_block') ) {
160
+ textareaID = $(ui.item).find('.wp-editor-area').attr('id');
161
+ try { tinyMCE.execCommand('mceRemoveEditor', false, textareaID); } catch(e){
162
+ console.log(e);
163
+ }
164
  }
165
  }
166
  });
167
 
168
  $('ul.blocks').bind('sortstop', function(event, ui) {
169
+ if( ui != null ){
170
+ if( ui.item.hasClass('block-aq_editor_block') ) {
171
+ textareaID = $(ui.item).find('.wp-editor-area').attr('id');
172
+ try {
173
+ tinyMCE.execCommand('mceAddEditor', false, textareaID);
174
+ tinyMCE.execCommand('mceAddControls', false, textareaID);
175
+ } catch(e){
176
+ console.log(e);
177
+ }
178
  }
179
  }
180
  });
181
 
182
  $('ul.blocks .ui-resizable').bind('resizestart', function(event, ui) {
183
+ if( ui != null ){
184
+ if( ui.element.hasClass('block-aq_editor_block') ) {
185
+ textareaID = $(ui.item).find('.wp-editor-area').attr('id');
186
+ try { tinyMCE.execCommand('mceRemoveEditor', false, textareaID); } catch(e){
187
+ console.log(e);
188
+ }
189
  }
190
  }
191
  });
192
 
193
  $('ul.blocks .ui-resizable').bind('resizestop', function(event, ui) {
194
+ if( ui != null ){
195
+ if( ui.element.hasClass('block-aq_editor_block') ) {
196
+ textareaID = $(ui.item).find('.wp-editor-area').attr('id');
197
+ try {
198
+ tinyMCE.execCommand('mceAddEditor', false, textareaID);
199
+ tinyMCE.execCommand('mceAddControls', false, textareaID);
200
+ } catch(e){
201
+ console.log(e);
202
+ }
203
  }
204
  }
205
  });
assets/javascripts/aqpb.js CHANGED
@@ -197,6 +197,9 @@ jQuery(document).ready(function($){
197
  revert: 'invalid',
198
  start: function(event, ui) {
199
  block_archive = $(this).attr('id');
 
 
 
200
  }
201
  });
202
  });
@@ -294,26 +297,30 @@ jQuery(document).ready(function($){
294
  ui.draggable.parent().find('.placeholder').show();
295
  },
296
  drop: function(ev, ui) {
297
- ui.draggable.remove();
298
- $(this).find('#removing-block').fadeOut('fast');
299
  }
300
  });
301
 
302
  /** Delete Block (via "Delete" anchor) **/
303
  $(document).on('click', '.block-control-actions a', function() {
 
304
  $clicked = $(this);
305
  $parent = $(this.parentNode.parentNode.parentNode);
306
-
307
  if($clicked.hasClass('delete')) {
308
- $parent.find('> .block-bar .block-handle').css('background', 'red');
309
- $parent.slideUp(function() {
310
- $(this).remove();
311
- update_block_order();
312
- update_block_number();
313
- }).fadeOut('fast');
 
 
314
  } else if($clicked.hasClass('close')) {
315
  $parent.find('> .block-bar a.block-edit').click();
316
  }
 
317
  return false;
318
  });
319
 
197
  revert: 'invalid',
198
  start: function(event, ui) {
199
  block_archive = $(this).attr('id');
200
+ },
201
+ stop: function(event, ui) {
202
+ ui.helper.css('height', 'auto');
203
  }
204
  });
205
  });
297
  ui.draggable.parent().find('.placeholder').show();
298
  },
299
  drop: function(ev, ui) {
300
+ ui.draggable.remove();
301
+ $(this).find('#removing-block').fadeOut('fast');
302
  }
303
  });
304
 
305
  /** Delete Block (via "Delete" anchor) **/
306
  $(document).on('click', '.block-control-actions a', function() {
307
+
308
  $clicked = $(this);
309
  $parent = $(this.parentNode.parentNode.parentNode);
310
+
311
  if($clicked.hasClass('delete')) {
312
+ if (confirm('Are you sure to Remove it')) {
313
+ $parent.find('> .block-bar .block-handle').css('background', 'red');
314
+ $parent.slideUp(function() {
315
+ $(this).remove();
316
+ update_block_order();
317
+ update_block_number();
318
+ }).fadeOut('fast');
319
+ }
320
  } else if($clicked.hasClass('close')) {
321
  $parent.find('> .block-bar a.block-edit').click();
322
  }
323
+
324
  return false;
325
  });
326
 
blocks/aq-clear-block.php CHANGED
@@ -18,7 +18,6 @@ class AQ_Clear_Block extends AQ_Block {
18
  }
19
 
20
  function form($instance) {
21
-
22
  $defaults = array(
23
  'horizontal_line' => 'none',
24
  'line_color' => '#353535',
@@ -62,7 +61,6 @@ class AQ_Clear_Block extends AQ_Block {
62
 
63
  </div>
64
  <?php
65
-
66
  }
67
 
68
  function block($instance) {
@@ -86,7 +84,6 @@ class AQ_Clear_Block extends AQ_Block {
86
  if($height) {
87
  echo '<div class="cf" style="height:'.$height.'px"></div>';
88
  }
89
-
90
  }
91
 
92
  }
18
  }
19
 
20
  function form($instance) {
 
21
  $defaults = array(
22
  'horizontal_line' => 'none',
23
  'line_color' => '#353535',
61
 
62
  </div>
63
  <?php
 
64
  }
65
 
66
  function block($instance) {
84
  if($height) {
85
  echo '<div class="cf" style="height:'.$height.'px"></div>';
86
  }
 
87
  }
88
 
89
  }
blocks/aq-editor-block.php CHANGED
@@ -16,7 +16,7 @@ class AQ_Editor_Block extends AQ_Block {
16
  function form($instance) {
17
 
18
  $defaults = array(
19
- 'text' => ''
20
  );
21
  $instance = wp_parse_args($instance, $defaults);
22
  extract($instance);
@@ -30,15 +30,15 @@ class AQ_Editor_Block extends AQ_Block {
30
  </p>
31
 
32
  <p class="description">
33
- <label for="<?php echo $this->get_field_id('text') ?>">
34
  Content
35
  <?php
36
  $args = array (
37
  'tinymce' => true,
38
  'quicktags' => true,
39
- 'textarea_name' => $this->get_field_name('text')
40
  );
41
- wp_editor( htmlspecialchars_decode($text), $this->get_field_id('text'), $args );
42
  ?>
43
  </label>
44
  </p>
16
  function form($instance) {
17
 
18
  $defaults = array(
19
+ 'content' => ''
20
  );
21
  $instance = wp_parse_args($instance, $defaults);
22
  extract($instance);
30
  </p>
31
 
32
  <p class="description">
33
+ <label for="<?php echo $this->get_field_id('content') ?>">
34
  Content
35
  <?php
36
  $args = array (
37
  'tinymce' => true,
38
  'quicktags' => true,
39
+ 'textarea_name' => $this->get_field_name('content')
40
  );
41
+ wp_editor( htmlspecialchars_decode($content), $this->get_field_id('content'), $args );
42
  ?>
43
  </label>
44
  </p>
blocks/aq-text-block.php CHANGED
@@ -40,7 +40,6 @@ class AQ_Text_Block extends AQ_Block {
40
  <?php _e('Automatically add paragraphs', 'aqpb-l10n') ?>
41
  </label>
42
  </p>
43
-
44
  <?php
45
  }
46
 
@@ -50,11 +49,9 @@ class AQ_Text_Block extends AQ_Block {
50
  $wp_autop = ( isset($wp_autop) ) ? $wp_autop : 0;
51
 
52
  if($title) echo '<h4 class="aq-block-title">'.strip_tags($title).'</h4>';
53
- if($wp_autop == 1){
54
  echo do_shortcode(htmlspecialchars_decode($text));
55
- }
56
- else
57
- {
58
  echo wpautop(do_shortcode(htmlspecialchars_decode($text)));
59
  }
60
 
40
  <?php _e('Automatically add paragraphs', 'aqpb-l10n') ?>
41
  </label>
42
  </p>
 
43
  <?php
44
  }
45
 
49
  $wp_autop = ( isset($wp_autop) ) ? $wp_autop : 0;
50
 
51
  if($title) echo '<h4 class="aq-block-title">'.strip_tags($title).'</h4>';
52
+ if($wp_autop == 1) {
53
  echo do_shortcode(htmlspecialchars_decode($text));
54
+ } else {
 
 
55
  echo wpautop(do_shortcode(htmlspecialchars_decode($text)));
56
  }
57
 
classes/class-aq-block.php CHANGED
@@ -55,7 +55,7 @@ if(!class_exists('AQ_Block')) {
55
  */
56
  function form($instance) {
57
  echo '<p class="no-options-block">' . __('There are no options for this block.', 'aqpb-l10n') . '</p>';
58
- return 'noform';
59
  }
60
 
61
  /**
55
  */
56
  function form($instance) {
57
  echo '<p class="no-options-block">' . __('There are no options for this block.', 'aqpb-l10n') . '</p>';
58
+ return false;
59
  }
60
 
61
  /**
classes/class-aq-page-builder.php CHANGED
@@ -765,8 +765,7 @@ if(!class_exists('AQ_Page_Builder')) {
765
  // Help tab sidebar
766
  $screen->set_help_sidebar(
767
  '<p><strong>' . __('For more information:') . '</strong></p>' .
768
- '<p>' . __('<a href="http://aquagraphite.com/api/documentation/aqua-page-builder" target="_blank">Documentation</a>') . '</p>' .
769
- '<p>' . __('<a href="https://wordpress.org/plugins/aqua-page-builder/changelog/" target="_blank">Changelog</a>') . '</p>'
770
  );
771
 
772
  // Main overview tab
765
  // Help tab sidebar
766
  $screen->set_help_sidebar(
767
  '<p><strong>' . __('For more information:') . '</strong></p>' .
768
+ '<p>' . __('<a href="http://aquagraphite.com/api/documentation/aqua-page-builder" target="_blank">Documentation</a>') . '</p>'
 
769
  );
770
 
771
  // Main overview tab
readme.txt CHANGED
@@ -2,11 +2,11 @@
2
  Author URI: http://aquagraphite.com
3
  Plugin URI: http://aquagraphite.com/2012/10/aqua-page-builder/
4
  Contributors: syamilmj
5
- Tags: page builder, aquagraphite, syamil mj
6
  Requires at least: 3.3
7
- Tested up to: 3.9.1
8
 
9
- Stable Tag: 1.1.4
10
  License: GNU Version 2 or Any Later Version
11
 
12
 
@@ -25,10 +25,7 @@ Features of the plugin include:
25
  * Compatible with WordPress Import/Exporter
26
  * Unlimited number of reusable templates
27
  * Highly extensible
28
- * Developer friendly with dozens of actions and filters
29
-
30
- **Looking for themes that support this plugin? [Themeforest themes](http://themeforest.net/browse/tags/default/aqua%20page%20builder?ref=SyamilMJ)**
31
- **Developer? Follow this plugin on [GitHub](https://github.com/sy4mil/Aqua-Page-Builder)**
32
 
33
  More information at [Aquagraphite.com](http://aquagraphite.com/2012/10/aqua-page-builder/).
34
 
@@ -55,6 +52,12 @@ Please see our [Wiki](https://github.com/sy4mil/Aqua-Page-Builder/wiki) section
55
 
56
  == Changelog ==
57
 
 
 
 
 
 
 
58
  = 1.1.4: July 21, 2014
59
 
60
  * NEW - Visual editor
@@ -82,8 +85,7 @@ Please see our [Wiki](https://github.com/sy4mil/Aqua-Page-Builder/wiki) section
82
 
83
  = 1.1.0: April =
84
 
85
- * First offical release!
86
- * For complete list of changelog from previous versions, please see the [Changelog](http://aquagraphite.com/api/changelog/aqua-page-builder) Page
87
 
88
  == Upgrade Notice ==
89
 
2
  Author URI: http://aquagraphite.com
3
  Plugin URI: http://aquagraphite.com/2012/10/aqua-page-builder/
4
  Contributors: syamilmj
5
+ Tags: page builder, aquagraphite, syamilmj
6
  Requires at least: 3.3
7
+ Tested up to: 4.3.1
8
 
9
+ Stable Tag: 1.1.5
10
  License: GNU Version 2 or Any Later Version
11
 
12
 
25
  * Compatible with WordPress Import/Exporter
26
  * Unlimited number of reusable templates
27
  * Highly extensible
28
+ * Developer friendly with dozens of hooks and filters
 
 
 
29
 
30
  More information at [Aquagraphite.com](http://aquagraphite.com/2012/10/aqua-page-builder/).
31
 
52
 
53
  == Changelog ==
54
 
55
+ = 1.1.5: November 30, 2015
56
+
57
+ * FIX - Fix block height on dropping a block into the template area
58
+ * FIX - Renamed Visual Editor's textarea block to avoid conflict with Text block
59
+ * IMP - Various cleanups
60
+
61
  = 1.1.4: July 21, 2014
62
 
63
  * NEW - Visual editor
85
 
86
  = 1.1.0: April =
87
 
88
+ * Public release
 
89
 
90
  == Upgrade Notice ==
91
 
view/view-builder-page.php CHANGED
@@ -189,15 +189,13 @@ $disabled = $selected_template_id === 0 ? 'metabox-holder-disabled' : '';
189
  admin_url( 'themes.php' )
190
  ));
191
  ?>
192
- "><?php _e('Create a new template', 'aqpb-l10n') ?></a>
193
  </span>
194
 
195
  </form>
196
 
197
  <?php } else { ?>
198
- <span class="add-new-template-action">
199
- <?php _e('Create your new template below', 'aqpb-l10n') ?>
200
- </span>
201
  <?php } ?>
202
 
203
  </div>
@@ -233,9 +231,11 @@ $disabled = $selected_template_id === 0 ? 'metabox-holder-disabled' : '';
233
  <input name="template-name" id="template-name" type="text" class="template-name regular-text" title="Enter template name here" placeholder="<?php _e('Enter template name here', 'aqpb-l10n') ?>" value="<?php echo is_object($selected_template_object) ? $selected_template_object->post_title : ''; ?>">
234
  </label>
235
 
236
- <div id="template-shortcode">
237
- <input type="text" readonly="readonly" value='[template id="<?php echo $selected_template_id ?>"]' onclick="select()"/>
238
- </div>
 
 
239
 
240
  <div class="publishing-action">
241
  <?php submit_button( empty( $selected_template_id ) ? __( 'Create Template', 'aqpb-l10n' ) : __( 'Save Template', 'aqpb-l10n' ), 'button-primary ', 'save_template', false, array( 'id' => 'save_template_header' ) ); ?>
189
  admin_url( 'themes.php' )
190
  ));
191
  ?>
192
+ "><?php _e('create a new template', 'aqpb-l10n') ?></a>
193
  </span>
194
 
195
  </form>
196
 
197
  <?php } else { ?>
198
+ <?php _e('Create your new template below', 'aqpb-l10n') ?>
 
 
199
  <?php } ?>
200
 
201
  </div>
231
  <input name="template-name" id="template-name" type="text" class="template-name regular-text" title="Enter template name here" placeholder="<?php _e('Enter template name here', 'aqpb-l10n') ?>" value="<?php echo is_object($selected_template_object) ? $selected_template_object->post_title : ''; ?>">
232
  </label>
233
 
234
+ <?php if($selected_template_id !== 0) { ?>
235
+ <div id="template-shortcode">
236
+ <input type="text" readonly="readonly" value='[template id="<?php echo $selected_template_id ?>"]' onclick="select()"/>
237
+ </div>
238
+ <?php } ?>
239
 
240
  <div class="publishing-action">
241
  <?php submit_button( empty( $selected_template_id ) ? __( 'Create Template', 'aqpb-l10n' ) : __( 'Save Template', 'aqpb-l10n' ), 'button-primary ', 'save_template', false, array( 'id' => 'save_template_header' ) ); ?>