<?xml version="1.0"?>
<!--

-->

<layout>
    <default>
        <reference name="head">
            <action method="addCss"><name>xmlconnect/boxes.css</name></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"><script>lib/flex.js</script></action>
            <action method="addJs"><script>lib/FABridge.js</script></action>
            <action method="addJs"><script>mage/adminhtml/flexuploader.js</script></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="addCss"><name>lib/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>
        <reference name="left">
            <block type="xmlconnect/adminhtml_mobile_edit_tabs" name="mobile_edit_tabs">
                <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_accordion" name="mobile_edit_tab_design_accordion" as="design_accordion">
                        <block type="xmlconnect/adminhtml_mobile_edit_tab_design_accordion_images" name="accordion_images" />
                        <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>images</name><block>accordion_images</block></action>
                        <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>
            </block>
        </reference>
        <reference name="content">
            <block type="xmlconnect/adminhtml_mobile_edit" name="mobile_edit_content"/>
        </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>
    </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>
    </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>
</layout>
