
-- METADOR Application

INSERT INTO gui (gui_id, gui_name, gui_description, gui_public) VALUES ('MeTaDor','MeTaDor','Application to edit metadata',1);
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','jq_ui',1,1,'The jQuery UI core','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-ui-1.8.14.custom/js/jquery-ui-1.8.14.custom.min.js','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','jq_ui','css','../extensions/jquery-ui-1.7.2.custom/css/ui-lightness/jquery-ui-1.7.2.custom.css','','file/css');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_md_selectAction',1,1,'','Metadateneditorstartseite','div','','data="{path:''#mb_md_selectAction''}"',0,0,NULL ,NULL,NULL ,'','','div','../MeTaDor/mb_md_selectAction.js','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','md_editor_navigation_data',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'display:none','<ul class="md_editor_navigation">
<li><a class=''wizard'' href=''#metadata_create_data_metadata''>Metadatensatz</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_identification''>Identifikation</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_description''>Inhaltsbeschreibung</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_categories''>Kategorisierung</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_keywords''>Schlüsselwörter</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_geographic_extent''>Räumliche Angaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_temporal_extent''>Zeitliche Angaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_feature_catalogue''>Dokumentation und Visualisierung</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_structure''>Datenqualität</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_conformance''>Evaluierung</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_constraints''>Beschränkungen</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_download''>Vertriebsangaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_data_contact''>Kontaktangaben</a></li>
</ul>','div','../MeTaDor/mb_md_editor_navigation.js','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','i18n',1,1,'Internationalization module, collects data from all elements and sends them to the server in a single POST request. The strings are translated via gettext only.','Internationalization','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../plugins/mb_i18n.js','','','','http://www.mapbender.org/Gettext');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','jq_datatables',1,1,'jQuery plugin datatables, use like this
$(selector).datatables(options)','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','../plugins/jq_datatables.js','../extensions/dataTables-1.5/media/js/jquery.dataTables.min.js','','','http://www.datatables.net/');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','jq_datatables','defaultCss','../extensions/dataTables-1.5/media/css/demo_table_jui.css','','file/css');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','jq_layout',1,1,'This jQuery plugin can create a sophisticated pane layout ','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery.layout.all-1.2.0/jquery.layout.js','','','http://layout.jquery-dev.net');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','jq_metadata',1,1,'Metadata plugin','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery.metadata.2.1/jquery.metadata.min.js','','','http://plugins.jquery.com/project/metadata');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','jq_upload',1,1,'Allows to upload files into Mapbender''s temporary files folder','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../plugins/jq_upload.js','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','jq_validate',1,1,'The jQuery validation plugin','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','../javascripts/jq_validate.js','../extensions/jquery-validate/jquery.validate.js','','','http://docs.jquery.com/Plugins/Validation');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','jq_validate','css','label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }','','text/css');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_alert',1,0,'replaces alerts with jQuery UI dialogs','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../../lib/alert.js','','jq_ui,jq_ui_dialog','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_md_editMetadataByApplication',1,1,'','Bearbeitung von Metadaten zu Geoanwendungen','div','','data="{path:''#mb_md_selectAction/#mb_md_editMetadataByApplication''}"',NULL ,NULL,NULL ,NULL,NULL ,'display:none;width:98%','','div','../MeTaDor/mb_md_editMetadataByData.js','','mb_md_wizard','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_md_editMetadataByApplication','inputs','[
    {
        "method": "setFilter",
        "linkedTo": [
            {
                "id": "md_editor_search_data",
                "event": "searchComplete"
            }
        ]
    },
    {
        "method": "fileUploaded",
        "linkedTo": [
            {
                "id": "md_editor_xml_import",
                "event": "uploadComplete"
            }
        ]
    }
]','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_md_editMetadataByApplication','serverSideUrl','../MeTaDor/mb_md_editMetadataByApplication.php','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_md_editMetadataByData',1,1,'','Bearbeitung von Metadatensätzen zu Geodaten','div','','data="{path:''#mb_md_selectAction/#mb_md_editMetadataByData''}"',NULL ,NULL,NULL ,NULL,NULL ,'display:none;width:98%','','div','../MeTaDor/mb_md_editMetadataByData.js','','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_md_editMetadataByData','inputs','[
    {
        "method": "setFilter",
        "linkedTo": [
            {
                "id": "md_editor_search_data",
                "event": "searchComplete"
            }
        ]
    },
    {
        "method": "fileUploaded",
        "linkedTo": [
            {
                "id": "md_editor_xml_import",
                "event": "uploadComplete"
            }
        ]
    }
]','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_md_editMetadataByData','serverSideUrl','../MeTaDor/mb_md_editMetadataByData.php','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_md_editMetadataByService',1,1,'../MeTaDor/mb_md_editMetadataByData.js','Bearbeitung von Metadatensätzen zu Geodatendiensten','div','','data="{path:''#mb_md_selectAction/#mb_md_editMetadataByService''}"',NULL ,NULL,NULL ,NULL,NULL ,'display:none;width:98%','','div','../MeTaDor/mb_md_editMetadataByData.js','','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_md_editMetadataByService','inputs','[
    {
        "method": "setFilter",
        "linkedTo": [
            {
                "id": "md_editor_search_data",
                "event": "searchComplete"
            }
        ]
    },
    {
        "method": "fileUploaded",
        "linkedTo": [
            {
                "id": "md_editor_xml_import",
                "event": "uploadComplete"
            }
        ]
    }
]','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_md_editMetadataByService','serverSideUrl','../MeTaDor/mb_md_editMetadataByService.php','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_md_path',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','&nbsp;','div','../MeTaDor/mb_md_path.js','','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_md_path','inputs','[
    {
        "method": "set",
        "linkedTo": [
            {
                "id": "mb_md_container",
                "event": "onClickLink" ,
"attr": "path"
            }
        ]
    }
]','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','md_editor_navigation_application',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'display:none','<ul class="md_editor_navigation">
<li><a class=''wizard'' href=''#metadata_create_application_metadata''>Metadatensatz</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_identification''>Identifikation</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_description''>Inhaltsbeschreibung</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_categories''>Kategorisierung</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_keywords''>Schlüsselwörter</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_geographic_extent''>Räumliche Angaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_temporal_extent''>Zeitliche Angaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_constraints''>Beschränkungen</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_download''>Vertriebsangaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_application_contact''>Kontaktangaben</a></li>
</ul>','div','','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','body',1,1,'body (obligatory)','','body','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','body','../MeTaDor/css/body.css','to define the color of text','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','css_class_bg',' * {
    font-family: Verdana;
    font-size: 100%;
}
#mb_md_path a.wizard, #mb_md_selectAction a.wizard {
    color: #666666;
}

