<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     default_default
 * @copyright   Copyright (c) 2006-2017 X.commerce, Inc. and affiliates (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->

<layout>
    <default>
        <reference name="head">
            <action method="addCss"><name>xmlconnect/boxes.css</name></action>
            <action method="addItem"><type>skin_css</type><name>xmlconnect/iestyles.css</name><params/><if>lte IE 8</if></action>
        </reference>
    </default>

    <adminhtml_mobile_index>
        <reference name="content">
            <block type="xmlconnect/adminhtml_mobile" name="applications"/>
        </reference>
    </adminhtml_mobile_index>

    <adminhtml_mobile_history>
        <reference name="content">
            <block type="xmlconnect/adminhtml_history" name="history"/>
        </reference>
    </adminhtml_mobile_history>

    <adminhtml_mobile_queue>
        <reference name="content">
            <block type="xmlconnect/adminhtml_queue" name="queue"/>
        </reference>
    </adminhtml_mobile_queue>

    <adminhtml_mobile_template>
        <reference name="content">
            <block type="xmlconnect/adminhtml_template" name="template"/>
        </reference>
    </adminhtml_mobile_template>

    <adminhtml_mobile_editqueue>
        <reference name="content">
            <block type="xmlconnect/adminhtml_queue_edit" name="queue_edit"/>
        </reference>
    </adminhtml_mobile_editqueue>

    <adminhtml_mobile_queuemessage>
        <reference name="content">
            <block type="xmlconnect/adminhtml_queue_edit" name="queue_edit"/>
        </reference>
    </adminhtml_mobile_queuemessage>

    <adminhtml_mobile_edittemplate>
         <reference name="head">
            <action method="setCanLoadExtJs"><flag>1</flag></action>
            <action method="addJs"><script>mage/adminhtml/variables.js</script></action>
            <action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action>
             <action method="addJs"><name>lib/uploader/flow.min.js</name></action>
             <action method="addJs"><name>lib/uploader/fusty-flow.js</name></action>
             <action method="addJs"><name>lib/uploader/fusty-flow-factory.js</name></action>
             <action method="addJs"><name>mage/adminhtml/uploader/instance.js</name></action>
            <action method="addJs"><script>mage/adminhtml/browser.js</script></action>
            <action method="addJs"><script>prototype/window.js</script></action>
            <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
            <action method="addItem"><type>js_css</type><name>prototype/windows/themes/magento.css</name></action>
        </reference>
        <reference name="content">
            <block type="xmlconnect/adminhtml_template_edit" name="template_edit"/>
        </reference>
    </adminhtml_mobile_edittemplate>

    <adminhtml_mobile_new>
        <reference name="left">
            <block type="xmlconnect/adminhtml_mobile_edit_tabs" name="mobile_edit_tabs" />
        </reference>
        <reference name="content">
            <block type="xmlconnect/adminhtml_mobile_edit" name="mobile_edit_content"/>
        </reference>
    </adminhtml_mobile_new>

    <adminhtml_mobile_edit>
        <update handle="editor"/>
        <reference name="left">
            <block type="xmlconnect/adminhtml_mobile_edit_tabs" name="mobile_edit_tabs">
                <block type="xmlconnect/adminhtml_mobile_edit_tab_offlineCatalog" name="mobile_edit_tab_offlineCatalog"/>
                <block type="xmlconnect/adminhtml_mobile_edit_tab_general" name="mobile_edit_tab_general"/>
                <block type="xmlconnect/adminhtml_mobile_edit_tab_design" name="mobile_edit_tab_design">
                    <block type="xmlconnect/adminhtml_mobile_edit_tab_design_images" name="mobile_edit_tab_design_images" as="design_images" />
                    <block type="xmlconnect/adminhtml_mobile_edit_tab_design_accordion" name="mobile_edit_tab_design_accordion" as="design_accordion">
                        <block type="xmlconnect/adminhtml_mobile_edit_tab_design_accordion_themes" name="accordion_themes" />
                        <block type="xmlconnect/adminhtml_mobile_edit_tab_design_accordion_tabs" name="accordion_tabs" />

                        <action method="addAccordionItem"><name>themes</name><block>accordion_themes</block></action>
                        <action method="addAccordionItem"><name>tabs</name><block>accordion_tabs</block></action>
                    </block>
                    <block type="xmlconnect/adminhtml_mobile_edit_tab_design_preview" name="mobile_edit_tab_design_preview" as="app_preview" />
                </block>
                <block type="xmlconnect/adminhtml_mobile_edit_tab_content" name="mobile_edit_tab_content"/>
                <block type="xmlconnect/adminhtml_mobile_edit_tab_payment" name="mobile_edit_tab_payment"/>
                <block type="xmlconnect/adminhtml_mobile_edit_tab_flurryanalytics" name="mobile_edit_tab_flurryanalytics"/>
                <block type="xmlconnect/adminhtml_mobile_edit_tab_submission_history" name="mobile_edit_tab_submission_history_grid"/>
                <block type="xmlconnect/adminhtml_mobile_edit_tab_cache" name="mobile_edit_tab_cache"/>
                <block type="xmlconnect/adminhtml_mobile_edit_tab_social" name="mobile_edit_tab_social" />
                <block type="xmlconnect/adminhtml_mobile_edit_tab_notification" name="mobile_edit_tab_notification">
                    <block type="core/template" name="mobile_edit_tab_notification_helper" as="app_notification_helper" template="xmlconnect/mobile/notification_helper.phtml" />
                </block>

                <action method="addTab"><id>general_section</id><block>mobile_edit_tab_general</block></action>
                <action method="addTab"><id>design_section</id><block>mobile_edit_tab_design</block></action>
                <action method="addTab"><id>content_section</id><block>mobile_edit_tab_content</block></action>
                <action method="addTab"><id>payment_methods</id><block>mobile_edit_tab_payment</block></action>
                <action method="addTab"><id>flurryanalytics_section</id><block>mobile_edit_tab_flurryanalytics</block></action>
                <action method="addTab"><id>history_grid</id><block>mobile_edit_tab_submission_history_grid</block></action>
                <action method="addTab"><id>cache_section</id><block>mobile_edit_tab_cache</block></action>
                <action method="addTab"><id>social_section</id><block>mobile_edit_tab_social</block></action>
                <action method="addTab"><id>notification_section</id><block>mobile_edit_tab_notification</block></action>
                <!--<action method="addTab"><id>offline_catalog</id><block>mobile_edit_tab_offlineCatalog</block></action>-->
            </block>
        </reference>
        <reference name="content">
            <block type="xmlconnect/adminhtml_mobile_edit" name="mobile_edit_content"/>
        </reference>
        <reference name="before_body_end">
            <block type="core/template" name="image_action_block" template="xmlconnect/edit/tab/design/image_edit.phtml"/>
        </reference>
        <reference name="head">
            <action method="addCss"><name>xmlconnect/dropdown.css</name></action>
            <action method="addCss"><name>xmlconnect/styles.css</name></action>
        </reference>
    </adminhtml_mobile_edit>

    <adminhtml_mobile_submissionhistorygrid>
        <remove name="root"/>
        <block type="xmlconnect/adminhtml_mobile_edit_tab_submission_history" name="submission_history_grid" output="toHtml"/>
    </adminhtml_mobile_submissionhistorygrid>

    <adminhtml_mobile_submission>
        <reference name="left">
            <block type="xmlconnect/adminhtml_mobile_submission_tabs" name="mobile_submission_tabs">
                <block type="xmlconnect/adminhtml_mobile_submission_tab_container" name="mobile_submission_tab_container">
                    <block type="xmlconnect/adminhtml_mobile_submission_tab_container_submission" name="mobile_submission_tab_container_submission" as="edit_form"/>
                    <block type="xmlconnect/adminhtml_mobile_edit_tab_design_preview" name="mobile_edit_tab_design_preview" as="app_preview" />
                </block>
                <action method="addTab"><id>submission_section</id><block>mobile_submission_tab_container</block></action>
            </block>
        </reference>
        <reference name="content">
            <block type="xmlconnect/adminhtml_mobile_submission" name="mobile_submission_content"/>
        </reference>
        <reference name="head">
            <action method="addCss"><name>xmlconnect/styles.css</name></action>
        </reference>
    </adminhtml_mobile_submission>

    <adminhtml_mobile_grid>
        <block type="xmlconnect/adminhtml_mobile_grid" name="mobile_grid" output="toHtml"/>
    </adminhtml_mobile_grid>

    <adminhtml_mobile_history_grid>
        <block type="xmlconnect/adminhtml_history_grid" name="history_grid" output="toHtml"/>
    </adminhtml_mobile_history_grid>

    <adminhtml_mobile_template_preview>
        <block type="core/template" name="root" output="toHtml" template="xmlconnect/template/preview.phtml">
            <block type="xmlconnect/adminhtml_template_preview" name="content" as="content"></block>
        </block>
    </adminhtml_mobile_template_preview>

    <adminhtml_mobile_previewhome>
        <block type="core/text_list" name="root" output="toHtml">
            <block type="xmlconnect/adminhtml_mobile_preview_content" name="preview_home_content">
                <action method="setTemplate"><templateType>home</templateType></action>
                <block type="xmlconnect/adminhtml_mobile_preview_tabitems" name="preview_tab_items" as="tab_items">
                    <action method="setActiveTab"><tab>home</tab></action>
                </block>
            </block>
            <block type="core/template" template="xmlconnect/edit/tab/design/preview/banner_rotator.phtml"/>
        </block>
    </adminhtml_mobile_previewhome>

    <adminhtml_mobile_previewhomehor>
        <block type="core/text_list" name="root" output="toHtml">
            <block type="xmlconnect/adminhtml_mobile_preview_content" name="preview_home_hor_content">
                <action method="setTemplate"><templateType>home_hor</templateType></action>
                <block type="xmlconnect/adminhtml_mobile_preview_tabitems" name="preview_tab_items" as="tab_items">
                    <action method="setActiveTab"><tab>home</tab></action>
                </block>
            </block>
            <block type="core/template" template="xmlconnect/edit/tab/design/preview/banner_rotator.phtml"/>
        </block>
    </adminhtml_mobile_previewhomehor>

    <adminhtml_mobile_previewcataloghor>
        <block type="core/text_list" name="root" output="toHtml">
            <block type="xmlconnect/adminhtml_mobile_preview_content" name="preview_catalog_hor_content">
                <action method="setTemplate"><templateType>catalog_hor</templateType></action>
                <block type="xmlconnect/adminhtml_mobile_preview_tabitems" name="preview_tab_items" as="tab_items">
                    <action method="setActiveTab"><tab>shop</tab></action>
                </block>
            </block>
        </block>
    </adminhtml_mobile_previewcataloghor>

    <adminhtml_mobile_previewcatalog>
        <block type="core/text_list" name="root" output="toHtml">
            <block type="xmlconnect/adminhtml_mobile_preview_content" name="preview_catalog_content">
                <action method="setTemplate"><templateType>catalog</templateType></action>
                <block type="xmlconnect/adminhtml_mobile_preview_tabitems" name="preview_tab_items" as="tab_items">
                    <action method="setActiveTab"><tab>shop</tab></action>
                </block>
            </block>
        </block>
    </adminhtml_mobile_previewcatalog>

    <adminhtml_mobile_previewproductinfo>
        <block type="core/text_list" name="root" output="toHtml">
            <block type="xmlconnect/adminhtml_mobile_preview_content" name="preview_productinfo_content">
                <action method="setTemplate"><templateType>productinfo</templateType></action>
                <block type="xmlconnect/adminhtml_mobile_preview_tabitems" name="preview_tab_items" as="tab_items">
                    <action method="setActiveTab"><tab>shop</tab></action>
                </block>
            </block>
        </block>
    </adminhtml_mobile_previewproductinfo>

    <!-- Admin application actions -->
    <adminhtml_admin_application_index>
        <reference name="left">
            <block type="xmlconnect/adminhtml_admin_application_edit_tabs" name="admin_app_settings_tabs"/>
        </reference>
        <reference name="content">
            <block type="xmlconnect/adminhtml_admin_application_edit" name="admin_app_settings"/>
        </reference>
    </adminhtml_admin_application_index>

    <adminhtml_connect_config_index>
        <block type="xmlconnect/adminhtml_connect_config" name="admin.connect.config" output="toHtml"/>
    </adminhtml_connect_config_index>

    <adminhtml_connect_config_localization>
        <block type="xmlconnect/localization" name="xmlconnect.localization" output="toHtml"/>
    </adminhtml_connect_config_localization>

    <adminhtml_connect_dashboard_index>
        <block type="xmlconnect/adminhtml_connect_dashboard" name="admin.connect.dashboard" output="toHtml">
            <block type="xmlconnect/adminhtml_connect_dashboard_storeSwitcher" name="admin.connect.store.switcher" as="store_switcher"/>
            <block type="xmlconnect/adminhtml_connect_dashboard_salesInfo" name="dashboard.sales.info" as="sales_info"/>
            <block type="xmlconnect/adminhtml_connect_dashboard_graphInfo" name="dashboard.graph.info" as="graph_info">
                <block type="xmlconnect/adminhtml_connect_dashboard_graphOrderData" name="dashboard.graph.order.data" as="graph_order_data"/>
                <block type="xmlconnect/adminhtml_connect_dashboard_graphAmountsData" name="dashboard.graph.amounts.data" as="graph_amounts_data"/>
                <block type="xmlconnect/adminhtml_connect_dashboard_graphTotalsData" name="dashboard.graph.totals.data" as="graph_totals_data"/>
            </block>
            <block type="xmlconnect/adminhtml_connect_dashboard_lastOrders" name="dashboard.last.orders" as="last_orders"/>
            <block type="xmlconnect/adminhtml_connect_dashboard_lastSearchTerms" name="dashboard.last.search.terms" as="last_search_terms"/>
            <block type="xmlconnect/adminhtml_connect_dashboard_newCustomers" name="dashboard.new.customers" as="new_customers"/>
            <block type="xmlconnect/adminhtml_connect_dashboard_topSearchTerms" name="dashboard.top.search.terms" as="top_search_terms"/>
            <block type="xmlconnect/adminhtml_connect_dashboard_mostViewedProducts" name="dashboard.most.viewed.products" as="most_viewed"/>
            <block type="xmlconnect/adminhtml_connect_dashboard_bestSellers" name="dashboard.best.sellers" as="best_sellers"/>
            <block type="xmlconnect/adminhtml_connect_dashboard_customers" name="dashboard.customers" as="customers"/>
        </block>
    </adminhtml_connect_dashboard_index>
</layout>
