示例#1
0
 /**
  * html structure of element in Page Builder area
  *
  * @param type $content        : inner shortcode elements of this row
  * @param type $shortcode_data : not used
  *
  * @return string
  */
 public function element_in_pgbldr($content = '', $shortcode_data = '')
 {
     if (empty($content)) {
         $column = new JSNPBShortcodeColumn();
         $column_html = $column->element_in_pgbldr();
         $column_html = $column_html;
     } else {
         $column_html = JSNPagebuilderHelpersBuilder::generateShortCode($content);
     }
     if (empty($shortcode_data)) {
         $shortcode_data = $this->config['shortcode_structure'];
     }
     // remove [/it_row][it_column...] from $shortcode_data
     $shortcode_data = explode("][", $shortcode_data);
     $shortcode_data = $shortcode_data[0] . "]";
     $row = '<div class="jsn-row-container ui-sortable row-fluid shortcode-container" STYLE>
     				<div class="jsn-iconbar left">
     					<a href="javascript:void(0);" title="' . JText::_('Move Up') . '" class="jsn-move-up disabled"><i class="icon-chevron-up"></i></a>
                         <a href="javascript:void(0);" title="' . JText::_('Move Down') . '" class="jsn-move-down disabled"><i class=" icon-chevron-down"></i></a>
     				</div>
                     <textarea class="hidden" data-sc-info="shortcode_content" name="shortcode_content[]" >' . $shortcode_data . '</textarea>
                     <div class="jsn-pb-row-content">
                     ' . $column_html . '
                     </div>
                     <div class="jsn-iconbar jsn-vertical">
                         <a href="javascript:void(0);" class="add-container" title="' . JText::_('Add column') . '"><i class="icon-plus"></i></a>
                         <a href="javascript:void(0);" title="Edit element" data-shortcode="' . $this->config['shortcode'] . '" class="element-edit row"><i class="icon-pencil"></i></a>
                         <a href="javascript:void(0);" class="item-delete row" title="' . JText::_('Delete row') . '"><i class="icon-trash"></i></a>
                     </div>
                     <textarea class="hidden" name="shortcode_content[]" >[/' . $this->config['shortcode'] . ']</textarea>
                 </div>';
     return $row;
 }
示例#2
0
 /**
  * html structure of element in Page Builder area
  *
  * @param type $content        : inner shortcode elements of this row
  * @param type $shortcode_data : not used
  *
  * @return string
  */
 public function element_in_pgbldr($content = '', $shortcode_data = '')
 {
     if (empty($content)) {
         $column = new JSNPBShortcodeColumn();
         $column_html = $column->element_in_pgbldr();
         $column_html = $column_html;
     } else {
         $column_html = JSNPagebuilderHelpersBuilder::generateShortCode($content);
     }
     if (empty($shortcode_data)) {
         $shortcode_data = $this->config['shortcode_structure'];
     }
     // remove [/it_row][it_column...] from $shortcode_data
     $shortcode_data = explode("][", $shortcode_data);
     $shortcode_data = $shortcode_data[0] . "]";
     // 		if (strpos($column_html,'system-readmore') !== false) {
     // 			$row            = '<div class="jsn-row-container ui-sortable row-fluid shortcode-container" STYLE>
     //         				<div class="jsn-iconbar left">
     //         					<a href="javascript:void(0);" title="' . JText::_('JSN_PAGEBUILDER_HELPER_ROW_MOVE_UP') . '" class="jsn-move-up disabled"><i class="icon-chevron-up"></i></a>
     //                             <a href="javascript:void(0);" title="' . JText::_('JSN_PAGEBUILDER_HELPER_ROW_MOVE_DOWN') . '" class="jsn-move-down disabled"><i class=" icon-chevron-down"></i></a>
     //         				</div>
     //                         <textarea class="hidden" data-sc-info="shortcode_content" name="shortcode_content[]" >' . $shortcode_data . '</textarea>
     //                         <div class="jsn-pb-row-content">
     //                         ' . $column_html . '
     //                         </div>
     //                         <textarea class="hidden" name="shortcode_content[]" >[/' . $this->config['shortcode'] . ']</textarea>
     //                     </div>';
     // 		} else {
     $row = '<div class="jsn-row-container ui-sortable row-fluid shortcode-container" STYLE>
     				<div class="jsn-iconbar left">
     					<a href="javascript:void(0);" title="' . JText::_('JSN_PAGEBUILDER_HELPER_ROW_MOVE_UP') . '" class="jsn-move-up disabled"><i class="icon-chevron-up"></i></a>
                         <a href="javascript:void(0);" title="' . JText::_('JSN_PAGEBUILDER_HELPER_ROW_MOVE_DOWN') . '" class="jsn-move-down disabled"><i class=" icon-chevron-down"></i></a>
     				</div>
                     <textarea class="hidden" data-sc-info="shortcode_content" name="shortcode_content[]" >' . $shortcode_data . '</textarea>
                     <div class="jsn-pb-row-content">
                     ' . $column_html . '
                     </div>
                     <div class="jsn-iconbar jsn-vertical">
                         <a href="javascript:void(0);" class="add-container" title="' . JText::_('JSN_PAGEBUILDER_HELPER_ROW_ADD_COLUMN') . '"><i class="icon-plus"></i></a>
                         <a href="javascript:void(0);" title="Edit element" data-shortcode="' . $this->config['shortcode'] . '" class="element-edit row"><i class="icon-pencil"></i></a>
                         <a href="javascript:void(0);" class="item-delete row" title="' . JText::_('JSN_PAGEBUILDER_HELPER_ROW_DELETE_ROW') . '"><i class="icon-trash"></i></a>
                     </div>
                     <textarea class="hidden" name="shortcode_content[]" >[/' . $this->config['shortcode'] . ']</textarea>
                 </div>';
     //}
     return $row;
 }