body {
    height: 97%;
}

li {
    list-style-type: disc;
    color: #f25424;
}
#md_editor_navigation_data, #md_editor_navigation_service, #md_editor_navigation_application {
    color: #f25424;
    list-style-type: disc;
    line-height: 12px;
}
#md_editor_navigation_data li, #md_editor_navigation_service li, #md_editor_navigation_application li {
/*    background: transparent url(../i/icon_yellow_dot.gif) no-repeat scroll 7px 16px;*/
    background: transparent no-repeat scroll 7px 16px;
    border-bottom: dotted 1px #666666;
    padding: 8px 0 8px 24px;
}
#md_editor_navigation_data a, #md_editor_navigation_service a, #md_editor_navigation_application a {
    color: #666666;
}
#mb_md_path {
    font-weight: bold;
}','to define the color of the body','text/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','css_class_pane','.ui-layout-pane {
	background:	#FFF;
	padding:	3px;
	overflow:	auto;
}
.ui-layout-content {
	padding:	0px;
	position:	relative;
	overflow:	auto;
}
.mb_pane-west {
	padding: 0;
	overflow: hidden;
}
.mb_pane-center {
	padding: 0;
	overflow: auto;
}
.mb_pane-center P.ui-layout-content {
	line-height:	1.4em;
	margin:			0;
}

