function ioa_page_builder_lg()
{
    global $radunits, $post, $ioa_portfolio_slug;
    ?>


	<div class="rad_toolbox clearfix">
			<a href="" class='ioa-front-icon left-open-bigicon- toggle-rad_toolbox parent_tip'><small class="rad_tooltip rleft">Toggle Widgets Sidebar</small></a>
			<ul  class="rad-swift-menu clearfix">
				<li class='rad_elements rad_image_prop'><a href="#rad_elements" class=""><img src='<?php 
    echo HURL . '/css/i/builder_icon.png';
    ?>
' /><span>Elements</span><i class="ioa-front-icon left-dir-1icon-"></i></a></li>
				<li class='rad_pages rad_image_prop parent_tip'><a href="#rad_pages" class=""><img src='<?php 
    echo HURL . '/css/i/page_icon.png';
    ?>
' /><span>Pages</span><i class="ioa-front-icon left-dir-1icon-"></i> <small class="rad_tooltip rleft">Import Inbuilt Pages</small></a></li>
			
			</ul>
		 	 <div id="rad_elements" class="clearfix rad-widget-area">
					<div class="rad-content-area">
									
						<div id="rad_builder_items">
							
							<div class="rad-widgets clearfix">
								
									
										
								<h3><a href="#rad-widgets"><?php 
    _e('Widgets', 'ioa');
    ?>
 </a><i class="ioa-front-icon angle-downicon-"></i></h3>
								<div id="rad-widgets"  class='rad-w-tab-content clearfix'>
								 	<div class="rad-w-scroll-area clearfix">
										<div class="clearfix">
											<?php 
    foreach ($radunits as $key => $widget) {
        if ($widget->data['group'] == "widgets") {
            echo $widget->getThumb();
        }
    }
    foreach ($radunits as $key => $widget) {
        if ($widget->data['group'] == "plugins") {
            echo $widget->getThumb();
        }
    }
    ?>
	
										</div>									
									</div>
								</div>

								<h3><a href="#rad-media"><?php 
    _e('Media Widgets', 'ioa');
    ?>
 </a><i class="ioa-front-icon angle-downicon-"></i></h3>
								<div id="rad-media"  class='rad-w-tab-content clearfix'>
								 	<div class="rad-w-scroll-area clearfix">
								 	<?php 
    foreach ($radunits as $key => $widget) {
        if ($widget->data['group'] == "media") {
            echo $widget->getThumb();
        }
    }
    ?>
									</div>
								</div>


								<h3><a href="#rad-advance"><?php 
    _e('Post Widgets', 'ioa');
    ?>
 </a><i class="ioa-front-icon angle-downicon-"></i></h3>
								<div id="rad-advance"  class='rad-w-tab-content clearfix'>
								 	<div class="rad-w-scroll-area clearfix">
								 	<?php 
    foreach ($radunits as $key => $widget) {
        if ($widget->data['group'] == "advance") {
            echo $widget->getThumb();
        }
    }
    ?>
									</div>
								</div>

								<h3><a href="#rad-advance"><?php 
    _e('Infographics Widgets', 'ioa');
    ?>
 </a><i class="ioa-front-icon angle-downicon-"></i></h3>
								<div id="rad-advance"  class='rad-w-tab-content clearfix'>
								 	<div class="rad-w-scroll-area clearfix">
								 	<?php 
    foreach ($radunits as $key => $widget) {
        if ($widget->data['group'] == "infographic") {
            echo $widget->getThumb();
        }
    }
    ?>
									</div>
								</div>

	
							</div>	
						</div>	
					</div>

		 	 </div>
		 	 <div id="rad_pages" class="clearfix rad-widget-area">

		 	 	<div class="rad-widgets clearfix">
					<ul class='clearfix'>
						<li><a href="#rad_inbuilt_pages">Inbuilt Pages</a></li>
						<li><a href="#rad_save_templates">Save Templates</a></li>
					</ul>
					<div class="ioa-information-p">
						<?php 
    _e('Click on the Template to import it', 'ioa');
    ?>
					</div>
					<div id="rad_inbuilt_pages" class="rad-w-tab-content rad_tab_scroll clearfix">
						<div class="clearfix">
						<div class="rad-search-file clearfix">
							 <input type="text" class='rad-file-input' placeholder="<?php 
    _e('Enter Page to Search', 'ioa');
    ?>
" />
							 <i class="ioa-front-icon search-2icon-"></i>
						</div>
							<?php 
    $ins_path = get_template_directory() . "/sprites/templates";
    if (file_exists($ins_path)) {
        $insta_templates = scandir($ins_path);
        $i = 0;
        $depth = 0;
        foreach ($insta_templates as $key => $template) {
            if ($template != '.' && $template != '..') {
                $id = str_replace('.txt', '', $template);
                $name = str_replace("_", " ", $id);
                ?>
												<div class="rad-template-icon insta-template insta-template-trigger <?php 
                if ($i % 3 == 0) {
                    echo 'first ';
                    $depth++;
                }
                echo ' level-' . $depth;
                ?>
" data-source="<?php 
                echo $template;
                ?>
"> 
													<i class="ioa-front-icon doc-alt-1icon- file-icon"></i>
													<span class="label"><?php 
                echo $name;
                ?>
</span> 
												</div>
												<?php 
                $i++;
            }
        }
    }
    ?>
						</div>
					</div>	
					
					
					<div id="rad_save_templates" class=" rad-w-tab-content rad_tab_scroll clearfix">
					<?php 
    $data = array();
    if (get_option('RAD_TEMPLATES')) {
        $data = get_option('RAD_TEMPLATES');
    }
    $i = 0;
    $depth = 0;
    foreach ($data as $key => $template) {
        ?>
					  	<div class="import-p-template rad-template-icon <?php 
        if ($i % 3 == 0) {
            echo 'first ';
            $depth++;
        }
        echo ' level-' . $depth;
        ?>
" data-key="<?php 
        echo $key;
        ?>
" data-source="<?php 
        echo $template['title'];
        ?>
"> 
										<i class="ioa-front-icon doc-alt-1icon- file-icon"></i>
										<i class="ioa-front-icon cancel-3icon- delete-icon"></i>
										<span class="label"><?php 
        echo $template['title'];
        ?>
</span> 
						</div>
						<?php 
        $i++;
    }
    ?>
					 </div>
				</div>	 

		 	 </div>
		 	 
	</div>
	

	<span class="initializer-msg"><?php 
    _e('Intializing Builder', 'ioa');
    ?>
</span>
	
	<div class="ioa-wp-editor">
		<div class="ioa-wp-editor-area">
			<?php 
    echo getIOAInput(array("label" => __("Enter Text", 'ioa'), "name" => "ioa_wp_editor", "default" => "", "is_editor" => true, "type" => "textarea", "length" => 'medium'));
    ?>
		</div>
		<div class="ioa-wp-editor-footer clearfix">
			<a href="" class="button-save ioa-save-wp-editor"><?php 
    _e('Save Changes', 'ioa');
    ?>
</a>
			<a href="" class="button-default ioa-close-wp-editor"><?php 
    _e('Close', 'ioa');
    ?>
</a>
		</div>
	</div>	


			<div class="rad-catcher"></div>


			<div class="settings-overlay">
					
				</div>
				<div class="settings-lightbox" data-version='1.0'>
					<div class="settings-body">
						<div class="inner-settings-body clearfix">
						

					</div>
					</div>
					<div class="bottom-bar clearfix">
						<a href="" class="cancel-settings button-default"><?php 
    _e('Cancel', 'ioa');
    ?>
</a>
						<a href="" class="save-settings button-save"><?php 
    _e('Save', 'ioa');
    ?>
</a>
						<a href="" class="insert-rad-shortcode button-save"><?php 
    _e('Insert Widget', 'ioa');
    ?>
</a>
					</div>
				</div>
			
					<?php 
    RADMarkup::generateRADSection(array(), '', array(), true);
    RADMarkup::generateRADContainer(array(), '', 'full', array(), true);
    RADMarkup::generateRADWidget(array('id' => '', 'label' => ''), array(), '', 'full', true);
    ?>

			<script type='text/javascript'>
			var RAD_BUILDER_VERSION = 3.22;
			var rad_builder_data = {

				<?php 
    $settings = array();
    foreach ($radunits as $key => $widget) {
        if ($key == 'rad_page_container_80') {
            $key = 'rad_page_container';
        }
        if ($widget->getCommonKey() != "") {
            $settings[$widget->getCommonKey()] = $key . ' :{ inputs : [ ' . $widget->createWidgetIOAInputs() . '], styles:[' . $widget->createWidgetIOAStyles() . '] }';
        } else {
            $settings[$key] = $key . ' : { inputs : [ ' . $widget->createWidgetIOAInputs() . '] , styles:[' . $widget->createWidgetIOAStyles() . '] }';
        }
    }
    array_unique($settings);
    echo join(',', $settings);
    ?>


			}
			var rad_rich_fields = ['text_data','meta_value','rad_tab','gallery_images'];
			var rad_sections = {

				<?php 
    echo join(",", RADPageBuilder::getValues());
    ?>

			};

			</script>
		<?php 
}
Beispiel #2
0
    static function generateRADContainer($values = array(), $id = '', $layout = 'full', $widgets = array(), $clone = false, $force_value = false)
    {
        global $radunits;
        if ($clone) {
            $id = '{ID}';
            echo '<script type="text/template" id="RADContainerView">';
        }
        ?>

			<div id="<?php 
        echo $id;
        ?>
" class="rad_page_container <?php 
        echo $layout;
        ?>
 clearfix" data-type='rad_page_container'>
									<div class="container-toolbar clearfix">
											<a href="" class="container-move"><i class="ioa-front-icon resize-full-alt-1icon-"></i> <span class="c-tip"> <small class='ioa-front-icon up-dir-1icon-'></small><?php 
        _e('Drag to Sort the Column or drop it in another row.', 'ioa');
        ?>
</span></a>
										 	<div class="container-layout">
										 			<?php 
        echo getIOAInput(array("label" => "", "name" => "component_layout", "default" => "100%", "type" => "select", "description" => "", "options" => array("full" => "100%", "four_fifth" => "80%", "three_fourth" => "75%", "two_third" => "66%", "one_half" => "50%", "one_third" => "33%", "one_fourth" => "25%", "one_fifth" => "20%"), "value" => $layout, "data" => array("attr" => "component_layout_holder")));
        ?>
										 			<span class="c-tip"> <small class='ioa-front-icon up-dir-1icon-'></small><?php 
        _e('Select the Column Width', 'ioa');
        ?>
</span>
										 		</div>
												<a href="" class="container-clone"><i class='ioa-front-icon docsicon-'></i> <span class="c-tip"> <small class='ioa-front-icon up-dir-1icon-'></small><?php 
        _e('Duplicate Column', 'ioa');
        ?>
</span></a>
										 		<a href="" class="container-delete"><i class='ioa-front-icon cancel-1icon-'></i><span class="c-tip"> <small class='ioa-front-icon up-dir-1icon-'></small><?php 
        _e('Delete Column', 'ioa');
        ?>
</span></a>
										 		<a href="" class="container-edit"><i class='ioa-front-icon pencil-2icon-'></i><span class="c-tip"> <small class='ioa-front-icon up-dir-1icon-'></small><?php 
        _e('Edit Column settings', 'ioa');
        ?>
</span></a>
									</div>
									<div class="container-content clearfix">
										<?php 
        foreach ($widgets as $key => $widget) {
            $widget_data = $widget;
            $f = false;
            if (is_array($force_value)) {
                $f = $widget['data'];
            }
            $l = 'full';
            if (isset($widget['layout'])) {
                $l = $widget['layout'];
            }
            $widget['type'] = str_replace('-', '_', $widget['type']);
            $unit = $radunits['rad_text_widget'];
            if (isset($radunits[$widget['type']])) {
                $unit = $radunits[$widget['type']];
            }
            if (isset($widget['id'])) {
                $widget_data['id'] = $widget['id'];
            }
            RADMarkup::generateRADWidget($unit->data, $widget_data, $widget_data['id'], $l, false, $f);
        }
        ?>
									</div>
									<?php 
        if (is_array($force_value)) {
            echo '<div class="save-data">';
            foreach ($force_value as $key => $value) {
                echo '<textarea name="' . $value['name'] . '">' . stripslashes($value['value']) . '</textarea>';
            }
            echo '</div>';
        }
        ?>
									
			</div>
			<?php 
        if ($clone) {
            echo "</script>";
        }
    }