','to define the color of the body','text/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','favicon','../img/favicon.png','favicon','php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','includeWhileLoading','','show splash screen while the application is loading','php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','jq_datatables_css_ui','../MeTaDor/css/demo_table_jui_metador.css','css-file for jQuery datatables','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','jq_ui_theme','../extensions/jquery-ui-1.8.1.custom/css/ui-lightness/jquery-ui-1.8.1.custom.css','UI Theme from Themeroller','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','jq_ui_theme_md','../MeTaDor/css/jquery-ui-.custom.css','UI Theme from Themeroller','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','metadataeditorspecifc','../MeTaDor/css/metadata_editor.css','','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','body','use_load_message','true','show splash screen while the application is loading','php_var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','md_editor_navigation_service',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'display:none','<ul class="md_editor_navigation">
<li><a class=''wizard'' href=''#metadata_create_service_metadata''>Metadatensatz</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_identification''>Identifikation</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_description''>Inhaltsbeschreibung</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_keywords''>Schlüsselwörter</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_geographic_extent''>Räumliche Angaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_temporal_extent''>Zeitliche Angaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_feature_catalogue''>Dokumentation und Visualisierung</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_conformance''>Evaluierung</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_constraints''>Beschränkungen</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_download''>Vertriebsangaben</a></li>
<li><a class=''wizard'' href=''#metadata_create_service_contact''>Kontaktangaben</a></li>
</ul>','div','','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','md_editor_search_data',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../MeTaDor/mb_md_editor_search_data.js','','md_editor_container','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','md_editor_search_data','inputs','[
    {
        "method": "init",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByData",
                "event": "onSearch",
                "value": "mb_md_editMetadataByData"
            },
            {
                "id": "mb_md_editMetadataByService",
                "event": "onSearch",
                "value": "mb_md_editMetadataByService"
            },
            {
                "id": "mb_md_editMetadataByApplication",
                "event": "onSearch",
                "value": "mb_md_editMetadataByApplication"
            }
        ]
    }
]','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','md_editor_xml_import',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../MeTaDor/mb_md_editor_xml_import.js','','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','md_editor_xml_import','inputs','[
    {
        "method": "init",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByData",
                "event": "onXmlImport"
            }
        ]
    },
    {
        "method": "init",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByService",
                "event": "onXmlImport"
            }
        ]
    },
    {
        "method": "init",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByApplication",
                "event": "onXmlImport"
            }
        ]
    }
]','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','outer_pane',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'height:100%;width:100%','','div','../plugins/mb_pane.js','','','jq_layout','http://layout.jquery-dev.net');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','outer_pane','center','content_pane','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','outer_pane','css','../extensions/jquery.layout.all-1.2.0/jquery.layout.css','','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','outer_pane','inputs','[
    {
        "method": "resizeAll",
        "linkedTo": [
            {
                "id": "metadata_create_data",
                "event": "formLoaded"
            }
        ]
    },
    {
        "method": "resizeAll",
        "linkedTo": [
            {
                "id": "metadata_create_service",
                "event": "formLoaded"
            }
        ]
    },
    {
        "method": "resizeAll",
        "linkedTo": [
            {
                "id": "metadata_create_application",
                "event": "formLoaded"
            }
        ]
    }
]','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','outer_pane','layoutOptions','{
resizable: false,
north__size:150,
south__size:36
}','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','outer_pane','north','outer_pane_north','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','outer_pane','south','outer_pane_south','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','outer_pane_north',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'background-color:#3d3f44;overflow:hidden;','<div style=''position:relative;top:0;float:left''><img src="../img/metador_header_left.jpg" border="0">
</div><div style=''position:relative;top:0;float:right;height:140px''><img src="../img/metador_header_right.jpg" border="0"></div>','div','','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','outer_pane_south',1,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','content_pane',2,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'height:100%;width:100%','','div','../plugins/mb_pane.js','','','jq_layout','http://layout.jquery-dev.net');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','content_pane','center','mb_md_container','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','content_pane','css','../extensions/jquery.layout.all-1.2.0/jquery.layout.css','','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','content_pane','inputs','[
    {
        "method": "resizeAll",
        "linkedTo": [
            {
                "id": "outer_pane",
                "event": "resize"
            }
        ]
    }
]','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','content_pane','layoutOptions','{
resizable: false
}','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','content_pane','north','mb_md_path','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','heartbeat',2,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../plugins/heartbeat.js','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','helptext',2,1,'adds a little dialog box to the help graphics','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../MeTaDor/helptext.js','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_md_container',2,1,'','Metadateneditorstartseite','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../plugins/mb_wizard.js','../../lib/wizard.js','mb_md_selectAction,mb_md_editMetadataByData,mb_pane_editor_data,mb_md_editMetadataByService,mb_pane_editor_service,mb_md_editMetadataByApplication,mb_pane_editor_application,editSelf,editFilteredGroup,editFilteredUser,editUser,editGroup','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','metadata_create_wizard',2,0,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'display: none;','','div','../plugins/mb_wizard.js','../../lib/wizard.js','metadata_create_data,metadata_create_application,metadata_create_service','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','openlayers',2,1,'','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../extensions/OpenLayers-2.8/OpenLayers.js','','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_pane_editor_data',3,1,'','Metadaten editieren','div','','data="{path:''#mb_md_selectAction/#mb_md_editMetadataByData/#mb_pane_editor_data''}"
',NULL ,NULL,NULL ,NULL,NULL ,'height:100%;width:100%;display:none','','div','../plugins/mb_pane.js','','','jq_layout','http://layout.jquery-dev.net');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_data','center','metadata_create_data','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_data','css','../extensions/jquery.layout.all-1.2.0/jquery.layout.css','','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_data','inputs','[
    {
        "method": "resizeAll",
        "linkedTo": [
            {
                "id": "content_pane",
                "event": "resize"
            }
        ]
    }
]','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_data','layoutOptions','{
resizable: false,
west__size:200
}','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_data','west','md_editor_navigation_data','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_pane_editor_application',3,1,'','Metadaten editieren','div','','data="{path:''#mb_md_selectAction/#mb_md_editMetadataByData/#mb_pane_editor_application''}"
',NULL ,NULL,NULL ,NULL,NULL ,'height:100%;width:100%;display:none','','div','../plugins/mb_pane.js','','','jq_layout','http://layout.jquery-dev.net');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_application','center','metadata_create_application','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_application','css','../extensions/jquery.layout.all-1.2.0/jquery.layout.css','','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_application','inputs','[
    {
        "method": "resizeAll",
        "linkedTo": [
            {
                "id": "content_pane",
                "event": "resize"
            }
        ]
    }
]','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_application','layoutOptions','{
resizable: false,
west__size:200
}','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_application','west','md_editor_navigation_application','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','mb_pane_editor_service',3,1,'','Metadaten editieren','div','','data="{path:''#mb_md_selectAction/#mb_md_editMetadataByService/#mb_pane_editor_service''}"
',NULL ,NULL,NULL ,NULL,NULL ,'height:100%;width:100%;display:none','','div','../plugins/mb_pane.js','','','jq_layout','http://layout.jquery-dev.net');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_service','center','metadata_create_service','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_service','css','../extensions/jquery.layout.all-1.2.0/jquery.layout.css','','file/css');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_service','inputs','[
    {
        "method": "resizeAll",
        "linkedTo": [
            {
                "id": "content_pane",
                "event": "resize"
            }
        ]
    }
]','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_service','layoutOptions','{
resizable: false,
west__size:200
}','','var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','mb_pane_editor_service','west','md_editor_navigation_service','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','jq_tooltip',5,1,'tooltip from http://jquery.bassistance.de/tooltip','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-tooltip/jquery.tooltip.min.js','','','');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','metadata_create_data',5,1,'Metadatenerfassung für Geodaten','','div','','class="metadata-editor"',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../MeTaDor/mb_metadata_create_data.js','../extensions/ajaxChange-0.1/ajaxChange-0.2.js,../MeTaDor/jquery.md.datepicker.js','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','metadata_create_data','inputs','[
    {
        "method": "load",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByData",
                "event": "onEdit",
                "attr": "id"
            }
        ]
    },
    {
        "method": "display",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByData",
                "event": "onDisplay",
                "attr": "id"
            }
        ]
    },
    {
        "method": "init",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByData",
                "event": "onCreate"
            }
        ]
    },
    {
        "method": "createFromTemplate",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByData",
                "event": "onCreateFromTemplate",
                "attr": "id"
            }
        ]
    }
]','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','metadata_create_application',5,1,'Metadatenerfassung für Geoanwendungen','','div','','class="metadata-editor"',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../MeTaDor/mb_metadata_create_data.js','../extensions/ajaxChange-0.1/ajaxChange-0.2.js,../MeTaDor/jquery.md.datepicker.js','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','metadata_create_application','inputs','[
    {
        "method": "load",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByApplication",
                "event": "onEdit",
                "attr": "id"
            }
        ]
    },
    {
        "method": "display",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByApplication",
                "event": "onDisplay",
                "attr": "id"
            }
        ]
    },
    {
        "method": "init",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByApplication",
                "event": "onCreate"
            }
        ]
    },
    {
        "method": "createFromTemplate",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByApplication",
                "event": "onCreateFromTemplate",
                "attr": "id"
            }
        ]
    }
]','','var');
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('MeTaDor','metadata_create_service',5,1,'Metadatenerfassung für Geodatendienste','','div','','class="metadata-editor"',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../MeTaDor/mb_metadata_create_data.js','../extensions/ajaxChange-0.1/ajaxChange-0.2.js,../MeTaDor/jquery.md.datepicker.js','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('MeTaDor','metadata_create_service','inputs','[
    {
        "method": "load",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByService",
                "event": "onEdit",
                "attr": "id"
            }
        ]
    },
    {
        "method": "display",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByService",
                "event": "onDisplay",
                "attr": "id"
            }
        ]
    },
    {
        "method": "init",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByService",
                "event": "onCreate"
            }
        ]
    },
    {
        "method": "createFromTemplate",
        "linkedTo": [
            {
                "id": "mb_md_editMetadataByService",
                "event": "onCreateFromTemplate",
                "attr": "id"
            }
        ]
    }
]','','var');

-- ADD USER TO GUI

INSERT INTO gui_mb_user (fkey_gui_id, fkey_mb_user_id, mb_user_type) VALUES ('MeTaDor', 1, 'owner');

-- METADATA CATEGORY

INSERT INTO gui_category (category_id, category_name, category_description) VALUES (4, 'Metadateneditor', 'INSPIRE-Metadaten-Editor');
INSERT INTO gui_gui_category (fkey_gui_id, fkey_gui_category_id) VALUES ('MeTaDor', 4);


-- METADATA TABLE
-- Umschreiben auf die Tabelle mb_metadata
--CREATE TABLE mb_metadata_data (
--	id serial NOT NULL, -- metadata_id
--	uuid character varying(100), -- uuid
--	title character varying(250), -- t
--	keywords text, -- ?
--	date date, -- einfügedatum ? createdate lastchanged changedate --> lastchanged
--	status character varying(50), -- status
--	"type" character varying(50),--type
--	"xml" text, --- data
--	fkey_mb_user_id integer NOT NULL DEFAULT 1, -- wie
--	responsible_party integer, --wie
--	individual_name integer, -- wie
--	visibility character varying(12), -- wie
--	locked boolean DEFAULT false, -- wie 
--	copyof character varying(100), -- wie
--	responsible_party_name character varying(100) -- neu
--);
-- noch: origin MeTaDoR-full 

-- ADD VIEW
-- new -- view on table mb_metadata
--DROP VIEW view_mb_metadata ;
CREATE OR REPLACE VIEW view_mb_metadata AS
 SELECT mb_metadata.metadata_id, 
mb_metadata.metadata_id as id,  
mb_metadata.uuid, 
 mb_metadata.copyof, mb_metadata.title, 
 mb_metadata.createdate, --date, 
lastchanged,
changedate,
 mb_group.mb_group_name AS responsible_party, 
mb_metadata.responsible_party_name,  -- neu
 mb_group.mb_group_id AS responsible_party_id, 
 kontakt.mb_user_name AS individual_name, 
 kontakt.mb_user_id AS individual_name_id, 
 mb_metadata.status, mb_metadata.visibility, 
 mb_metadata.fkey_mb_user_id, 
 mb_metadata.data, --xml, 
 mb_metadata.type
   FROM mb_user erfasser, mb_metadata
   LEFT JOIN mb_group ON mb_metadata.responsible_party = mb_group.mb_group_id
   LEFT JOIN mb_user kontakt ON mb_metadata.individual_name = kontakt.mb_user_id
WHERE mb_metadata.fkey_mb_user_id = erfasser.mb_user_id;


