diff --git a/core/src/main/java/org/fao/geonet/web/LocaleRedirects.java b/core/src/main/java/org/fao/geonet/web/LocaleRedirects.java index ccbe24aaaf8..791859c1e31 100644 --- a/core/src/main/java/org/fao/geonet/web/LocaleRedirects.java +++ b/core/src/main/java/org/fao/geonet/web/LocaleRedirects.java @@ -80,9 +80,9 @@ public class LocaleRedirects { SPECIAL_HEADERS = Collections.unmodifiableSet(headers); } - private String _homeRedirectUrl; + private String _homeRedirectUrl = "catalog.search"; - private String _defaultLanguage; + private String _defaultLanguage = Geonet.DEFAULT_LANGUAGE; @RequestMapping(value = "/home") public ModelAndView home(final HttpServletRequest request, @@ -212,37 +212,4 @@ private String lang(String langParam, String langCookie, String langHeader) { return userLang; } - - - @Autowired - private ApplicationContext _appContext; - - @PostConstruct - public void init() throws BeansException { - final String configPath = _appContext.getBean("configPath", String.class); - final ServletContext servletContext = _appContext.getBean(ServletContext.class); - try { - final Element guiConfig = ConfigurationOverrides.DEFAULT.loadXmlFileAndUpdate(configPath + "config-gui.xml", servletContext); - final String xpath = "client/@url"; - this._homeRedirectUrl = Xml.selectString(guiConfig, xpath); - if (_homeRedirectUrl == null) { - throw new FatalBeanException("No redirect URL was found in " + configPath + "config-gui.xml" + " at xpath: " + xpath); - } - } catch (Exception e) { - throw new FatalBeanException("Error loading guiConfig: " + configPath + "config-gui.xml", e); - } - - try { - final Element config = ConfigurationOverrides.DEFAULT.loadXmlFileAndUpdate(configPath + "config.xml", servletContext); - final String xpath = "default/language"; - this._defaultLanguage = Xml.selectString(config, xpath); - if (_defaultLanguage == null) { - _defaultLanguage = Geonet.DEFAULT_LANGUAGE; - } - } catch (Exception e) { - throw new FatalBeanException("Error loading config.xml: " + configPath + "config-gui.xml", e); - } - - - } } diff --git a/installer/installer-config.xml b/installer/installer-config.xml index 87f77f74d57..d2566f73e07 100644 --- a/installer/installer-config.xml +++ b/installer/installer-config.xml @@ -116,9 +116,6 @@ - - - diff --git a/pom.xml b/pom.xml index deec6f4c21a..99d1a76f0bf 100644 --- a/pom.xml +++ b/pom.xml @@ -1134,7 +1134,6 @@ schemas-test web-ui web-ui-docs - web-client web e2e-tests geoserver diff --git a/services/src/main/java/org/fao/geonet/guiservices/util/GetCurrentMDTab.java b/services/src/main/java/org/fao/geonet/guiservices/util/GetCurrentMDTab.java index d6dbebc8a32..9c1e5dbcd67 100644 --- a/services/src/main/java/org/fao/geonet/guiservices/util/GetCurrentMDTab.java +++ b/services/src/main/java/org/fao/geonet/guiservices/util/GetCurrentMDTab.java @@ -61,9 +61,7 @@ public Element exec(Element params, ServiceContext context) throws Exception if (currentTab == null) { context.info("Creating default metadata tab"); - GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME); - String defaultView = gc.getBean(SettingManager.class).getValue("system/metadata/defaultView"); - currentTab = (defaultView != null?defaultView:"simple"); + currentTab = "simple"; session.setProperty(sessionTabProperty, currentTab); } diff --git a/software_development/README.md b/software_development/README.md index 11550cf5b69..14f33f8e2a7 100644 --- a/software_development/README.md +++ b/software_development/README.md @@ -306,10 +306,6 @@ An example of the configuration file for JRebel may be the following:: - - - - diff --git a/web-client/README.md b/web-client/README.md deleted file mode 100644 index d238d47d70e..00000000000 --- a/web-client/README.md +++ /dev/null @@ -1 +0,0 @@ -The web-client module contains the javascript and html file for the geonetwork web clients. \ No newline at end of file diff --git a/web-client/pom.xml b/web-client/pom.xml deleted file mode 100644 index 2f600984185..00000000000 --- a/web-client/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - 4.0.0 - - - org.geonetwork-opensource - geonetwork - 3.1.0-SNAPSHOT - - - geonetwork-client - jar - GeoNetwork web client module - GUI components in order to easily build applications based on GeoNetwork server module. - - - - General Public License (GPL) - http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt - repo - - - - - - - - - - - - src/main/resources - true - - **/web-client-wro-sources.xml - - - - src/main/resources - false - - **/web-client-wro-sources.xml - - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.1.2 - - - attach-sources - - jar - - - - - - - - - - ${project.build.directory}/${project.build.finalName} - false - - diff --git a/web-client/src/main/resources/WEB-INF/classes/web-client-wro-sources.xml b/web-client/src/main/resources/WEB-INF/classes/web-client-wro-sources.xml deleted file mode 100644 index c87437856cd..00000000000 --- a/web-client/src/main/resources/WEB-INF/classes/web-client-wro-sources.xml +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/css/gndefault.css b/web-client/src/main/resources/apps/css/gndefault.css deleted file mode 100644 index d9bc7fe93de..00000000000 --- a/web-client/src/main/resources/apps/css/gndefault.css +++ /dev/null @@ -1,851 +0,0 @@ -body { - /*font-family : helvetica, tahoma, verdana, sans-serif;*/ - font-family : "Helvetica Neue", sans-serif; - padding : 20px; - padding-top : 32px; - font-size : 12px; - background-color : #fff !important; -} -a { - color: #0076A1; -} -p { - margin-bottom : 15px; -} -h1 { - font-size : large; - margin-bottom : 20px; -} -h2 { - font-size : 14px; - color : #333; - font-weight : bold; - margin : 10px 0; -} -pre.code { - background : #F8F8F8; - border : 1px solid #e8e8e8; - padding : 10px; - margin : 10px; - margin-left : 0px; - border-left : 5px solid #e8e8e8; - font-size : 12px !important; - line-height : 14px !important; -} -.msg .x-box-mc { - font-size : 14px; -} -#msg-div { - position : absolute; - width : 350px; - z-index : 20000; -} -.x-grid3-row-body p { - margin : 5px 5px 10px 5px !important; -} - - -/* Overide ext style */ -.x-layout-split, -.x-layout-collapsed { - background-color : #ececec; -} -.x-layout-split { - width : 3px; -/* border-right: 1px solid #777777; */ -} -.x-layout-collapsed { - width : 10px !important; -} -.x-layout-split-west { - box-shadow: 2px 0px 10px 0px #777777 -} -.x-layout-split-east { - box-shadow: -2px 0px 10px 0px #777777 -} -/* Disable shadow for layer manager */ -#editorPanel .x-layout-split-east, -#east .x-layout-split-east { - box-shadow: none; -} -.x-layout-split-west .x-layout-mini { - left: -10px; -} -.x-layout-split-east .x-layout-mini { - left: 2px; -} -.x-layout-cmini-west .x-layout-mini, -.x-layout-cmini-east .x-layout-mini { -/* top: 0px; - left: -10px; -*/} - - -.x-layout-mini { - height: 50px; - width: 9px; - opacity: .9; - background-size: 100% 100%; -} -x-layout-cmini-east { - border: 0 none; - width: 25px!important; -} - -.md-info { - background-color : #FFF; - /*padding: 5px;*/ -} - -.md-info { - padding : 20px; -} -#mode-form { - width : 260px; -} -#search-form, #searchForm { - position:relative; /* Required for IE */ -} - -#infoContent { - /*padding: 5px;*/ -} -.latest { - clear: both; - float: right; - width: 80%; - height: 250px; -} -.latest * span.checkbox { - display: none; -} - -.info { - float : right; - width : 28%; - height : 40%; - -moz-border-radius : 0px 0px 54px 0px; - -webkit-border-radius : 0px 0px 54px 0px; - border-radius : 0px 0px 54px 0px; - background-color : rgba(217, 210, 123, 0.85); - box-shadow: 2px 0px 10px 0px #777777; - /* border : 1px solid rgba(0, 51, 102, 0.25);*/ - padding : 3px; - margin : 13px; -} - -.info h3, .latest h3 { - border-bottom : 2px solid #003366; -} - -ul.main { - list-style-type: circle -} - -#shortcut { - position : absolute; - top : 14%; - left : 14%; - width : 72%; - height : 72%; - padding : 1em; - -moz-border-radius : 0px 34px 34px 34px; - -webkit-border-radius : 0px 34px 34px 34px; - border-radius : 0px 34px 34px 34px; - background-color : rgba(0, 0, 0, 0.85) !important; - background-color : #000000; - border-top : 1px solid rgba(0, 0, 0, 0.85); - z-index : 999; - color : #FFF; -} -#shortcut div { - width : 100%; - border-bottom : 1px solid #d9d27b; -} -#shortcut a { - color : #FFF; -} -#shortcut h1, -#shortcut h2 { - color : #d9d27b; - font-weight : bold; -} -#shortcut .label { - color : #d9d27b; - font-weight : bold; - background: none; -} - -#editor { - height : 100%; - width : 100%; -} - -.metadata { - background-color : #fff; -} - -/* Center map widget in view and edit mode */ -table.map { - margin: auto; -} -#infoPanel { - color: #777777; - overflow: auto; - height: 100%; -} -#infoPanel h3 { - color: #000000; -} -#infoPanel ul.main { - margin-left: 30px; -} - -#infoContent { - vertical-align : bottom; -} -#infoContent div.md-info h2 { - border-bottom : 2px solid #959532; -} -#infoContent div.md-info { - width : 15%; - height : 200px; - float : left; - margin : 2px; - -moz-border-radius : 4px; - -webkit-border-radius : 4px; - border-radius : 4px; - background-color : rgba(10, 10, 10, 0.15); - border-top : 1px solid rgba(0, 0, 0, 0.15); -} -#header { - /*background-image : url(../apps/images/default/header-bg.png);*/ - height : 33px; - border-bottom: 1px solid #ececec; -} - -#header .catLogo { - max-height : 33px; - float : left; -} -#header div { - width : auto; - display : inline; - height: 33px; - vertical-align: middle; -} - -#footer { - background-image : url(../apps/images/default/header-bg.png); - height : 20px; - /* bottom: 0px; */ - text-align : center; -} -.right { - text-align: right !important; -} - -.footer { - margin : 10px; - position : absolute; - bottom : 0; -} - -.left { - left : 0; -} -#logo { - background-image : url(../apps/images/default/gn-logo.png); - background-repeat : no-repeat; - height : 30px; -} -#mn-top { - position : absolute; - top : 0px; - right : 5px; - height : 33px; -} -.pipe { - float : right; - width : auto; - height : inherit; - display : inline; - margin : 0; - padding: 3px; -} -.pipe div { -} -.first { - border-left : 0; -} - -table.related * a, -#mn-top div a, -.mn-main { - color : #0076A1; - font-family : "Lucida Sans", "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; - text-decoration : none; -} -#mn-top div a, -.mn-main { - font-size : 1.2em; - font-weight : bold; - position : relative; - top : 2px; -} - -table.related * a:hover, -#mn-top div a:hover { - color : #959532; -} - -.mn-main { - vertical-align: top; -} - -/* Icon based on protocol prefix in related resource table */ -.WWWLINK { - background-image : url(../apps/images/default/link.png); -} -.WWWDOWNLOAD { - background-image : url(../apps/images/default/database_yellow.png); -} -.OGCWMS { - background-image : url(../apps/images/default/map/server_picture.png); -} -.OGCWFS { - background-image : url(../apps/images/default/map/server_vector.png); -} - - -/* Other icons */ -.md-mn-reset { - background-image : url(../apps/images/default/cross.png); -} -.md-mn-kml { - background-image : url(../apps/images/default/google-earth-link.png); -} -.md-mn-www { - background-image : url(../apps/images/default/link.png); -} -.xmlIcon { - background-image : url(../apps/images/default/page_code.png); -} -.rdfIcon { - background-image : url(../apps/images/default/sw-cube.png); -} -.addIcon { - background-image : url(../apps/images/default/add.png) !important; -} -.privIcon { - background-image : url(../apps/images/default/group_key.png) !important; -} -.childIcon { - background-image : url(../apps/images/default/chart_organisation.png) !important; -} -.statusIcon { - background-image : url(../apps/images/default/tag_blue_add.png) !important; -} -.versioningIcon { - background-image : url(../apps/images/default/date_go.png) !important; -} -.downloadAllIcon { - background-image : url(../apps/images/default/folder_page_white.png) !important; -} -.searchIcon { - background-image : url(../apps/images/default/find.png) !important; -} -.validationReportIcon { - background-image : url(../apps/images/default/schematron.gif) !important; -} -.shortcutHelpIcon { - background-image : url(../apps/images/default/schematron.gif) !important; -} -.viewModeIcon { - background-image : url(../apps/images/default/application_view_tile.png) !important; -} -.linkIcon { - background-image : url(../apps/images/default/link.png) !important; -} -.addVector { - background-image : url(../apps/images/default/vector_add.png) !important; -} -.delVector { - background-image : url(../apps/images/default/vector_delete.png) !important; -} -.connect { - background-image : url(../apps/images/default/connect.png) !important; -} -.importIcon { - background-image : url(../apps/images/default/import.png) !important; -} -.adminIcon { - background-image : url(../apps/images/default/admin.png) !important; -} -.csvIcon { - background-image : url(../apps/images/default/csv.png) !important; -} -.categoryIcon { - background-image : url(../apps/images/default/tag_orange.png) !important; -} -.newOwnerIcon { - background-image : url(../apps/images/default/newOwner.png) !important; -} -.subtemplateIcon { - background-image : url(../apps/images/default/report_magnify.png) !important; -} -.processMetadata { - background-image : url(../apps/images/default/table_gear.png) !important; -} -.repository { - background-image : url(../apps/images/default/database_yellow.png) !important; - background-repeat : no-repeat; - padding-left : 15px; -} -.WFSDownloadIcon { - background-image : url(../apps/images/default/database_yellow.png) !important; - background-repeat : no-repeat; - padding-left : 15px; -} - -.logo-wrap div img { - max-height : 80px; - max-width : 80px; -} -.logo-wrap { - height : 90px; - width : 90px; - float : left; - margin : 4px; - margin-right : 0; - padding : 5px; - border : 1px solid #fff; -} -.logo-wrap span { - display : block; - overflow : hidden; - text-align : center; -} -.logo-over { - border : 1px solid #dddddd; -} -.logo-selected { - border : 1px solid #99bbe8; - background-color : #dddddd; - padding : 4px; -} - -#loading-mask { - position : absolute; - left : 0; - top : 0; - width : 100%; - height : 100%; - z-index : 20000; - background-color : white; -} - -#loading { - position : absolute; - left : 5px; - top : 5px; - padding : 2px; - z-index : 20001; - height : auto; -} - -#loading .loading-indicator { - background : url(../apps/images/default/spinner.gif) no-repeat; - color : #555; - text-align : center; - height : 40px; - width : 100px; -} -span.madeBy { - color : #555; - font-size : 85%; -} -span.madeBy img { - vertical-align : middle; -} -span.madeBy a { - color : #666 -} -.xmltag { - color : #25b7e6; -} -.xmlatt { - color : #959532; -} -.xmlattvalue { - color : #444; - font-weight : bold; -} -xmltagvalue { - font-weight : bold; -} -.xmlns { - color : #959532; - font-style : italic; -} -dl.xml { - color : #444; - padding-left : 2px; -} -dl.xml * dd { - padding-left : 2px; -} - -div.facets { - padding: 5px; -} - -div.facets * ul, -div.facets * li { - list-style: none; -} -/** - * Facet category label - */ -div.facets > ul > li { - margin: 0px 15px 0px 0px; -/* border-top: 1px solid #CCC;*/ - font-weight: bold; -} -/** - * Facet sub elements - */ -div.facets ul ul { - margin-bottom: 5px; - font-size: 85%; -} -/** - * Facet count between (number) displayed next to a facet value - */ -.facet-count { - color: #71C0DD; - padding-left: 3px; -} -/** - * Facet clickable link which trigger the filter action - */ -div.facets * a { - text-decoration: none; -} -div.facets * .facet-more-bt, -div.facets * .facet-less-bt { - margin-bottom: 10px; -} -div.facets * .facet-more-bt a, -div.facets * .facet-less-bt a { - color: #777777 !important; -} - -.breadcrumb table.x-btn { - float: left; -} -.breadcrumb * .x-btn-tl, -.breadcrumb * .x-btn-tr, -.breadcrumb * .x-btn-tc, -.breadcrumb * .x-btn-ml, -.breadcrumb * .x-btn-mr, -.breadcrumb * .x-btn-mc, -.breadcrumb * .x-btn-bl, -.breadcrumb * .x-btn-br, -.breadcrumb * .x-btn-bc{ - background: none; -} -.breadcrumb * button { - color: #0076A1; - font-size: smaller; - font-weight: bold; -} -.breadcrumb * button:hover { - color : #959532; - text-decoration: underline; -} -.breadcrumb-mn { - background-color: #FFF !important; - background-image: none; -} -.breadcrumb-mn * .current-mn { - font-weight: bold; -} -.breadcrumb-mn * a.x-menu-item { - line-height: 10px; -} -.breadcrumb-mn * .x-menu-item-icon { - height: 10px; - width: 10px; -} -.tplTitle { - font-weight: bold; -} -.tplDesc { - white-space: normal !important; -} -.gn-bt-main * button , -.gn-bt-main * span { - font-weight: bolder; -} -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 20px; - margin-right: 10px; - color: #C09853; - font-weight: normal; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #FCF8E3; - border: 1px solid #FBEED5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.alert-danger, .alert-error { - color: #B94A48; - background-color: #F2DEDE; - border-color: #EED3D7; -} -.alert * h2 { - color: #C09853; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} - -.label, .badge { - font-size: 11.844px; - font-weight: bold; - line-height: 14px; - color: white; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - white-space: nowrap; - vertical-align: baseline; - background-color: #999; -} -.label { - padding: 1px 4px 2px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.badge { - padding: 1px 9px 2px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; -} - -.ux-mselect-selected { - background-color: #767676 !important; - color: #FFF; -} -.label-success, .badge-success { - background-color: #468847; -} -.label-warning, .badge-warning { - background-color: #F89406; -} -.label-important, .badge-important, .label-error, .badge-error { - background-color: #B94A48; -} -.label-info, .badge-info { - background-color: #3A87AD; -} -.label-success-font { - color: #468847; -} -.label-error-font { - color: red; -} -.validation * h2, .validation * div { - white-space: normal !important; -} -.thesaurusPicker * div.badge { - margin: 3px; - white-space: normal; -} -.thesaurusPicker * fieldset { - border: 1px solid #B3D4E6 !important; -} -.thesaurusPicker * legend { - color: #777 !important; -} -.thesaurusPicker * .thesaurusInfo span { - padding-right: 5px; -} -.x-superboxselect-item img { - max-height: 16px; - vertical-align: middle; -} -.validatePanel * .x-grid3-cell-inner { - white-space: normal !important; -} -.relation-type { - text-transform: uppercase; - margin-left: 3px; -} - -.linkPanel * h2 { - width: 100%; - border-bottom: 1px solid #B3D4E6; -} -.linkPanel * ul { - list-style: circle; - padding-left: 16px; -} -.linkPanel * h2 span { - float: right; -} -.linkPanel * .x-btn-tl, .linkPanel * .x-btn-tr, -.linkPanel * .x-btn-tc, .linkPanel * .x-btn-ml, -.linkPanel * .x-btn-mr, .linkPanel * .x-btn-mc, -.linkPanel * .x-btn-bl, .linkPanel * .x-btn-br, -.linkPanel * .x-btn-bc { - background: none; -} -.linkPanel * .x-btn-noicon .x-btn-small .x-btn-text { - border-bottom: 1px black solid; -} - -ul.gn-relation-thumbnail { - overflow: hidden; -} - -.gn-relation-thumbnail li { - list-style-type: none; - float: left; - width: 50%; - max-width: 120px; - height: 100px; - text-align: center; - position: relative; -} -.gn-relation-thumbnail li span { - position: absolute; - bottom: 0px; - right: 2px; -} -.gn-relation-thumbnail li .lightBox { - position: absolute; - top: 0px; - right: 2px; - height: 18px; -} - -.debug { - display: none; -} - -.filter-text-icon { - background-image: url(../apps/images/default/find.png) !important; - width: 16px; - height: 16px; - border-color: transparent !important; - margin: 4px; -} - -.privilges-not-user-groups .x-grid3-cell-inner { - color: gray; -} -.privileges-internal .x-grid3-cell-inner { - font-weight: bold; -} - -.privileges-grid-disable { - color: gray; -} - -.privileges-grid-disable .x-grid3-check-col, -.privileges-grid-disable .x-grid3-check-col-on { - opacity:0.4; -} - -#user-info-tip { - border-top: 1px solid #b6b6b6; -} - -#user-info-tip .x-btn-tl, -#user-info-tip .x-btn-tr, -#user-info-tip .x-btn-tc, -#user-info-tip .x-btn-ml, -#user-info-tip .x-btn-mr, -#user-info-tip .x-btn-mc, -#user-info-tip .x-btn-bl, -#user-info-tip .x-btn-br, -#user-info-tip .x-btn-bc { - background-image: none; -} - -#user-info-tip button { - color: #0076A1; -} -#user-info-tip button:hover { - color : #959532; - text-decoration: underline; -} - -#user-info-tip .x-panel { - padding-bottom: 2px; - color: #777777; -} - -#user-info-tip .x-panel-body { - background-color: #f5f5f5; - padding: 2px; -} - -#user-info-tip .x-panel table { - width: 100%; -} - -#user-info-tip .gn-login { - font-weight: bold; -} - - -.loginInfo { -/* text-align: right;*/ - padding: 1px; -} -.gn-avatar { - vertical-align: middle; -} -#login-form .gn-login { - margin-left: 3px -} - -.md-insert-status-title { - font-weight: 700; - padding-bottom: 5px; -} -.md-import-status-panel li { - padding-left: 15px; -} - -.gn-onlineResForm { - padding-top: 10px; - padding-bottom: 10px; -} -.gn-onlineResForm-grid .x-panel-body { - padding-bottom: 15px; -} -.gn-onlineResForm-grid .x-panel-header { - background-image: none; -} -.x-form-valid, textarea.x-form-valid { -background-color: #DDF8DD; -border-color: #59B854; -background-image: none; -} - -.close-button { - top: 6px; - right: 6px; - position: absolute; -} - -.close-button.x-btn-text-icon .x-btn-icon-small-left .x-btn-text { - background:none; - padding: 2px; - height: 16px; - width: 14px; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/css/gnmapdefault.css b/web-client/src/main/resources/apps/css/gnmapdefault.css deleted file mode 100644 index 5b2b1eac1a9..00000000000 --- a/web-client/src/main/resources/apps/css/gnmapdefault.css +++ /dev/null @@ -1,250 +0,0 @@ -.olCursorWait { - cursor : wait; -} -.print { - background-image : url(../apps/images/default/map/icon_print.png) !important; - height : 20px !important; - width : 20px !important; -} -.addLayerIcon { - background-image : url(../apps/images/default/map/map_go.png) !important; -} -.addLayer { - background-image : url(../apps/images/default/map/map_go.png) !important; - height : 20px !important; - width : 20px !important; -} -.deleteLayer { - background-image : url(../apps/images/default/map/delete_layer.png) !important; - height : 20px !important; - width : 20px !important; -} -.measure { - background-image : url(../apps/images/default/map/icon_measure.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomin { - background-image : url(../apps/images/default/map/icon_zoomin.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomout { - background-image : url(../apps/images/default/map/icon_zoomout.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomfull { - background-image : url(../apps/images/default/map/icon_zoomfull.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomlayer { - background-image : url(../apps/images/default/map/icon_zoomlayer.png) !important; - height : 20px !important; - width : 20px !important; -} - -.pan { - background-image : url(../apps/images/default/map/icon_pan.png) !important; - height : 20px !important; - width : 20px !important; -} -.selextent { - background-image : url(../apps/images/default/map/icon_selextent.png) !important; - height : 20px !important; - width : 20px !important; -} -.query { - background-image : url(../apps/images/default/map/icon_featureinfo.png) !important; - height : 20px !important; - width : 20px !important; -} -.next { - background-image : url(../apps/images/default/map/resultset_next.png) !important; - height : 20px !important; - width : 20px !important; -} -.back { - background-image : url(../apps/images/default/map/resultset_previous.png) !important; - height : 20px !important; - width : 20px !important; -} -.savewmc { - background-image : url(../apps/images/default/map/icon_savewmc.png) !important; - height : 20px !important; - width : 20px !important; -} -.wmsTime { - background-image : url(../apps/images/default/map/wmstime.gif) !important; - height : 20px !important; - width : 20px !important; -} -.layerStyles { - background-image : url(../apps/images/default/map/layerstyles.png) !important; - height : 20px !important; - width : 20px !important; -} -.layerOpacity { - background-image : url(../apps/images/default/map/opacity.png) !important; - height : 20px !important; - width : 20px !important; -} -.wmsInfo { - background-image : url(../apps/images/default/map/wmsinfo.png) !important; - height : 20px !important; - width : 20px !important; -} - -.olControlLoadingPanel { - background-image : url(../apps/images/default/map/indicator_medium.gif); - background-position : center; - background-repeat : no-repeat; -} - -.loadwmc { - background-image : url(../apps/images/default/map/icon_loadwmc.png) !important; - height : 20px !important; - width : 20px !important; -} -.selectfile { - background : url(../apps/images/default/map/icon_selectfile.png) no-repeat 0 0 !important; -} - -.olControlMousePosition { - font-family : tahoma, arial, verdana, sans-serif; - font-size : 9pt; - font-weight : bold; -} -.olControlScaleBar { - bottom : 25px; - color : #000000; - font-family : tahoma, arial, verdana, sans-serif; - right : 10px; -} -.olControlScaleBarBar { - background-color : #000000; - border : 1px solid #000000; - height : 5px; - top : 12px; -} -.olControlScaleBarBarAlt { - background-color : #FFFFFF; - border : 1px solid #000000; - height : 5px; - top : 12px; -} -.olControlScaleBarNumbersBox { - font-size : 9pt; - top : 19px; - width : 40px; -} -.olControlScaleBarLabelBox { - font-size : 9pt; - height : 15px; - letter-spacing : 0.1em; - top : -5px; -} -.styler { - background-image : url(../apps/images/default/map/layerstyles.png) !important; -} -.drawPolygon { - background-image : url(../apps/images/default/map/draw_polygon_off.png) !important; -} -.drawCircle { - background-image : url(../apps/images/default/map/draw_circle_off.png) !important; -} -.drawRectangle { - background-image : url(../apps/images/default/map/draw_rectangle_off.png) !important; -} -.clearPolygon { - background-image : url(../apps/images/default/map/draw_polygon_clear_off.png) !important; -} -.icon-measure-length { - background : url(../apps/images/default/map/ruler.png) no-repeat scroll 0 0 transparent !important; - height : 16px !important; - margin : 0 !important; - width : 16px !important; -} - -.icon-measure-area { - background : url(../apps/images/default/map/ruler_square.png) no-repeat scroll 0 0 transparent !important; - height : 16px !important; - margin : 0 !important; - width : 16px !important; -} - -div.map-overlay div.overlay-element { - display : inline; - float : left; - margin : 5px; -} - -.olControlScaleLine { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; - left : 10px; -} - -.overlay-scaleline { - bottom : 0; - left : 0; - margin-top : 0; -} - -.overlay-scalechooser { - float : right !important; -} - -div.map-overlay { - bottom : 5px; - position : absolute; - right : 5px; - z-index : 1000; - width : 250px; /* For IE */ -} - -.olControlScaleLineTop { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; -} -.olControlScaleLineBottom { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; -} - -.x-collapsed-title { - color : #15428B; - font : bold 11px / 15pxtahoma, arial, verdana, sans-serif; - padding : 2px 5px; -} - -.x-tool { - float : left; - margin-right : 2px; -} -.info-wms { - padding: 2px; - color: #069; -} - -.info-wms p { - padding: 5px; -} - -.info-wms ul { - width: 100%; -} - -.info-wms li { - font-weight: bold; -} -.info-wms li span { - width: 33%; - padding-right: 5px; - font-weight: normal; -} -.info-wms ul li ul li { - list-style-type: circle; - margin-left: 16px; -} diff --git a/web-client/src/main/resources/apps/css/gnmetadatadefault.css b/web-client/src/main/resources/apps/css/gnmetadatadefault.css deleted file mode 100644 index f0df2450fa2..00000000000 --- a/web-client/src/main/resources/apps/css/gnmetadatadefault.css +++ /dev/null @@ -1,613 +0,0 @@ -.metadata a { - font-weight : bold; -} - -/* Specific elements */ -.title { - font-size : 120%; - font-weight : bold; - padding-bottom : 5px; - padding-top : 15px; -} - -.x-tool-newwindow { - background-image : url(../apps/images/default/newwindow.png) !important; -} - -.metadata * img.logo { - max-height : 100px; - max-width : 100px; - margin : 5px; -} - -.metadata * img.thumbnail { - max-height : 100px; - max-width : 100px; - border : 1px solid #B3D4E6; - margin : 5px; -} - -.mandatory * { - /*color : red !important;*/ - font-weight : bold; -} - -img.thumb-small { - max-width : 80px; - max-height : 80px; - min-height : 40px; -} - -span.success { - padding-left : 15px !important; - background-repeat : no-repeat; - background-image : url(../apps/images/default/flag_green.png); -} -span.error { - padding-left : 15px !important; - background-repeat : no-repeat; - background-image : url(../apps/images/default/flag_red.png); -} -.mandatory + td span input, -.mandatory + td span textarea, -.mandatory + td span select { - /*border-color : red !important;*/ - border : 2px solid #767676; -} - - -.metadata * div.info { - width : 100%; - text-align : center; - font-style : italic; - font-size : 80%; -} - -/* Help & suggestion */ -li.suggestion, -div.help { - padding : 5px; - border-bottom : 1px solid #7EADD9; -} - -li.thumbnail { - padding : 5px; - width : 100px; - text-align : center; - float : left; -} - -li.thumbnail-over, -li.suggestion-over { - background-color : #F7EEE1; -} -li.thumbnail-selected, -li.suggestion-selected { - background-color : #7EADD9; -} - -div.attr { - clear: both; -} - -/* Tab navigation - start */ -div#tabs ul li ul { - list-style-type : none; - padding-bottom : 25px; - border-bottom : 2px solid #7EADD9; - margin : 0; -} -div#tabs ul li span.mode { - display : none; -} - -div#tabs ul li ul li { - float : left; - height : 21px; - background-color : #F7EEE1; - margin : 2px 2px 0 2px; - border : 2px solid #7EADD9; -} -div#tabs ul li ul li.active { - padding-top : 2px; - border-bottom : 2px solid #fff; - background-color : #fff; -} -#tabs a { - float : left; - display : block; - color : #666; - text-decoration : none; - padding : 4px; -} -#tabs a:hover { - background : #fff; -} -/* Tab navigation - end */ - - - -/* Layout view/edit */ -.metadata * div.el { - width : 100%; - clear : both; -} -.metadata * div.el label { - margin-right: 5px; -} -.metadata * label { - color : #767676; - float : left; -} -/* -label + span { - clear: right; - float:left; -} -*/ -.metadata * fieldset { - border-top : 1px solid #8c8c8c; - border-bottom : none; - border-left : none; - border-right : none; - padding : 0px; - margin : 0px; -} - -.metadata * legend { - font-size : 110%; - font-weight : bold; - color : #016599; - padding : 5px 0px 4px 0px; -} - - - - -/* Form - start */ - - -.metadata * input, -.metadata * textarea, -.metadata * select { - color : #353a3b; - border-color : #C1C1C1; - border : 1px solid #7EADD9; - padding : 1px 3px; -} - -.metadata * input[type='radio'] { - border-width: 0px; - width: auto; -} - -.metadata * select { - max-width : 200px; - background-color: #FFF; -} - -.metadata * input.error, -.metadata * textarea.error, -.metadata * select.error { - border : 2px solid red; -} - -.metadata * input, -.metadata * textarea { - width : 60%; - float: left; -} - - -.metadata * .helper-radio, -.metadata * .helper-radio_withdesc, -.metadata * .helper-radio { - float: left; - width: 100%; -} - -.metadata * .helper div { - padding: 5px; - width: 30%; - float: left; -} - -.metadata * .helper div label span { - color: #069; - padding-left: 5px; -} - -/* for helper having description, increase -height to make them align vertically. To be improved -for long description */ -.metadata * .helper-radio_withdesc div { - min-height: 45px; -} - -.metadata * .helper-radio_linebreak div { - width: 100% !important; -} - -.metadata * .helper div label { - float: none; - padding-left: 3px; -} - -.metadata * .helper div input, -.metadata * .helper div textarea { - float: none; -} - -.metadata * table.map * input { - float: none !important; -} - -.metadata * input.small { - width : 10%; -} - -.metadata * input[type = checkbox] { - width : 20px; -} - - -.metadata * input:focus, -.metadata * textarea:focus, -.metadata * select:focus -{ - color : #000; - background-color : #F7EEE1; -} - -.metadata * textarea { - resize : both; -} -.metadata * textarea.small { - height : 60px; -} -.metadata * textarea.medium { - height : 140px; -} -.metadata * textarea.large { - height : 240px; -} - -.metadata.xml * textarea.xml { - width : 99% !important; - font-size: 80%; - border: none; - height : 100% !important; /* Don't work */ -} - -/* Form - end */ - - - - - - -/* Table - start */ - -.metadata * table.gn { - border-collapse : collapse; - background-color : #fff; - clear : both; - padding : 0px; - margin : 0px; - width : 100%; -} -.metadata * table.gn > tbody > tr { - -} -.metadata * table.gn > tbody > tr > td, -.metadata * table.gn > tbody > tr > th { - padding : 7px 0px 7px 7px; - vertical-align : top; - text-align : left; - word-break: break-word; -} -.metadata * table.gn > tbody > tr > td.col { - padding : 0px; - width: 50%; -} - -.metadata * table.gn > tbody > tr > td.main, -.metadata * table.gn > tbody > tr > th.main { - width : 25%; -} - -.metadata * table.gn p { - margin-bottom: 5px; -} - -table.related { - border-collapse: collapse; - border-spacing: 0px; - width: 100%; -} -table.related > tbody > tr { - height : 30px; -} -table.related > tbody > tr > td { - color : #069; - border-top : 1px solid #D9AF71; - border-bottom : 1px solid #D9AF71; -} -table.related > tbody > tr > td.main { - background-color : #F7EEE1; -} -table.related * ul { - padding-top: 5px; - padding-left: 10px; -} - - -table.gn { - /*border : 1px solid #B3D4E6;*/ -} -table.gn > tbody > tr > td, -table.gn > tbody > tr > th { - border-bottom : 1px solid #B3D4E6; - color : #069; -} - -table.gn > tbody > tr > th.complex, -table.gn > tbody > tr > td.complex { - border : none; -} - -table.gn > tbody > tr > td.main, -table.gn > tbody > tr > th.main { - background-color : #EBF5FA; -} - -table.map > tbody > tr > td { - text-align : center; -} -table.map > tbody > tr > td > input, -table.map > tbody > tr > td > label { - width : 80px !important; -} - -/* Table - end */ - - - - - -/* Icon and button - start */ -span.icon { - padding-left : 20px; - background-repeat : no-repeat; -} - -span.buttons { - background-color : inherit; - text-align : left; - vertical-align : middle; -} -span.buttons a { - border-width : 0px !important; - cursor : hand; - cursor : pointer; -} -span.buttons a.small span { - margin : 1px; - padding : 0px 4px; - width : 6px !important; - height : 5px !important; - background-repeat : no-repeat; -} -.buttons a.find span { - padding-left : 15px !important; - background-image : url(../apps/images/default/find.png); -} -.buttons a.findsub span { - padding-left : 15px !important; - background-image : url(../apps/images/default/find.png); -} -.buttons a.error span { - padding-left : 15px !important; - background-image : url(../apps/images/default/flag_red.png); -} -.buttons a.add span { - background-image : url(../apps/images/default/bullet_toggle_plus.png); - background-size: 10px; -} -.buttons a.del span { - background-image : url(../apps/images/default/bullet_toggle_minus.png); - background-size: 10px; -} -.buttons a.up span { - background-image : url(../apps/images/default/bullet_arrow_up.png); - background-size: 8px; -} -.buttons a.down span { - background-image : url(../apps/images/default/bullet_arrow_down.png); - background-size: 8px; -} - -div.button { - float : left; - background-repeat : no-repeat; - min-width: 15px; - min-height: 15px; -} - -.tgRight { - background-image : url(../apps/images/default/bullet_arrow_right.png); -} -.tgDown { - background-image : url(../apps/images/default/bullet_arrow_down.png); - background-position: 50% 50%; -} -.edit { - background-image : url(../apps/images/default/page_white.png) !important; -} -.editing { - background-image : url(../apps/images/default/page_white_edit.png) !important; -} -.saveMetadata { - background-image : url(../apps/images/default/page_save.png) !important; -} -.quitMetadata { - background-image : url(../apps/images/default/page_go.png) !important; -} -.validateMetadata { - background-image : url(../apps/images/default/page_lightning.png) !important; -} -.refreshMetadata { - background-image : url(../apps/images/default/page_refresh.png) !important; -} -.cancel { - background-image : url(../apps/images/default/cancel.png) !important; -} -.configIcon { - background-image : url(../apps/images/default/cog.png) !important; -} -.groupKey { - background-image : url(../apps/images/default/group_key.png) !important; -} -.flagGreen { - background-image : url(../apps/images/default/flag_green.png) !important; -} -.flagOrange { - background-image : url(../apps/images/default/flag_orange.png) !important; -} -.flagRed { - background-image : url(../apps/images/default/flag_red.png) !important; -} -.valid-1 { - background-image : url(../apps/images/default/flag_green.png) !important; -} -.valid-0 { - background-image : url(../apps/images/default/flag_red.png) !important; -} -.valid--1 { -} -.addMenu { - background-image : url(../apps/images/default/add.png) !important; -} -.cat-children, .cat-parent, .cat-sibling, .cat-associated { - background-image : url(../apps/images/default/chart_organisation.png) !important; -} -.book { - background-image : url(../apps/images/default/book.png) !important; -} -.feedback { - background-image : url(../apps/images/default/feedback.png) !important; -} -.subtemplateIcon { - background-image : url(../apps/images/default/report_magnify.png) !important; -} -.thumbnailIcon { - background-image : url(../apps/images/default/picture.png) !important; -} -.thumbnailAddIcon { - background-image : url(../apps/images/default/picture_add.png) !important; -} -.thumbnailDelIcon { - background-image : url(../apps/images/default/picture_delete.png) !important; -} -.thumbnailGoIcon { - background-image : url(../apps/images/default/picture_go.png) !important; -} -.attached { - background-image : url(../apps/images/default/folder_brick.png) !important; -} -.attachedAdd { - background-image : url(../apps/images/default/folder_go.png) !important; -} -.uploadIconAdd { - background-image : url(../apps/images/default/folder_page_white.png) !important; -} -.uploadIcon { - background-image : url(../apps/images/default/folder_go.png) !important; -} -.suggestionIcon { - background-image : url(../apps/images/default/cog.png) !important; -} -.suggestionRunIcon { - background-image : url(../apps/images/default/page_gear.png) !important; -} -.relatedAddIcon { - background-image : url(../apps/images/default/link_add.png) !important; -} -.relatedDelIcon { - background-image : url(../apps/images/default/link_del.png) !important; -} -.lightBox { - background-image : url(../apps/images/default/map/icon_zoomin.png) !important; -} - -.cat-thumbnail { - background-image : url(../apps/images/default/picture_go.png) !important; -} -.cat-applications { - background-image : url(../apps/images/default/category/applications.png) !important; -} -.cat-dataset { - background-image : url(../apps/images/default/category/dataset.png) !important; -} -.cat-datasets { - background-image : url(../apps/images/default/category/datasets.png) !important; -} -.cat-services, .cat-service { - background-image : url(../apps/images/default/category/service.png) !important; -} -.cat-maps { - background-image : url(../apps/images/default/category/maps.png) !important; -} -.cat-audioVideo { - background-image : url(../apps/images/default/category/audioVideo.png) !important; -} -.cat-caseStudies { - background-image : url(../apps/images/default/category/caseStudies.png) !important; -} -.cat-directories { - background-image : url(../apps/images/default/category/directories.png) !important; -} -.cat-related, .cat-featureCatalogue, .cat-fcats { - background-image : url(../apps/images/default/category/featureCatalogue.png) !important; -} -.cat-interactiveResources { - background-image : url(../apps/images/default/category/interactiveResources.png) !important; -} -.cat-model { - background-image : url(../apps/images/default/category/model.png) !important; -} -.cat-photo { - background-image : url(../apps/images/default/category/photo.png) !important; -} -.cat-otherResources { - background-image : url(../apps/images/default/category/otherResources.png) !important; -} -.cat-proceedings { - background-image : url(../apps/images/default/category/proceedings.png) !important; -} -/* Icon and button - end */ - - - -/* Codelist have a class attribute which could -be use for custom styling in view mode */ -.topSecret *, .confidential *, .restricted *, .secret * { - color: #ff0a0f !important; -} -.color { - border-left-width: 5px; - border-left-style: solid; -} - -/* duration field: inline input elements - class name is on the label, so select the next sibling which is the container. -* */ -.gtsTMPeriodDuration + * input, -.gmlduration + * input { - float: none !important; -} - -/* Hide by default inline help on editor */ -span.editor-help-inline { - display: none; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/css/gnmetadataprint.css b/web-client/src/main/resources/apps/css/gnmetadataprint.css deleted file mode 100644 index e7fcbb32c83..00000000000 --- a/web-client/src/main/resources/apps/css/gnmetadataprint.css +++ /dev/null @@ -1,55 +0,0 @@ -div.metadata { - width : auto; - border : 0; - margin : 0 5%; - padding : 0; - float : none !important; -} - -div#tabs { - display : none !important; -} - -* { - color : black !important; -} - -td.complex div h1 { - font-size : 110%; - font-weight : bold; - color : #016599; - padding : 5px 0px 4px -} - -a:link, -a:visited { - color : #520 !important; - background : transparent; - font-weight : bold; - text-decoration : underline; -} - - -/* Badly supported by browser - a small line strike through the legend element */ -.metadata * fieldset { - border-top : none !important; -} - -/* Display link between square bracket next to the hyperlinks */ -li a:link:after, -li a:visited:after, -td a:link:after, -td a:visited:after { - content : " [" attr(href) "] "; - font-size : 80%; -} - -/* Do not display absolute URL or Javascripts */ -a[href^="/"]:after, a[href^="#"]:after, a[href^="#"]:after, a[href^="mailto:"]:after { - content: "" !important; -} - -/* Always break page before map to avoid missing map parts */ -div.extentViewer { - page-break-before: always; -} diff --git a/web-client/src/main/resources/apps/css/hidemap.css b/web-client/src/main/resources/apps/css/hidemap.css deleted file mode 100644 index 8adf6b00614..00000000000 --- a/web-client/src/main/resources/apps/css/hidemap.css +++ /dev/null @@ -1,7 +0,0 @@ -.md-mn-kml { - display: none; -} - -.addLayer { - display: none; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/css/metadata-view.css b/web-client/src/main/resources/apps/css/metadata-view.css deleted file mode 100644 index 0baa22f734a..00000000000 --- a/web-client/src/main/resources/apps/css/metadata-view.css +++ /dev/null @@ -1,415 +0,0 @@ -.gn { - background-color : #FFFFFF; -} -.md-view { - /*background-color : #FFFFFF;*/ - text-shadow : 0 1px 0 #FFFFFF; -} -.md-view ul { - display : block; - height : auto; - position : relative; - padding: 5px 0px 5px 7px;; -} -/*.md-view ul li img { - margin-bottom : 1px; -} -*/ -.md-view ul li * h1 { - color : #0076A1; - font-size : small; - margin-bottom : 5px; -} - -.md-view div.relation { - margin-left : 30px !important; - max-height : 50px !important; - overflow : hidden; - display: none; - position:relative; /* Required for IE */ -} -.md-view div.relation ul { - margin-left: 15px !important; -} -.md-view div.relation span { - background-image : url(../apps/images/default/chart_organisation.png) !important; - background-repeat : no-repeat; - width: 16px; - height: 16px; - position: absolute; -} -.md-view div.more { - background-image : url(../apps/images/default/three_dots.png) !important; - background-repeat : no-repeat; - background-position : 95% 80%; -} - -.md-view div.relation.more:hover { - overflow : auto; - background-image : none !important; - max-height : 500px !important; -} - -.md-view div.relation ul li, -table.related * li { - float : left; - width : 200px; - line-height : initial !important; - word-wrap: break-word; - padding: 2px; -} - -div.linkPanel div#add-menu-content{ - float: right !important; -} - -.md-view * a { - text-decoration : none; - color : #0076A1; - cursor: pointer; -} -.md-view * a:hover { - text-decoration : underline; - color : #959532 -} -.md-view td.left { - width : 30px; -} -.md-view td.thumb { - width : 180px; -} -.md-view td.icon { - width : 16px; - border-left : 1px solid #ececec; - text-align : center; -} -.md-view ul li * .md-logo img { - width : 30px; -} -.md-view ul li { - border-top : 1px solid transparent; - color : #222222; - float : left; - margin : 2px; - overflow : hidden; - padding : 2px 2px 2px 2px; -} - -/* View mode */ -.md-view ul li.md-simple { - width : 98%; - /* FIXME : Should be auto */ -} -.md-view ul li.md-full { - width : 98%; - /* FIXME : Should be auto */ -} -.md-view ul li.md-thumbnail { - height : 220px; - width : 160px; -} -.md-thumbnail * h1 { - font-size : smaller !important; - height: 35px; -} - - - -.md-view * table { - width : 100%; -} -.md-view * table tr { - vertical-align : top; -} /* -.md-view * table tr td.md-full-right { - width : 180px; - text-align : right; -} -*/ -.md-full-right * img { - max-width : 180px; - max-height : 140px; - min-height : 40px; -} - -.md-view * div.md-wrap { - float : left; - width : 85%; -} -.md-view * div.rating, -.md-view * div.thumbnail { - clear : both; - width : 158px; - text-align: center; -} - -.md-view * div.thumbnail img { - border : 1px solid #e7e5e5; - padding : 1px; - max-width : 152px; - max-height : 152px; - min-height : 40px; - height: auto; -} - -.md-view * div.rating { - padding-bottom : 2px; -} - -img.orgLogo { - max-width : 40px; - max-height : 40px; - vertical-align : middle; -} - -div.md-contact span { - font-style : italic !important; - font-size : 80% !important; - color : #666; - padding-right : 4px; -} - -div.md-contact { - text-align : right; - clear : both; -} - -span.md-action-menu { - visibility : hidden; -} - -.md-view ul li.x-view-selected { - -moz-border-radius : 4px 4px 4px 4px; - /* - background-color:rgba(100, 100, 100, 0.15); - border-top:1px solid rgba(0, 0, 0, 0.15); - */ - background-color : rgba(217, 210, 123, 0.25); - border : 1px solid rgba(0, 51, 102, 0.25); -} -.md-view ul li.md-over { - -moz-border-radius : 4px 4px 4px 4px; - background-color : rgba(10, 10, 10, 0.10); - border-top : 1px solid rgba(0, 0, 0, 0.10); - box-shadow: 2px 2px 14px -2px; -} -.md-view li strong { - color : #000000; - display : block; -} /* -.md-view * .rating, -.md-full * div.rating { - display : block; - padding-left : 0px !important; - text-align : center; -} -.md-view * .rating * { - padding-left : 0px !important; -}*/ -.md-view * p { - color : #444; -} - -.md-view * .md-links { -} - -/** - * Format Ext button in the link area - */ -.md-links table { - float: left; - margin-right: 5px; -} -.md-links * .x-btn-tl, -.md-links * .x-btn-tr, -.md-links * .x-btn-tc, -.md-links * .x-btn-ml, -.md-links * .x-btn-mr, -.md-links * .x-btn-mc, -.md-links * .x-btn-bl, -.md-links * .x-btn-br, -.md-links * .x-btn-bc{ - background: none; -} -/* -Display hyperlink as text next to element -.md-links a:hover:after { - content : " " attr(href) " "; - font-size : 80%; -}*/ - -.md-view * p.abstract { -} -.md-view * .subject { - font-size : 80%; - text-transform : uppercase; -} -.md-view ul li.md-full div, -.md-view ul li.md-simple div { - padding-left : 1px; -} -/* Icons */ -.md-mn { - background-repeat : no-repeat; - padding-left: 20px; - padding-bottom: 3px; -} -.md-mn-view { - background-image : url(../apps/images/default/page_go.png) !important; -} -.md-mn-edit { - background-image : url(../apps/images/default/page_edit.png) !important; -} -.md-mn-del { - background-image : url(../apps/images/default/page_delete.png) !important; -} -.md-mn-copy { - background-image : url(../apps/images/default/page_copy.png) !important; -} -.md-mn-find { - background-image : url(../apps/images/default/find.png) !important; -} -.md-mn-go { - background-image : url(../apps/images/default/bullet_go.png) !important; -} -.md-mn-advanced { - background-image : url(../apps/images/default/cog.png) !important; -} -.md-mn-user { - background-image : url(../apps/images/default/user.png) !important; -} -.md-mn-pdf { - background-image : url(../apps/images/default/page_white_acrobat.png) !important; -} -.md-mn-badd { - background-image : url(../apps/images/default/brick_add.png) !important; -} -.md-mn-zip { - background-image : url(../apps/images/default/page_white_zip.png) !important; -} -.md-mn-ftp { - background-image : url(../apps/images/default/folder.png) !important; -} -.md-mn-ftps { - background-image : url(../apps/images/default/folder_key.png) !important; -} -.md-mn-download { - background-image : url(../apps/images/default/download.png) !important; -} -.mn-user-location { - background-image : url(../apps/images/default/user_location.png) !important; -} -.mn-view-simple { - background-image : url(../apps/images/default/mv-simple.png) !important; - background-repeat : no-repeat; -} -.mn-view-full { - background-image : url(../apps/images/default/mv-full.png) !important; - background-repeat : no-repeat; -} -.mn-view-thumbnail { - background-image : url(../apps/images/default/mv-thumbnail.png) !important; - background-repeat : no-repeat; -} -.mn-login { - background-image : url(../apps/images/default/user_go.png) !important; -} -.mn-logout { - background-image : url(../apps/images/default/door_out.png) !important; -} -.mn-clear { - background-image : url(../apps/images/default/cross.png) !important; -} - -.search-item { - padding-left: 2px; -} -.search-item h3 { - font-weight : normal !important; - line-height : 1.6em; -} -.search-item span { - font-weight: bolder; -} - -/* TagCloud styles */ -ul li.tag-cloud { - text-align : center; - padding : 1px; - margin : 2px; -} -ul li.tag-cloud-hover { - text-decoration: none; -} -ul li.tag-cloud a { - line-height: 26px; -} -li.tag-cloud-0 { - font-size : 60% !important; -} -li.tag-cloud-1 { - font-size : 70% !important; -} -li.tag-cloud-2 { - font-size : 80% !important; -} -li.tag-cloud-3 { - font-size : 90% !important; -} -li.tag-cloud-4 { - font-size : 100% !important; -} -li.tag-cloud-5 { - font-size : 120% !important; -} -li.tag-cloud-6 { - font-size : 140% !important; -} -li.tag-cloud-7 { - font-size : 160% !important; -} -/* Image in combo box */ -.x-combo-list-item img { - max-width : 20px; - max-height : 20px; - vertical-align : middle; - margin-right : 3px; -} -.connectIcon { - background-image : url(../apps/images/default/connect.png) !important; -} -.zoomin { - background-image : url(../apps/images/default/icon_zoomin.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomout { - background-image : url(../apps/images/default/icon_zoomout.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomfull { - background-image : url(../apps/images/default/icon_zoomfull.png) !important; - height : 20px !important; - width : 20px !important; -} -.pan { - background-image : url(../apps/images/default/icon_pan.png) !important; - height : 20px !important; - width : 20px !important; -} - -div.help .title { - font-size : 120%; - font-weight : bold; -} -div.help div { - margin-top : 3px; -} -div.help span { - font-style : italic; -} -div.help ul li { - list-style-type : circle !important; - margin-left : 10px !important; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/README.md b/web-client/src/main/resources/apps/html5ui/README.md deleted file mode 100644 index aade415d23d..00000000000 --- a/web-client/src/main/resources/apps/html5ui/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# HTML 5 UI - -This is an html5 based UI which uses the wigets from geonetwork and the library ExtJS. - -It contains two maps: preview map and big map. You can access the big map -clicking on the preview map. Both maps have synchronized layers, so if you add -or remove (or change style) on one map layer, you will see that the other map -also changes. - -Tested in Chrome, Firefox and IE>8 (also works but with some penalties on IE7). - -## Changing Style - -Basic changing styling is pretty easy with this UI: - -### Colors - -There is a file on web-client/src/main/resources/apps/html5ui/css/colors.css -which contains all the colors of the app. - -### Page design - -The html is loaded from web/src/main/webapp/xsl/search.xsl This xsl is -interpreted by jeeves and transformed to show the basic page. The page scheme is -basically the same on all links, so if you change the position of some html -elements, they will be changed on all views. - -Don't forget that some of the elements are also placed with css. - -Specific css for this UI (not shared with other UIs like search or tabsearch) is placed on web-client/src/main/resources/apps/html5ui/css/main.css - -### Results view templates - -They are on web/src/main/resources/apps/html5ui/js/Templates.js - -### Add more tabs - -To add more tabs just look on search.xsl around line 240 (id="main-navigation") and add a new element like this: - - -
  • - - - -
  • - -The value of the string will be taken from the strings.xml file that -corresponds to the language used. - -### Add a footer link - -Look for the div element with id = "footer" and just add it: - -
  • - GeoNetwork OpenSource -
  • - -### Maps and other elements: change display behaviour - -Maps are always loaded even if they are not displayed. You can change this -behaviour and allow (for example) the big map to be shown at all times. This is -the same for all elements you see that disappear. - -To change this behaviour you should take a look at GlobalFunctions.js file. For -each "view" you have one function that shows it and hides it. You can change -them to allow, for example, that the big map is not hidden when results are -shown: - - * showBrowse - * hideBrowse - * showAdvancedSearch - * hideAdvancedSearch - * showBigMap - * ... - -If you add a new "view", you should update all this functions so the view is - hidden or shown when you want. - -## Changing more complex features - -### Debugging - -To debug javascript you only have to add a "debug" or "debug=true" parameter to -the url like this: http://....../srv/eng/search?debug - -### Adding more widgets - -Widgets are usually added on the file -/web-client/src/main/resources/apps/html5ui/js/App.js or one of its children -(see next section). - -### Global variable app -App.js creates the *app* global variable wich has (or should have) all the -information needed for the app to run. - -It also initializes some secondary objects which contains information and loads more widgets: - - init : function() { - - this.initializeEnvironment(); - - // Initialize utils - this.loginApp = new GeoNetwork.loginApp(); - this.loginApp.init(); - this.mapApp = new GeoNetwork.mapApp(); - this.mapApp.init(); - this.searchApp = new GeoNetwork.searchApp(); - this.searchApp.init(); - - if (urlParameters.create !== undefined && catalogue.isIdentified()) { - var actionCtn = Ext.getCmp('resultsPanel').getTopToolbar(); - actionCtn.createMetadataAction.handler.apply(actionCtn); - } - } - - -#### app.loginApp - -Should contain everything related to the authentication of the user like -control buttons to log in and log out and handles the cookie. - -#### app.mapApp - -Should control everything related to maps. For example, if you want to add a new layer to -the maps you should look here. - -Also initializes the maps (preview and big). - -#### app.searchApp - -Closely related to Catalogue.js, it launches searches and initializes the -results view. To change the advanced search you have to look here too. - -## More info - -### History - -The ExtJS History plugin is also used on this UI. It is not quite stable (not -at all on IE) but it can be modified to allow back button from browser to work. - -### What is the div id="only_for_spiders"? - -As the name says, this is for spiders or crawlers. When you access with the -direct link to a metadata, that div will be used to load plain xml data so -browsers can process it. Don't worry, if you are human you will not see it at -all. \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/css/colors.css b/web-client/src/main/resources/apps/html5ui/css/colors.css deleted file mode 100644 index 1d28cedc66e..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/colors.css +++ /dev/null @@ -1,297 +0,0 @@ -/** - -This file contains all the color schema of the UI and only colors. - -If you want to customize the color schema, just use this file. - -**/ - - -html,button,input,select,textarea { - color: #222; -} - -div#resultsPanel .x-panel-bbar table.x-toolbar-ct,.x-panel-header,div#big-map .x-panel-tbar table.x-toolbar-ct,div#resultsPanel table.x-toolbar-ct,.main aside - { - background: #47A8DD; - color: white; -} - -nav a { - background: transparent; - color: #376690; -} - -nav a.selected { - background: #376690; - color: white; -} - -#welcome-text { - color: #393939; -} - -div#advSearchTabs .x-panel-header { - background: #47A8DD; -} - -#header { - border-top-color: #CCC34E; - border-bottom-color: #376690; -} - -.user-button { - background-color: #CCC34E; -} - -#lang-form div div form div input { - color: #898989; -} - -/* please use this for headers of facet filters to the left; cf. http://pdok.cdxi.nl/nl/pdok-producten */ -.left-column-header { - background: #fbead9; -} - -#bread-crumb-app { - color: #43788A; -} - -#bread-crumb-app a { - color: #3D4F5E; -} - -#bread-crumb-app .current,div#advSearchTabs .x-panel-header,div#resultsPanel .x-panel-bbar table.x-toolbar-ct - { - color: black; -} - -.main aside,#footer footer,.title,.chromeframe { - color: white; -} - -#footer ul li a { - color: white; -} - -#foot-loads { - color: #069; -} - -#foot-loads h1 { - color: #012; -} - -.grey,#printer-button,#rss-button,#lang-form,#sitemap-button,#feedback-site-button - { - color: #767B7E; -} - -div#advSearchTabs div.x-panel-bwrap div.x-panel-body.x-panel-body-noheader.x-panel-body-noborder.x-box-layout-ct div.x-box-inner div.x-panel.x-form-label-left.x-box-item div.x-panel-bwrap div.x-panel-body - { - background: white; -} - -#big-map .x-layout-collapsed { - background-color: #47A8DD; -} - -#big-map .x-layout-split,#big-map .x-layout-collapsed-over { - background-color: #47A8DD; -} - -div#tabs ul.x-tab-strip-top { - background-color: white; - border-bottom-color: black; -} - -div#tabs .x-tab-strip-top .x-tab-right,div#tabs .x-tab-strip-top .x-tab-left,div#tabs .x-tab-strip-top .x-tab-strip-inner - { - background-color: #005BA7; -} - -div#tabs .x-tab-strip-active .x-tab-right,div#tabs .x-tab-strip-active .x-tab-left,div#tabs .x-tab-strip-active .x-tab-strip-inner - { - background: white; - color: black; -} - -div#tabs .x-tab-strip-active .x-tab-right { - box-shadow: rgba(0, 0, 0, 0.5); - border-top: #47A8DD; -} - -#legend-search { - color: #fff; -} - -#search-form input { - border: #000; -} - -#search-submit { - background-color: #fff; - border: #000; - color: transparent; -} - -#show-advanced,#hide-advanced { - color: white; - background-color: #47A8DD; -} - -/** - * Facet category label - */ -div.facets>ul>li { - border-top: #CCC; - color: #47A8DD; -} - -.facet-count { - color: #71C0DD; -} - -div.facets * .facet-more-bt,div.facets * .facet-less-bt { - color: #47A8DD; -} - -.breadcrumb * button { - color: #47A8DD; -} - -.breadcrumb * button:hover { - color: #959532; -} - -.breadcrumb-mn { - background-color: #FFF !important; -} - -.user-button a { - color: white; -} - -#permalink-div { - border: black; - background-color: white; -} - -a#custom-tweet-button { - color: black; -} - -#fb-button,a#custom-tweet-button { - border: #CCC; -} - -#fb-button a { - color: black; -} - -.black,.black a { - color: black; -} - -#cookie-warning input { - background-color: white; - color: #C09853; - border-color: #C09853; -} - -.label,.badge { - background-color: #999; - color: white; -} - -.ir { - background-color: transparent; -} - -.alert { - background-color: #FCF8E3; - border: #FBEED5; -} - -.alert * h2,.alert { - color: #C09853; -} - -.user-button label { - color: #767B7E; -} - -div#resultsPanel .x-btn button { - background-color: transparent; - border-color: transparent; -} - -/** -tag cloud */ -ul li.tag-cloud a { - color: #565B5E; - background-color: #FEEDDD; -} - -/** Recent viewed **/ -#secondary-aside,#recent-viewed { - background: white; -} - -#recent-viewed span.x-view-over { - color: white; - background: rgba(226, 111, 2, 0.9); -} - -#recent-viewed span { - background: transparent; - color: transparent; -} - -#recent-viewed .thumb-wrap h1 { - color: #234150; -} - -#recent-viewed-div h1 { - background-color: transparent; - color: black; -} - -#resultsPanel .md-action-menu a { - color: transparent; -} -/** Syntax highlighting */ -.xmltag { - color: #25b7e6; -} - -.xmlatt { - color: #959532; -} - -.xmlattvalue { - color: #444; -} - -.xmlns { - color: #959532; -} - -dl.xml { - color: #444; -} - -#login_div { - background-color: white; -} - -div#tabs .x-tab-strip span.x-tab-strip-text { - color: black; - box-shadow: grey; -} - - -.emptyThumbnail span { - color: #376690; -} - diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/LICENSE.txt b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/LICENSE.txt deleted file mode 100644 index d6456956733..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Bold.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Bold.ttf deleted file mode 100755 index fd79d43bea0..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Bold.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-BoldItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-BoldItalic.ttf deleted file mode 100755 index 9bc800958a4..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-BoldItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondBold.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondBold.ttf deleted file mode 100644 index 83966f21381..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondBold.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondLight.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondLight.ttf deleted file mode 100644 index 97c355b9f67..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondLight.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondLightItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondLightItalic.ttf deleted file mode 100644 index 0b45898db8e..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-CondLightItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-ExtraBold.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-ExtraBold.ttf deleted file mode 100755 index 21f6f84a079..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-ExtraBold.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-ExtraBoldItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-ExtraBoldItalic.ttf deleted file mode 100755 index 31cb688340e..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-ExtraBoldItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Italic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Italic.ttf deleted file mode 100755 index c90da48ff3b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Italic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Light.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Light.ttf deleted file mode 100755 index 0d381897da2..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Light.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-LightItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-LightItalic.ttf deleted file mode 100755 index 68299c4bc6b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-LightItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Regular.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Regular.ttf deleted file mode 100755 index db433349b70..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Regular.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Semibold.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Semibold.ttf deleted file mode 100755 index 1a7679e3949..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-Semibold.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-SemiboldItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-SemiboldItalic.ttf deleted file mode 100755 index 59b6d16b065..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/OpenSans-SemiboldItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/LICENSE.txt b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/LICENSE.txt deleted file mode 100644 index d6456956733..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Bold.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Bold.eot deleted file mode 100644 index 4b49739adc8..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Bold.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Bold.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Bold.ttf deleted file mode 100755 index fd79d43bea0..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Bold.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-BoldItalic.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-BoldItalic.eot deleted file mode 100644 index fb981f7841c..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-BoldItalic.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-BoldItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-BoldItalic.ttf deleted file mode 100755 index 9bc800958a4..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-BoldItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondBold.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondBold.eot deleted file mode 100644 index 3ae0dde32cb..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondBold.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondBold.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondBold.ttf deleted file mode 100644 index 83966f21381..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondBold.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLight.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLight.eot deleted file mode 100644 index a965329143d..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLight.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLight.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLight.ttf deleted file mode 100644 index 97c355b9f67..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLight.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLightItalic.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLightItalic.eot deleted file mode 100644 index cec3dc44aba..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLightItalic.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLightItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLightItalic.ttf deleted file mode 100644 index 0b45898db8e..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-CondLightItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBold.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBold.eot deleted file mode 100644 index c180ec7257f..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBold.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBold.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBold.ttf deleted file mode 100755 index 21f6f84a079..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBold.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBoldItalic.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBoldItalic.eot deleted file mode 100644 index c7b4a70d84b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBoldItalic.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBoldItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBoldItalic.ttf deleted file mode 100755 index 31cb688340e..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-ExtraBoldItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Italic.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Italic.eot deleted file mode 100644 index 7859457d764..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Italic.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Italic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Italic.ttf deleted file mode 100755 index c90da48ff3b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Italic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Light.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Light.eot deleted file mode 100644 index 4616b0101dc..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Light.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Light.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Light.ttf deleted file mode 100755 index 0d381897da2..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Light.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-LightItalic.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-LightItalic.eot deleted file mode 100644 index 3e3dfd71f98..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-LightItalic.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-LightItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-LightItalic.ttf deleted file mode 100755 index 68299c4bc6b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-LightItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Regular.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Regular.eot deleted file mode 100644 index a7f4f70ed69..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Regular.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Regular.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Regular.ttf deleted file mode 100755 index db433349b70..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Regular.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Semibold.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Semibold.eot deleted file mode 100644 index 1228d23caea..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Semibold.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Semibold.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Semibold.ttf deleted file mode 100755 index 1a7679e3949..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-Semibold.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-SemiboldItalic.eot b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-SemiboldItalic.eot deleted file mode 100644 index 1ff149a0a70..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-SemiboldItalic.eot and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-SemiboldItalic.ttf b/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-SemiboldItalic.ttf deleted file mode 100755 index 59b6d16b065..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/css/fonts/Open_Sans/Open_Sans/OpenSans-SemiboldItalic.ttf and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/css/gnmapdefault.css b/web-client/src/main/resources/apps/html5ui/css/gnmapdefault.css deleted file mode 100644 index 998d0c89c2f..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/gnmapdefault.css +++ /dev/null @@ -1,221 +0,0 @@ -.olCursorWait { - cursor : wait; -} -.print { - background-image : url(../../images/default/map/icon_print.png) !important; - height : 20px !important; - width : 20px !important; -} -.addLayerIcon { - background-image : url(../../images/default/map/add_layer.png) !important; -} -.addLayer { - background-image : url(../../images/default/map/map_go.png) !important; - height : 20px !important; - width : 20px !important; -} -.deleteLayer { - background-image : url(../../images/default/map/delete_layer.png) !important; - height : 20px !important; - width : 20px !important; -} -.measure { - background-image : url(../../images/default/map/icon_measure.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomin { - background-image : url(../../images/default/map/icon_zoomin.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomout { - background-image : url(../../images/default/map/icon_zoomout.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomfull { - background-image : url(../../images/default/map/icon_zoomfull.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomlayer { - background-image : url(../../images/default/map/icon_zoomlayer.png) !important; - height : 20px !important; - width : 20px !important; -} - -.pan { - background-image : url(../../images/default/map/icon_pan.png) !important; - height : 20px !important; - width : 20px !important; -} -.selextent { - background-image : url(../../images/default/map/icon_selextent.png) !important; - height : 20px !important; - width : 20px !important; -} -.query { - background-image : url(../../images/default/map/icon_featureinfo.png) !important; - height : 20px !important; - width : 20px !important; -} -.next { - background-image : url(../../images/default/map/resultset_next.png) !important; - height : 20px !important; - width : 20px !important; -} -.back { - background-image : url(../../images/default/map/resultset_previous.png) !important; - height : 20px !important; - width : 20px !important; -} -.savewmc { - background-image : url(../../images/default/map/icon_savewmc.png) !important; - height : 20px !important; - width : 20px !important; -} -.wmsTime { - background-image : url(../../images/default/map/wmstime.gif) !important; - height : 20px !important; - width : 20px !important; -} -.layerStyles { - background-image : url(../../images/default/map/layerstyles.png) !important; - height : 20px !important; - width : 20px !important; -} -.layerOpacity { - background-image : url(../../images/default/map/opacity.png) !important; - height : 20px !important; - width : 20px !important; -} -.wmsInfo { - background-image : url(../../images/default/map/wmsinfo.png) !important; - height : 20px !important; - width : 20px !important; -} - -.olControlLoadingPanel { - background-image : url(../../images/default/map/indicator_medium.gif); - background-position : center; - background-repeat : no-repeat; -} - -.loadwmc { - background-image : url(../../images/default/map/icon_loadwmc.png) !important; - height : 20px !important; - width : 20px !important; -} -.selectfile { - background : url(../../images/default/map/icon_selectfile.png) no-repeat 0 0 !important; -} - -.olControlMousePosition { - font-family : tahoma, arial, verdana, sans-serif; - font-size : 9pt; - font-weight : bold; -} -.olControlScaleBar { - bottom : 25px; - color : #000000; - font-family : tahoma, arial, verdana, sans-serif; - right : 10px; -} -.olControlScaleBarBar { - background-color : #000000; - border : 1px solid #000000; - height : 5px; - top : 12px; -} -.olControlScaleBarBarAlt { - background-color : #FFFFFF; - border : 1px solid #000000; - height : 5px; - top : 12px; -} -.olControlScaleBarNumbersBox { - font-size : 9pt; - top : 19px; - width : 40px; -} -.olControlScaleBarLabelBox { - font-size : 9pt; - height : 15px; - letter-spacing : 0.1em; - top : -5px; -} -.styler { - background-image : url(../../images/default/map/layerstyles.png) !important; -} -.drawPolygon { - background-image : url(../../images/default/map/draw_polygon_off.png) !important; -} -.drawCircle { - background-image : url(../../images/default/map/draw_circle_off.png) !important; -} -.drawRectangle { - background-image : url(../../images/default/map/draw_rectangle_off.png) !important; -} -.clearPolygon { - background-image : url(../../images/default/map/draw_polygon_clear_off.png) !important; -} -.icon-measure-length { - background : url(../../images/default/map/ruler.png) no-repeat scroll 0 0 transparent !important; - height : 16px !important; - margin : 0 !important; - width : 16px !important; -} - -.icon-measure-area { - background : url(../../images/default/map/ruler_square.png) no-repeat scroll 0 0 transparent !important; - height : 16px !important; - margin : 0 !important; - width : 16px !important; -} - -div.map-overlay div.overlay-element { - display : inline; - float : left; - margin : 5px; -} - -.olControlScaleLine { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; - left : 10px; -} - -.overlay-scaleline { - bottom : 0; - left : 0; - margin-top : 0; -} - -.overlay-scalechooser { - float : right !important; -} - -div.map-overlay { - bottom : 5px; - position : absolute; - right : 5px; - z-index : 1000; - width : 250px; /* For IE */ -} - -.olControlScaleLineTop { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; -} -.olControlScaleLineBottom { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; -} - -.x-collapsed-title { - color : #15428B; - font : bold 11px / 15pxtahoma, arial, verdana, sans-serif; - padding : 2px 5px; -} - diff --git a/web-client/src/main/resources/apps/html5ui/css/gnmetadatadefault.css b/web-client/src/main/resources/apps/html5ui/css/gnmetadatadefault.css deleted file mode 100644 index 2f882fcd9a4..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/gnmetadatadefault.css +++ /dev/null @@ -1,653 +0,0 @@ -.metadata a { - font-weight: bold; -} - -.title { - font-size: 120%; - font-weight: bold; - padding-bottom: 5px; - padding-top: 15px; -} - -.x-tool-newwindow { - background-image: url(../../images/default/newwindow.png) !important; -} - -.metadata * img.logo { - max-height: 100px; - max-width: 100px; - border: 1px solid #B3D4E6; - margin: 5px; -} - -.mandatory * { - font-weight: bold; -} - -img.thumb-small { - max-width: 80px; - max-height: 80px; - min-height: 40px; -} - -span.success { - padding-left: 15px !important; - padding-right: 15px !important; - background-repeat: no-repeat; - background-image: url(../img/valid_metadata.png); -} - -span.error { - padding-left: 15px !important; - padding-right: 15px !important; - background-repeat: no-repeat; - background-image: url(../img/invalid_metadata.png); -} - -.mandatory+td span input,.mandatory+td span textarea,.mandatory+td span select,.mandatory+td span input.error,.mandatory+td span textarea.error,.mandatory+td span select.error - { - border: 2px solid #767676; -} - -.metadata .mandatory+td input.error,.metadata .mandatory+td textarea.error,.metadata .mandatory+td select.error - { - border: 2px solid #ff0000; -} - -.metadata * div.info { - width: 100%; - text-align: center; - font-style: italic; - font-size: 80%; -} - -li.suggestion,div.help { - padding: 5px; - border-bottom: 1px solid #7EADD9; -} - -li.thumbnail { - padding: 5px; - width: 100px; - text-align: center; - float: left; -} - -li.thumbnail-over,li.suggestion-over { - background-color: #F7EEE1; -} - -li.thumbnail-selected,li.suggestion-selected { - background-color: #7EADD9; -} - -div.attr { - clear: both; -} - -div#tabs ul li ul { - font: bold 11px; - list-style-type: none; - margin-bottom: 0; - margin-left: 0; - margin-top: 1px; - padding: 3px 0; - text-align: left; - border-bottom: 1px solid #778; - padding-bottom: 21px; -} - -div#tabs ul li span.mode { - display: none; -} - -div#tabs ul li ul li { - float: left; - /*border: 1px solid #778;*/ - margin: 0; -} - -div#tabs ul li ul li.active { - background-image: url("../images/shadeactive.gif"); - border-bottom-color: white; - top: 1px; - padding: 3px 7px; -} - -.metadata * #tabs a { - float: left; - display: block; - background: url("../images/shade.gif") repeat-x scroll left top white; - color: #2D2B2B; - margin-right: 3px; - padding: 3px 7px; - position: relative; - text-decoration: none; - z-index: 1; -} - -.metadata * #tabs a:hover { - color: #000; -} - -.metadata * div.el { - width: 100%; - clear: both; -} - -.metadata * div.el label { - margin-right: 5px; -} - -.metadata * label { - color: #767676; - float: left; -} - -.metadata * fieldset { - border-top: none; - border-bottom: none; - border-left: none; - border-right: none; - padding: 0; - margin: 0; -} - -.metadata * legend { - font-size: 110%; - font-weight: bold; - color: #016599; - padding: 5px 0 4px 0; -} - -.metadata * input,.metadata * textarea,.metadata * select { - color: #353a3b; - border-color: #C1C1C1; - border: 1px solid #7EADD9; - padding: 1px 3px; -} - -.metadata * input[type='radio'] { - border-width: 0; -} - -.metadata * select { - max-width: 200px; -} - -/** -.metadata * input.error,.metadata * textarea.error,.metadata * select.error - { - border: 2px solid red; -} -*/ -.metadata * input,.metadata * textarea { - width: 60%; - float: left; -} - -.metadata * table.map * input { - float: none !important; -} - -.metadata * input.small { - width: 10%; -} - -.metadata * input[type=checkbox] { - width: 20px; -} - -.metadata * input:focus,.metadata * textarea:focus,.metadata * select:focus - { - color: #000; - background-color: #F7EEE1; -} - -.metadata * textarea { - resize: both; -} - -.metadata * textarea.small { - height: 60px; -} - -.metadata * textarea.medium { - height: 140px; -} - -.metadata * textarea.large { - height: 240px; -} - -.metadata * textarea.xml { - width: 100% !important; - min-height: 700px; - height: 100% !important; -} - -.metadata * table.gn { - border-collapse: collapse; - background-color: #fff; - clear: both; - padding: 0; - margin: 0; - width: 100%; -} - -#editForm table.gn { - border-collapse: collapse; - background-color: #fff; - clear: both; - margin-left: 0; - margin-right: 0; - width: 100%; -} - -.metadata * table.gn>tbody>tr>td,.metadata * table.gn>tbody>tr>th { - padding: 7px 0 7px 7px; - vertical-align: top; - text-align: left; -} - -.metadata * table.gn>tbody>tr>td.col { - padding: 0; - width: 50%; -} - -.metadata * table.gn>tbody>tr>td.main,.metadata * table.gn>tbody>tr>th.main - { - width: 25%; -} - -.metadata * table.gn p { - margin-bottom: 5px; -} - -table.related { - border-collapse: collapse; - border-spacing: 0; - width: 100%; -} - -table.related>tbody>tr { - height: 30px; -} - -table.related>tbody>tr>td { - color: #000000; - border-top: 1px solid #e26f02; - border-bottom: 1px solid #e26f02; -} - -table.related>tbody>tr>td.main { - background-color: #f6d4b1; -} - -table.related * ul { - padding-top: 5px; - padding-left: 10px; -} - -table.gn>tbody>tr>td,table.gn>tbody>tr>th { - border-bottom: 1px solid #B3D4E6; - color: #069; -} - -table.gn>tbody>tr>th.complex,table.gn>tbody>tr>td.complex { - border: none; -} - -table.gn>tbody>tr>td.main,table.gn>tbody>tr>th.main { - background-color: #f6d4b1; -} - -table.map>tbody>tr>td { - text-align: center; -} - -table.map>tbody>tr>td>input,table.map>tbody>tr>td>label { - width: 80px !important; -} - -span.icon { - padding-left: 20px; - background-repeat: no-repeat; -} - -span.buttons { - background-color: inherit; - text-align: left; - vertical-align: middle; -} - -span.buttons a { - border-width: 0 !important; - cursor: hand; - cursor: pointer; -} - -span.buttons a.small span { - margin: 1px; - padding: 0 4px; - width: 6px !important; - height: 5px !important; - background-repeat: no-repeat; -} - -.buttons a.find span { - padding-left: 15px !important; - background-image: url(../../images/default/find.png); -} - -.buttons a.findsub span { - padding-left: 15px !important; - background-image: url(../../images/default/find.png); -} - -.buttons a.error span { - padding-left: 15px !important; - background-image: url(../../images/default/flag_red.png); -} - -.buttons a.add span { - background-image: url(../../images/default/bullet_toggle_plus.png); -} - -.buttons a.del span { - background-image: url(../../images/default/bullet_toggle_minus.png); -} - -.buttons a.up span { - background-image: url(../../images/default/bullet_arrow_up.png); -} - -.buttons a.down span { - background-image: url(../../images/default/bullet_arrow_down.png); -} - -div.button { - float: left; - background-repeat: no-repeat; - min-width: 15px; - min-height: 15px; -} - -.tgRight { - background-image: url(../../images/default/bullet_arrow_right.png); -} - -.tgDown { - background-image: url(../../images/default/bullet_arrow_down.png); -} - -.edit { - background-image: url(../../images/default/page_white.png) !important; -} -.addMenu { - background-image : url(../images/default/add.png) !important; -} -.editing { - background-image: url(../../images/default/page_white_edit.png) - !important; -} - -.saveMetadata { - background-image: url(../../images/default/page_save.png) !important; -} - -.quitMetadata { - background-image: url(../../images/default/page_go.png) !important; -} - -.validateMetadata { - background-image: url(../../images/default/page_lightning.png) - !important; -} - -.refreshMetadata { - background-image: url(../../images/default/page_refresh.png) !important; -} - -.cancel { - background-image: url(../../images/default/cancel.png) !important; -} - -.configIcon { - background-image: url(../../images/default/cog.png) !important; -} - -.groupKey { - background-image: url(../../images/default/group_key.png) !important; -} - -.flagGreen { - background-image: url(../../images/default/flag_green.png) !important; -} - -.flagOrange { - background-image: url(../../images/default/flag_orange.png) !important; -} - -.flagRed { - background-image: url(../../images/default/flag_red.png) !important; -} - -.valid-1 { - background-image: url(../../images/default/flag_green.png) !important; -} - -.valid-0 { - background-image: url(../../images/default/flag_red.png) !important; -} - -.cat-children,.cat-parent { - background-image: url(../../images/default/chart_organisation.png) - !important; -} - -.book { - background-image: url(../../images/default/book.png); -} - -.subtemplateIcon { - background-image: url(../../images/default/report_magnify.png) - !important; -} - -.thumbnailIcon { - background-image: url(../../images/default/picture.png) !important; -} - -.thumbnailAddIcon { - background-image: url(../../images/default/picture_add.png) !important; -} - -.thumbnailDelIcon { - background-image: url(../../images/default/picture_delete.png) - !important; -} - -.thumbnailGoIcon { - background-image: url(../../images/default/picture_go.png) !important; -} - -.validateWmsIcon { - background-image: url(../img/wms_validation.png) !important; - width: 24px !important; - height: 24px !important; -} - -.validateWfsIcon { - background-image: url(../img/wfs_validation.png) !important; - width: 24px !important; - height: 24px !important; -} - -.attached { - background-image: url(../../images/default/folder_brick.png) !important; -} - -.attachedAdd { - background-image: url(../../images/default/folder_go.png) !important; -} - -.uploadIconAdd { - background-image: url(../../images/default/folder_page_white.png) - !important; -} - -.uploadIcon { - background-image: url(../../images/default/folder_go.png) !important; -} - -.suggestionIcon { - background-image: url(../../images/default/cog.png) !important; -} - -.suggestionRunIcon { - background-image: url(../../images/default/page_gear.png) !important; -} - -.relatedAddIcon { - background-image: url(../../images/default/link_add.png) !important; -} - -.relatedDelIcon { - background-image: url(../../images/default/link_del.png) !important; -} - -.lightBox { - background-image: url(../../images/default/map/icon_zoomin.png) - !important; -} - -.cat-applications { - background-image: url(../../images/default/category/applications.png) - !important; -} - -.cat-dataset { - background-image: url(../../images/default/category/dataset.png) - !important; -} - -.cat-datasets { - background-image: url(../../images/default/category/datasets.png) - !important; -} - -.cat-services,.cat-service { - background-image: url(../../images/default/category/service.png) - !important; -} - -.cat-maps { - background-image: url(../../images/default/category/maps.png) !important; -} - -.cat-audioVideo { - background-image: url(../../images/default/category/audioVideo.png) - !important; -} - -.cat-caseStudies { - background-image: url(../../images/default/category/caseStudies.png) - !important; -} - -.cat-directories { - background-image: url(../../images/default/category/directories.png) - !important; -} - -.cat-related,.cat-featureCatalogue,.cat-fcats { - background-image: - url(../../images/default/category/featureCatalogue.png) !important; -} - -.cat-interactiveResources { - background-image: - url(../../images/default/category/interactiveResources.png) !important; -} - -.cat-model { - background-image: url(../../images/default/category/model.png) - !important; -} - -.cat-photo { - background-image: url(../../images/default/category/photo.png) - !important; -} - -.cat-otherResources { - background-image: url(../../images/default/category/otherResources.png) - !important; -} - -.cat-proceedings { - background-image: url(../../images/default/category/proceedings.png) - !important; -} - -.topSecret *,.confidential *,.restricted *,.secret * { - color: #ff0a0f !important; -} - -#editorPanel * .title { - color: black; - float: none; -} - -#layerManager * ul { - padding: 0 0 0 0; -} - - -#massivereplace-container { - clear:both; - margin-left: 10px; - margin-right: 10px; -} - -#massivereplace-updates { - border-collapse:collapse; - border: 1px solid #cccccc; - table-layout: fixed; - margin-top:10px; - margin-bottom:10px; - width: 80%; -} - -#massivereplace-updates th, #massivereplace-updates td { - border: 1px solid #cccccc; - padding:5px; -} - -#massivereplace-updates th { - background-color: #dddddd; - color:black; - font-weight: bolder; -} - - -#massivereplace-buttons { - width:100%; - margin-top: 10px -} - -#massivereplace-results-container { - display:none; - margin: 10px;" -} - -#massivereplace-add-replacement-panel { - float:left; - width:60%; -} - -#massivereplace-instructions-panel { - float:right; - width:40%; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/css/gnmetadataprint.css b/web-client/src/main/resources/apps/html5ui/css/gnmetadataprint.css deleted file mode 100644 index ddb9680ed9d..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/gnmetadataprint.css +++ /dev/null @@ -1,62 +0,0 @@ -div.metadata { - width : auto; - border : 0; - margin : 0 5%; - padding : 0; - float : none !important; -} - -div#tabs { - display : none !important; -} - -* { - color : black !important; -} - -td.complex div h1 { - font-size : 110%; - font-weight : bold; - color : #016599; - padding : 5px 0px 4px -} - -a:link, -a:visited { - color : #520 !important; - background : transparent; - font-weight : bold; - text-decoration : underline; -} - -/* Increase thumbnails size */ -.metadata * img.logo { - max-height:none !important; - max-width : 650px !important; - float: left; - clear: both; -} - -/* Badly supported by browser - a small line strike through the legend element */ -.metadata * fieldset { - border-top : none !important; -} - -/* Display link between square bracket next to the hyperlinks */ -li a:link:after, -li a:visited:after, -td a:link:after, -td a:visited:after { - content : " [" attr(href) "] "; - font-size : 80%; -} - -/* Do not display absolute URL or Javascripts */ -a[href^="/"]:after, a[href^="#"]:after, a[href^="#"]:after, a[href^="mailto:"]:after { - content: "" !important; -} - -/* Always break page before map to avoid missing map parts */ -div.extentViewer { - page-break-before: always; -} diff --git a/web-client/src/main/resources/apps/html5ui/css/gnmetadataview.css b/web-client/src/main/resources/apps/html5ui/css/gnmetadataview.css deleted file mode 100644 index 03da327dba5..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/gnmetadataview.css +++ /dev/null @@ -1,1191 +0,0 @@ -.gn { - background-color: #FFFFFF; -} - -.md-view { - background-color: #FFFFFF; - text-shadow: 0 1px 0 #FFFFFF; -} - -.md-view ul { - display: block; - height: auto; - position: relative; - padding: 0 0 0 0; -} -/*.md-view ul li img { - margin-bottom : 1px; -} -*/ -.md-view ul li * h1 { - color: #0076A1; - font-size: small; - margin-bottom: 5px; -} - -.md-view div.relation { - margin-left: 30px !important; - max-height: 50px !important; - overflow: hidden; - display: none; - position: relative; /* Required for IE */ -} - -.md-view div.relation ul { - margin-left: 15px !important; -} - -.md-view div.relation span { - background-image: url(../images/default/chart_organisation.png) - !important; - background-repeat: no-repeat; - width: 16px; - height: 16px; - position: absolute; -} - -.md-view div.more { - background-image: url(../images/default/three_dots.png) !important; - background-repeat: no-repeat; - background-position: 95% 80%; -} - -.md-view div.relation.more:hover { - overflow: auto; - background-image: none !important; - max-height: 500px !important; -} - -.md-view div.relation ul li,table.related * li { - float: left; - width: 200px; - line-height: initial !important; -} - -.md-view * a { - text-decoration: none; - color: #0076A1; -} - -.md-view * a:hover { - text-decoration: underline; - color: #959532 -} - -.md-view td.left { - width: 30px; -} - -.md-view td.thumb { - width: 180px; -} - -.md-view td.icon { - width: 16px; - text-align: left; -} - -.md-view ul li * .md-logo img { - max-width: 30px; -} - -.md-view ul li { - border-top: 1px solid transparent; - color: #222222; - cursor: pointer; - float: left; - margin: 2px; - overflow: hidden; - padding: 2px 2px 2px 2px; -} - -/* View mode */ -.md-view ul li.md-simple { - width: 98%; - /* FIXME : Should be auto */ -} - -.md-view ul li.md-full { - width: 98%; - /* FIXME : Should be auto */ -} - -.md-view ul li.md-thumbnail { - height: 280px; - width: 184px; -} - -.md-thumbnail * h1 { - font-size: smaller !important; -} - -.md-view * table { - width: 100%; -} - -.md-view * table tr { - vertical-align: top; -} /* -.md-view * table tr td.md-full-right { - width : 180px; - text-align : right; -} -*/ -.md-full-right * img { - max-width: 180px; - max-height: 140px; - min-height: 40px; -} - -.md-view * div.md-wrap { - float: left; - width: 85%; -} - -.md-view * div.rating,.md-view * div.thumbnail { - clear: both; - width: 182px; -} - -.md-view * div.thumbnail img { - border: 1px solid #e7e5e5; - padding: 1px; - max-width: 180px; - max-height: 140px; - min-height: 40px; - height: auto; -} - -.md-view * div.rating { - padding-bottom: 2px; -} - -img.orgLogo { - max-width: 40px; - max-height: 40px; - vertical-align: middle; -} - -div.md-contact div { - font-style: italic !important; - font-size: 80% !important; - color: #666; - padding-right: 4px; -} - -div.md-contact { - text-align: right; - clear: both; -} - -span.md-action-menu { - visibility: hidden; -} - -.md-view ul li.x-view-selected { - -moz-border-radius: 4px 4px 4px 4px; - /* - background-color:rgba(100, 100, 100, 0.15); - border-top:1px solid rgba(0, 0, 0, 0.15); - */ - background-color: rgba(217, 210, 123, 0.85); - border: 1px solid rgba(0, 51, 102, 0.25); -} - -.md-view ul li.md-over { - -moz-border-radius: 4px 4px 4px 4px; - background-color: rgba(10, 10, 10, 0.15); - border-top: 1px solid rgba(0, 0, 0, 0.15); -} - -.md-view li strong { - color: #000000; - display: block; -} /* -.md-view * .rating, -.md-full * div.rating { - display : block; - padding-left : 0px !important; - text-align : center; -} -.md-view * .rating * { - padding-left : 0px !important; -}*/ -.md-view * p { - color: #444; -} - -.md-view * .md-links { - margin-top: 6px; -} - -/** - * Format Ext button in the link area - */ -.md-links table { - float: left; - margin-right: 5px; - width: auto; -} - -.md-links * .x-btn-tl,.md-links * .x-btn-tr,.md-links * .x-btn-tc,.md-links * .x-btn-ml,.md-links * .x-btn-mr,.md-links * .x-btn-mc,.md-links * .x-btn-bl,.md-links * .x-btn-br,.md-links * .x-btn-bc - { - background: none; -} - -div#resultspanel button { - background: none; - background-repeat: no-repeat; - color: black; -} - -/* -Display hyperlink as text next to element -.md-links a:hover:after { - content : " " attr(href) " "; - font-size : 80%; -}*/ -.md-view * p.abstract { - -} - -.md-view * p.subject { - font-size: 80%; - text-transform: uppercase; -} - -.md-view ul li.md-full div,.md-view ul li.md-simple div { - padding-left: 1px; -} -/* Icons */ -.md-mn { - background-repeat: no-repeat; - padding-left: 20px; - padding-bottom: 3px; -} - -.md-mn-view { - background-image: url(../images/default/page_go.png) !important; -} - -.md-mn-edit { - background-image: url(../images/default/page_edit.png) !important; -} - -.md-mn-del { - background-image: url(../images/default/page_delete.png) !important; -} - -.md-mn-copy { - background-image: url(../images/default/page_copy.png) !important; -} - -.md-mn-find { - background-image: url(../images/default/find.png) !important; -} - -.md-mn-go { - background-image: url(../images/default/bullet_go.png) !important; -} - -.md-mn-advanced { - background-image: url(../images/default/cog.png) !important; -} - -.md-mn-user { - background-image: url(../images/default/user.png) !important; -} - -.md-mn-pdf { - background-image: url(../images/default/page_white_acrobat.png) - !important; -} - -.md-mn-badd { - background-image: url(../images/default/brick_add.png) !important; -} - -.md-mn-zip { - background-image: url(../images/default/page_white_zip.png) !important; -} - -.md-mn-ftp { - background-image: url(../images/default/folder.png) !important; -} - -.md-mn-ftps { - background-image: url(../images/default/folder_key.png) !important; -} - -.md-mn-download { - background-image: url(../images/default/download.png) !important; -} - -.mn-user-location { - background-image: url(../images/default/user_location.png) !important; -} - -.mn-view-simple { - background-image: url(../images/default/mv-simple.png) !important; - background-repeat: no-repeat; -} - -.mn-view-full { - background-image: url(../images/default/mv-full.png) !important; - background-repeat: no-repeat; -} - -.mn-view-thumbnail { - background-image: url(../images/default/mv-thumbnail.png) !important; - background-repeat: no-repeat; -} - -.mn-login { - background-image: url(../images/default/user_go.png) !important; -} - -.mn-logout { - background-image: url(../images/default/door_out.png) !important; -} - -.mn-clear { - background-image: url(../images/default/cross.png) !important; -} - -.search-item { - font-weight: normal !important; - line-height: 1.5em; -} - -.search-item span { - text-decoration: underline; -} -/* TagCloud styles */ -ul li.tag-cloud { - border-top: 1px solid transparent; - text-align: center; - padding: 1px; - margin: 2px; - display: inline-block; - /* - height:200px; - width:200px; - */ -} - -ul li.tag-cloud-hover { - -moz-border-radius: 4px 4px 4px 4px; - background-color: rgba(10, 10, 10, 0.15); - border-top: 1px solid rgba(0, 0, 0, 0.15); -} - -li.tag-cloud-0 { - font-size: xx-small !important -} - -li.tag-cloud-1 { - font-size: x-small !important -} - -li.tag-cloud-2 { - font-size: smaller !important -} - -li.tag-cloud-3 { - font-size: small !important -} - -li.tag-cloud-4 { - font-size: medium !important -} - -li.tag-cloud-5 { - font-size: large !important -} - -li.tag-cloud-6 { - font-size: large !important; - font-weight: bold !important; -} - -li.tag-cloud-7 { - font-size: large !important; - font-weight: bold !important; -} -/* Image in combo box */ -.x-combo-list-item img { - max-width: 20px; - max-height: 20px; - vertical-align: middle; - margin-right: 3px; -} - -.connectIcon { - background-image: url(../images/default/connect.png) !important; -} - -.zoomin { - background-image: url(../images/default/icon_zoomin.png) !important; - height: 20px !important; - width: 20px !important; -} - -.zoomout { - background-image: url(../images/default/icon_zoomout.png) !important; - height: 20px !important; - width: 20px !important; -} - -.zoomfull { - background-image: url(../images/default/icon_zoomfull.png) !important; - height: 20px !important; - width: 20px !important; -} - -.pan { - background-image: url(../images/default/icon_pan.png) !important; - height: 20px !important; - width: 20px !important; -} - -div.help .title { - font-size: 120%; - font-weight: bold; -} - -div.help div { - margin-top: 3px; -} - -div.help span { - font-style: italic; -} - -div.help ul li { - list-style-type: circle !important; - margin-left: 10px !important; -} - -.badge { - padding: 1px 9px 2px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; -} - -.label-warning,.badge-warning,.badge-error { - background-color: #F89406; -} - -.label-success,.badge-success { - background-color: #468847; -} - -.validation * h2,.validation * div { - white-space: normal !important; -} - -.x-superboxselect-item img { - max-height: 16px; - vertical-align: middle; -} - -#metadata-info * { - font: 12px; -} - -#metadata-info .x-toolbar { - background: none !important; - background-color: white !important; -} - -#metadata-info .x-layout-collapsed { - background-color: #F6D4B1 !important; -} - -#metadata-info .x-layout-split,#metadata-info .x-layout-collapsed-over { - background-color: #E26F02 !important; -} - -#metadata-info .title { - color: #069; -} - -/* cookie message */ -#cookie-warning .label { - background: none; - text-shadow: none; - color: #333; - font-size: 14px; -} - -#cookie-warning input { - border: 1px solid #666; - border-radius: 2px; - padding: 5px 10px 5px 10px; - background-color: #ccc; - color: #333; -} -/* bread crumbs */ -#bread-crumb-app { - margin-left: 20px; -} -/* welcome in left sidebar */ -#welcome-text { - margin: 20px 20px 10px 10px; -} -/* cloud tag */ -#cloud-tag ul { - padding-left: 15px -} - -#cloud-tag ul li.tag-cloud { - border-top: none; -} - -#cloud-tag ul li.tag-cloud a { - background-color: #FEEDDD; - color: #565B5E; - padding: 3px; - text-decoration: none; -} - -#cloud-tag ul li.tag-cloud-hover { - background: none; -} - -#cloud-tag ul li.tag-cloud-hover a { - color: #333; - background-color: #F6D4B1; -} -/* search form + advanced search */ -#advanced-search-options .x-panel-body { - clear: both; - background: none; -} - -#show-advanced,#hide-advanced { - margin: 0; - padding: 5px 30px 5px 10px; - background-position: right 50%; - white-space: nowrap; -} - -#advanced-search-options #hide-advanced { - margin: 0; - padding: 5px 30px 5px 10px; - border-left: 1px solid #e5e5e5; - border-bottom: 1px solid #e5e5e5; - background-position: right 50%; -} - -/* thumbnails */ -#latest-metadata .md-view * div.thumbnail img,#popular-metadata .md-view * div.thumbnail img - { - border: 1px solid #e5e5e5; - background: #fff; - height: auto; - height: 140px; - width: 154px; - min-height: 140px; - padding: 1px; - vertical-align: bottom; -} - -#latest-metadata header h1,#popular-metadata header h1 { - font-size: 14px; - font-weight: bold; - line-height: 1.2em; - margin-bottom: 0.2em; - margin-top: 0; - margin-bottom: 0.2em; -} - -/* first thumbnial container */ -#latest-metadata { - margin-top: 20px; - padding-top: 10px; -} - -#latest-metadata ul { - padding-top: 0px; -} - -#latest-metadata .md-thumbnail { - margin: 0px 10px 10px 0px; - padding: 5px; - border: 1px solid #fff; -} - -#latest-metadata .md-thumbnail h1 { - margin: 0; - height: 70px; -} - -#latest-metadata .md-thumbnail h1 a { - font-size: 13px; -} - -#latest-metadata .md-thumbnail.md-over { - border: 1px solid #e5e5e5; - background: url(../images/default/bg_stripe.png) !important; -} -/* second thumbnial container */ -#popular-metadata .md-thumbnail { - margin: 0px 10px 10px 0px; - padding: 5px; - border: 1px solid #fff; -} - -#popular-metadata .md-thumbnail h1 { - margin: 0; - height: 70px; -} - -#popular-metadata .md-thumbnail h1 a { - font-size: 13px; -} - -#popular-metadata .md-thumbnail.md-over { - border: 1px solid #e5e5e5; - background: url(../images/default/bg_stripe.png) !important; -} - -/* search result --- left sidebar */ -#search-container .main-aside header { - padding: 4px 6px 4px 6px; - text-transform: uppercase; - font-size: 14px; -} - -#search-container .main-aside { - margin: 10px 10px 10px 20px; -} - -#search-container .main-aside a { - color: #0076A1; -} - -#search-container .main-aside a:hover { - text-decoration: underline; - color: #959532 -} - -#search-container div.facets>ul>li { - border-top: none; -} - -/* search result --- list + right sidebar */ -#resultsPanel { - -} -/* search result --- list header */ -div#resultsPanel .x-toolbar { - border: none; - margin: 0; - padding: 0; -} /* -div#resultsPanel .x-toolbar-ct { - padding: 0px 6px 1px 6px; -}*/ -div#resultsPanel .x-toolbar-left { - padding-left: 5px; - padding-bottom: 1px; -} - -div#resultsPanel .x-toolbar-right { - padding-right: 5px; - padding-bottom: 1px; -} -/* search result --- list items */ -#resultsPanel .md-simple,#resultsPanel .md-full,#resultsPanel .md-thumbnail - { - border: 1px solid #e5e5e5; - margin: 0px 0px 3px 0px; - padding: 5px; -} - -#resultsPanel .md-over { - background: url(../images/default/bg_stripe.png) !important; -} - -#resultsPanel .md-simple input[type="checkbox"],#resultsPanel .md-full input[type="checkbox"],#resultsPanel .md-thumbnail input[type="checkbox"] - { - margin-right: 5px; -} - -#resultsPanel .abstract { - margin-top: 10px; - font-size: 14px; - line-height: 1.4em; - color: #3333; - padding-right: 10px; -} - -#resultsPanel .subject { - margin-top: 5px; - margin-bottom: 5px; - font-size: 13px; - line-height: 1.4em; - color: #393939; - padding-right: 10px; - text-transform: capitalize; -} -/* search result --- list items --- full */ -#resultsPanel .md-full { - padding: 0; -} - -#resultsPanel .md-full table { - margin-bottom: 5px; - width: auto; -} - -#resultsPanel .md-full td { - padding: 5px; -} - -#resultsPanel .md-full .icon { - width: 400px; -} - -#resultsPanel .md-full .icon div { - float: left -} - -#resultsPanel .md-full .icon .md-links { - margin: 0px 0px 0px 4px; -} - -#resultsPanel .md-full .icon .md-links table { - float: left; -} - -#resultsPanel .md-full .thumb { - margin-top: 5px; - padding: 0px; -} - -#resultsPanel .md-full .rating { - padding: 4px; - border-top: 1px solid #e5e5e5; - margin-top: 5px; - background: #fff; - width: 192px; - border-left: 1px solid #e5e5e5; - border-right: 1px solid #e5e5e5; -} - -#resultsPanel .md-full .thumbnail { - min-height: 140px; - width: 192px; - border-left: 1px solid #e5e5e5; - border-right: 1px solid #e5e5e5; - background: #fff; - text-align: right; - padding: 4px; - border-top: 1px solid #e5e5e5; -} - -#resultsPanel .md-full .md-contact { - border-right: 1px solid #e5e5e5; - padding: 5px; - background: #fff; - border-left: 1px solid #e5e5e5; - border-bottom: 1px solid #e5e5e5; - font-size: 12px; -} - -#resultsPanel .md-full .md-contact span { - font-style: normal; -} -/* search result --- list items --- thumb */ -#resultsPanel .md-thumbnail { - margin: 5px; -} - -#resultsPanel .md-thumbnail .md-contact { - width: 100%; - text-align: left; -} -/* search result --- list items --- simple */ -#resultsPanel .md-simple table { - margin-top: 5px; - margin-bottom: 5px; -} - -#resultsPanel .md-simple .bookmark-icon { - float: left; - padding: 4px; -} - -#resultsPanel .md-simple .md-links { - margin: 0px 0px 0px 4px; - float: left; -} -/* search result --- right sidebar */ -#search-container #secondary-aside { - margin-left: 3px; - padding-top: 0px -} - -#search-container #secondary-aside .x-panel-header { - border: none; - padding: 7px 6px 7px 6px; - text-transform: uppercase; - font-weight: bolder; - font-size: 14px; -} - -#recent-viewed-div h1 { - padding-left: 0px; - padding: 0; -} - -#recent-viewed span { /* Theoretically for IE 8 & 9 (more valid) */ - /* ...but not required as filter works too */ - /* should come BEFORE filter */ - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; - /* This works in IE 8 & 9 too */ - /* ... but also 5, 6, 7 */ - filter: alpha(opacity = 50); - /* Older than Firefox 0.9 */ - -moz-opacity: 0.5; - /* Safari 1.x (pre WebKit!) */ - -khtml-opacity: 0.5; - /* Modern! - /* Firefox 0.9+, Safari 2?, Chrome any? - /* Opera 9+, IE 9+ */ - opacity: 0.5; -} -/* big map */ - -/* opener is assuming the minimap is 200px wide */ -div.showBigMapItemInactive { - background: url("../images/sprites/sprite_resize_map.gif") 0px 0px - no-repeat; - height: 26px; - margin-left: 166px; - margin-top: 5px; - width: 26px; - cursor: pointer; -} - -div.showBigMapItemInactive:hover { - background: url("../images/sprites/sprite_resize_map.gif") 0px -26px - no-repeat; -} - -#big-map-container { - margin: 30px 20px 20px 20px; -} - -#big-map-container .x-border-layout-ct { - background-color: #fff; - border: none; -} - -#big-map-container .x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-color: #E26F02; - background-color: #E26F02; - padding: 0; -} - -#big-map-container .x-toolbar-left { - padding: 3px 0px 3px 5px; - width: 80%; -} - -#big-map-container .x-toolbar-right { - padding: 3px 15px 3px 0px; - width: 20%; -} - -#big-map-container .x-toolbar-right table { - float: left; -} - -/* metadata */ -#metadata-info { - margin: 30px 20px 20px 20px; -} - -#metadata-info a { - color: #0076A1; -} - -.metadata * label { - color: #444444; -} -/* --- metadata toolbar left */ -#metadata-info .x-toolbar-left .x-toolbar-cell { - padding: 4px; - border-right: 1px solid #e5e5e5; -} -/* --- metadata toolbar right */ -#metadata-info .x-toolbar-right .x-toolbar-cell { - padding: 4px; -} - -#metadata-info .x-toolbar-right .x-toolbar-cell:hover { - background-color: #e5e5e5; -} -/* --- metadata tabs */ -#metadata-info #tabs { - -} - -#metadata-info #tabs ul { - padding-left: 0; - /*padding-bottom: 25px;*/ - margin: 0; -} - -#metadata-info #tabs ul li ul { - border-bottom: 1px solid #ccc; -} - -#metadata-info #tabs ul li ul li { - border: 1px solid #ccc; - padding: 3px 5px 3px 5px; - margin-right: 5px; - background: #efefef; -} - -#metadata-info #tabs ul li ul li.active { - border-bottom: 1px solid #fff; - background: #fff; - padding: 3px 5px 3px 5px; -} - -#metadata-info #tabs ul li ul li a { - background: none; - padding: 0; - margin: 0; -} - -/* --- metadata table */ -#metadata-info legend,#metadata-info .title { - color: #333; - font-weight: bold; - padding: 10px 0px 10px 0px; -} - -#metadata-info fieldset .gn { /*border-top: 1px solid #e5e5e5;*/ - clear: both; -} - -#metadata-info .gn .main { - background-color: #fff; - /* border-right: 1px solid #e5e5e5; */ - color: #333; -} - -#metadata-info .gn .el { - color: #999; - padding: 0px 0px 4px 0px; - line-height: 1.4em; -} - -#metadata-info .gn th,#metadata-info .gn td { - border-top: 0; - /* border-bottom: 1px solid #e5e5e5; */ - padding: 5px 0 5px 5px; -} - -#metadata-info .gn td td th,#metadata-info .gn td td td { - border-bottom: 0; -} - -#metadata-info .col { - padding: 15px; - background: #F7F7F7; -} - -#metadata-info .col .gn th,#metadata-info .col .gn td { - border-top: 1px solid #e5e5e5; -} -/* map */ -#metadata-info .center { - border-left: 1px solid #e5e5e5; - border-right: 1px solid #e5e5e5; -} - -#metadata-info .map { - background: #F7F7F7; - padding: 10px; - border: 1px solid #e5e5e5; -} - -#metadata-info .map th,#metadata-info .map td { - border-bottom: 0; -} -/* --- metadata table - related */ -#metadata-info .related span.icon { - display: none; -} - -#metadata-info .related .main { - border-right: 0; - width: 1px; - padding: 0; -} - -#metadata-info .related td { - border: 0; -} - -#metadata-info .related { - border-bottom: 1px solid #e5e5e5; -} - -#metadata-info .related ul { - margin: 0 0 10px 0; - padding: 0 0 10px 0; -} - -#metadata-info .related li { - width: auto; - margin: 0px 5px 5px 0px; - padding: 4px; - background-color: #FEEDDD; - color: #565B5E; -} - -#metadata-info .related li a { - text-decoration: none; -} - -#metadata-info .related li a:hover { - color: #333; -} -/* --- medtadata edit */ -#metadata-info #editorPanel th { - border-bottom: 0; - border-top: 0; - padding: 3px; -} - -#metadata-info #editorPanel td { - border: 0; - background-color: white !important; - padding: 3px; -} - -#metadata-info #editorPanel .buttons a.del span { - background-image: url("../../images/default/minus-white.png"); -} - -#metadata-info #editorPanel .buttons a.add span { - background-image: url("../../images/default/add.png"); -} - -#metadata-info #editorPanel span.buttons a.small span { - background-repeat: no-repeat; - height: 16px !important; - margin: 1px; - padding: 3px 6px 3px 6px; - width: 16px !important; -} - - -.validatePanel * .x-grid3-cell-inner { - white-space: normal !important; -} - - -.relation-type { - text-transform: uppercase; - margin-left: 3px; -} - -.linkPanel * h2 { - width: 100%; - border-bottom: 1px solid #B3D4E6; -} -.linkPanel * ul { - list-style: circle; - padding-left: 16px; -} -.linkPanel * h2 span { - float: right; -} -.linkPanel * .x-btn-tl, .linkPanel * .x-btn-tr, -.linkPanel * .x-btn-tc, .linkPanel * .x-btn-ml, -.linkPanel * .x-btn-mr, .linkPanel * .x-btn-mc, -.linkPanel * .x-btn-bl, .linkPanel * .x-btn-br, -.linkPanel * .x-btn-bc { - background: none; -} -.linkPanel * .x-btn-noicon .x-btn-small .x-btn-text { - border-bottom: 1px black solid; -} - -ul.gn-relation-thumbnail { - overflow: hidden; -} - -.gn-relation-thumbnail li { - list-style-type: none; - float: left; - width: 50%; - max-width: 120px; - height: 100px; - text-align: center; - position: relative; -} -.gn-relation-thumbnail li span { - position: absolute; - bottom: 0px; - right: 2px; -} -.gn-relation-thumbnail li .lightBox { - position: absolute; - top: 0px; - right: 2px; - height: 18px; -} -.suggestionPanel ul { - padding: 0px; -} - - - - -/* admin */ -.user-button a { - padding-top: 0px; - padding-left: 25px; -} - -a#administration_button { - background-position: 0 -17px -} - -#metadata-panel .x-btn-over .book,#metadata-panel .x-btn-pressed .book { - background-position: 0px 0px; -} - -/** What search */ -#what_adv_search .x-form-item { - margin-bottom: 7px; - margin-top: 9px; -} - -#what_adv_search .x-fieldset { - margin-bottom: 7px; - margin-top: 43px; -} - -/* mozilla, make text selectable in grids */ -.x-grid3-row td,.x-grid3-summary-row td,.x-grid3-cell-text,.x-grid3-hd-text,.x-grid3-hd,.x-grid3-row - { - -moz-user-select: true; - -khtml-user-select: text; -} - -/* white text on orange toolbars */ -#resultsPanel div.x-panel-tbar td,#resultsPanel div.x-panel-tbar button - { - color: white; -} diff --git a/web-client/src/main/resources/apps/html5ui/css/hidemap.css b/web-client/src/main/resources/apps/html5ui/css/hidemap.css deleted file mode 100644 index 8adf6b00614..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/hidemap.css +++ /dev/null @@ -1,7 +0,0 @@ -.md-mn-kml { - display: none; -} - -.addLayer { - display: none; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/css/ltie7.css b/web-client/src/main/resources/apps/html5ui/css/ltie7.css deleted file mode 100644 index f908c1ca17b..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/ltie7.css +++ /dev/null @@ -1,3 +0,0 @@ -#container { - height:100%; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/css/main.css b/web-client/src/main/resources/apps/html5ui/css/main.css deleted file mode 100644 index f6fe319a409..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/main.css +++ /dev/null @@ -1,1645 +0,0 @@ - -/** Fonts **/ -@font-face { - font-family:'OpenSans'; - src: url('fonts/Open_Sans/OpenSans-Regular.ttf') format('truetype'), - url('fonts/Open_Sans/OpenSans-Regular.eot') format('embedded-opentype'); -} - -/* to keep footer down -- from http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page */ -html,body { - margin: 0; - padding: 0; - height: 100%; - font-family: OpenSans; -} - -/** Overriding fonts from gnmetadataview.css **/ -div#page-container #metadata-info * , div#page-container div#latest-metadata header h1, div#page-container div#popular-metadata header h1 { - font-family: OpenSans; -} - -/** General settings **/ - -#container { - min-height: 100%; - position: relative; -} - -#main { - padding: 3px; - padding-bottom: 150px; /* height of the footer */ - margin-left: 15%; - margin-right: 15%; -} - -#footer { - position: absolute; - bottom: 0; - width: 100%; - height: 150px; /* height of the footer */ - background-image: url('../images/map_header.png'); - background-color: #636363; -} - -/* Footer Links */ -#footer ul { - margin: 0.25em 0; - padding: 0 1em; - list-style: none; -} - -#footer li { - display: inline; - padding: 0 0.2em 0 0.5em; -} - -#footer ul li a { - text-decoration: none; - font-weight: bold; -} - -/* end of stuff to keep the footer down */ -html,body,button,input,select,textarea { - font-size: 1em; - line-height: 1.4; -} - -::-moz-selection { - background: #b3d4fc; - text-shadow: none; -} - -::selection { - background: #b3d4fc; - text-shadow: none; -} - -hr { - display: block; - height: 1px; - border: 0; - border-top: 1px solid #ccc; - margin: 1em 0; - padding: 0; -} - -img { - vertical-align: middle; -} - -fieldset { - border: 0; - margin: 0; - padding: 0; -} - -textarea { - resize: vertical; -} - -.chromeframe { - margin: 0.2em 0; - background: #ccc; - padding: 0.2em 0; -} - -body { - min-width: 900px; -} - -#map { - width: 100%; - height: 100%; -} - -.metadata_map { - margin: 1%; - float: left; - width: 22%; - height: 400px; -} - -.metadata_data { - float: left; - width: 75%; -} - -#big-map .hideBigMapPanel { - background: url("../images/sprites/sprite_resize_map.gif") -30px -5px - no-repeat; -} - -#big-map .hideBigMapPanel:hover { - background: url("../images/sprites/sprite_resize_map.gif") -31px -30px - no-repeat; -} - -#big-map .x-layout-mini,#editorPanel .x-layout-mini { - height: 50px; - width: 9px; - background-size: 100% 100%; -} - -#header header { - width: 100%; -} - -#header { - border-bottom: 10px solid; - background-image: url('../images/map_header.png'); - box-shadow: none; - border-top: 6px solid; -} - -#logo { - background-position: center top; - background-repeat: no-repeat; - background-image: url('../images/banner_logo.png'); - width: 100%; - height: 55px; - margin-top: 20px; -} - -.main-aside { - margin: 10px; - float: left; - width: 18%; -} - -#welcome-text { - font-weight: bold; - margin: 13px; - margin-left: 30px; - font: Serif; - font-size: 16px; - text-align: center; -} - -#secondary-aside { - float: right; - width: 200px; - padding: 2px; - position: relative; -} - -#lang-form div { - display: inline; - padding-right: 7px; -} - -#lang-form div div form { - background: transparent; - border: none; -} - -#lang-form div div form div input { - background: transparent; - border: none; - text-align: right; -} - -#lang-form div div form div img { - text-align: right; -} - -#bread-crumb-app { - font-weight: bolder; - font-size: smaller; - margin-left: 40px; - margin-top: 8px; -} - -/* ============== - MOBILE: Menu - ============== */ -nav ul { - margin: 0; - padding: 0; - margin-left: 50px; -} - -nav a { - text-align: center; - text-decoration: none; - font-weight: bold; - float: left; - padding: 4px 2%; - margin-bottom: 0; - margin: 0 3px; -} - -nav a:hover { - text-decoration: bolder; -} - -/* ============== - MOBILE: Main - ============== */ -.main { - padding: 0; -} - -.main article h1 { - font-size: 2em; -} - -#foot-loads { - padding: 50px; - width: 650px; -} - -#page-container { - width: 100%; -} - -.grey { - margin-top: 5px; - margin-bottom: 5px; -} - -.black,.black a { - margin-top: 5px; - margin-bottom: 5px; - text-decoration: none; -} - -form { - display: inline; -} - -#search-form { - background-color: #F3F4EF; - border: 5px solid #F3F4EF; - border-radius: 3px; -} - -#search-form .form-dummy * { - float: none; - padding: 4px; - display: inline; -} - -#search-form .form-dummy span { - padding-right: 25px; -} - -#search-form .form-dummy div { - margin: 0px; - padding: 0px; -} - -#search-form .form-dummy div input { - border: none; -} - -input#search-submit.hover { - background-position-y: -35px; - background-position: 0px -35px; -} - -.form-dummy { - display: inline; -} - -nav { - display: block; -} - -#printer-button,#rss-button,#lang-form,#sitemap-button,#feedback-site-button - { - display: inline; - padding-right: 5px; - text-decoration: none; - background-position: 3 3; - background-position-x: 3px; - background-position-y: 3px; - background-repeat: no-repeat; - padding-left: 15px; -} - -#printer-button { - background-image: url('../images/default/print_top.gif'); -} - -#rss-button { - background-image: url('../images/default/rss_top.gif'); -} - -#feedback-site-button { - background-image: url('../images/default/comment_top.gif'); -} - -#lang-form,#sitemap-button,#contact-button { - float: left; -} - -#cloud-tag { - width: 550px; - min-height: 150px; - position: absolute; - z-index: 4000; - background-color: #EDEDEB; - border-bottom: 1px solid #A6A6A5; - border-right: 1px solid #A6A6A5; - border-left: 1px solid #F6F6F4; - border-top: 1px solid #F6F6F4; -} - -#tag-cloud-button { - text-decoration: none; - text-transform: uppercase; - color: white; - background-image: url('../images/sprites/spritetags.png'); - width: 75px; - height: 31px; - display: inline-block; - background-position-y: -31px; - background-position: 0px -31px; - font-weight: bold; - background-repeat: no-repeat; - padding-left: 30px; - padding-top: 5px; -} - -#tag-cloud-button:hover { - background-position-y: 5px; - background-position: 0px 5px; - color: #3794DA; -} - -#browser #cloud-tag .tag-cloud a { - background-color: transparent; - color: #3794DA; - padding: 3px; - text-decoration: none; - font-weight: bold; -} - -#browser #cloud-tag .tag-cloud { - background-color: transparent; - padding: 3px; - color: #565B5E; - width: 47%; - display: inline-block; -} - -/* =============== - Left aside sidebar - =============== */ -aside#main-aside header { - padding-top: 6px; - font-weight: bolder; - font-size: larger; -} - -aside#main-aside ul { - list-style-type: none; -} -/* ============== - MENU: Icons for the menu - ============== */ -ul#main-buttons { - float: right; - margin: 0px; -} - -ul#main-buttons li { - list-style-type: none; - margin: 0px; - float: left; -} - -img.menu_icon { - width: 40px; -} - -/* =============== - ALL: IE Fixes - =============== */ -.ie7 .title { - padding-top: 20px; -} - -/*===================== - Override ExtJS - =======================*/ -.x-panel-header { - background-image: none; -} - -div#tabs .x-tab-panel-body { - border: none; -} - -div#resultsPanel * div.x-panel-tbar { - padding-top: 0px; - height: 29px; - border: none !important; -} - -div#resultsPanel * div.x-panel-tbar>div { - border: none !important; -} - -#layerManager-accordion .x-panel-btns { - padding: 5px; - overflow: initial; -} - -div#resultsPanel .x-panel-bbar div { - border: none !important; - background: none; -} - -div#resultsPanel table.x-toolbar-ct { - height: 29px !important; -} - -div#advSearchTabs div.x-panel.x-form-label-left.x-box-item { - width: 32%; -} - -div#advSearchTabs ul { - padding: 0 0 0 0; - margin: 0 0 0 0; -} - -div#advSearchTabs input { - border: none; -} - -div#tabs ul.x-tab-strip-top { - background-image: none; - margin: 0 0 0 0; - border: none; -} - -div#tabs .x-tab-strip-top .x-tab-right,div#tabs .x-tab-strip-top .x-tab-left,div#tabs .x-tab-strip-top .x-tab-strip-inner - { - background-image: none; -} - -div#tabs .x-tab-strip-active .x-tab-right,div#tabs .x-tab-strip-active .x-tab-left,div#tabs .x-tab-strip-active .x-tab-strip-inner - { - margin-top: 1px; - border-top-left-radius: 2px; - border-top-right-radius: 2px; - padding-top: 1px; -} - -div#tabs { - margin-top: 11px; -} - -div#tabs .x-tab-strip-active .x-tab-right { - box-shadow: 1px 1px 10px 1px; - border-top: solid 3px; -} - -div#tabs .x-tab-strip span.x-tab-strip-text { - font-size: 16px; -} - -div#tabs ul.x-tab-strip-top { - padding: 0 0 0 40px; -} - -div#tabs .x-tab-panel-header { - padding: 0; - border: none; -} - -div#tabs ul.x-tab-strip li { - margin-left: 12px; -} - -/* ========================================================================== - Author's custom styles - ========================================================================== */ - -/* ========================================================================== - Media Queries - ========================================================================== */ -nav li a { - margin-right: 20px; - padding-left: 17px; - padding-right: 17px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} - -nav li:first-child a { - margin-left: 0; -} - -nav li:last-child a { - margin-right: 0; -} - -#footer { - text-align: right; -} - -#footer ul li { - padding: 0px 20px; -} - -#search-form { - clear: both; - float: none; - margin: 5px 20px 0px; -} - -#legend-search { - display: none; - padding: 0px 20px; -} - -#search-form input { - float: left; - margin: 0; - border: solid 1px; - font-weight: bolder; -} - -#search-form input#E_any { - height: 35px; -} - -#search-submit { - left: 0; - margin: 0 0 0 -1px; - font-size: 1em; - padding: 1px; - position: relative; - border: 1px solid; - xfont-weight: bold; - width: 35px; - height: 35px; - background: url('../images/ico_find.png') no-repeat; - cursor: pointer; -} - -#search-form-fieldset #show-advanced,#search-form-fieldset #hide-advanced - { - cursor: pointer; - display: inline-block; - padding-right: 15px; - padding-left: 15px; - padding-top: 5px; - padding-bottom: 5px; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - float: right; -} - -#search-form-fieldset span.button { - background-image: - url('../images/sprites/asprite_dvanced_search_arrows.png'); - background-repeat: no-repeat; - background-position-y: 0px; - background-position-x: 0px; - background-position: 0px 0px; width : 18px; - height: 20px; - display: inline-block; - width: 18px; -} - -#search-form-fieldset #hide-advanced span.button { - background-position-y: -20px; - background-position: 0px -20px; -} - -#advanced-search-options { - min-height: 200px; - width: 100%; - float: none; - clear: both; -} - -/* ======================== - INTERMEDIATE: IE Fixes - ======================== */ -nav ul li,#footer ul li { - display: inline; -} - -.oldie nav a { - margin: 0 0.7%; -} -/* ============ -WIDE: CSS3 Effects - ==================== * / - /* ============ - WIDE: Menu - ============ */ -.title { - float: left; -} - -nav { - margin-left: 15%; - margin-right: 15%; - font-size: 14px; - font-weight: bold; - xclear: both; - float: left; -} - -/* ============ - WIDE: Main - ============ */ -.main article { - width: 100%; - margin: 9px; -} - -.main article#map { - float: left; - width: 100%; - height: 800px; - margin: 9px; -} - -/* ========================================================================== - Helper classes - ========================================================================== */ -.ir { - border: 0; - overflow: hidden; - *text-indent: -9999px; -} - -.ir:before { - content: ""; - display: block; - width: 0; - height: 100%; -} - -.hidden { - display: none !important; - visibility: hidden; -} - -.visuallyhidden { - border: 0; - clip: rect(0, 0, 0, 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} - -.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus { - clip: auto; - height: auto; - margin: 0; - overflow: visible; - position: static; - width: auto; -} - -.invisible { - visibility: hidden; -} - -.clearfix:before,.clearfix:after { - content: " "; - display: table; -} - -.clearfix:after { - clear: both; -} - -.clearfix { - *zoom: 1; -} - -/* ========================================================================== - Print styles - ========================================================================== */ -@media print { - * { - background: transparent !important; - color: #000 !important; /* Black prints faster: h5bp.com/s */ - box-shadow: none !important; - text-shadow: none !important; - } - a,a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - - /* - * Don't show links for images, or javascript/internal links - */ - .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after { - content: ""; - } - pre,blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; /* h5bp.com/t */ - } - tr,img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - @page { - margin: 0.5cm; - } - p,h2,h3 { - orphans: 3; - widows: 3; - } - h2,h3 { - page-break-after: avoid; - } -} - -#toctree ul.x-tree-root-ct.x-tree-no-lines { - overflow: scroll; - height: inherit; -} - -/* Icon based on protocol prefix in related resource table */ -#result-panel div#resultsPanel .WWWLINK { - background-image: url(../../images/default/link.png); -} - -#result-panel div#resultsPanel .WWWDOWNLOAD { - background-image: url(../../images/default/database_yellow.png); -} - -#result-panel div#resultsPanel .OGCWMS { - background-image: url(../../images/default/map/server_picture.png); -} - -#result-panel div#resultsPanel .OGCWFS { - background-image: url(../../images/default/map/server_vector.png); -} - -/* Other icons */ -.md-mn-reset { - background-image: url(../../images/default/cross.png); -} - -#result-panel div#resultsPanel .md-mn-kml { - background-image: url(../../images/default/google-earth-link.png); -} - -#result-panel div#resultsPanel .md-mn-www { - background-image: url(../../images/default/link.png); -} - -#result-panel div#resultsPanel .xmlIcon { - background-image: url(../../images/default/page_code.png); -} - -#result-panel div#resultsPanel .addIcon { - background-image: url(../../images/default/add.png) !important; -} - -.privIcon { - background-image: url(../../images/default/group_key.png) !important; -} - -#result-panel div#resultsPanel .downloadAllIcon { - background-image: url(../../images/default/folder_page_white.png) - !important; -} - -.searchIcon { - background-image: url(../../images/default/find.png) !important; -} - -.shortcutHelpIcon { - background-image: url(../../images/default/schematron.gif) !important; -} - -.viewModeIcon { - background-image: url(../../images/default/application_view_tile.png) - !important; -} - -.linkIcon { - background-image: url(../../images/default/link.png) !important; -} - -.addVector { - background-image: url(../../images/default/vector_add.png) !important; -} - -.delVector { - background-image: url(../../images/default/vector_delete.png) !important; -} - -.connect { - background-image: url(../../images/default/connect.png) !important; -} - -.subtemplateIcon { - background-image: url(../../images/default/report_magnify.png) - !important; -} - -.processMetadata { - background-image: url(../../images/default/table_gear.png) !important; -} - -.repository { - background-image: url(../../images/default/database_yellow.png) - !important; - background-repeat: no-repeat; - padding-left: 15px; -} - -.addLayerIcon,.addLayer { - background-image: url(../../html5ui/img/icon_show_map.png) !important; -} - -.bookmark-icon,.checkWMS,.checkWFS { - padding: 0px; - border: none; - margin-top: 3px; -} - -.validStatus { - float: left; -} - -.otherLicenses,.validStatus { - margin-top: 3px; -} - -span.license { - background-image: url(../../html5ui/img/icon_gebruiksvoorwaarden.png) - !important; - background-repeat: no-repeat; - padding-left: 20px; - height: 28px; -} - -.deleteLayer { - background-image: url(../../images/default/map/delete_layer.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.measure { - background-image: url(../../images/default/map/icon_measure.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.zoomin { - background-image: url(../../images/default/map/icon_zoomin.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.zoomout { - background-image: url(../../images/default/map/icon_zoomout.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.zoomfull { - background-image: url(../../images/default/map/icon_zoomfull.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.zoomlayer { - background-image: url(../../images/default/map/icon_zoomlayer.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.pan { - background-image: url(../../images/default/map/icon_pan.png) !important; - height: 20px !important; - width: 20px !important; -} - -.selextent { - background-image: url(../../images/default/map/icon_selextent.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.query { - background-image: url(../../images/default/map/icon_featureinfo.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.next { - background-image: url(../../images/default/map/resultset_next.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.back { - background-image: url(../../images/default/map/resultset_previous.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.savewmc { - background-image: url(../../images/default/map/icon_savewmc.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.wmsTime { - background-image: url(../../images/default/map/wmstime.gif) !important; - height: 20px !important; - width: 20px !important; -} - -.layerStyles { - background-image: url(../../images/default/map/layerstyles.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.layerOpacity { - background-image: url(../../images/default/map/opacity.png) !important; - height: 20px !important; - width: 20px !important; -} - -.wmsInfo { - background-image: url(../../images/default/map/wmsinfo.png) !important; - height: 20px !important; - width: 20px !important; -} - -.olControlLoadingPanel { - background-image: url(../../images/default/map/indicator_medium.gif); - background-position: center; - background-repeat: no-repeat; -} - -.loadwmc { - background-image: url(../../images/default/map/icon_loadwmc.png) - !important; - height: 20px !important; - width: 20px !important; -} - -.selectfile { - background: url(../../images/default/map/icon_selectfile.png) no-repeat - 0 0 !important; -} - -.styler { - background-image: url(../../images/default/map/layerstyles.png) - !important; -} - -.drawPolygon { - background-image: url(../../images/default/map/draw_polygon_off.png) - !important; -} - -.drawCircle { - background-image: url(../../images/default/map/draw_circle_off.png) - !important; -} - -.drawRectangle { - background-image: url(../../images/default/map/draw_rectangle_off.png) - !important; -} - -.clearPolygon { - background-image: - url(../../images/default/map/draw_polygon_clear_off.png) !important; -} - -.md-mn-view { - background-image: url(../images/default/page_go.png) !important; -} - -.md-mn-edit { - background-image: url(../images/default/page_edit.png) !important; -} - -.md-mn-del { - background-image: url(../images/default/page_delete.png) !important; -} - -.md-mn-copy { - background-image: url(../images/default/page_copy.png) !important; -} - -.md-mn-find { - background-image: url(../images/default/find.png) !important; -} - -.md-mn-go { - background-image: url(../images/default/bullet_go.png) !important; -} - -.md-mn-advanced { - background-image: url(../images/default/cog.png) !important; -} - -.md-mn-user { - background-image: url(../images/default/user.png) !important; -} - -.md-mn-pdf { - background-image: url(../images/default/page_white_acrobat.png) - !important; -} - -.md-mn-badd { - background-image: url(../images/default/brick_add.png) !important; -} - -.md-mn-zip { - background-image: url(../images/default/page_white_zip.png) !important; -} - -.md-mn-ftp { - background-image: url(../images/default/folder.png) !important; -} - -.md-mn-ftps { - background-image: url(../images/default/folder_key.png) !important; -} - -.md-mn-download,.download { - background-image: url(../../html5ui/img/icon_download_dataset.png) - !important; - width: 24px !important; - height: 24px !important; -} - -.mn-user-location { - background-image: url(../images/default/user_location.png) !important; -} - -.mn-view-simple { - background-image: url(../images/default/mv-simple.png) !important; - background-repeat: no-repeat; -} - -.mn-view-full { - background-image: url(../images/default/mv-full.png) !important; - background-repeat: no-repeat; -} - -.mn-view-thumbnail { - background-image: url(../images/default/mv-thumbnail.png) !important; - background-repeat: no-repeat; -} - -.mn-login { - background-image: url(../images/default/user_go.png) !important; -} - -.mn-logout { - background-image: url(../images/default/door_out.png) !important; -} - -.mn-clear { - background-image: url(../images/default/cross.png) !important; -} - -div.facets ul { - padding: 0 0 0 2px !important; -} - -div.facets * ul,div.facets * li { - list-style: none; -} -/** - * Facet category label - */ -div.facets>ul>li { - margin: 0px; - padding: 0px; - border-top: 1px solid; - font-weight: bold; -} -/** - * Facet sub elements - */ -div.facets ul ul { - margin-left: 5px; - margin-bottom: 5px; - font-size: 85%; -} -/** - * Facet count between (number) displayed next to a facet value - */ -.facet-count { - padding-left: 3px; -} -/** - * Facet clickable link which trigger the filter action - */ -div.facets * a { - text-decoration: none; -} - -.breadcrumb * .x-btn-tl,.breadcrumb * .x-btn-tr,.breadcrumb * .x-btn-tc,.breadcrumb * .x-btn-ml,.breadcrumb * .x-btn-mr,.breadcrumb * .x-btn-mc,.breadcrumb * .x-btn-bl,.breadcrumb * .x-btn-br,.breadcrumb * .x-btn-bc - { - background: none; -} - -.breadcrumb * button { - font-weight: bold; -} - -.breadcrumb * button:hover { - text-decoration: underline; -} - -.breadcrumb-mn { - background-image: none; -} - -.breadcrumb-mn * .current-mn { - font-weight: bold; -} - -.breadcrumb-mn * a.x-menu-item { - line-height: 10px; -} - -.breadcrumb-mn * .x-menu-item-icon { - height: 10px; - width: 10px; -} - -.breadcrumb-mn * .x-menu-list { - padding: 0 0 0 0px !important; - margin: 0 0 !important; -} - -/* Login form - */ -#login-form { - position: absolute; - right: 15%; - top: 40px; - background: none; - z-index: 999; -} - -#login_div { - width: 200px; - padding: 5px; - padding-bottom: 35px; - box-shadow: 3px 3px 12px 3px grey; -} - - - -#login_div input { - max-width: 180px; -} - -#login_div #login_button { - float: right; - margin-top: 7px; - border: black 1px solid; - padding: 2px; - padding-left: 10px; - padding-right: 10px; - background: white; -} - -#login-form .x-panel-body { - background: none !important; -} - -/** Interactive link/buttons -*/ - -#metadata-panel table.x-toolbar-ct tr.x-toolbar-right-row td.x-toolbar-cell table.x-btn{ - background-image: url('../images/sprites/sprite_icons_metadadato.png'); -} - -#metadata-panel .book { - background:none; -} - -#viewpanel-feedback { - background-position: -101px 0px; - background-position-x: -101px; - background-position-y: 0px; -} - -#viewpanel-print { - background-position: -404px 0px; - background-position-x: -404px; - background-position-y: 0px; -} - -#permalink-button { - background-position: -202px 0px; - background-position-x: -202px; - background-position-y: 0px; -} - -#share-button { - background-position: -303px 0px; - background-position-x: -303px; - background-position-y: 0px; -} - -.insert-missing-elements { - background-image: url('../images/add-missing-elements.png'); -} - -#metadata-panel tr td em button.print { - padding-left: 14px; - background-position: 0 0; - background-position-x: 0px; - background-position-y: 0px; - background-repeat: repeat; -} - -.user-button a { - padding-left: 20px; - padding-top: 2px; - background-image: url('../images/icon_user.png'); - background-repeat: no-repeat; - text-decoration: none; - text-transform: uppercase; - font-weight: bolder; - font-size: 11px; - margin-right: 3px; -} - -.user-button { - float: right; - padding: 3px; - margin-right: 10%; -} - -a#administration_button { - margin-left: 2px; - /* background-image: url('../images/sprites/sprite_admin.gif'); - background-repeat: no-repeat; - background-position-y: -17px; */ -} - -a#administration_button:hover { - background-position-y: 1px; -} - -#viewpanel-feedback:hover, #viewpanel-feedback.x-btn-pressed { - background-position: -101px -39px; - background-position-y: -39px; -} - -#viewpanel-print:hover, #viewpanel-print.x-btn-pressed { - background-position: -404px -39px; - background-position-y: -39px; -} - -#viewpanel-tooltip:hover, #viewpanel-tooltip.x-btn-pressed { - background-position: 0px -39px; - background-position-y: -39px; -} - -#permalink-button:hover,#permalink-button.x-btn-pressed { - background-position: -202px -39px; - background-position-y: -39px; -} - -#share-button:hover,#share-button.x-btn-pressed { - background-position: -303px -39px; - background-position-y: -39px; -} - -#metadata-panel .x-btn-over tr td em button.print { - background-position: -404px -39px; - background-position-y: -39px; -} - -#metadata-info .title { - font-size: 20px; -} - -#metadata-panel td { - background: transparent; - height: auto; -} - -#metadata-panel .metadata.view-simple > div > table.gn > tbody > tr > td { - background-image: url('../images/pattern_hr.png'); - background-repeat: repeat-x; - background-position: center bottom; - border: none; -} -/**Metadata view */ -#metadata-panel form { - display: inline-block; -} -/** -Share social -*/ -#share-capabilities { - float: right; -} - -#permalink-div { - border: 1px solid; - border-radius: 3px; - margin: 3px; - padding: 3px; - box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2); - position: absolute; - top: 280px; - z-index: 2000; - right: 10px; -} - -a#custom-tweet-button { - padding: 2px 5px 2px 20px; - background: url('https://twitter.com/favicons/favicon.ico') 1px center - no-repeat; - border: 1px solid; - padding: 2px 5px 2px 20px; - text-decoration: none; -} - -#fb-button { - margin-top: 1px; - background-image: - url('https://s-static.ak.fbcdn.net/rsrc.php/v2/yI/x/1dQf_ATK831.png'); - background-repeat: no-repeat; - padding-left: 20px; - background-position: 2px 4px; - border: 1px solid; -} - -#fb-button a { - text-decoration: none; -} - -body * ul.x-menu-list { - margin: 0 0; -} - -.x-superboxselect-item img { - max-height: 16px; - vertical-align: middle; -} - -.validatePanel * .x-grid3-cell-inner { - white-space: normal !important; -} - -#advSearchTabs .x-box-inner { - overflow: auto; -} - -#advSearchTabs { - width: 100%; -} - -#msg-div { - position: absolute; - width: 350px; - z-index: 20000; -} - -#cookie-warning { - position: absolute; - z-index: 10000; - width: 80%; -} - -.label,.badge { - font-size: 11.844px; - font-weight: bold; - line-height: 14px; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - white-space: nowrap; - vertical-align: baseline; -} - -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 20px; - margin-right: 10px; - font-weight: normal; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - border: 1px solid; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -legend[id*="MD_Metadata"][id*="root"] span span div.alert { - display: none; -} - -.alert * h2 { - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} - -/** -tag cloud */ -ul li.tag-cloud a { - text-decoration: none; - padding: 2px; -} - -#recent-viewed .thumb-wrap { - display: inline-block; -} - -#recent-viewed span { - position: absolute; - bottom: 0px; - left: 0px; - font-size: 9px; - padding: 4px; - margin: 0px; -} - -#recent-viewed .thumb-wrap h1 { - font-size: 10px; -} - -#recent-viewed a { - text-decoration: none; -} - -#recent-viewed .thumb { - position: relative; -} - -#recent-viewed-div h1 { - font-size: 16px; - font-weight: bolder; - padding-left: 8px; -} - -#recent-viewed .thumb img { - vertical-align: middle; - margin: 1px; - width: 200px; - height: 200px; -} - -/** Startup page */ -#popular-metadata input { - display: none; -} - -#popular-metadata { - padding-left: 25px; -} - -#latest-metadata .md-thumbnail, #popular-metadata .md-thumbnail { - width: 30%; -} - -#latest-metadata .md-thumbnail .thumbnail, #popular-metadata .md-thumbnail .thumbnail { - width: 100%; -} - -#latest-metadata .thumbnail img, #popular-metadata .thumbnail img { - display:block; - margin: auto; -} - -#latest-metadata header h1,#popular-metadata header h1 { - background-image: url('../images/pattern_hr.png'); - background-repeat: repeat-x; -} - -#latest-metadata header h1 span,#popular-metadata header h1 span{ - padding:12px; - background: white; -} - -#latest-metadata input { - display: none; -} - -/** Syntax highlighting */ -.xmlattvalue { - font-weight: bold; -} - -.xmltagvalue { - font-weight: bold; -} - -.xmlns { - font-style: italic; -} - -dl.xml { - padding-left: 2px; -} - -dl.xml * dd { - padding-left: 2px; -} - -/** Metadata Menu **/ -#resultsPanel .md-action-menu a { - background-image: url("../images/metadata-menu.png"); - background-repeat: no-repeat; - visibility: visible; - padding-left: 15px; - background-position-y: 12px; - padding-top: 13px; - width: 15px; -} - -#big-map div.x-layout-cmini-east,#editorPanel div.x-layout-cmini-east { - border: 0 none; - width: 25px !important; -} - -/** Keyword window **/ -.ux-mselect-item { - font-size: 11px; -} - -/** IE specific **/ -.ext-ie #search-form .x-form-check-wrap input { - height: 22px; - width: 22px; -} - -/** What if we dont have thumbnail **/ -.emptyThumbnail { - min-height: 128px; - background: url('../images/no_thumbnail.png'); - background-repeat: no-repeat; - background-position: center; -} - - -.emptyThumbnail span { - font-size: 12px; - text-align: center; - margin: auto; - display: block; - font-weight: bold; - padding-top: 50px; - text-shadow: 1px 1px grey; -} - -.overthumb { - background-color: rgba(255,255,255,0.5); - width: inherit; - height: inherit; - display: none; - background-image: url('../images/ico_moreinformation.png'); - background-position: center center; - background-repeat: no-repeat; -} - -.md-over .overthumb { - display: block; - position: absolute; -} - -#latest-metadata header h1,#popular-metadata header h1 { - text-transform: uppercase; - font-size: 26px; - color: #3B6688; - text-align: center; -} diff --git a/web-client/src/main/resources/apps/html5ui/css/normalize.css b/web-client/src/main/resources/apps/html5ui/css/normalize.css deleted file mode 100644 index d4210aac296..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/normalize.css +++ /dev/null @@ -1,504 +0,0 @@ -/*! normalize.css v1.0.1 | MIT License | git.io/normalize */ - -/* ========================================================================== - HTML5 display definitions - ========================================================================== */ - -/* - * Corrects `block` display not defined in IE 6/7/8/9 and Firefox 3. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section, -summary { - display: block; -} - -/* - * Corrects `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. - */ - -audio, -canvas, -video { - display: inline-block; - *display: inline; - *zoom: 1; -} - -/* - * Prevents modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/* - * Addresses styling for `hidden` attribute not present in IE 7/8/9, Firefox 3, - * and Safari 4. - * Known issue: no IE 6 support. - */ - -[hidden] { - display: none; -} - -/* ========================================================================== - Base - ========================================================================== */ - -/* - * 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using - * `em` units. - * 2. Prevents iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-size: 100%; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ - -ms-text-size-adjust: 100%; /* 2 */ -} - -/* - * Addresses `font-family` inconsistency between `textarea` and other form - * elements. - */ - -html, -button, -input, -select, -textarea { - font-family: sans-serif; -} - -/* - * Addresses margins handled incorrectly in IE 6/7. - */ - -body { - margin: 0; -} - -/* ========================================================================== - Links - ========================================================================== */ - -/* - * Addresses `outline` inconsistency between Chrome and other browsers. - */ - -a:focus { - outline: thin dotted; -} - -/* - * Improves readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* ========================================================================== - Typography - ========================================================================== */ - -/* - * Addresses font sizes and margins set differently in IE 6/7. - * Addresses font sizes within `section` and `article` in Firefox 4+, Safari 5, - * and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -h2 { - font-size: 1.5em; - margin: 0.83em 0; -} - -h3 { - font-size: 1.17em; - margin: 1em 0; -} - -h4 { - font-size: 1em; - margin: 1.33em 0; -} - -h5 { - font-size: 0.83em; - margin: 1.67em 0; -} - -h6 { - font-size: 0.75em; - margin: 2.33em 0; -} - -/* - * Addresses styling not present in IE 7/8/9, Safari 5, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/* - * Addresses style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -blockquote { - margin: 1em 40px; -} - -/* - * Addresses styling not present in Safari 5 and Chrome. - */ - -dfn { - font-style: italic; -} - -/* - * Addresses styling not present in IE 6/7/8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/* - * Addresses margins set differently in IE 6/7. - */ - -p, -pre { - margin: 1em 0; -} - -/* - * Corrects font family set oddly in IE 6, Safari 4/5, and Chrome. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, serif; - _font-family: 'courier new', monospace; - font-size: 1em; -} - -/* - * Improves readability of pre-formatted text in all browsers. - */ - -pre { - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; -} - -/* - * Addresses CSS quotes not supported in IE 6/7. - */ - -q { - quotes: none; -} - -/* - * Addresses `quotes` property not supported in Safari 4. - */ - -q:before, -q:after { - content: ''; - content: none; -} - -/* - * Addresses inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/* - * Prevents `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* ========================================================================== - Lists - ========================================================================== */ - -/* - * Addresses margins set differently in IE 6/7. - */ - -dl, -menu, -ol, -ul { - margin: 1em 0; -} - -dd { - margin: 0 0 0 40px; -} - -/* - * Addresses paddings set differently in IE 6/7. - */ - -menu, -ol, -ul { - padding: 0 0 0 40px; -} - -/* - * Corrects list images handled incorrectly in IE 7. - */ - -nav ul, -nav ol { - list-style: none; - list-style-image: none; -} - -/* ========================================================================== - Embedded content - ========================================================================== */ - -/* - * 1. Removes border when inside `a` element in IE 6/7/8/9 and Firefox 3. - * 2. Improves image quality when scaled in IE 7. - */ - -img { - border: 0; /* 1 */ - -ms-interpolation-mode: bicubic; /* 2 */ -} - -/* - * Corrects overflow displayed oddly in IE 9. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* ========================================================================== - Figures - ========================================================================== */ - -/* - * Addresses margin not present in IE 6/7/8/9, Safari 5, and Opera 11. - */ - -figure { - margin: 0; -} - -/* ========================================================================== - Forms - ========================================================================== */ - -/* - * Corrects margin displayed oddly in IE 6/7. - */ - -form { - margin: 0; -} - -/* - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/* - * 1. Corrects color not being inherited in IE 6/7/8/9. - * 2. Corrects text not wrapping in Firefox 3. - * 3. Corrects alignment displayed oddly in IE 6/7. - */ - -legend { - border: 0; /* 1 */ - padding: 0; - white-space: normal; /* 2 */ - *margin-left: -7px; /* 3 */ -} - -/* - * 1. Corrects font size not being inherited in all browsers. - * 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5, - * and Chrome. - * 3. Improves appearance and consistency in all browsers. - */ - -button, -input, -select, -textarea { - font-size: 100%; /* 1 */ - margin: 0; /* 2 */ - vertical-align: baseline; /* 3 */ - *vertical-align: middle; /* 3 */ -} - -/* - * Addresses Firefox 3+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -button, -input { - line-height: normal; -} - -/* - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Corrects inability to style clickable `input` types in iOS. - * 3. Improves usability and consistency of cursor style between image-type - * `input` and others. - * 4. Removes inner spacing in IE 7 without affecting normal text inputs. - * Known issue: inner spacing remains in IE 6. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ - *overflow: visible; /* 4 */ -} - -/* - * Re-set default cursor for disabled elements. - */ - -button[disabled], -input[disabled] { - cursor: default; -} - -/* - * 1. Addresses box sizing set to content-box in IE 8/9. - * 2. Removes excess padding in IE 8/9. - * 3. Removes excess padding in IE 7. - * Known issue: excess padding remains in IE 6. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ - *height: 13px; /* 3 */ - *width: 13px; /* 3 */ -} - -/* - * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome. - * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/* - * Removes inner padding and search cancel button in Safari 5 and Chrome - * on OS X. - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* - * Removes inner padding and border in Firefox 3+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/* - * 1. Removes default vertical scrollbar in IE 6/7/8/9. - * 2. Improves readability and alignment in all browsers. - */ - -textarea { - overflow: auto; /* 1 */ - vertical-align: top; /* 2 */ -} - -/* ========================================================================== - Tables - ========================================================================== */ - -/* - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} diff --git a/web-client/src/main/resources/apps/html5ui/css/normalize.min.css b/web-client/src/main/resources/apps/html5ui/css/normalize.min.css deleted file mode 100644 index a783c5307d1..00000000000 --- a/web-client/src/main/resources/apps/html5ui/css/normalize.min.css +++ /dev/null @@ -1,50 +0,0 @@ -/*! normalize.css v1.0.1 | MIT License | git.io/normalize */ -article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block} -audio,canvas,video{display:inline-block;*display:inline;*zoom:1} -audio:not([controls]){display:none;height:0} -[hidden]{display:none} -html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%} -html,button,input,select,textarea{font-family:sans-serif} -body{margin:0} -a:focus{outline:thin dotted} -a:active,a:hover{outline:0} -h1{font-size:2em;margin:.67em 0} -h2{font-size:1.5em;margin:.83em 0} -h3{font-size:1.17em;margin:1em 0} -h4{font-size:1em;margin:1.33em 0} -h5{font-size:.83em;margin:1.67em 0} -h6{font-size:.75em;margin:2.33em 0} -abbr[title]{border-bottom:1px dotted} -b,strong{font-weight:bold} -blockquote{margin:1em 40px} -dfn{font-style:italic} -mark{background:#ff0;color:#000} -p,pre{margin:1em 0} -code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em} -pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word} -q{quotes:none} -q:before,q:after{content:'';content:none} -small{font-size:80%} -sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} -sup{top:-0.5em} -sub{bottom:-0.25em} -dl,menu,ol,ul{margin:1em 0} -dd{margin:0 0 0 40px} -menu,ol,ul{padding:0 0 0 40px} -nav ul,nav ol{list-style:none;list-style-image:none} -img{border:0;-ms-interpolation-mode:bicubic} -svg:not(:root){overflow:hidden} -figure{margin:0} -form{margin:0} -fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} -legend{border:0;padding:0;white-space:normal;*margin-left:-7px} -button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle} -button,input{line-height:normal} -button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;*overflow:visible} -button[disabled],input[disabled]{cursor:default} -input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*height:13px;*width:13px} -input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} -input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} -button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} -textarea{overflow:auto;vertical-align:top} -table{border-collapse:collapse;border-spacing:0} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/images/GeoNetwork_opensource_logo_.png b/web-client/src/main/resources/apps/html5ui/images/GeoNetwork_opensource_logo_.png deleted file mode 100644 index ffcc8653f33..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/GeoNetwork_opensource_logo_.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/abstract_background_blue.jpg b/web-client/src/main/resources/apps/html5ui/images/abstract_background_blue.jpg deleted file mode 100644 index db66f451dfd..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/abstract_background_blue.jpg and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/add-missing-elements.png b/web-client/src/main/resources/apps/html5ui/images/add-missing-elements.png deleted file mode 100644 index 36d82a19de8..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/add-missing-elements.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/asterisk.png b/web-client/src/main/resources/apps/html5ui/images/asterisk.png deleted file mode 100644 index 86042653fb4..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/asterisk.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/banner_logo.png b/web-client/src/main/resources/apps/html5ui/images/banner_logo.png deleted file mode 100644 index cbd05ee8eac..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/banner_logo.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/accept.png b/web-client/src/main/resources/apps/html5ui/images/default/accept.png deleted file mode 100755 index 89c8129a490..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/accept.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/add.png b/web-client/src/main/resources/apps/html5ui/images/default/add.png deleted file mode 100644 index 6332fefea4b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/application_view_tile.png b/web-client/src/main/resources/apps/html5ui/images/default/application_view_tile.png deleted file mode 100644 index 3bc0bd32fce..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/application_view_tile.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/bg_stripe.png b/web-client/src/main/resources/apps/html5ui/images/default/bg_stripe.png deleted file mode 100644 index 785377c266a..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/bg_stripe.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/book.png b/web-client/src/main/resources/apps/html5ui/images/default/book.png deleted file mode 100755 index b0f4dd7928c..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/book.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/brick_add.png b/web-client/src/main/resources/apps/html5ui/images/default/brick_add.png deleted file mode 100755 index fac186bfb79..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/brick_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_down.png b/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_down.png deleted file mode 100755 index 9b23c06d7b4..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_down.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_right.png b/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_right.png deleted file mode 100755 index 03ffc4fe59e..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_right.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_up.png b/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_up.png deleted file mode 100644 index ca77b9644e2..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/bullet_arrow_up.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/bullet_go.png b/web-client/src/main/resources/apps/html5ui/images/default/bullet_go.png deleted file mode 100755 index bc4faa709e7..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/bullet_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/bullet_toggle_minus.png b/web-client/src/main/resources/apps/html5ui/images/default/bullet_toggle_minus.png deleted file mode 100644 index 18a85eb8826..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/bullet_toggle_minus.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/bullet_toggle_plus.png b/web-client/src/main/resources/apps/html5ui/images/default/bullet_toggle_plus.png deleted file mode 100644 index 311331e7ec7..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/bullet_toggle_plus.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/cancel.png b/web-client/src/main/resources/apps/html5ui/images/default/cancel.png deleted file mode 100755 index c149c2bc017..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/cancel.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/chart_organisation.png b/web-client/src/main/resources/apps/html5ui/images/default/chart_organisation.png deleted file mode 100755 index c32d25c16f8..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/chart_organisation.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/cog.png b/web-client/src/main/resources/apps/html5ui/images/default/cog.png deleted file mode 100755 index 67de2c6ccbe..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/cog.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/color_swatch.png b/web-client/src/main/resources/apps/html5ui/images/default/color_swatch.png deleted file mode 100755 index 6e6e85212b8..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/color_swatch.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/comment_top.gif b/web-client/src/main/resources/apps/html5ui/images/default/comment_top.gif deleted file mode 100644 index 821e89996fd..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/comment_top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/connect.png b/web-client/src/main/resources/apps/html5ui/images/default/connect.png deleted file mode 100755 index 024138eb33b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/connect.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/cross.png b/web-client/src/main/resources/apps/html5ui/images/default/cross.png deleted file mode 100755 index 1514d51a3cf..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/cross.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/database_yellow.png b/web-client/src/main/resources/apps/html5ui/images/default/database_yellow.png deleted file mode 100644 index de69faa230d..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/database_yellow.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/date_go.png b/web-client/src/main/resources/apps/html5ui/images/default/date_go.png deleted file mode 100644 index 52dd9f3ae37..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/date_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/del.gif b/web-client/src/main/resources/apps/html5ui/images/default/del.gif deleted file mode 100644 index fe784234be0..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/del.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/door_out.png b/web-client/src/main/resources/apps/html5ui/images/default/door_out.png deleted file mode 100755 index 2541d2bcbc2..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/door_out.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/down.gif b/web-client/src/main/resources/apps/html5ui/images/default/down.gif deleted file mode 100644 index 03c02bd6814..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/down.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/download.png b/web-client/src/main/resources/apps/html5ui/images/default/download.png deleted file mode 100644 index 4c8204af156..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/download.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/exclamation.png b/web-client/src/main/resources/apps/html5ui/images/default/exclamation.png deleted file mode 100755 index c37bd062e60..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/exclamation.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/feed.png b/web-client/src/main/resources/apps/html5ui/images/default/feed.png deleted file mode 100755 index 315c4f4fa62..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/feed.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/find.png b/web-client/src/main/resources/apps/html5ui/images/default/find.png deleted file mode 100755 index 15474796467..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/find.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/flag_green.png b/web-client/src/main/resources/apps/html5ui/images/default/flag_green.png deleted file mode 100755 index a9925a06ab0..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/flag_green.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/flag_orange.png b/web-client/src/main/resources/apps/html5ui/images/default/flag_orange.png deleted file mode 100755 index e63202420f6..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/flag_orange.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/flag_red.png b/web-client/src/main/resources/apps/html5ui/images/default/flag_red.png deleted file mode 100755 index 1514d51a3cf..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/flag_red.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/folder.png b/web-client/src/main/resources/apps/html5ui/images/default/folder.png deleted file mode 100644 index 784e8fa4823..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/folder.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/folder_brick.png b/web-client/src/main/resources/apps/html5ui/images/default/folder_brick.png deleted file mode 100644 index 5dea9769a2c..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/folder_brick.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/folder_go.png b/web-client/src/main/resources/apps/html5ui/images/default/folder_go.png deleted file mode 100644 index 34a736f7026..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/folder_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/folder_key.png b/web-client/src/main/resources/apps/html5ui/images/default/folder_key.png deleted file mode 100644 index fb9b4c2bbc2..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/folder_key.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/folder_page_white.png b/web-client/src/main/resources/apps/html5ui/images/default/folder_page_white.png deleted file mode 100644 index 14d6b6181f0..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/folder_page_white.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/folder_picture.png b/web-client/src/main/resources/apps/html5ui/images/default/folder_picture.png deleted file mode 100644 index 052b33638ea..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/folder_picture.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/gn-logo.png b/web-client/src/main/resources/apps/html5ui/images/default/gn-logo.png deleted file mode 100644 index 0db45c525b9..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/gn-logo.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/google-earth-link.png b/web-client/src/main/resources/apps/html5ui/images/default/google-earth-link.png deleted file mode 100644 index b5b2a3bb8f1..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/google-earth-link.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/group_key.png b/web-client/src/main/resources/apps/html5ui/images/default/group_key.png deleted file mode 100755 index 257f111ca8b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/group_key.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/header-bg.png b/web-client/src/main/resources/apps/html5ui/images/default/header-bg.png deleted file mode 100644 index 928d79f4016..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/header-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/ico_advanced_search.gif b/web-client/src/main/resources/apps/html5ui/images/default/ico_advanced_search.gif deleted file mode 100644 index 1aae088024b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/ico_advanced_search.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/ico_calendar.gif b/web-client/src/main/resources/apps/html5ui/images/default/ico_calendar.gif deleted file mode 100644 index 7a95a50c255..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/ico_calendar.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/ico_find.gif b/web-client/src/main/resources/apps/html5ui/images/default/ico_find.gif deleted file mode 100644 index ca527953614..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/ico_find.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/icon_pan.png b/web-client/src/main/resources/apps/html5ui/images/default/icon_pan.png deleted file mode 100644 index 904dcefb279..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/icon_pan.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomfull.png b/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomfull.png deleted file mode 100644 index f313b61d232..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomfull.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomin.png b/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomin.png deleted file mode 100644 index 59b85a3caec..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomin.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomout.png b/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomout.png deleted file mode 100644 index 5057fd43d8c..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/icon_zoomout.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/link.png b/web-client/src/main/resources/apps/html5ui/images/default/link.png deleted file mode 100755 index 25eacb7c252..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/link.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/link_add.png b/web-client/src/main/resources/apps/html5ui/images/default/link_add.png deleted file mode 100644 index 00be352c578..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/link_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/link_break.png b/web-client/src/main/resources/apps/html5ui/images/default/link_break.png deleted file mode 100644 index 523575306d5..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/link_break.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/mv-full.png b/web-client/src/main/resources/apps/html5ui/images/default/mv-full.png deleted file mode 100644 index 19978f9f8b1..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/mv-full.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/mv-simple.png b/web-client/src/main/resources/apps/html5ui/images/default/mv-simple.png deleted file mode 100644 index 91f2869bea2..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/mv-simple.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/mv-thumbnail.png b/web-client/src/main/resources/apps/html5ui/images/default/mv-thumbnail.png deleted file mode 100644 index 33a06dee7ef..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/mv-thumbnail.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/newwindow.png b/web-client/src/main/resources/apps/html5ui/images/default/newwindow.png deleted file mode 100644 index 5d2313217cb..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/newwindow.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_code.png b/web-client/src/main/resources/apps/html5ui/images/default/page_code.png deleted file mode 100644 index f7ea90419d9..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_code.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_copy.png b/web-client/src/main/resources/apps/html5ui/images/default/page_copy.png deleted file mode 100755 index 195dc6d6c36..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_copy.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_delete.png b/web-client/src/main/resources/apps/html5ui/images/default/page_delete.png deleted file mode 100755 index 3141467c678..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_delete.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_edit.png b/web-client/src/main/resources/apps/html5ui/images/default/page_edit.png deleted file mode 100755 index 046811ed7a6..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_edit.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_gear.png b/web-client/src/main/resources/apps/html5ui/images/default/page_gear.png deleted file mode 100644 index 8e83281c5f8..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_gear.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_go.png b/web-client/src/main/resources/apps/html5ui/images/default/page_go.png deleted file mode 100755 index 80fe1ed0cc7..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_lightning.png b/web-client/src/main/resources/apps/html5ui/images/default/page_lightning.png deleted file mode 100755 index 7e568703d64..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_lightning.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_refresh.png b/web-client/src/main/resources/apps/html5ui/images/default/page_refresh.png deleted file mode 100755 index cf347c7d468..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_refresh.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_save.png b/web-client/src/main/resources/apps/html5ui/images/default/page_save.png deleted file mode 100755 index caea546af54..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_save.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_white.png b/web-client/src/main/resources/apps/html5ui/images/default/page_white.png deleted file mode 100644 index 8b8b1ca0000..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_white.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_white_acrobat.png b/web-client/src/main/resources/apps/html5ui/images/default/page_white_acrobat.png deleted file mode 100755 index 8f8095e46fa..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_white_acrobat.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_white_compressed.png b/web-client/src/main/resources/apps/html5ui/images/default/page_white_compressed.png deleted file mode 100755 index 2b6b1007f33..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_white_compressed.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_white_edit.png b/web-client/src/main/resources/apps/html5ui/images/default/page_white_edit.png deleted file mode 100644 index b93e77600de..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_white_edit.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/page_white_zip.png b/web-client/src/main/resources/apps/html5ui/images/default/page_white_zip.png deleted file mode 100755 index fd4bbccdf16..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/page_white_zip.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/picture.png b/web-client/src/main/resources/apps/html5ui/images/default/picture.png deleted file mode 100755 index 4a158fef7e0..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/picture.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/picture_add.png b/web-client/src/main/resources/apps/html5ui/images/default/picture_add.png deleted file mode 100755 index d6d3f856447..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/picture_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/picture_delete.png b/web-client/src/main/resources/apps/html5ui/images/default/picture_delete.png deleted file mode 100755 index cca9f535d9a..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/picture_delete.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/picture_go.png b/web-client/src/main/resources/apps/html5ui/images/default/picture_go.png deleted file mode 100755 index 27c63c5afe3..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/picture_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/plus.gif b/web-client/src/main/resources/apps/html5ui/images/default/plus.gif deleted file mode 100644 index cade83c7f96..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/print_top.gif b/web-client/src/main/resources/apps/html5ui/images/default/print_top.gif deleted file mode 100644 index 705ab643919..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/print_top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/report_magnify.png b/web-client/src/main/resources/apps/html5ui/images/default/report_magnify.png deleted file mode 100644 index aeaa8895342..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/report_magnify.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/rss_top.gif b/web-client/src/main/resources/apps/html5ui/images/default/rss_top.gif deleted file mode 100644 index 243c9ca0827..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/rss_top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/spinner.gif b/web-client/src/main/resources/apps/html5ui/images/default/spinner.gif deleted file mode 100644 index 39615c89252..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/spinner.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/sw-cube.png b/web-client/src/main/resources/apps/html5ui/images/default/sw-cube.png deleted file mode 100644 index 9067ab8573a..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/sw-cube.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/table_gear.png b/web-client/src/main/resources/apps/html5ui/images/default/table_gear.png deleted file mode 100644 index cfc2702acd7..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/table_gear.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/tag_blue_add.png b/web-client/src/main/resources/apps/html5ui/images/default/tag_blue_add.png deleted file mode 100644 index f135248f82e..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/tag_blue_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/three_dots.png b/web-client/src/main/resources/apps/html5ui/images/default/three_dots.png deleted file mode 100755 index a2f3d370c0e..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/three_dots.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/tick.png b/web-client/src/main/resources/apps/html5ui/images/default/tick.png deleted file mode 100755 index a9925a06ab0..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/tick.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/up.gif b/web-client/src/main/resources/apps/html5ui/images/default/up.gif deleted file mode 100644 index 22e62c14b10..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/up.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/user.png b/web-client/src/main/resources/apps/html5ui/images/default/user.png deleted file mode 100755 index 79f35ccbdad..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/user.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/user_go.png b/web-client/src/main/resources/apps/html5ui/images/default/user_go.png deleted file mode 100755 index 0468cf08f37..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/user_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/user_location.png b/web-client/src/main/resources/apps/html5ui/images/default/user_location.png deleted file mode 100644 index 1d6f47724a0..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/user_location.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/vector_add.png b/web-client/src/main/resources/apps/html5ui/images/default/vector_add.png deleted file mode 100644 index bf91801a77a..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/vector_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/default/vector_delete.png b/web-client/src/main/resources/apps/html5ui/images/default/vector_delete.png deleted file mode 100644 index f335546ed01..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/default/vector_delete.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/ico_find.gif b/web-client/src/main/resources/apps/html5ui/images/ico_find.gif deleted file mode 100644 index ca527953614..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/ico_find.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/ico_find.png b/web-client/src/main/resources/apps/html5ui/images/ico_find.png deleted file mode 100644 index bdbdfecb76e..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/ico_find.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/ico_moreinformation.png b/web-client/src/main/resources/apps/html5ui/images/ico_moreinformation.png deleted file mode 100644 index 8aacd38940a..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/ico_moreinformation.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/icon_user.png b/web-client/src/main/resources/apps/html5ui/images/icon_user.png deleted file mode 100644 index 4ec240adb14..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/icon_user.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/main-bg.png b/web-client/src/main/resources/apps/html5ui/images/main-bg.png deleted file mode 100644 index 869aa21c12f..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/main-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/map_header.png b/web-client/src/main/resources/apps/html5ui/images/map_header.png deleted file mode 100644 index 91a066bdf1b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/map_header.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/metadata-menu.png b/web-client/src/main/resources/apps/html5ui/images/metadata-menu.png deleted file mode 100644 index 1c82eb8c71d..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/metadata-menu.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/no_thumbnail.png b/web-client/src/main/resources/apps/html5ui/images/no_thumbnail.png deleted file mode 100644 index 19031570091..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/no_thumbnail.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/pattern_hr.png b/web-client/src/main/resources/apps/html5ui/images/pattern_hr.png deleted file mode 100644 index fad17bd8a5c..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/pattern_hr.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/shade.gif b/web-client/src/main/resources/apps/html5ui/images/shade.gif deleted file mode 100644 index 2dd62496ae4..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/shade.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/shadeactive.gif b/web-client/src/main/resources/apps/html5ui/images/shadeactive.gif deleted file mode 100644 index 0a7823211e4..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/shadeactive.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/asprite_dvanced_search_arrows.png b/web-client/src/main/resources/apps/html5ui/images/sprites/asprite_dvanced_search_arrows.png deleted file mode 100644 index 5a25db1f2b8..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/asprite_dvanced_search_arrows.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_admin.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_admin.gif deleted file mode 100644 index b2f0ff7ac07..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_admin.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_coment.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_coment.gif deleted file mode 100644 index 9b00d04171b..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_coment.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_hand_map.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_hand_map.gif deleted file mode 100644 index 4f7003c9ce6..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_hand_map.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_icons_metadadato.png b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_icons_metadadato.png deleted file mode 100644 index c2bee29ddcc..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_icons_metadadato.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_less.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_less.gif deleted file mode 100644 index 636570bf788..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_less.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_link.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_link.gif deleted file mode 100644 index 695e4762918..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_link.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_location_map.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_location_map.gif deleted file mode 100644 index 655933adadf..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_location_map.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_menu_user.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_menu_user.gif deleted file mode 100644 index 88a75b37958..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_menu_user.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_more.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_more.gif deleted file mode 100644 index dbf1067dae8..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_more.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_printer.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_printer.gif deleted file mode 100644 index 06727958c82..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_printer.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_resize_map.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_resize_map.gif deleted file mode 100644 index 30e7d9fe48a..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_resize_map.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_searchless.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_searchless.gif deleted file mode 100644 index 0daa3eb4bbd..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_searchless.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_searchplus.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_searchplus.gif deleted file mode 100644 index e2d61daf355..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_searchplus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_share.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_share.gif deleted file mode 100644 index 0c6e75a32bb..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_share.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_tooltip.gif b/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_tooltip.gif deleted file mode 100644 index 4c777866dae..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/sprite_tooltip.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/images/sprites/spritetags.png b/web-client/src/main/resources/apps/html5ui/images/sprites/spritetags.png deleted file mode 100644 index dc53858c95f..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/images/sprites/spritetags.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/arrow_in.png b/web-client/src/main/resources/apps/html5ui/img/arrow_in.png deleted file mode 100644 index 745c65134db..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/arrow_in.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/arrow_out.png b/web-client/src/main/resources/apps/html5ui/img/arrow_out.png deleted file mode 100644 index 2e9bc42bec1..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/arrow_out.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/bookmark-add-icon.png b/web-client/src/main/resources/apps/html5ui/img/bookmark-add-icon.png deleted file mode 100644 index 0124a6f866c..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/bookmark-add-icon.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/clipboard.png b/web-client/src/main/resources/apps/html5ui/img/clipboard.png deleted file mode 100644 index 74e5d10df79..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/clipboard.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/icon_access-restrictions.png b/web-client/src/main/resources/apps/html5ui/img/icon_access-restrictions.png deleted file mode 100644 index e62f2e700cb..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/icon_access-restrictions.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/icon_creative_commons.png b/web-client/src/main/resources/apps/html5ui/img/icon_creative_commons.png deleted file mode 100644 index f09925fe9b3..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/icon_creative_commons.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/icon_download_dataset.png b/web-client/src/main/resources/apps/html5ui/img/icon_download_dataset.png deleted file mode 100644 index 4ae98531fda..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/icon_download_dataset.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/icon_euro.png b/web-client/src/main/resources/apps/html5ui/img/icon_euro.png deleted file mode 100644 index ee319d87d53..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/icon_euro.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/icon_gebruiksvoorwaarden.png b/web-client/src/main/resources/apps/html5ui/img/icon_gebruiksvoorwaarden.png deleted file mode 100644 index 0d92c6ea6aa..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/icon_gebruiksvoorwaarden.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/icon_public_domein.png b/web-client/src/main/resources/apps/html5ui/img/icon_public_domein.png deleted file mode 100644 index d0ca09da9f5..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/icon_public_domein.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/icon_show_map.png b/web-client/src/main/resources/apps/html5ui/img/icon_show_map.png deleted file mode 100644 index e55e2be3560..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/icon_show_map.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/icon_use-restrictions.png b/web-client/src/main/resources/apps/html5ui/img/icon_use-restrictions.png deleted file mode 100644 index 730c49cf435..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/icon_use-restrictions.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/inspire-logo.gif b/web-client/src/main/resources/apps/html5ui/img/inspire-logo.gif deleted file mode 100644 index d702c435d5a..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/inspire-logo.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/invalid_metadata.png b/web-client/src/main/resources/apps/html5ui/img/invalid_metadata.png deleted file mode 100644 index 8cb26663912..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/invalid_metadata.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/valid_metadata.png b/web-client/src/main/resources/apps/html5ui/img/valid_metadata.png deleted file mode 100644 index b4bb10a6077..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/valid_metadata.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/wfs_validation.png b/web-client/src/main/resources/apps/html5ui/img/wfs_validation.png deleted file mode 100644 index 495d8a34690..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/wfs_validation.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/img/wms_validation.png b/web-client/src/main/resources/apps/html5ui/img/wms_validation.png deleted file mode 100644 index 19f5e7c849a..00000000000 Binary files a/web-client/src/main/resources/apps/html5ui/img/wms_validation.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/html5ui/js/App.js b/web-client/src/main/resources/apps/html5ui/js/App.js deleted file mode 100644 index 3e656ca1e00..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/App.js +++ /dev/null @@ -1,793 +0,0 @@ -/* - * Copyright (C) 2012 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ -Ext.namespace('GeoNetwork'); - -var catalogue; -var app; -var cookie; -var urlParameters; - -var nodeInfo = /([a-zA-Z0-9_\-]+)\/([a-z]{3})\/search/ - .exec(window.location.href); -var catalogueLang = nodeInfo[2] || GeoNetwork.Util.defaultLocale; -var catalogueNode = nodeInfo[1] || 'srv'; - - -/** - * Main App class. It should only contain specific GUI behaviour. - */ -GeoNetwork.app = function() { - - var createLatestUpdate = function() { - var latestView = new GeoNetwork.MetadataResultsView({ - catalogue : catalogue, - autoScroll : true, - tpl : GeoNetwork.HTML5UI.Templates.THUMBNAIL_SIMPLER - }); - var latestStore = new GeoNetwork.Settings.mdStore(); - latestView.setStore(latestStore); - latestStore.on('load', function() { - Ext.ux.Lightbox.register('a[rel^=lightbox]'); - }); - var p = new Ext.Panel({ - border : false, - bodyCssClass : 'md-view', - items : latestView, - renderTo : 'latest-metadata' - }); - latestView.tpl = GeoNetwork.HTML5UI.Templates.THUMBNAIL_SIMPLER; - catalogue.kvpSearch( - "fast=index&from=1&to=3&sortBy=changeDate", - function(e) { - Ext.each(Ext.DomQuery.select('.md-action-menu'), function( - el) { - hide(el); - }); - }, null, null, true, latestView.getStore()); - }; - - function createMainTagCloud() { - var tagCloudView = new GeoNetwork.TagCloudView({ - catalogue : catalogue, - query : 'fast=true&summaryOnly=true&from=1&to=4', - renderTo : 'cloud-tag', - onSuccess : 'app.loadResults', - itemSelector : 'div.tag-cloud', - tpl: new Ext.XTemplate( - '', - '
    ', - '{value} ({count})', - '
    ', - '
    ') - }); - - return tagCloudView; - } - ; - var createPopularUpdate = function() { - var latestView = new GeoNetwork.MetadataResultsView({ - catalogue : catalogue, - autoScroll : true, - tpl : GeoNetwork.HTML5UI.Templates.THUMBNAIL_SIMPLER - }); - var latestStore = new GeoNetwork.Settings.mdStore(); - latestView.setStore(latestStore); - latestStore.on('load', function() { - Ext.ux.Lightbox.register('a[rel^=lightbox]'); - }); - var p = new Ext.Panel({ - border : false, - bodyCssClass : 'md-view', - items : latestView, - renderTo : 'popular-metadata' - }); - latestView.tpl = GeoNetwork.HTML5UI.Templates.THUMBNAIL_SIMPLER; - catalogue.kvpSearch( - "fast=index&from=1&to=3&sortBy=popularity", - function(e) { - Ext.each(Ext.DomQuery.select('.md-action-menu'), function( - el) { - hide(el); - }); - }, null, null, true, latestView.getStore()); - }; - - /** - * - * Given a metadata, load a map on the metadata associated map and creates - * the checkbox for downloading or adding layers to the big map - * - */ - var loadMetadataMap = function(metadata) { - - var checkboxes = []; - var layers = []; - - // add data to map - Ext.each(metadata.record.get("links"), function(link) { - if (link.protocol === 'application/vnd.ogc.wms_xml' - || link.protocol.toUpperCase().indexOf("OGC:WMS") >= 0) { - var layers = app.mapApp.getCapabilitiesWMS(link.href); - Ext.each(layers, function(layer) { - var wms = new OpenLayers.Layer.WMS(link.name, link.href, { - layers : layer, - transparent : true - }); - - wms.setVisibility(true); - - checkboxes.push(new Ext.form.Checkbox({ - boxLabel : layer, - layer : wms - })); - - layers.push(wms); - }); - } else if (link.protocol === 'application/vnd.ogc.wfs_xml' - || link.protocol.toUpperCase().indexOf("OGC:WFS") >= 0) { - var layers = []; - try { - layers = app.mapApp.getCapabilitiesWFS(link.href); - } catch (ex) { - layers = []; - } - var styleMap = new OpenLayers.StyleMap({ - strokeWidth : 3, - strokeColor : "#333333" - }); - var strategies = [ new OpenLayers.Strategy.BBOX() ]; - - Ext.each(layers, function(layer) { - var wfs = new OpenLayers.Layer.Vector(link.name, { - strategies : strategies, - protocol : layer, - styleMap : styleMap - }); - wfs.setVisibility(true); - - checkboxes.push(new Ext.form.Checkbox({ - boxLabel : layer.featurePrefix + ":" - + layer.geometryName, - layer : wfs - })); - - layers.push(wfs); - }); - } - }); - - var wfs_href = metadata.record.get("href"); - - // var form = new Ext.form.FormPanel( - // { - // renderTo : "download_" + metadata.title, - // defaultType : 'checkboxgroup', - // buttonAlign : 'left', - // width : 200, - // layout : 'column', - // items : [ checkboxes ], - // fbar : { - // xtype : 'toolbar', - // items : [ - // { - // text : OpenLayers.i18n('Add to map'), - // handler : function() { - // form.items - // .each(function(c) { - // if (c.checked && !c.added) { - // c.added = true; - // app.mapApp - // .createLayer(c.layer); - // } - // }); - // } - // }, - // { - // text : OpenLayers.i18n('prepareDownload'), - // handler : function() { - // // FIXME : this call require the - // // catalogue to be named - // // catalogue - // catalogue - // .metadataPrepareDownload(metadata.record - // .get('id')); - // } - // } ] - // } - // }); - var map = app.mapApp.generateAuxiliaryMap("map_" + metadata.title); - Ext.each(layers, function(layer) { - map.addLayer(layer); - }); - - }; - - /** - * Create a language switcher menu. This one changes the url so the language - * is now on Jeeves mode. - * - */ - var createLanguageSwitcher = function(lang) { - return new Ext.form.FormPanel({ - renderTo : 'lang-form', - width : 400, - border : false, - layout : 'anchor', - hidden : GeoNetwork.Util.locales.length === 1 ? true : false, - items : [ new Ext.form.ComboBox({ - mode : 'local', - triggerAction : 'all', - height : '100%', - store : new Ext.data.ArrayStore({ - idIndex : 2, - fields : [ 'id', 'name', 'id2' ], - data : GeoNetwork.Util.locales - }), - valueField : 'id2', - displayField : 'name', - value : lang, - listeners : { - select : function(cb, record, idx) { - - var lang = catalogueLang || GeoNetwork.Util.defaultLocale; - var node = catalogueNode || 'srv'; - if (Ext.isArray(lang)) { - lang = lang[1]; - } - - if (lang === null) { - window.location.pathname = window.location.pathname - .replace('/' + node + '/search', '/' + node + '/' - + cb.getValue() + '/search'); - } else { - window.location.pathname = window.location.pathname - .replace(lang, cb.getValue()); - } - - } - } - }) ] - }); - }; - - function edit(metadataId, create, group, child) { - - Ext.getCmp('metadata-panel') && Ext.getCmp('metadata-panel').destroy(); - var editorPanel = new GeoNetwork.editor.EditorPanel({ - defaultViewMode : GeoNetwork.Settings.editor.defaultViewMode, - catalogue : catalogue, - selectionPanelImgPath: '../../apps/js/ext-ux/images', - renderTo : 'metadata-info', - layout : 'border', - xlinkOptions : { - CONTACT : true - }, - listeners : { - editorClosed : function() { - showSearch(); - Ext.get("search-form").show(); - } - } - }); - - editorPanel.init(metadataId, create, group, child); - editorPanel.doLayout(false); - showMetadata(); - hide("search-form"); - app.breadcrumb.setCurrent({ - text : OpenLayers.i18n('mdEditor'), - func : "app.edit('" + metadataId + "', " + create + ", " + group - + "," + child + ")" - }); - } - - function show(uuid, record, url, maximized, width, height, clean) { - - Ext.get("metadata-info").update(""); - - var button_width = 101; - var button_height = 38; - var aResTab = new GeoNetwork.view.ViewPanel({ - serviceUrl : catalogue.services.mdView + '?uuid=' + uuid, - lang : catalogue.lang, - id : 'metadata-panel', - renderTo : 'metadata-info', - autoScroll : true, - resultsView : catalogue.resultsView, - layout : 'fit', - // autoHeight:true, - padding : '5px 25px', - currTab : GeoNetwork.defaultViewMode || 'simple', - printDefaultForTabs : GeoNetwork.printDefaultForTabs || false, - printUrl : '../../apps/html5ui/print.html', - catalogue : catalogue, - // maximized: true, - metadataUuid : uuid, - record : record, - buttonWidth : button_width, - buttonHeight : button_height - }); - - // aResTab.on("afterrender", function() { - // // Initialize map and links - // loadMetadataMap({ - // record : record, - // title : record.get('title') - // }); - // }); - - showMetadata(); - app.breadcrumb.setDefaultPrevious(2); - app.breadcrumb.setCurrent({ - text : record.get('title'), - func : "app.searchApp.addMetadata('" + uuid + "', true)" - }); - - // Get title, keywords and author for current record - // in order to populate the META tag in the HEAD of the HTML page. - var contacts = []; - Ext.each(record.get('contact'), function(item) { - contacts.push(item.name); - }); - var subjects = []; - Ext.each(record.get('subject'), function(item) { - subjects.push(item.value); - }); - GeoNetwork.Util.updateHeadInfo({ - title : catalogue.getInfo().name - + ' | ' - + record.get('title') - + (record.get('type') ? ' (' + record.get('type') + ')' - : ''), - meta : { - subject : record.get('abstract'), - keywords : subjects, - author : contacts - } - }); - - token = "|" + uuid; - - if (!GeoNetwork.state.History.getToken() - || GeoNetwork.state.History.getToken().indexOf("edit=") != 0) { - if (!Ext.state.Manager.getProvider().restoring) { - GeoNetwork.state.History.eventsSuspended = true; - GeoNetwork.state.History.suspendEvents(); - GeoNetwork.state.History.add(token); - GeoNetwork.state.History.resumeEvents(); - GeoNetwork.state.History.eventsSuspended = false; - } - } - - Ext.state.Manager.getProvider().restoring = false; - - hide("share-capabilities"); - hide("permalink-div"); - - // Adding social capabilities - Ext.getCmp("metadata-panel").getTopToolbar().addButton({ - id : 'share-button', - width : button_width, - height : button_height, - handler : function() { - toggle("share-capabilities"); - }, - text : '', - tooltip : 'Share this', - type : 'submit', - tooltip : OpenLayers.i18n('Social Share'), - enableToggle : true - }); - - GeoNetwork.Util.removeMetaTags({ - 'og:title' : true, - 'og:url' : true - }); - - GeoNetwork.Util.addMetaTag("og:title", record.get('title')); - GeoNetwork.Util.addMetaTag("og:url", Ext.state.Manager.getProvider() - .getPrettyLink()); - - // Updating social - Ext.get("custom-tweet-button").dom.href = "https://twitter.com/share?text=" - + record.get('title') - + " " - + Ext.state.Manager.getProvider().getPrettyLink(); - Ext.get("custom-tweet-button").dom.title = "Tweet this"; - - var fb_url = "https://www.facebook.com/dialog/feed?app_id=307560442683468&redirect_uri=" - + Ext.state.Manager.getProvider().getPrettyLink() - + '&link=' - + Ext.state.Manager.getProvider().getPrettyLink(); - - Ext.get("fb-button") - .update( - '' + OpenLayers.i18n('Like!') - + ''); - Ext.get("fb-button").dom.title = "Like this"; - // feedback window -// var feedbackWindow; -// var newFeedbackWindow = function() { -// feedbackWindow = new GeoNetwork.FeedbackForm(null, record); -// feedbackWindow.show(); -// }; -// - // feedback button to open window -// Ext.getCmp("metadata-panel").getTopToolbar().addButton({ -// id : 'feedback-button', -// width : button_width, -// height : button_height, -// tooltip : 'Feedback', -// handler : newFeedbackWindow, -// text : '', -// tooltip : OpenLayers.i18n('Feedback'), -// type : 'submit' -// }); - - // Adding permalink - Ext.getCmp("metadata-panel").getTopToolbar().addButton({ - id : 'permalink-button', - width : button_width, - height : button_height, - handler : function() { - var url = Ext.state.Manager.getProvider().getPrettyLink(); - Ext.get("permalink-div").update(url); - toggle("permalink-div"); - }, - text : '', - tooltip : OpenLayers.i18n('Permalink'), - enableToggle : true, - type : 'submit' - }); - - Ext.getCmp("metadata-panel").doLayout(); - // Add to recent viewed - addToRecentViewed(record); - - } - - function addToRecentViewed(record) { - var div = Ext.getCmp("recent-viewed"); - - if (!div) { - - var store = new Ext.data.ArrayStore({ - autoDestroy : true, - autoSave : true, - storeId : 'recent-viewed-store', - idIndex : 0, - fields : [ 'thumbnail', 'description', 'uuid', 'title' ] - }); - - var tpl = new Ext.XTemplate( - '', - '', - ''); - div = new Ext.DataView({ - store : store, - tpl : tpl, - autoHeight : true, - overClass : 'x-view-over', - renderTo : "recent-viewed-div", - id : "recent-viewed" - }); - } - - var description = record.get('abstract'); - if (description.length > 140) { - description = description.substring(0, 140) + "..."; - } - - var alreadyThere = false; - - Ext.each(div.store.data.items, function(e) { - if (e.data.uuid === record.get('uuid')) { - alreadyThere = true; - } - }); - - if (!alreadyThere) { - div.store.insert(0, new div.store.recordType({ - title : record.get('title'), - uuid : record.get('uuid'), - thumbnail : record.get('thumbnail'), - description : description - })); - } - while (div.store.data.length > 4) { - div.store.remove(div.store.data.items[div.store.data.length - 1]); - } - - } - - // public space: - return { - mapApp : null, - searchApp : null, - loginApp : null, - breadcrumb : null, - switchMode : function(i, j) { - }, - /** - * Deprecated, but maintained for compatibility with old UI versions. Do - * not use, look for app.mapApp.maps or app.mapApp.getMap - */ - getIMap : function() { - return this.mapApp; - }, - /** - * Hides everything but the map, which becomes "fullscreen" - */ - showBigMap : function() { - showBigMap(); - }, - /** - * Hides the "fullscreen" map in order to show the rest of the elements - * (search and results, mostly). - */ - hideBigMap : function() { - hideBigMap(); - }, - /** - * Initializes cookies, connections, url, etc,... - */ - initializeEnvironment : function() { - - var geonetworkUrl = window.location.href.match( - /(http.*\/.*)\/.*\/.*\/.*/, '')[1]; - - urlParameters = GeoNetwork.Util.getParameters(location.href); - - var lang = catalogueLang || GeoNetwork.Util.defaultLocale; - var node = catalogueNode || 'srv'; - - if (urlParameters.extent) { - urlParameters.bounds = new OpenLayers.Bounds( - urlParameters.extent[0], urlParameters.extent[1], - urlParameters.extent[2], urlParameters.extent[3]); - } - - createLanguageSwitcher(lang); - - // Init cookie - cookie = new Ext.state.CookieProvider({ - expires : new Date(new Date().getTime() - + (1000 * 60 * 60 * 24 * 365)) - }); - // Create connection to the catalogue - catalogue = new GeoNetwork.Catalogue( - { - // statusBarId: 'info', - lang : lang, - node: node, - statusBarId : 'info', - hostUrl : geonetworkUrl, - mdOverlayedCmpId : 'resultsPanel', - adminAppUrl : geonetworkUrl + '/' + node + '/' + lang + '/admin.console', - // Declare default store to be used for records and - // summary - metadataStore : GeoNetwork.Settings.mdStore ? new GeoNetwork.Settings.mdStore() - : new GeoNetwork.data.MetadataResultsStore(), - metadataCSWStore : GeoNetwork.data - .MetadataCSWResultsStore(), - summaryStore : GeoNetwork.data.MetadataSummaryStore(), - editMode : 2, - metadataEditFn : edit, - metadataShowFn : show - }); - - // Make sure we are still logged in: - var response = OpenLayers.Request.GET({ - url : geonetworkUrl + '/srv/' + lang + '/admin', - async : false - }), exception; - - // Check status and also check than an Exception is not described in - // the - // HTML response - // in case of bad startup - exception = response.responseText.indexOf('Exception') !== -1; - - if (response.status !== 200 || exception) { - delete cookie.state.user; - } else { - catalogue.identifiedUser = cookie.get('user'); - } - - // set a permalink provider which will be the main state provider. - Ext.state.Manager - .setProvider(new GeoNetwork.state.PermalinkProvider({ - encodeType : false - })); - - createLatestUpdate(); - createPopularUpdate(); - createMainTagCloud(); - - this.breadcrumb = GeoNetwork.BreadCrumb(); - this.breadcrumb.setCurrent(this.breadcrumb.defaultSteps[0]); - - }, - /** - * Function to initialize the App. Should only call utilities and their - * init function. Keep it clean. - */ - init : function() { - - this.initializeEnvironment(); - - // Initialize utils - this.loginApp = new GeoNetwork.loginApp(); - this.loginApp.init(); - this.mapApp = new GeoNetwork.mapApp(); - - var layers={}, options={}; - if(GeoNetwork.map.CONTEXT || GeoNetwork.map.OWS) { - options = GeoNetwork.map.CONTEXT_MAIN_MAP_OPTIONS; - } else { - options = GeoNetwork.map.MAIN_MAP_OPTIONS; - layers = GeoNetwork.map.BACKGROUND_LAYERS; - } - - this.mapApp.init(options, layers); - this.searchApp = new GeoNetwork.searchApp(); - this.searchApp.init(); - - if (urlParameters.create !== undefined && catalogue.isIdentified()) { - var actionCtn = Ext.getCmp('resultsPanel').getTopToolbar(); - actionCtn.createMetadataAction.handler.apply(actionCtn); - } - - if (urlParameters.insert !== undefined) { - setTimeout(function () { - var actionCtn = Ext.getCmp('resultsPanel').getTopToolbar(); - actionCtn.mdImportAction.handler.apply(actionCtn); - }, 500); - } - }, - edit : function(uuid) { - edit(uuid); - }, - switchMode : function() { - // Deprecated - } - }; -}; - -Ext - .onReady(function() { - - hideAdvancedSearch(); - - var url = /(.*)\/[a-zA-Z0-9_\-]+/.exec(location.href)[1]; - var lang = catalogueLang; - GeoNetwork.Util.setLang(lang, url + '/apps'); - - // This should be on search.xls, but IE9 is too fast - var spiders = Ext.get("only_for_spiders"); - if (spiders) { - spiders.setVisibilityMode(Ext.Element.DISPLAY); - spiders.hide(); - } - if (Ext.isIE6) { - Ext.get(Ext.query("html")[0]).addClass("lt-ie9 lt-ie8 lt-ie7"); - } else if (Ext.isIE7) { - Ext.get(Ext.query("html")[0]).addClass("lt-ie9 lt-ie8"); - } else if (Ext.isIE8) { - Ext.get(Ext.query("html")[0]).addClass("lt-ie9"); - } - - Ext.QuickTips.init(); - app = new GeoNetwork.app(); - app.init(); - GeoNetwork.Util.updateHeadInfo({ - title : catalogue.getInfo().name - }); - - initShortcut(); - if (Ext.getDom('E_any')) { - Ext.getDom('E_any').focus(true); - } - // Restoring session (if any) - - Ext.state.Manager.getProvider().restore(location.href); - - GeoNetwork.state.History.init(); - - // Register events where the search should be triggered - var events = [ 'afterDelete', 'afterRating', 'afterLogin' ]; - Ext - .each( - events, - function(e) { - catalogue - .on( - e, - function() { - if (Ext.get(resultsPanel) - .isVisible()) { - var e = Ext - .getCmp('advanced-search-options-content-form'); - e.getEl().fadeIn(); - e.fireEvent('search'); - } - }); - }); - - if (!cookie.get("alreadyShowMessage")) { - GeoNetwork - .Message() - .msg( - { - title : OpenLayers.i18n('cookies'), - msg : OpenLayers.i18n('cookies.warning') - + "

    ", - status : 'information', - target : document.body, - id : 'cookie-warning', - pause : 40 - }); - cookie.set('alreadyShowMessage', true); - } - - Ext.getCmp("fullTextField").keyNav.enter = function(e) { - Ext.getCmp('advanced-search-options-content-form').fireEvent( - 'search'); - - }; - - }); - -/** - * Resize maps and panels on window resize to acomodate content - */ -Ext.fly(window).on('resize', function(e, w) { - resizeMap(); - resizeResultsPanel(); - - var doLayout_children = function(obj) { - - if (obj.doLayout) { - obj.doLayout(true, true); - } - - if (obj.items && obj.items.items) { - Ext.each(obj.items.items, function(e) { - if (e.doLayout) { - doLayout_children(e); - } - }); - } - - if (obj.doLayout) { - obj.doLayout(true, true); - } - }; - - doLayout_children(Ext.getCmp("advSearchTabs")); -}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/js/BreadCrumb.js b/web-client/src/main/resources/apps/html5ui/js/BreadCrumb.js deleted file mode 100644 index bbffdaf765f..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/BreadCrumb.js +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (C) 2012 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - * @author Maria Arias de Reyna - */ - -Ext.namespace('GeoNetwork'); - -/** - * All breadcrumb functionality - */ -GeoNetwork.BreadCrumb = function() { - - // Public Space - return { - previous : [], - current : '', - separator : " >> ", - div : "bread-crumb-app", - defaultSteps : [ { - text : OpenLayers.i18n("BROWSE"), - func : "showBrowse()" - }, { - text : OpenLayers.i18n("SEARCH RESULTS"), - func : "showSearch()" - } ], - /** - * Adds another crumb to the breadcrumb. - * - * @param crumb, - * which should have a text to display and a func to execute - * when clicking on it - */ - setCurrent : function(crumb) { - if (this.current) { - this.previous.push(this.current); - } - this.current = crumb; - this.update(); - }, - /** - * Deletes all previous bread crumbs and replaces it with param - * - * @param prev - * @returns - */ - setPrevious : function(prev) { - this.previous = prev; - this.current = null; - }, - /** - * Deletes all previous bread crumbs and replaces it with - * defaultPrevious - * - * @param index - * @returns - */ - setDefaultPrevious : function(index) { - var i = 0; - var prev = []; - - while (i < index && i < this.defaultSteps.length) { - prev.push(this.defaultSteps[i]); - i++; - } - this.previous = prev; - this.current = null; - }, - - /** - * Updates the breadcrumb with the existing data - */ - update : function() { - var breadcrumb = null; - var separator = this.separator; - - if (this.previous.length == 0) { - Ext.get(this.div).update(''); - return; - } - - Ext.each(this.previous, function(elem) { - if (breadcrumb) { - breadcrumb = breadcrumb + separator; - } else { - breadcrumb = ''; - } - breadcrumb = breadcrumb + "" + elem.text + ""; - }); - - if (breadcrumb) { - breadcrumb = breadcrumb + this.separator; - } else { - breadcrumb = ''; - } - breadcrumb = breadcrumb + "" + this.current.text + ""; - - if (this.div) { - Ext.get(this.div).update(breadcrumb); - } - } - } - -} diff --git a/web-client/src/main/resources/apps/html5ui/js/GlobalFunctions.js b/web-client/src/main/resources/apps/html5ui/js/GlobalFunctions.js deleted file mode 100644 index 269bd7ef1df..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/GlobalFunctions.js +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Copyright (C) 2012 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ - -// The following functions are for the advanced search hiding and showing -function hide(id) { - if (Ext.get(id)) { - Ext.get(id).setVisibilityMode(Ext.Element.DISPLAY); - Ext.get(id).hide(); - } -} -function show(id) { - if (Ext.get(id)) { - Ext.get(id).setVisibilityMode(Ext.Element.DISPLAY); - Ext.get(id).show(); - } -} - -function toggleLogin() { - toggle('login-form'); - Ext.get('username').focus(); -} - -function toggle(id) { - if (Ext.get(id)) { - if (Ext.get(id).isDisplayed()) { - hide(id); - } else { - show(id); - } - } -} - -function showBrowse() { - // Reset search for tag cloud - catalogue.kvpSearch("fast=index&from=1&to=5&sortBy=changeDate", null, null, - null, true); - - show("main"); - show("search-form"); - - hideSearch(); - hideBigMap(); - hideMetadata(); - - show("browser"); - show("latest-metadata"); - show("popular-metadata"); - - app.breadcrumb.setPrevious([]); - app.breadcrumb.setCurrent(app.breadcrumb.defaultSteps[0]); - - Ext.each(Ext.query('a', Ext.get("main-navigation").dom), function(a) { - Ext.get(a).removeClass("selected"); - }); - - Ext.get("browse-tab").addClass("selected"); - - hideAdvancedSearch(); -} - -function hideBrowse() { - hide("browser"); - hide("latest-metadata"); - hide("popular-metadata"); -} - -function showBigMap() { - hideBrowse(); - hideSearch(); - hideAdvancedSearch(); - hideMetadata(); - show("search-form"); - - // Hide advanced search - hide('advanced-search-options'); - show('show-advanced'); - - // show map - show("big-map-container"); - // Resize the map, to cover all space available: - resizeMap(); - - app.breadcrumb.setCurrent({ - text : OpenLayers.i18n("Map"), - func : "showBigMap()" - }); - - // Printpanel can be only initiazed once the map is rendered - // Trigger the print panel init only when the big map is displayed - // the first time. It will check if the print panel is already initiliazed - // or not - app.mapApp.initPrint(); - - - Ext.each(Ext.query('a', Ext.get("main-navigation").dom), function(a) { - Ext.get(a).removeClass("selected"); - }); - - Ext.get("map-tab").addClass("selected"); -} - -function hideBigMap() { - hide("big-map-container"); -} - -function showSearch() { - hideBrowse(); - hideMetadata(); - hideBigMap(); - show("search-form"); - - show("secondary-aside"); - Ext.getCmp('resultsPanel').show(); - Ext.get('resultsPanel').show(); - show("main-aside"); - - app.breadcrumb.setDefaultPrevious(1); - app.breadcrumb.setCurrent(app.breadcrumb.defaultSteps[1]); - - if (!app.searchApp.firstSearch) { - app.searchApp.firstSearch = true; - - Ext.getCmp('advanced-search-options-content-form').fireEvent('search'); - } - - - Ext.each(Ext.query('a', Ext.get("main-navigation").dom), function(a) { - Ext.get(a).removeClass("selected"); - }); - - Ext.get("catalog-tab").addClass("selected"); - -} - -function hideSearch() { - // Comment the following if you want a push-down and not a hiding - // for the results - hide("secondary-aside"); - hide("resultsPanel"); - hide("main-aside"); -} - -function showMetadata() { - - show("search-form"); - hideBrowse(); - hideSearch(); - hideBigMap(); - hideAdvancedSearch(); - - show("metadata-info"); - - app.breadcrumb.setDefaultPrevious(2); - - Ext.each(Ext.query('a', Ext.get("main-navigation").dom), function(a) { - Ext.get(a).removeClass("selected"); - }); - - Ext.get("catalog-tab").addClass("selected"); -} - -function hideMetadata() { - hide("metadata-info"); - hide("share-capabilities"); - - // Destroy potential existing panel - Ext.getCmp('metadata-panel') && Ext.getCmp('metadata-panel').destroy(); - Ext.getCmp('editorPanel') && Ext.getCmp('editorPanel').destroy(); -} - -function resizeResultsPanel() { - var resultsPanel = Ext.get("resultsPanel"); - resultsPanel.setWidth(Ext.getBody().getWidth() - - Ext.get("main-aside").getWidth() - 320); - Ext.get("result-panel").setWidth(resultsPanel.getWidth()); - Ext.each(resultsPanel.dom.children, function(div) { - div = Ext.get(div); - Ext.each(div.dom.children, function(child) { - child = Ext.get(child); - child.setWidth("100%"); - Ext.each(child.dom.children, function(gchild) { - Ext.get(gchild).setWidth("100%"); - }); - }); - }); -} - -function resizeMap() { - - if (Ext.getCmp("big-map")) { - Ext.getCmp("big-map").doLayout(false, true); - - var div = Ext.get("big-map"); - - var setChildrens = function(children) { - Ext.each(children, function(child) { - child = Ext.get(child); - var classN = child.dom.className; - if (classN - && classN.indexOf - && (classN.indexOf("tbar") < 0 && classN - .indexOf("x-panel-header") < 0)) { - child.setHeight("100%"); - if (child.id - && (child.id.indexOf("ViewPort") < 0 && child.id - .indexOf("layerManager") < 0)) { - setChildrens(child.dom.children); - } - } - }); - }; - var height = Ext.getBody().getHeight() - Ext.get("footer").getHeight() - - Ext.get("header").getHeight() - - Ext.get("search-form").getHeight() - 20; - - setChildrens(div); - div.setHeight(height); - } - - if (Ext.getCmp("layerManager")) { - Ext.getCmp("layerManager").collapse(false); - Ext.getCmp("layerManager").expand(false); - } - app.mapApp.getMap().updateSize(); - - if (app.mapApp.getMap().getZoom() < 4) { - app.mapApp.getMap().zoomTo(4); - } -} - -function showAdvancedSearch() { - hide('show-advanced'); - show('legend-search'); - show('hide-advanced'); - Ext.get("search-form-fieldset").dom.style.border = "1px solid #fff"; - show('advanced-search-options'); - if (Ext.getCmp('advanced-search-options-content-form')) { - Ext.getCmp('advanced-search-options-content-form').doLayout(); - - // For reset and submit buttons: - - t = Ext.getCmp('advanced-search-options-content-form').toolbars[0]; - document.getElementById(t.el.parent().id).style.width = ""; - } - if (cookie && cookie.get('user')) { - cookie.get('user').searchTemplate = 'FULL'; - } else if (cookie) { - cookie.set('user', {}); - cookie.get('user').searchTemplate = 'FULL'; - } - if (catalogue && catalogue.resultsView && catalogue.resultsView.autoSelectTemplate) { - catalogue.resultsView.autoSelectTemplate(); - } -} - -function hideAdvancedSearch(updateSearch) { - - if (Ext.getCmp('advanced-search-options-content-form')) { - - GeoNetwork.state.History.suspendEvents(); - - Ext.getCmp('advanced-search-options-content-form').getForm().reset(); - - var value = Ext.getCmp("fullTextField").getValue(); - - if (value.length > 0) - Ext.getCmp('E_trueany').setValue(value + "*"); - else - Ext.getCmp('E_trueany').setValue(value); - - Ext.getCmp('E_dynamic').suspendEvents(false); - Ext.getCmp('E_dynamic').checked = (Ext.getCmp("o_dynamic").getValue()); - Ext.getCmp('E_dynamic').resumeEvents(); - - Ext.getCmp('E_download').suspendEvents(false); - Ext.getCmp('E_download').checked = (Ext.getCmp("o_download").getValue()); - Ext.getCmp('E_download').resumeEvents(); - - Ext.getCmp('E_nodynamicdownload').suspendEvents(false); - Ext.getCmp('E_nodynamicdownload').checked = ( - Ext.getCmp("o_nodynamicdownload").getValue()); - Ext.getCmp('E_nodynamicdownload').resumeEvents(); - - GeoNetwork.state.History.resumeEvents(); - - } - - if (Ext.getCmp('facets-panel')) { - Ext.getCmp('facets-panel').reset(); - } - - hide('advanced-search-options'); - hide('legend-search'); - hide('hide-advanced'); - Ext.get("search-form-fieldset").dom.style.border = "none"; - show('show-advanced'); - if (updateSearch) { - if (cookie && cookie.get('user')) { - cookie.get('user').searchTemplate = 'THUMBNAIL'; - } else if (cookie) { - cookie.set('user', {}); - cookie.get('user').searchTemplate = 'THUMBNAIL'; - } - if (catalogue && catalogue.resultsView - && catalogue.resultsView.autoSelectTemplate) { - catalogue.resultsView.autoSelectTemplate(); - } - } -} - -/** - * This function only works in IE. In IE8, the user has to confirm a security - * alert. Other browsers not tested. - */ -function copyToClipboard(text) { - var textfield = Ext.getCmp("copy-clipboard-ie_"); - - if (!textfield) { - textfield = new Ext.form.TextField({ - id : "copy-clipboard-ie_", - renderTo : "copy-clipboard-ie" - }); - } - show(textfield); - textfield.setValue(text); - textfield.focus(); - textfield.selectText(); - - if (window.clipboardData && clipboardData.setData) { - window.clipboardData.setData('Text', textfield.getValue()); - } else { - CopiedTxt = document.selection.createRange(); - CopiedTxt.execCommand("Copy"); - } - // clearSelection(); - hide(textfield); -} -/** - * @param uuid - * @return {String} - */ -function metadataViewURL(uuid) { - return window.location.href.match(/(http.*\/.*)\/srv\.*/, '')[1] + '?uuid=' - + uuid; -} - -// the following function is for bookmarking uuids: -// Chrome doesn't support it, then show permalink -function bookmarkMetadata(title, uuid) { - var url = document.location.href; - if (url.indexOf("#") > 0) { - url = url.substring(0, url.indexOf("#")); - } - if (url.indexOf("?") > 0) { - url = url.substring(0, url.indexOf("?")); - } - - url = url + "|#" + uuid; - - if (window.sidebar) { // firefox - window.sidebar.addPanel(title, url, ""); - } else if (window.opera && window.print) { // opera - var elem = document.createElement('a'); - elem.setAttribute('href', url); - elem.setAttribute('title', title); - elem.setAttribute('rel', 'sidebar'); - elem.click(); - } else if (Ext.isIE || window.external.addFavorite) { - window.external.AddFavorite(url, title); - } else { - // TODO show permalink - } -} - -// Validate a WMS or WFS against the Geonovum service -function validateWMSWFS(capsURL, el, type) { - - el = Ext.get(el); - - if (el) - el = el.parent().parent().parent().parent().parent(); - - if (!el) - el = Ext.getBody(); - - // Load mask to prevent more than one click: - if (el) { - var mask = new Ext.LoadMask(el, { - msg : OpenLayers.i18n('disclaimer.loading') - }); - mask.show(); - } - - // do NOT use the REQUEST=GetCapabilities etc, because the validator - // seesm to trip over this - capsURL = capsURL.replace(/REQUEST=GetCapabilities/i, ""); - // capsURL = capsURL.replace(/SERVICE=WMS/i, ""); - capsURL = capsURL.replace(/VERSION=1.1.1/i, ""); - capsURL = capsURL.replace(/&&/gi, "&"); // replace any double & - capsURL = capsURL.replace(/\?&/gi, "?"); // replace any combi of ?& - - // now use that url for validation and presentation of the results - var params = { - type : type, - wmsurl : capsURL - }; - var totalUrl = 'validators.wms'; - - Ext.Ajax.request({ - method : 'GET', - url : totalUrl, - params : params, - success : function(response) { - mask.hide(); - - Ext.MessageBox.show({ - title : OpenLayers.i18n('validityInfo'), - msg : response.responseText, - buttons : Ext.MessageBox.OK, - icon : Ext.MessageBox.INFO, - minWidth : 600, - maxWidth : 800 - }); - - }, - failure : function(response) { - mask.hide(); - - Ext.MessageBox.show({ - title : OpenLayers.i18n('validityInfo'), - msg : OpenLayers.i18n('wxs-extract-service-not-found', { - url : "validation", - misc : response.responseText - }), - buttons : Ext.MessageBox.OK, - icon : Ext.MessageBox.ERROR, - minWidth : 600, - maxWidth : 800 - }); - } - }); -} - -// Load tabs from PDOK page: -function loadPDOK(el, page) { - - var base_url = "https://www.pdok.nl/"; - - var url = base_url + page; - - Ext.get("pdok-loads").load( - { - url : url, - callback : function(response, opts) { - var dom = Ext.get("pdok-loads").dom; - var toRemove = [ "header", "nav_main", "footer", - "footer_links", "nav_bar", "func_links", - "breadcrumb", "nav_sub" ]; - Ext.each(toRemove, function(clas) { - Ext.each(Ext.query("." + clas, dom), function(el) { - Ext.get(el).remove(); - }); - }); - } - }); - - Ext.each(Ext.query('a', Ext.get("main-navigation").dom), function(a) { - Ext.get(a).removeClass("selected"); - }); - - Ext.get(el).addClass("selected"); - - hide("main"); - hide("foot-loads"); - show("pdok-loads"); -} - diff --git a/web-client/src/main/resources/apps/html5ui/js/Settings.js b/web-client/src/main/resources/apps/html5ui/js/Settings.js deleted file mode 100644 index e9c30e00749..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/Settings.js +++ /dev/null @@ -1,92 +0,0 @@ -GeoNetwork.Settings = {}; - -// Default to absolute path without apps/search -//GeoNetwork.URL = '../'; - -//OpenLayers.ProxyHostURL = '/cgi-bin/proxy.cgi?url='; -// GeoNetwork proxy is much more permissive than OL one -OpenLayers.ProxyHostURL = '../../proxy?url='; - -OpenLayers.ProxyHost = function(url){ - /** - * Do not use proxy for local domain. - * This is required to keep the session activated. - */ - if (url && url.indexOf(window.location.host) != -1) { - return url; - } else { - return OpenLayers.ProxyHostURL + encodeURIComponent(url); - } -}; - - -GeoNetwork.Util.defaultLocale = 'eng'; -// Restrict locales to a subset of languages -//GeoNetwork.Util.locales = [ -// ['fr', 'Français'] -// ]; -GeoNetwork.searchDefault = { - activeMapControlExtent: false, - // show "Title" field in advanced search form - advSearchShowTitleField: false, - // show "Alternate title" in advanced search form - advSearchShowAltTitleField: false -}; -GeoNetwork.advancedFormButton = true; - -GeoNetwork.Settings.editor = { - defaultViewMode : 'simple', - editHarvested: false -// defaultViewMode : 'inspire' -}; - -// Define if default mode should be used for HTML print output instead of tabs only -GeoNetwork.printDefaultForTabs = false; - -// Define if label needs to be displayed for login form next to username/password fields -GeoNetwork.hideLoginLabels = true; - - -// Define which type of search to use -// Old mode (xml.search with lucene, db access and XSL formatting) -//GeoNetwork.Settings.mdStore = GeoNetwork.data.MetadataResultsStore; -// IndexOnly mode (xml.search with lucene only) - recommended -GeoNetwork.Settings.mdStore = GeoNetwork.data.MetadataResultsFastStore; - - -//List of facet to display. If none, the server configuration is use. -GeoNetwork.Settings.facetListConfig = [{name: 'orgNames'}, - {name: 'keywords'}, - {name: 'licenses'}, - {name: 'types'}, - {name: 'categories'}, - {name: 'serviceTypes'}, - {name: 'denominators'}, - {name: 'createDateYears'}]; -GeoNetwork.Settings.facetMaxItems = 7; - -GeoNetwork.MapModule = true; -GeoNetwork.ProjectionList = [['EPSG:4326', 'WGS84 (lat/lon)']]; -GeoNetwork.WMSList = []; - -GeoNetwork.defaultViewMode = 'view-simple'; - -Ext.BLANK_IMAGE_URL = '../../apps/js/ext/resources/images/default/s.gif'; - -GeoNetwork.Settings.results = { - // Parameters to set bounding box highlighter colors - // Use a custom single color for bounding box - featurecolor: 'orange', - // Use a random color map with 2 colors - //colormap: GeoNetwork.Util.generateColorMap(2), - // Use a default color map with 10 colors - //colormap: GeoNetwork.Util.defaultColorMap, - // Use a custom color map - //colormap: ['red', 'green', 'blue'], - colormap: undefined, - // Use a custom CSS rules - //featurecolorCSS: "border-width: 5px;border-style: solid; border-color: ${featurecolor}" - featurecolorCSS: undefined -}; - - diff --git a/web-client/src/main/resources/apps/html5ui/js/Shortcuts.js b/web-client/src/main/resources/apps/html5ui/js/Shortcuts.js deleted file mode 100644 index a90c68943b8..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/Shortcuts.js +++ /dev/null @@ -1,193 +0,0 @@ -/** - * Init shortcut - * - * @return - */ -function initShortcut() { - - // Define editor shortcut here. - var searchConfig = [{ - key: "f", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('focusOnAny'), - fn: function () { - var e = Ext.get('E_any'); - e.highlight(); - e.dom.focus(true); - } - }, { - key: "s", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('runSearch'), - fn: function () { - var e = Ext.getCmp('advanced-search-options-content-form'); - e.getEl().fadeIn(); - e.fireEvent('search'); - } - }, { - key: Ext.EventObject.LEFT, - keyLabel: "LEFT", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('previousPage'), - fn: function () { - Ext.getCmp('previousBt').handler(); - } - }, { - key: Ext.EventObject.RIGHT, - keyLabel: "RIGHT", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('nextPage'), - fn: function () { - Ext.getCmp('nextBt').handler(); - } - }, { - key: Ext.EventObject.UP, - keyLabel: "UP", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('upInPage'), - fn: function () { - catalogue.resultsView.getEl().scroll('t', 170, true); - } - }, { - key: Ext.EventObject.DOWN, - keyLabel: "DOWN", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('downInPage'), - fn: function () { - catalogue.resultsView.getEl().scroll('b', 170, true); - } - }, { - key: "d", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('hideadvanced-search-options-content-form'), - fn: function () { - var r = Ext.getCmp('west'); - r.toggleCollapse(); - } - }, { - key: "r", - ctrl: true, - shift: true, - label: OpenLayers.i18n('resetadvanced-search-options-content-form'), - fn: function () { - var e = Ext.getCmp('advanced-search-options-content-form'); - e.getEl().fadeIn(); - e.fireEvent('reset'); - } - }, { - key: "v", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('switchMode'), - fn: function () { - if(app.switchMode)app.switchMode(null, true); - } - }, { - key: "m", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('toggleLayerManager'), - fn: function () { - var r = Ext.getCmp('layerManager'); - r.toggleCollapse(); - } - }, { - key: "l", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('focusOnLogin'), - fn: function () { - if (catalogue.identifiedUser === undefined) { - toggleLogin(); - } else { - catalogue.logout(); - } - - } - }, { - key: "a", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('openAdmin'), - fn: function () { - if (catalogue.isIdentified()) { - catalogue.admin(); - } - } - }, { - key: "c", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('newMetadata'), - fn: function () { - if (catalogue.isIdentified()) { - var actionCtn = Ext.getCmp('resultsPanel').getTopToolbar(); - actionCtn.createMetadataAction.handler.apply(actionCtn); - } - } - }, { - key: 'h', // FIXME - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('displayHelpPanel'), - fn: function () { - var ss = Ext.getDom('shortcut').style; - if (ss.display === 'block') { - Ext.getDom('shortcut').style.display = 'none'; - } else { - Ext.getDom('shortcut').style.display = 'block'; - } - } - }]; - var map = new Ext.KeyMap(document, searchConfig); - map.enable(); - - var helpEl = Ext.getDom('shortcutHelp'); - if (helpEl) { - var help = ''; - for (var i = 0; i < searchConfig.length; i++) { - var c = searchConfig[i]; - help += '' + - (c.ctrl === true ? '<Ctrl> + ' : '') + - (c.shift === true ? '<Shift> + ' : '') + - '' + - (c.keyLabel ? c.keyLabel : c.key) + - '' + - ':' + - c.label + - ''; - } - - var html = '
    ' + help + '
    '; - Ext.DomHelper.insertHtml('afterEnd', helpEl, html); - } - // Launch search when enter key press - var formMap = new Ext.KeyMap("advanced-search-options-content-form", [{ - key: [10, 13], - fn: function () { - Ext.getCmp('advanced-search-options-content-form').fireEvent('search'); - } - }]); - - formMap.enable(); -} diff --git a/web-client/src/main/resources/apps/html5ui/js/Templates.js b/web-client/src/main/resources/apps/html5ui/js/Templates.js deleted file mode 100644 index 3affb1a1ab8..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/Templates.js +++ /dev/null @@ -1,550 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork'); - -/** api: (define) - * module = GeoNetwork - * class = Templates - * base_link = `Ext.XTemplate `_ - */ -/** api: constructor - * .. class:: GeoNetwork.HTML5UI.Templates() - * - * A template for harvester (experimental) - */ -GeoNetwork.HTML5UI = {}; - -GeoNetwork.HTML5UI.Templates = Ext.extend(Ext.XTemplate, { - compiled: false, - disableFormats: false, - catalogue : null, - sortOrder: 0, - abstractMaxSize : 50, - xmlTplMarkup : [ - '', - '', - '', - '{site_name}', - '', - '{site_ogctype}', - '', - '', - '{site_url}', - '', - '', - '{site_icon}', - '', - '', - '', - '{site_account_use}', - '{site_account_username}', - '{site_account_password}', - '', - '', - '', - '', - '', - '{options_every}', - '', - '', - '{options_onerunonly}', - '', - '', - '{options_lang}', - '', - '', - '{options_topic}', - '', - '', - '{options_createthumbnails}', - '', - '', - '{options_uselayer}', - '', - '', - '{options_uselayermd}', - '', - '', - '{options_datasetcategory}', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '' - // TODO : other properties - display if available depends on harvester - ], - initComponent: function() { - GeoNetwork.HTML5UI.Templates.superclass.initComponent.call(this); - }, - /** api: method[getHarvesterTemplate] - * - * :return: A template for harvester configuration - */ - getHarvesterTemplate: function() { - return new Ext.XTemplate(this.xmlTplMarkup); - } -}); - -/** - * Common templates - */ - -/** - * Shows Detailed Metadata on a new tab - */ -GeoNetwork.HTML5UI.Templates.DETAILED_METADATA = - '
  • ', - '', - '
  • '; - -GeoNetwork.HTML5UI.Templates.RATING = - '
    ', - 'checked="true" value="1"/>' + - 'checked="true" value="2"/>' + - 'checked="true" value="3"/>' + - 'checked="true" value="4"/>' + - 'checked="true" value="5"/>' + - '
    '; - -/** - * Title of the Metadata - */ -GeoNetwork.HTML5UI.Templates.SHORT_TITLE = - '

    \ - checked="true" \ - class="selector" \ - onclick="javascript:catalogue.metadataSelect((this.checked?\'add\':\'remove\'), [\'{uuid}\']);"/>\ - \ - {[Ext.util.Format.ellipsis(values.title, 30, true)]}\ -

    '; -GeoNetwork.HTML5UI.Templates.TITLE = - '

    \ - checked="true" \ - class="selector" \ - onclick="javascript:catalogue.metadataSelect((this.checked?\'add\':\'remove\'), [\'{uuid}\']);"/>\ - {title}\ -

    '; - - -/** - * Rating (stars) for metadata - */ -GeoNetwork.HTML5UI.Templates.RATING_TPL = '
    ' + - 'checked="true" value="1"/>' + - 'checked="true" value="2"/>' + - 'checked="true" value="3"/>' + - 'checked="true" value="4"/>' + - 'checked="true" value="5"/>' + - '
    '; - -/** - * Source logo - */ -GeoNetwork.HTML5UI.Templates.LOGO = - ''; - - -/** - * Button to put the metadata on the map - */ -GeoNetwork.HTML5UI.Templates.SHOW_ON_MAP = - '\ - \ - \ - \ - '; - -GeoNetwork.HTML5UI.Templates.LINKCONTAINER = - ''; -/** - * Button to download metadata - */ -GeoNetwork.HTML5UI.Templates.DOWNLOAD = - '
    \ - \ - \ - \ - '; - - -/** - * Shows if the metadata is valid - * Validity and category information - */ -GeoNetwork.HTML5UI.Templates.VALID = - '\ -
    \ - \ - \ - " title="{[OpenLayers.i18n("validityInfo")]}\ - \ - {values.type}: \ - {[OpenLayers.i18n("valid")]}\ - {[OpenLayers.i18n("notValid")]}\ - {[OpenLayers.i18n("notDetermined")]}\ - ({values.ratio}) - \ - \ - ">
    \ -
    '; - -/** - * Shows if the WMS is valid - * - * WMS validation is made by MetadataResultsView.dislayLinks - */ -GeoNetwork.HTML5UI.Templates.WMS_VALID = ""; - -/** - * Shows if the WFS is valid. WFS validation is made by MetadataResultsView.dislayLinks - */ -GeoNetwork.HTML5UI.Templates.WFS_VALID = ""; - -/** - * Shows Add to favourites - */ -GeoNetwork.HTML5UI.Templates.BOOKMARK = - ''; - -/** - * Display copy to clipboard icon if you are using IE. - * @type {String} - */ -GeoNetwork.HTML5UI.Templates.COPYTOCLIPBOARD = - ' \ - \ - '; - -/** - * Thumbnails - */ -GeoNetwork.HTML5UI.Templates.THUMB = - '
    \ - \ - \ - Thumbnail\ - \ - \ - \ -
    \ - {[OpenLayers.i18n("no-thumbnail")]}\ -
    \ -
    \ -
    '; - -GeoNetwork.HTML5UI.Templates.CHANGE_DATE = - '\ -
    {[OpenLayers.i18n("lastUpdate")]} {[values.changedate.split(\'T\')[0]]}
    \ -
    '; - -/** - * Shows contact info. - */ -GeoNetwork.HTML5UI.Templates.CONTACT_INFO = - '
    \ -\ - \ -
    \ - \ - \ - {name}\ -
    \ -
    \ -
    \ -\ -
    {ownername} - {[OpenLayers.i18n("lastUpdate")]}{[values.changedate.split(\'T\')[0]]}
    \ -
    ' + - GeoNetwork.HTML5UI.Templates.CHANGE_DATE + - '
    '; - -GeoNetwork.HTML5UI.Templates.CONTACT_INFO_TOOLTIP = - ' - {name} ({role}) \n\'; // In one line to avoid extra space in tooltip - -/** - * Description - */ -GeoNetwork.HTML5UI.Templates.SUBJECT = - '\ - \ - \ - {value}{[xindex==xcount?"":", "]}\ - \ - \ - '; - -/** - * Description - */ -GeoNetwork.HTML5UI.Templates.CATEGORIES = - '', - '', - '
     
    ', - '
    ', - ''; - -/** - * Related metadata - */ -GeoNetwork.HTML5UI.Templates.RELATED_DATASETS = - '
    \ - \ -
      \ -
      '; - -/** api: constructor - * .. class:: GeoNetwork.HTML5UI.Templates.SIMPLE() - * - * An instance of a pre-configured GeoNetwork.HTML5UI.Templates with title and - * keywords with abstract in tooltip. - */ -GeoNetwork.HTML5UI.Templates.SIMPLE = new Ext.XTemplate( - '
        ', - '', - '
      • ', - '\ -', - '', - '\ - \ -
        ', - GeoNetwork.HTML5UI.Templates.LOGO, - '', - GeoNetwork.HTML5UI.Templates.TITLE, - '
        ', - '\ -\ - \ - \ - \ -
        ', - GeoNetwork.HTML5UI.Templates.SUBJECT, - '', - GeoNetwork.HTML5UI.Templates.CONTACT_INFO, - '
        ', - '\ -\ - \ -// \ -// \ - \ - \ -
        ', -// Add to map and download link are handled by the JS -// based on the store content to create list menu instead -// of a long list of buttons. -// GeoNetwork.HTML5UI.Templates.SHOW_ON_MAP, -// '', -// GeoNetwork.HTML5UI.Templates.DOWNLOAD, -// '', - GeoNetwork.HTML5UI.Templates.BOOKMARK, - GeoNetwork.HTML5UI.Templates.LINKCONTAINER, - '', - GeoNetwork.HTML5UI.Templates.COPYTOCLIPBOARD, - '
        ', - '
      • ', - '
        ', - '
      ' -); - - - -/** api: constructor - * .. class:: GeoNetwork.HTML5UI.Templates.THUMBNAIL() - * - * An instance of a pre-configured GeoNetwork.HTML5UI.Templates with thumbnail view - */ -GeoNetwork.HTML5UI.Templates.THUMBNAIL = new Ext.XTemplate( - '
        ', - '', - '
      • ', - '
        ', - GeoNetwork.HTML5UI.Templates.SHORT_TITLE, - GeoNetwork.HTML5UI.Templates.THUMB, - GeoNetwork.HTML5UI.Templates.LINKCONTAINER, - '
        ', - GeoNetwork.HTML5UI.Templates.CHANGE_DATE, - '
        ', - '
        ', - '
      • ', - '
        ', - '
      ' -); - -/** api: constructor - * .. class:: GeoNetwork.HTML5UI.Templates.THUMBNAIL() - * - * An instance of a pre-configured GeoNetwork.HTML5UI.Templates with thumbnail view - */ -GeoNetwork.HTML5UI.Templates.THUMBNAIL_SIMPLER = new Ext.XTemplate( - '
        ', - '', - '
      • ', - ' ', - '
        ', - GeoNetwork.HTML5UI.Templates.THUMB, - GeoNetwork.HTML5UI.Templates.SHORT_TITLE, - '\ - {[values.abstract.substring(0, 60)]}...\ - \ - \ - {values.abstract}\ - ', - '
        ', - '
      • ', - '
        ', - '
      ' -); - - -/** api: constructor - * .. class:: GeoNetwork.HTML5UI.Templates.FULL() - * - * An instance of a pre-configured GeoNetwork.HTML5UI.Templates with full view - */ -GeoNetwork.HTML5UI.Templates.FULL = new Ext.XTemplate( - '
        ', - '', - '
      • ', - '\ - ', - '', - '\ - ', - GeoNetwork.HTML5UI.Templates.CATEGORIES, - '', - '
        ', - GeoNetwork.HTML5UI.Templates.LOGO, - '', - GeoNetwork.HTML5UI.Templates.TITLE, - '

        \ - \ - {[values.abstract.substring(0, 350)]}...\ - \ - \ - {values.abstract}\ - \ -

        ', // FIXME : 250 as parameters - GeoNetwork.HTML5UI.Templates.SUBJECT, - '
        ', - GeoNetwork.HTML5UI.Templates.RATING_TPL, - GeoNetwork.HTML5UI.Templates.THUMB, - GeoNetwork.HTML5UI.Templates.CONTACT_INFO, - '
        ', - '', - '', - '', - '', - '', - '', - '\ -
        ', - GeoNetwork.HTML5UI.Templates.BOOKMARK, - GeoNetwork.HTML5UI.Templates.COPYTOCLIPBOARD, - '', - - GeoNetwork.HTML5UI.Templates.WMS_VALID, - GeoNetwork.HTML5UI.Templates.WFS_VALID, - GeoNetwork.HTML5UI.Templates.LINKCONTAINER, - GeoNetwork.HTML5UI.Templates.VALID, - GeoNetwork.HTML5UI.Templates.RATING, - - // GeoNetwork.HTML5UI.Templates.SHOW_ON_MAP, - // GeoNetwork.HTML5UI.Templates.DOWNLOAD, - '
        ', - GeoNetwork.HTML5UI.Templates.RELATED_DATASETS, - GeoNetwork.HTML5UI.Templates.DETAILED_METADATA, - '
        ', - '
      • ', - '
        ', - '
      ', - { - hasDownloadLinks: function(values) { - var i; - for (i = 0; i < values.length; i ++) { - if (values[i].type === 'application/x-compressed') { - return true; - } - } - return false; - }, - hasWMSLinks: function(values) { - var i; - for (i = 0; i < values.length; i ++) { - console.log(values[i]); - if (values[i].type === 'application/vnd.ogc.wms_xml') { - return true; - } - } - return false; - }, - hasWFSLinks: function(values) { - var i; - for (i = 0; i < values.length; i ++) { - if (values[i].type === 'application/vnd.ogc.wfs_xml' || values[i].type === 'OGC:WFS') { - return true; - } - } - return false; - } - } -); - -GeoNetwork.HTML5UI.Templates.Relation = { - SHORT: ['
    • ', - '', - '
    • '] -}; diff --git a/web-client/src/main/resources/apps/html5ui/js/map/MapApp.js b/web-client/src/main/resources/apps/html5ui/js/map/MapApp.js deleted file mode 100644 index 1b7fb86a7b8..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/map/MapApp.js +++ /dev/null @@ -1,2107 +0,0 @@ -/* - * Copyright (C) 2012 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ -Ext.namespace('GeoNetwork'); - -/** - * Utility class for maps. Creates and manages maps. - * - * Helps App.js - */ -GeoNetwork.mapApp = function() { - // private vars: - var toolbar, toctoolbar; - var viewport = null; - - var tree, legendPanel, printPanel, printProvider, printPage, pageLayer; - - var featureinfo; - - var activeNode; - - var featureinfolayer; - - var layerLoadingMask; - - var layers; - - var generateMaps = function(options, layers, scales) { - var map; - - if (GeoNetwork.map.CONTEXT) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.CONTEXT, - async: false - }); - if (request.responseText) { - - var text = request.responseText; - var format = new OpenLayers.Format.WMC(); - map = format.read(text, {map:options}); - } - } - else if (GeoNetwork.map.OWS) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.OWS, - async: false - }); - if (request.responseText) { - var parser = new OpenLayers.Format.OWSContext(); - var text = request.responseText; - map = parser.read(text, {map: options}); - } - } - else { - map = new OpenLayers.Map('ol_map', options); - fixedScales = scales; - - Ext.each(GeoNetwork.map.BACKGROUND_LAYERS, function(layer) { - map.addLayer(layer.clone()); - }); - } - - map.events.register("click", map, function(e) { - app.showBigMap(); - }); - - var showBigMapButton = new OpenLayers.Control.Button({ - trigger : showBigMap, - title : 'Open kaart en verberg zoekresultaten' - }); - - OpenLayers.Util.extend(showBigMapButton, { - displayClass : 'showBigMap' - }); - - var panel = new OpenLayers.Control.Panel(); - - OpenLayers.Util.extend(panel, { - displayClass : 'showBigMapPanel' - }); - - panel.addControls([ showBigMapButton ]); - map.addControl(panel); - - new GeoExt.MapPanel({ - id : 'minimap', - renderTo : 'mini-map', - height : 200, - width : 200, - map : map, - title : OpenLayers.i18n('Preview'), - stateId : 'minimap', - prettyStateKeys : true - }); - Ext.get("mini-map").setVisibilityMode(Ext.Element.DISPLAY); - - var map2; - - if (GeoNetwork.map.CONTEXT) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.CONTEXT, - async: false - }); - if (request.responseText) { - - var text = request.responseText; - var format = new OpenLayers.Format.WMC(); - map2 = format.read(text, {map:options}); - } - } - else if (GeoNetwork.map.OWS) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.OWS, - async: false - }); - if (request.responseText) { - var parser = new OpenLayers.Format.OWSContext(); - var text = request.responseText; - map2 = parser.read(text, {map: options}); - } - } - else { - map2 = new OpenLayers.Map({ - maxExtent : GeoNetwork.map.MAP_OPTIONS.maxExtent.clone(), - projection : GeoNetwork.map.MAP_OPTIONS.projection, - resolutions : GeoNetwork.map.MAP_OPTIONS.resolutions, - restrictedExtent : GeoNetwork.map.MAP_OPTIONS.restrictedExtent - .clone(), - controls : [] - }); - - Ext.each(GeoNetwork.map.BACKGROUND_LAYERS, function(layer) { - map2.addLayer(layer.clone()); - }); - - } - - Ext.each(GeoNetwork.map.MAP_OPTIONS.controls_, function(control) { - map2.addControl(new control()); - }); - - var scaleLinePanel = new Ext.Panel({ - cls : 'olControlScaleLine overlay-element overlay-scaleline', - border : false - }); - - var zoomStore; - - var fixedScales = GeoNetwork.map.MAP_OPTIONS.resolutions; - - if (fixedScales && fixedScales.length > 0) { - var zooms = []; - var scales = fixedScales; - var units = map2.baseLayer.units; - - for ( var i = scales.length - 1; i >= 0; i--) { - var scale = scales[i]; - zooms.push({ - level : i, - resolution : OpenLayers.Util.getResolutionFromScale(scale, - units), - scale : scale - }); - } - - zoomStore = new GeoExt.data.ScaleStore({}); - zoomStore.loadData(zooms); - - } else { - zoomStore = new GeoExt.data.ScaleStore({ - map : map2 - }); - } - var zoomSelector = new Ext.form.ComboBox( - { - emptyText : 'Zoom level', - tpl : '
      1 : {[parseInt(values.scale)]}
      ', - editable : false, - triggerAction : 'all', - mode : 'local', - store : zoomStore, - width : 110 - }); - - zoomSelector.on('click', function(evt) { - evt.stopEvent(); - }); - zoomSelector.on('mousedown', function(evt) { - evt.stopEvent(); - }); - - zoomSelector.on('select', function(combo, record, index) { - map.zoomTo(record.data.level); - }, this); - - var zoomSelectorWrapper = new Ext.Panel({ - items : [ zoomSelector ], - cls : 'overlay-element overlay-scalechooser', - border : false - }); - - map2.events.register('zoomend', this, function() { - var scale = zoomStore.queryBy(function(record) { - return map.getZoom() === record.data.level; - }); - - if (scale.length > 0) { - scale = scale.items[0]; - zoomSelector.setValue("1 : " + parseInt(scale.data.scale, 10)); - } else { - if (!zoomSelector.rendered) { - return; - } - zoomSelector.clearValue(); - } - }); - - var mapOverlay = new Ext.Panel({ - // title: "Overlay", - cls : 'map-overlay', - items : [ scaleLinePanel, zoomSelectorWrapper ] - }); - - var panel2 = new GeoExt.MapPanel({ - height : 500, - map : map2, - id : 'really-big-map', - // title : 'Map', - stateId : 'bigmap', - prettyStateKeys : true - // , - // renderTo: 'big-map' - }); - - panel2.map = map2; - - panel2.on("render", function() { - var scaleLine = new OpenLayers.Control.ScaleLine(); - - map2.addControl(scaleLine); - scaleLine.activate(); - }, this); - app.mapApp.maps.push(map2); - app.mapApp.maps.push(map); - - addMapControls(); - - map.events.register("changebaselayer", map, function(e) { - var name = e.object.baseLayer.name; - var url = e.object.baseLayer.url; - - Ext.each(app.mapApp.maps, function(m) { - if (m.id !== e.object.id) { - Ext.each(m.layers, function(l) { - if (l.name === name && l.url === url) { - m.setBaseLayer(l); - } - }); - } - }); - }); - - map.events.register("moveend", map, function(e) { - var name = e.object.baseLayer.name; - var url = e.object.baseLayer.url; - - Ext.each(app.mapApp.maps, function(m) { - if (m.id !== e.object.id) { - Ext.each(m.layers, function(l) { - if (l.name === name && l.url === url) { - m.setBaseLayer(l); - } - }); - } - }); - }); - - map.events.register("preaddlayer", map, function(e) { - var name = e.layer.name; - var url = e.layer.url; - Ext.each(map.layers, function(l) { - if (l.name === name && l.url === url) { - return false; - } - }); - - Ext.each(app.mapApp.maps, function(m) { - var alreadyHas = false; - if (m.id !== e.object.id) { - Ext.each(map.layers, function(l) { - if (l.name === name && l.url === url) { - alreadyHas = true; - } - }); - if (!alreadyHas) { - m.addLayer(e.layer.clone()); - } - } - }); - }); - - map.events - .register( - "changelayer", - map, - function(e) { - var layer = e.layer; - var property = e.property; - - Ext - .each( - app.mapApp.maps, - function(m) { - if (m.id !== e.object.id) { - Ext - .each( - m.layers, - function(l) { - if (l.name === layer.name - && l.url === layer.url) { - if (property === "opacity") { - l - .setOpacity(layer.opacity); - } else if (property === "visibility") { - l - .setVisibility(layer - .getVisibility()); - } else if (property === "params") { - // style - // changed - l - .mergeNewParams({ - styles : Ext - .getCmp("layerstyles").layerStylesPanel.selectedStyle - }); - } - } - }); - } - }); - }); - - createViewport(panel2); - registerWindows(map2, map); - }; - - /** - * Configure the map controls - * - */ - var addMapControls = function() { - Ext.each(app.mapApp.maps, function(map) { - map.addControl(new GeoNetwork.Control.ZoomWheel()); - map.addControl(new OpenLayers.Control.LoadingPanel()); - }); - }; - - /** - * Handler to manage the remove of a layer in the map - * - */ - var removeLayerHandler = function(node) { - Ext - .each( - app.mapApp.maps, - function(map) { - try { - if (node) { - var lyr; - lyr = node.attributes.layer; - if (lyr) { - if (!lyr.isBaseLayer) { - if ((typeof (lyr.isLoading) === "undefined") - || // Layers - // added - // from - // WMC - (lyr.isLoading === false)) { - Ext - .each( - map.layers, - function(l) { - if (l - && (lyr.id === l.id || (lyr.name === l.name && lyr.url === l.url))) { - map - .removeLayer(l); - } - }); - if (activeNode - && activeNode === node) { - activeNode = null; - } - refreshTocToolbar(activeNode); - Ext.getCmp('toctree') - .getSelectionModel() - .clearSelections(); - } - } - } - } - } catch (ex) { - if (!Ext.isIE && console && console.log) { - console.log(ex); - } - } - }); - }; - - var removeLayerHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - removeLayerHandler(node); - }; - /** - * Handler to manage WMS time layers - * - */ - var wmsTimeHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if (layer && layer.dimensions && layer.dimensions.time) { - GeoNetwork.WindowManager.showWindow("wmstime"); - GeoNetwork.WindowManager.getWindow("wmstime").setLayer(layer); - } - } - }; - - var wmsTimeHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - wmsTimeHandler(node); - }; - - /** - * Handler to manage the selection of WMS layers with several SLD styles - * defined - * - */ - var stylesLayerHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if ((layer) && (layer.styles) && (layer.styles.length > 1)) { - GeoNetwork.WindowManager.showWindow("layerstyles"); - GeoNetwork.WindowManager.getWindow("layerstyles") - .showLayerStyles(layer); - } - } - }; - - var stylesLayerHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - stylesLayerHandler(node); - }; - - /** - * Handler to manage the WMS info window for the layers - * - */ - var metadataLayerHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - GeoNetwork.WindowManager.showWindow("wmsinfo"); - GeoNetwork.WindowManager.getWindow("wmsinfo").showLayerInfo(layer); - } - }; - - var metadataLayerHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - metadataLayerHandler(node); - }; - - /** - * Updates the TOC toolbar buttons depending on TOC layer selected - * - */ - var refreshTocToolbar = function(node) { - - activeNode = node; - - if ((node) && (node.attributes.layer)) { - if (node.parentNode.attributes.nodeType === "gx_baselayercontainer") { - Ext.getCmp("tbRemoveButton").disable(); - } else { - Ext.getCmp("tbRemoveButton").enable(); - } - - var layer = node.attributes.layer; - - if (layer && layer.dimensions && layer.dimensions.time) { - Ext.getCmp("tbWmsTimeButton").enable(); - } else { - Ext.getCmp("tbWmsTimeButton").disable(); - } - - if ((layer) && ((!layer.styles) || (layer.styles.length < 2))) { - Ext.getCmp("tbStylesButton").disable(); - } else { - Ext.getCmp("tbStylesButton").enable(); - } - - if (node.layer && node.layer.dimensions - && node.layer.dimensions.time) { - Ext.getCmp("tbWmsTimeButton").enable(); - } else { - Ext.getCmp("tbWmsTimeButton").disable(); - } - if ((node.layer) - && ((!node.layer.styles) || (node.layer.styles.length < 2))) { - Ext.getCmp("tbStylesButton").disable(); - } else { - Ext.getCmp("tbStylesButton").enable(); - } - Ext.getCmp("tbMetadataButton").setDisabled( - !(node.layer instanceof OpenLayers.Layer.WMS)); - - if (Ext.getCmp("btnZoomToExtent")) { - Ext.getCmp("btnZoomToExtent").enable(); - } - - } else { - if (Ext.getCmp("tbRemoveButton")) { - Ext.getCmp("tbRemoveButton").disable(); - } - if (Ext.getCmp("tbWmsTimeButton")) { - Ext.getCmp("tbWmsTimeButton").disable(); - } - if (Ext.getCmp("tbStylesButton")) { - Ext.getCmp("tbStylesButton").disable(); - } - if (Ext.getCmp("tbMetadataButton")) { - Ext.getCmp("tbMetadataButton").disable(); - } - if (Ext.getCmp("btnZoomToExtent")) { - Ext.getCmp("btnZoomToExtent").disable(); - } - } - }; - var createPrintPanel = function(map) { - // Only allow createPrintPanel once - if (printProvider !== undefined) { - return; - } - // The printProvider that connects us to the print service - printProvider = new GeoExt.data.PrintProvider({ - method : "POST", - url : GeoNetwork.map.printCapabilities, - autoLoad : true - }); - - printPage = new GeoExt.data.PrintPage({ - printProvider : printProvider - }); - - pageLayer = new OpenLayers.Layer.Vector(OpenLayers.i18n('printLayer'), - { - visibility : false - }); - pageLayer.addFeatures(printPage.feature); - - map.addLayer(pageLayer); - - map.events.register('moveend', map, function() { - printPage.fit(this, { - mode : "screen" - }); - }); - // The form with fields controlling the print output - printPanel = new Ext.form.FormPanel( - { - title : OpenLayers.i18n("mf.print.print"), - labelAlign : "top", - items : [ - { - xtype : "textarea", - name : "comment", - value : "", - fieldLabel : OpenLayers - .i18n("mf.print.comment"), - plugins : new GeoExt.plugins.PrintPageField({ - printPage : printPage - }) - }, - { - xtype : "combo", - store : printProvider.layouts, - displayField : "name", - fieldLabel : OpenLayers.i18n("layout"), - typeAhead : true, - mode : "local", - triggerAction : "all", - plugins : new GeoExt.plugins.PrintProviderField( - { - printProvider : printProvider - }) - }, - { - xtype : "combo", - store : printProvider.dpis, - displayField : "name", - fieldLabel : OpenLayers.i18n("mf.print.dpi"), - tpl : '
      {name} dpi
      ', - typeAhead : true, - mode : "local", - triggerAction : "all", - plugins : new GeoExt.plugins.PrintProviderField( - { - printProvider : printProvider - }), - // the plugin will work even if we modify a - // combo value - setValue : function(v) { - v = parseInt(v, 10) + " dpi"; - Ext.form.ComboBox.prototype.setValue.apply( - this, arguments); - } - }, - { - xtype : "combo", - store : printProvider.scales, - displayField : "name", - fieldLabel : OpenLayers.i18n("mf.print.scale"), - typeAhead : true, - mode : "local", - triggerAction : "all", - plugins : new GeoExt.plugins.PrintPageField({ - printPage : printPage - }) - }, - { - xtype : "textfield", - name : "rotation", - fieldLabel : OpenLayers - .i18n("mf.print.rotation"), - plugins : new GeoExt.plugins.PrintPageField({ - printPage : printPage - }) - } ], - buttons : [ { - text : OpenLayers.i18n("mf.print.generatingPDF"), - handler : function() { - printProvider.print(Ext.getCmp('really-big-map'), - printPage); - } - } ], - listeners : { - beforeexpand : function() { - this.setVisibility(true); - }, - beforecollapse : function() { - this.setVisibility(false); - }, - scope : pageLayer - } - }); - Ext.getCmp('layerManager-accordion').add(printPanel); - Ext.getCmp('layerManager-accordion').doLayout(); - }; - /** - * Creates the map viewer toolbars - */ - var createToolbars = function() { - toctoolbar = []; - // Layer TOC toolbar - var action = new GeoExt.Action({ - handler : function() { - GeoNetwork.WindowManager.showWindow("addwms"); - }, - iconCls : 'addLayer', - tooltip : OpenLayers.i18n("addWMSButtonText") - }); - - toctoolbar.push(action); - action = new GeoExt.Action({ - id : "tbRemoveButton", - handler : function() { - removeLayerHandler(activeNode); - }, - iconCls : 'deleteLayer', - tooltip : OpenLayers.i18n("removeButtonText") - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id : "tbStylesButton", - handler : function() { - stylesLayerHandler(activeNode); - }, - iconCls : 'layerStyles', - tooltip : OpenLayers.i18n("chooseLayerStyle") - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id : "tbMetadataButton", - handler : function() { - metadataLayerHandler(activeNode); - }, - iconCls : 'wmsInfo', - tooltip : OpenLayers.i18n("metadataButtonText") - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id : "tbWmsTimeButton", - handler : function() { - wmsTimeHandler(activeNode); - }, - iconCls : 'wmsTime', - tooltip : OpenLayers.i18n("wmsTime") - }); - - toctoolbar.push(action); - - // Main toolbar - toolbar = []; - - var map = app.mapApp.getMap(); - - var hideBigMapButton = new OpenLayers.Control.Button({ - trigger : showSearch, - title : OpenLayers.i18n('hideBigMap') - }); - - action = new GeoExt.Action({ - control : hideBigMapButton, - map : map, - iconCls : 'hideBigMapPanel', - tooltip : { - title : OpenLayers.i18n('hideBigMap') - } - }); - - toolbar.push(action); - - action = new GeoExt.Action({ - control : new OpenLayers.Control.ZoomToMaxExtent(), - map : map, - iconCls : 'zoomfull', - tooltip : { - title : OpenLayers.i18n("zoomToMaxExtentTooltipTitle"), - text : OpenLayers.i18n("zoomToMaxExtentTooltipText") - } - }); - - toolbar.push(action); - - toolbar.push("-"); - - action = new GeoExt.Action({ - iconCls : 'zoomlayer', - id : 'btnZoomToExtent', - // tooltip: {title: OpenLayers.i18n("zoomlayerTooltipTitle"), text: - // OpenLayers.i18n("zoomlayerTooltipText")}, - handler : function() { - var node = activeNode; - var layer; - - if (node) { - layer = node.attributes.layer; - if (layer) { - if (layer.llbbox) { - // store info as wgs84 - var mapProj = map.getProjectionObject(); - var wgs84 = new OpenLayers.Projection("WGS84"); - - var minMapxy = new OpenLayers.LonLat( - layer.llbbox[0], layer.llbbox[1]) - .transform(wgs84, mapProj); - var maxMapxy = new OpenLayers.LonLat( - layer.llbbox[2], layer.llbbox[3]) - .transform(wgs84, mapProj); - - var extent = new OpenLayers.Bounds(); - extent.left = minMapxy.lon; - extent.right = maxMapxy.lon; - extent.top = maxMapxy.lat; - extent.bottom = minMapxy.lat; - - map.zoomToExtent(extent); - - // If layer has no boundingbox info, use full extent - } else { - map.zoomToMaxExtent(); - } - } else { - Ext.MessageBox.alert(OpenLayers - .i18n("zoomlayer.selectLayerTitle"), OpenLayers - .i18n("zoomlayer.selectLayerText")); - } - } else { - Ext.MessageBox.alert(OpenLayers - .i18n("zoomlayer.selectLayerTitle"), OpenLayers - .i18n("zoomlayer.selectLayerText")); - } - - } - }); - - toolbar.push(action); - - toolbar.push("-"); - - action = new GeoExt.Action({ - control : new OpenLayers.Control.ZoomBox(), - map : map, - toggleGroup : "move", - allowDepress : false, - iconCls : 'zoomin' - // tooltip: {title: OpenLayers.i18n("zoominTooltipTitle"), text: - // OpenLayers.i18n("zoominTooltipText")} - }); - - toolbar.push(action); - - action = new GeoExt.Action({ - control : new OpenLayers.Control.ZoomBox({ - displayClass : 'ZoomOut', - out : true - }), - toggleGroup : "move", - allowDepress : false, - map : map, - iconCls : 'zoomout' - // tooltip: {title: OpenLayers.i18n("zoomoutTooltipTitle"), text: - // OpenLayers.i18n("zoomoutTooltipText")} - }); - - toolbar.push(action); - - action = new GeoExt.Action({ - control : new OpenLayers.Control.DragPan({ - isDefault : true - }), - toggleGroup : "move", - allowDepress : false, - pressed : true, - map : map, - iconCls : 'pan' - // tooltip: {title: OpenLayers.i18n("dragTooltipTitle"), text: - // OpenLayers.i18n("dragTooltipText")} - }); - - toolbar.push(action); - - toolbar.push("-"); - - featureinfo = new OpenLayers.Control.WMSGetFeatureInfo({ - drillDown : true, - infoFormat : 'application/vnd.ogc.gml' - }); - - var moveLayerToTop = function(layertomove) { - Ext.each(app.mapApp.maps, function(map) { - var idx = -1; - for ( var i = 0, len = map.layers.length; i < len; i++) { - var layer = map.layers[i]; - if (layer !== layertomove) { - idx = Math.max(map.getLayerIndex(map.layers[i]), idx); - } - } - if (map.getLayerIndex(layertomove) < idx) { - map.setLayerIndex(layertomove, idx + 1); - } - }); - }; - - featureinfolayer = new OpenLayers.Layer.Vector("Feature info", { - displayInLayerSwitcher : false, - styleMap : new OpenLayers.StyleMap({ - externalGraphic : OpenLayers.Util.getImagesLocation() - + "marker.png", - pointRadius : 12 - }) - }); - - map.addLayer(featureinfolayer); - - featureinfo.events.on({ - 'getfeatureinfo' : function(evt) { - var lonlat = map.getLonLatFromViewPortPx(evt.xy); - var point = new OpenLayers.Geometry.Point(lonlat.lon, - lonlat.lat); - featureinfolayer.destroyFeatures(); - featureinfolayer.addFeatures(new OpenLayers.Feature.Vector( - point)); - moveLayerToTop(featureinfolayer); - GeoNetwork.WindowManager.showWindow("featureinfo"); - GeoNetwork.WindowManager.getWindow("featureinfo").setMap( - app.mapApp.getMap()); - GeoNetwork.WindowManager.getWindow("featureinfo").setFeatures( - evt.features); - }, - 'deactivate' : function() { - featureinfolayer.destroyFeatures(); - } - }); - - action = new GeoExt.Action({ - control : featureinfo, - toggleGroup : "move", - allowDepress : false, - pressed : false, - map : map, - iconCls : 'query' - // tooltip: {title: OpenLayers.i18n('featureInfoTooltipTitle'), text: - // OpenLayers.i18n('featureInfoTooltipText') } - }); - - toolbar.push(action); - - toolbar.push("-"); - - // Navigation history - two "button" controls - ctrl = new OpenLayers.Control.NavigationHistory(); - map.addControl(ctrl); - - action = new GeoExt.Action({ - control : ctrl.previous, - disabled : true, - map : map, - iconCls : 'back', - tooltip : { - title : OpenLayers.i18n("previousTooltipTitle"), - text : OpenLayers.i18n("previosTooltipText") - } - }); - toolbar.push(action); - - action = new GeoExt.Action({ - control : ctrl.next, - disabled : true, - map : map, - iconCls : 'next', - tooltip : { - title : OpenLayers.i18n("nextTooltipTitle"), - text : OpenLayers.i18n("nextTooltipText") - } - }); - toolbar.push(action); - - toolbar.push("-"); - - action = new GeoExt.Action({ - iconCls : 'savewmc', - tooltip : { - title : OpenLayers.i18n("savewmcTooltipTitle"), - text : OpenLayers.i18n("savewmcTooltipText") - }, - handler : function() { - GeoNetwork.WMCManager.saveContext(map); - } - }); - - toolbar.push(action); - - action = new GeoExt.Action({ - iconCls : 'loadwmc', - tooltip : { - title : OpenLayers.i18n("loadwmcTooltipTitle"), - text : OpenLayers.i18n("loadwmcTooltipText") - }, - handler : function() { - GeoNetwork.WindowManager.showWindow("loadwmc"); - } - }); - - toolbar.push(action); - - // toolbar.push('->'); - // toolbar.push({ - // xtype : 'gn_projectionselector', - // width : 120, - // projections : GeoNetwork.ProjectionList, - // fieldLabel : OpenLayers.i18n("projectionTitle"), - // map : map - // }); - }; - - /** - * Map overlay with scale image and scale selector - * - */ - var createMapOverlay = function() { - var scaleLinePanel = new Ext.Panel({ - cls : 'olControlScaleLine overlay-element overlay-scaleline', - border : false - }); - - scaleLinePanel.on('render', function() { - var scaleLine = new OpenLayers.Control.ScaleLine({ - div : scaleLinePanel.body.dom - }); - - map.addControl(scaleLine); - scaleLine.activate(); - }, this); - - var zoomStore = new GeoExt.data.ScaleStore({ - map : map - }); - - var zoomSelector = new Ext.form.ComboBox( - { - emptyText : 'Zoom level', - tpl : '
      1 : {[parseInt(values.scale)]}
      ', - editable : false, - triggerAction : 'all', - mode : 'local', - store : zoomStore, - width : 110 - }); - - zoomSelector.on('click', function(evt) { - evt.stopEvent(); - }); - zoomSelector.on('mousedown', function(evt) { - evt.stopEvent(); - }); - - zoomSelector.on('select', function(combo, record, index) { - map.zoomTo(record.data.level); - }, this); - - var zoomSelectorWrapper = new Ext.Panel({ - items : [ zoomSelector ], - cls : 'overlay-element overlay-scalechooser', - border : false - }); - - map.events.register('zoomend', this, function() { - var scale = zoomStore.queryBy(function(record) { - return map.getZoom() === record.data.level; - }); - - if (scale.length > 0) { - scale = scale.items[0]; - zoomSelector.setValue("1 : " + parseInt(scale.data.scale, 10)); - } else { - if (!zoomSelector.rendered) { - return; - } - zoomSelector.clearValue(); - } - }); - - var mapOverlay = new Ext.Panel({ - // title: "Overlay", - cls : 'map-overlay', - items : [ scaleLinePanel, zoomSelectorWrapper ] - }); - - mapOverlay.on("afterlayout", function() { - scaleLinePanel.body.dom.style.position = 'relative'; - scaleLinePanel.body.dom.style.display = 'inline'; - - mapOverlay.getEl().on("click", function(x) { - x.stopEvent(); - }); - mapOverlay.getEl().on("mousedown", function(x) { - x.stopEvent(); - }); - }, this); - - return mapOverlay; - }; - - /** - * Measure control - * - */ - var createMeasureControl = function(handlerType, title) { - var styleMap = new OpenLayers.StyleMap({ - "default" : new OpenLayers.Style(null, { - rules : [ new OpenLayers.Rule({ - symbolizer : { - "Point" : { - pointRadius : 4, - graphicName : "square", - fillColor : "white", - fillOpacity : 1, - strokeWidth : 1, - strokeOpacity : 1, - strokeColor : "#333333" - }, - "Line" : { - strokeWidth : 3, - strokeOpacity : 1, - strokeColor : "#666666", - strokeDashstyle : "dash" - }, - "Polygon" : { - strokeWidth : 2, - strokeOpacity : 1, - strokeColor : "#666666", - fillColor : "white", - fillOpacity : 0.3 - } - } - }) ] - }) - }); - - var cleanup = function() { - if (measureToolTip) { - measureToolTip.destroy(); - } - }; - - var makeString = function(metricData) { - var metric = metricData.measure; - var metricUnit = metricData.units; - - measureControl.displaySystem = "english"; - - var englishData = metricData.geometry.CLASS_NAME - .indexOf("LineString") > -1 ? measureControl - .getBestLength(metricData.geometry) : measureControl - .getBestArea(metricData.geometry); - - var english = englishData[0]; - var englishUnit = englishData[1]; - - measureControl.displaySystem = "metric"; - var dim = metricData.order === 2 ? '2' : ''; - - return metric.toFixed(2) + " " + metricUnit + dim + "
      " - + english.toFixed(2) + " " + englishUnit + dim; - }; - - var measureToolTip; - var measureControl = new OpenLayers.Control.Measure(handlerType, - { - persist : true, - handlerOptions : { - layerOptions : { - styleMap : styleMap - } - }, - eventListeners : { - measurepartial : function(event) { - cleanup(); - measureToolTip = new Ext.ToolTip({ - html : makeString(event), - title : title, - autoHide : false, - closable : true, - draggable : false, - mouseOffset : [ 0, 0 ], - showDelay : 1, - listeners : { - hide : cleanup - } - }); - if (event.measure > 0) { - var px = measureControl.handler.lastUp; - var p0 = Ext.getCmp('mappanel').getPosition(); - measureToolTip.targetXY = [ p0[0] + px.x, - p0[1] + px.y ]; - measureToolTip.show(); - } - }, - measure : function(event) { - cleanup(); - measureToolTip = new Ext.ToolTip({ - target : Ext.getBody(), - html : makeString(event), - title : title, - autoHide : false, - closable : true, - draggable : false, - mouseOffset : [ 0, 0 ], - showDelay : 1, - listeners : { - hide : function() { - measureControl.cancel(); - cleanup(); - } - } - }); - }, - deactivate : cleanup, - scope : this - } - }); - - return measureControl; - }; - - /** - * Creates the layers tree control - * - */ - var createTree = function() { - - // using OpenLayers.Format.JSON to create a nice formatted string of the - // configuration for editing it in the UI - var treeConfig = new OpenLayers.Format.JSON().write([ { - nodeType : "gx_baselayercontainer", - text : OpenLayers.i18n('baseLayerList') - }, { - nodeType : "gx_overlaylayercontainer", - text : OpenLayers.i18n('overlaysList'), - expanded : true, - // render the nodes inside this container with a radio button, - // and assign them the group "foo". - loader : { - baseAttrs : { - radioGroup : "foo", - slider : "layeropacityslider", - uiProvider : "layernodeui" - } - } - } ], true); - - var LayerNodeUI = Ext.extend(GeoExt.tree.LayerNodeUI, - new GeoExt.tree.TreeNodeUIEventMixin()); - - // create the tree with the configuration from above - tree = new Ext.tree.TreePanel( - { - title : OpenLayers.i18n('layerTree'), - id : "toctree", - forceLayout : true, - // renderTo : "toc-tree", - enableDD : true, - collapsed : true, - loader : new Ext.tree.TreeLoader({ - // applyLoader has to be set to false to not interfer - // with loaders - // of nodes further down the tree hierarchy - applyLoader : false, - uiProviders : { - "layernodeui" : LayerNodeUI - } - }), - plugins : [ new GeoExt.plugins.TreeNodeRadioButton({ - listeners : { - "radiochange" : function(node) { - activeNode = node; - } - } - }), new GeoExt.tree.LayerOpacitySliderPlugin({ - listeners : { - "opacityslide" : function(node, value) { - } - } - }) ], - root : { - nodeType : "async", - // the children property of an Ext.tree.AsyncTreeNode is - // used to - // provide an initial set of layer nodes. We use the - // treeConfig - // from above, that we created with - // OpenLayers.Format.JSON.write. - children : Ext.decode(treeConfig) - }, - listeners : { - contextmenu : function(node, e) { - if ((node.attributes.nodeType !== "gx_overlaylayercontainer") - && (node.attributes.nodeType !== "gx_baselayercontainer")) { - node.select(); - var c = node.getOwnerTree().contextMenu; - if (node.parentNode.attributes.nodeType === "gx_baselayercontainer") { - c.items.get("removeMenu").disable(); - } else { - c.items.get("removeMenu").enable(); - } - - c.items.get("addMenu").hide(); - - var layer = node.layer; - c.items - .get("metadataMenu") - .setDisabled( - !(layer instanceof OpenLayers.Layer.WMS)); - - if (layer && layer.dimensions - && layer.dimensions.time) { - c.items.get("wmsTimeMenu").enable(); - } else { - c.items.get("wmsTimeMenu").disable(); - } - - if ((layer) - && ((!layer.styles) || (layer.styles.length < 2))) { - c.items.get("stylesMenu").disable(); - } else { - c.items.get("stylesMenu").enable(); - } - - c.contextNode = node; - c.showAt(e.getXY()); - } else { - - if (node.attributes.nodeType === "gx_overlaylayercontainer") { - - node.select(); - var c = node.getOwnerTree().contextMenu; - - c.items.get("addMenu").show(); - c.items.get("removeMenu").hide(); - c.items.get("wmsTimeMenu").hide(); - c.items.get("stylesMenu").hide(); - c.items.get("metadataMenu").hide(); - - c.contextNode = node; - c.showAt(e.getXY()); - } - } - }, - scope : this - }, - contextMenu : new Ext.menu.Menu({ - items : [ { - text : OpenLayers.i18n("addWMSButtonText"), - id : "addMenu", - handler : function() { - GeoNetwork.WindowManager.showWindow("addwms"); - } - }, { - text : OpenLayers.i18n("removeButtonText"), - id : "removeMenu", - handler : removeLayerHandlerContextMenu - }, { - text : OpenLayers.i18n("metadataButtonText"), - id : "metadataMenu", - handler : metadataLayerHandlerContextMenu - }, { - text : "Styles", - id : "stylesMenu", - handler : stylesLayerHandlerContextMenu - }, { - text : OpenLayers.i18n('WMSTimeWindowTitle'), - id : "wmsTimeMenu", - disabled : true, - handler : wmsTimeHandlerContextMenu - } - - ] - }), - tbar : toctoolbar, - rootVisible : false, - lines : false, - border : false, - region : 'center' - }); - - }; - - /** - * Creates the legend panel control - * - */ - var createLegendPanel = function() { - legendPanel = new GeoExt.LegendPanel({ - defaults : { - style : 'padding:5px' - }, - title : OpenLayers.i18n('legendTabTitle'), - height : 200, - autoScroll : true, - split : true, - collapsible : true, - // collapsed : true, - border : false, - region : 'south' - }); - }; - - /** - * Creates the map viewport - * - */ - var createViewport = function(mapOverlay) { - // createPrintPanel(app.mapApp.getMap()); - createToolbars(); - createTree(); - createLegendPanel(); - - // Accordion panel with layer tree and advanced print config - var accordion = new Ext.Panel({ - region : 'center', - id : 'layerManager-accordion', - border : false, - layout : 'accordion', - deferredRender : false, - items : [ tree, legendPanel ] - // , printPanel ] - }); - - viewport = new Ext.Panel({ - layout : 'border', - id : 'big-map', - renderTo : 'big-map-container', - border : false, - items : [ { - id : 'layerManager', - region : 'east', - xtype : 'panel', - collapsible : true, - collapsed : true, - collapseMode : "mini", - split : true, - border : false, - width : 205, - minSize : 205, - maxSize : 400, - layout : 'border', - items : [ accordion ] - }, { - region : 'center', - layout : 'fit', - xtype : 'gx_mappanel', - tbar : toolbar, - frame : false, - border : false, - margins : '2px 2px 2px 2px', - items : [ mapOverlay ] - } ], - listeners : { - afterlayout : function() { - // createPrintPanel(app.mapApp.getMap()); - } - } - }); - - Ext.getCmp("toctree").on({ - "click" : function(node) { - if (node.ui.radio) { - node.ui.radio.checked = true; - node.ui.fireEvent("radiochange", node); - - } - - refreshTocToolbar(node); - - }, - scope : this - }); - - Ext - .getCmp("toctree") - .on( - "nodedragover", - function(evt) { - // Only allow to move layers in the - // gx_overlaylayercontainer (user layers) - if ((evt.dropNode.parentNode.attributes.nodeType === "gx_baselayercontainer") - || // restrict move baselayers - (evt.target.attributes.nodeType === "gx_baselayercontainer") - || // restrict move layers to baselayer - // container - (evt.target.parentNode.attributes.nodeType === "gx_baselayercontainer") - || (evt.target.parentNode === evt.tree.root)) { // restrict - // move - // layers - // to - // outside - // of - // layercontainers - evt.cancel = true; - } - }); - - refreshTocToolbar(activeNode); - }; - - /** - * Method: processLayersSuccess Called when the GetCapabilities response is - * in. - * - * Parameters: response - {Object} The response object - */ - var processLayersSuccess = function(response) { - layerLoadingMask.hide(); - - var parser = new OpenLayers.Format.WMSCapabilities(); - var caps = parser.read(response.responseXML || response.responseText); - if (caps.capability) { - // GetCapabilities disclaimer - var accessContraints = caps.service.accessContraints; - - if ((accessContraints) - && (accessContraints.toLowerCase() !== "none") - && (accessContraints !== "-")) { - var disclaimerWindow = new GeoNetwork.DisclaimerWindow({ - disclaimer : accessContraints - }); - disclaimerWindow.show(); - disclaimerWindow = null; - } - - var map = app.mapApp.maps[1]; - for ( var i = 0, len = layers.length; i < len; i++) { - var name = layers[i][0]; - var url = layers[i][1]; - var layer = layers[i][2]; - var metadata_id = layers[i][3]; - - var ol_layer = new OpenLayers.Layer.WMS(name, url, { - layers : layer, - format : 'image/png', - transparent : 'TRUE', - version : caps.version, - language : GeoNetwork.OGCUtil.getLanguage() - }, { - queryable : true, - singleTile : true, - ratio : 1, - buffer : 0, - transitionEffect : 'resize', - metadata_id : metadata_id - }); - - if (!GeoNetwork.OGCUtil.layerExistsInMap(ol_layer, map)) { - // TODO: these events are never removed? - ol_layer.events.on({ - "loadstart" : function() { - this.isLoading = true; - } - }); - - ol_layer.events.on({ - "loadend" : function() { - this.isLoading = false; - } - }); - - var layerCap = getLayer(caps, caps.capability.layers, - ol_layer); - if (layerCap) { - ol_layer.queryable = layerCap.queryable; - ol_layer.name = layerCap.title || ol_layer.name; - ol_layer.llbbox = layerCap.llbbox; - ol_layer.styles = layerCap.styles; - ol_layer.dimensions = layerCap.dimensions; - ol_layer.metadataURLs = layerCap.metadataURLs; - ol_layer.abstractInfo = layerCap['abstract']; - map.addLayer(ol_layer); - } else { - //Someone used the wrong layername. doh! - //let them correct it - //show wms layer selection - GeoNetwork.WindowManager.showWindow("addwms"); - var panel = Ext.getCmp(GeoNetwork.WindowManager - .getWindow("addwms").browserPanel.id); - panel.setURL(caps.capability.request.getcapabilities.href); - } - - } - } - - } - }; - - /** - * Method: processLayersFailure Called when the GetCapabilities response is - * in and failed. - * - * Parameters: response - {Object} The response object - */ - var processLayersFailure = function(response) { - if (layerLoadingMask) { - layerLoadingMask.hide(); - } - - Ext.MessageBox.alert(OpenLayers.i18n("loadLayer.error.title"), - OpenLayers.i18n("loadLayer.error.message")); - }; - - /** - * Function: getLayer Recursive function to process a layer and their - * childLayers in the capabilities document, searching for the requested - * layer - * - * Parameters: caps - {Object} capabilities from the WMSCapabilities parser - * caplayers - {Object} list of layer objects from the WMSCapabilities - * parser layer - {Object} layer to return from capabilities document - * - * Returns: {Object} The layer if found, otherwise null - */ - var getLayer = function(caps, caplayers, layer) { - var findedLayer = null; - - for ( var i = 0, len = caplayers.length; i < len; ++i) { - var lr = caplayers[i]; - - try { - var layerName = lr.name.split(","); - - if (layerName.indexOf(layer.params.LAYERS) !== -1) { - findedLayer = lr; - break; - } - } catch (e) { - } - - if (typeof (lr.childLayers) !== "undefined") { - findedLayer = getLayer(caps, lr.childLayers, layer); - if (findedLayer !== null) { - break; - } - } - - } - - return findedLayer; - }; - var registerWindows = function(map, map2) { - - // Register windows in WindowManager - GeoNetwork.WindowManager.registerWindow("addwms", - GeoNetwork.AddWmsLayerWindow, { - map : map2, - id : "addwms" - }); - GeoNetwork.WindowManager.registerWindow("addwmts", - GeoNetwork.AddWmtsLayerWindow, { - map : map2, - id : "addwmts" - }); - GeoNetwork.WindowManager.registerWindow("wmsinfo", - GeoNetwork.WmsLayerMetadataWindow, { - map : map, - id : "wmsinfo" - }); - GeoNetwork.WindowManager.registerWindow("loadwmc", - GeoNetwork.LoadWmcWindow, { - map : map, - id : "loadwmc" - }); - GeoNetwork.WindowManager.registerWindow("featureinfo", - GeoNetwork.FeatureInfoWindow, { - map : map, - id : "featureinfo", - control : featureinfo - }); - GeoNetwork.WindowManager.registerWindow("layerstyles", - GeoNetwork.LayerStylesWindow, { - map : map, - id : "layerstyles" - }); - GeoNetwork.WindowManager.registerWindow("wmstime", - GeoNetwork.WMSTimeWindow, { - map : map, - id : "wmstime" - }); - - }; - // public space: - return { - initialize : false, - /** - * Add a list of WMS layers to the map - * - * @param layers - * List of layers to load [[name, url, layer, metadata_id], - * [name, url, layer, metadata_id], ....] - */ - addWMSLayer : function(layerList) { - if (layerList.length === 0) { - return; - } - - showBigMap(); - - layerLoadingMask = new Ext.LoadMask(this.getMap().div, { - msg : OpenLayers.Lang.translate('loadLayer.loadingMessage') - }); - layerLoadingMask.show(); - var map = this.maps[0]; - var onlineResource = layerList[0][1]; - /* if null layer name, open the WMS Browser panel */ - if (layerList[0][2] === '') { - GeoNetwork.WindowManager.showWindow("addwms"); - var panel = Ext.getCmp(GeoNetwork.WindowManager - .getWindow("addwms").browserPanel.id); - panel.setURL(onlineResource); - return; - } - - layers = layerList; - - var params = { - 'service' : 'WMS', - 'request' : 'GetCapabilities', - 'version' : '1.1.1' - }; - var paramString = OpenLayers.Util.getParameterString(params); - var separator = (onlineResource.indexOf('?') > -1) ? '&' : '?'; - onlineResource += separator + paramString; - - OpenLayers.Request.GET({ - url : onlineResource, // OpenLayers.Util.removeTail(OpenLayers.ProxyHostURL), - // method: 'GET', - // params: {url: onlineResource}, - success : processLayersSuccess, - failure : processLayersFailure, - timeout : 10000 - }); - }, - - /** - * Add a list of WMTS layers to the map - * - * @param layers - * List of layers to load [[name, url, layer, metadata_id], - * [name, url, layer, metadata_id], ....] - */ - addWMTSLayer : function(layerList) { - if (layerList.length === 0) { - return; - } - - showBigMap(); - - var format = new OpenLayers.Format.WMTSCapabilities({}); - - Ext.each(layerList, function(layerParam) { - - OpenLayers.Request.GET({ - url : layerParam[1], - params : { - SERVICE : "WMTS", - VERSION : "1.0.0", - REQUEST : "GetCapabilities" - }, - success : function(request) { - var doc = request.responseXML; - if (!doc || !doc.documentElement) { - doc = request.responseText; - } - - var capabilities = format.read(doc); - - var projection = app.mapApp.getMap().projection - .toUpperCase(); - - var layermatrixSet = app.mapApp.getMap().projection; - - var tileMS = capabilities.contents.tileMatrixSets; - for (key in tileMS) { - if (key.toUpperCase().indexOf(projection) >= 0 - || tileMS[key].supportedCRS.toUpperCase() - .indexOf(projection) >= 0 - || tileMS[key].identifier.toUpperCase() - .indexOf(projection) >= 0) { - layermatrixSet = key; - } - } - - var layername = layerParam[2]; - - if (layername === '') { - GeoNetwork.WindowManager.showWindow("addwmts"); - var panel = Ext.getCmp(GeoNetwork.WindowManager - .getWindow("addwmts").browserPanel.id); - hide("serviceSearchForm"); - panel.previewPanel.showPreview = function(layer) { - if (!layer) { - return; - } - this.showMask(); - - // if the layer has not been added to the map - // yet, we need to set its - // map property otherwise getFullRequestString - // will not work. - var previousMap = layer.map; - if (previousMap === null) { - layer.map = this.map; - } - - var url = layer.getFullRequestString({ - SERVICE : "WMTS", - REQUEST : "GetTile", - LAYER : layer.name, - STYLE : layer.style, - TILEMATRIXSET : layer.matrixSet, - TILEMATRIX : layer.matrixIds[0].identifier, - TILEROW : 0, - TILECOL : 0, - FORMAT : layer.format - }); - - if (previousMap === null) { - layer.map = previousMap; - } - - this.currentLayer = layer; - this.image.getEl().dom.src = url; - }; - panel.setURL(layerParam[1]); - } else { - Ext.each(app.mapApp.maps, function(map) { - - var f_ = ""; - Ext.each(capabilities.contents.layers, - function(l) { - if (l.identifier === layername) { - f_ = l.formats[0]; - } - }); - var layer = format.createLayer(capabilities, { - name : layerParam[0], - layer : layername, - matrixSet : layermatrixSet, - isBaseLayer : false, - format : f_ - }); - map.addLayer(layer); - }); - } - }, - failure : function() { - GeoNetwork.Message().msg({ - msg : 'loadLayer.error.message', - status : 'error', - target : document.body, - pause : 30 - }); - } - - }); - }); - }, - addWMC: function (url) { - var map = this.getMap(); - showBigMap(); - - OpenLayers.Request.GET({ - url: url, - scope: this, - callback: function (response) { - GeoNetwork.WMCManager.loadWmc(map, response.responseText); - } - }); - }, - getViewport : function() { - if (viewport === null) { - app.mapApp.init(); - } - return viewport; - }, - createWmsLayer : function(name, url, params, options) { - Ext.each(app.mapApp.maps, function(map) { - map - .adLayer(new OpenLayers.Layer.WMS(name, url, params, - options)); - }); - }, - createLayer : function(olLayer) { - Ext.each(app.mapApp.maps, function(map) { - map.addLayer(olLayer.clone()); - }); - }, - getMap : function() { - return app.mapApp.maps[0]; - }, - maps : [], - init : function(options, layers, fixedScales) { - generateMaps(options, layers, fixedScales); - }, - initPrint : function() { - createPrintPanel(app.mapApp.getMap()); - }, - /** - * Used by other functions that need to create and initialize a map - * - * @param id - * of the div for the map - * @returns - */ - generateAuxiliaryMap : function(id) { - - var map = new OpenLayers.Map({ - maxExtent : GeoNetwork.map.MAP_OPTIONS.maxExtent.clone(), - projection : GeoNetwork.map.MAP_OPTIONS.projection, - resolutions : GeoNetwork.map.MAP_OPTIONS.resolutions, - restrictedExtent : GeoNetwork.map.MAP_OPTIONS.restrictedExtent - .clone() - }); - - Ext.each(GeoNetwork.map.MAP_OPTIONS.controls_, function(control) { - if (control) { - map.addControl(new control()); - } - }); - - Ext.each(GeoNetwork.map.BACKGROUND_LAYERS, function(layer) { - map.addLayer(layer.clone()); - }); - - var scaleLinePanel = new Ext.Panel({ - cls : 'olControlScaleLine overlay-element overlay-scaleline', - border : false - }); - - scaleLinePanel.on('render', function() { - var scaleLine = new OpenLayers.Control.ScaleLine({ - div : scaleLinePanel.body.dom - }); - - map.addControl(scaleLine); - scaleLine.activate(); - }, this); - - var zoomStore; - - var fixedScales = GeoNetwork.map.MAP_OPTIONS.resolutions; - - if (fixedScales && fixedScales.length > 0) { - var zooms = []; - var scales = fixedScales; - var units = map.baseLayer.units; - - for ( var i = scales.length - 1; i >= 0; i--) { - var scale = scales[i]; - zooms.push({ - level : i, - resolution : OpenLayers.Util.getResolutionFromScale( - scale, units), - scale : scale - }); - } - - zoomStore = new GeoExt.data.ScaleStore({}); - zoomStore.loadData(zooms); - - } else { - zoomStore = new GeoExt.data.ScaleStore({ - map : map - }); - } - var zoomSelector = new Ext.form.ComboBox( - { - emptyText : 'Zoom level', - tpl : '
      1 : {[parseInt(values.scale)]}
      ', - editable : false, - triggerAction : 'all', - mode : 'local', - store : zoomStore, - width : 110 - }); - - zoomSelector.on('click', function(evt) { - evt.stopEvent(); - }); - zoomSelector.on('mousedown', function(evt) { - evt.stopEvent(); - }); - - zoomSelector.on('select', function(combo, record, index) { - map.zoomTo(record.data.level); - }, this); - - var zoomSelectorWrapper = new Ext.Panel({ - items : [ zoomSelector ], - cls : 'overlay-element overlay-scalechooser', - border : false - }); - - var mapOverlay = new Ext.Panel({ - // title: "Overlay", - cls : 'map-overlay', - items : [ scaleLinePanel, zoomSelectorWrapper ] - }); - - mapOverlay.on("afterlayout", function() { - scaleLinePanel.body.dom.style.position = 'relative'; - scaleLinePanel.body.dom.style.display = 'inline'; - - mapOverlay.getEl().on("click", function(x) { - x.stopEvent(); - }); - mapOverlay.getEl().on("mousedown", function(x) { - x.stopEvent(); - }); - }, this); - - var panel = new GeoExt.MapPanel({ - height : 400, - map : map, - renderTo : id - }); - - return map; - - }, - /** - * - * Given a URL, return the list of associated layers (WMS) - * - * @param url - * @returns WMS Capabilities - */ - getCapabilitiesWMS : function(url) { - var layers = []; - - if (!(/\?$/.test(url))) { - if (/\?$/.test(url)) { - url = url + "&"; - } else { - url = url + "?"; - } - } - OpenLayers.Request.GET({ - async : false, - url : url + "request=GetCapabilities&service=WMS", - success : function(response) { - var format = new OpenLayers.Format.XML(); - var xml = format.read(response.responseText); - var text = format.write(xml); - var CAPformat = new OpenLayers.Format.WMSCapabilities(); - var cap = CAPformat.read(xml); - if (cap.capability) { - Ext.each(cap.capability.layers, function(layer) { - if (layer.queryable) { - layers.push(layer.name); - } - }); - } - } - }); - return layers; - }, - /** - * - * Given a URL, return the list of associated layers (WMS) - * - * @param url - * @returns WFS Capabilities - */ - getCapabilitiesWFS : function(url) { - var layers = []; - - if (!(/\?$/.test(url))) { - if (/\?$/.test(url)) { - url = url + "&"; - } else { - url = url + "?"; - } - } - - var url2 = "version=1.1.0&request=DescribeFeatureType&service=WFS"; - var describeFormat = new OpenLayers.Format.WFSDescribeFeatureType(); - - OpenLayers.Request.GET({ - async : false, - url : url + url2, - success : function(response) { - var format = new OpenLayers.Format.XML(); - var xml = format.read(response.responseText); - var text = format.write(xml); - var describe = describeFormat.read(xml); - - Ext.each(describe.featureTypes, function(ftype) { - Ext.each(ftype.properties, function(feat) { - var layer = new OpenLayers.Protocol.WFS({ - url : url, - featurePrefix : describe.targetPrefix, - featureType : feat.type, - featureNS : describe.targetNamespace, - geometryName : feat.name - }); - - layers.push(layer); - }); - }); - } - - }); - return layers; - } - - }; -}; // end of app diff --git a/web-client/src/main/resources/apps/html5ui/js/map/Settings.js b/web-client/src/main/resources/apps/html5ui/js/map/Settings.js deleted file mode 100644 index 79168a439bf..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/map/Settings.js +++ /dev/null @@ -1,89 +0,0 @@ -OpenLayers.DOTS_PER_INCH = 90.71; -OpenLayers.ImgPath = '../../apps/js/OpenLayers/img/'; - -OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; - -// Remove pink background when a tile fails to load -OpenLayers.Util.onImageLoadErrorColor = "transparent"; - -// Lang -OpenLayers.Lang.setCode(GeoNetwork.defaultLocale); - -OpenLayers.Util.onImageLoadError = function() { - this._attempts = (this._attempts) ? (this._attempts + 1) : 1; - if (this._attempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) { - this.src = this.src; - } else { - this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor; - this.style.display = "none"; - } -}; - -// add Proj4js.defs here -// Proj4js.defs["EPSG:27572"] = "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 -// +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 -// +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"; -// Proj4js.defs["EPSG:28992"] = "+proj=sterea +lat_0=52.15616055555555 -// +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel -// +units=m +no_defs"; -Proj4js.defs["EPSG:2154"] = "+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"; - -GeoNetwork.map.printCapabilities = "../../pdf"; - -// Config for WGS84 based maps -GeoNetwork.map.PROJECTION = "EPSG:4326"; -GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-180,-90,180,90); -//GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-5.1,41,9.7,51); - - - -//GeoNetwork.map.BACKGROUND_LAYERS = [ -// //new OpenLayers.Layer.WMS("Background layer", "/geoserver/wms", {layers: 'gn:world,gn:ne_50m_boundary_da,gn:ne_50m_boundary_lines_land,gn:ne_50m_coastline', format: 'image/jpeg'}, {isBaseLayer: true}) -// new OpenLayers.Layer.WMS("Background layer", "http://www2.demis.nl/mapserver/wms.asp?", {layers: 'Countries', format: 'image/jpeg'}, {isBaseLayer: true}) -//]; - -// Config for OSM based maps -if (useOSMLayers) { - GeoNetwork.map.PROJECTION = "EPSG:900913"; - //GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-550000, 5000000, 1200000, 7000000); - GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34); - GeoNetwork.map.BACKGROUND_LAYERS = [ - new OpenLayers.Layer.OSM() - //new OpenLayers.Layer.Google("Google Streets"); - ]; -} else { - GeoNetwork.map.BACKGROUND_LAYERS = []; - GeoNetwork.map.CONTEXT = "../../maps/mapviewer.wmc"; - //GeoNetwork.map.OWS = "../../maps/demis.xml"; -} - -//GeoNetwork.map.RESOLUTIONS = []; - - -GeoNetwork.map.CONTEXT_MAP_OPTIONS = { - controls: [], - theme:null -}; - -GeoNetwork.map.CONTEXT_MAIN_MAP_OPTIONS = { - controls: [], - theme:null -}; - -GeoNetwork.map.MAP_OPTIONS = { - projection : GeoNetwork.map.PROJECTION, - maxExtent: GeoNetwork.map.EXTENT, - restrictedExtent : GeoNetwork.map.EXTENT, - resolutions: GeoNetwork.map.RESOLUTIONS, - controls: [], - theme:null -}; - -GeoNetwork.map.MAIN_MAP_OPTIONS = { - projection : GeoNetwork.map.PROJECTION, - maxExtent: GeoNetwork.map.EXTENT, - restrictedExtent : GeoNetwork.map.EXTENT, - resolutions: GeoNetwork.map.RESOLUTIONS, - controls: [], - theme:null -}; diff --git a/web-client/src/main/resources/apps/html5ui/js/search/SearchApp.js b/web-client/src/main/resources/apps/html5ui/js/search/SearchApp.js deleted file mode 100644 index 78702a6f6f1..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/search/SearchApp.js +++ /dev/null @@ -1,666 +0,0 @@ -/* - * Copyright (C) 2012 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ - -Ext.namespace('GeoNetwork'); - -/** - * All search related stuff. Helps App.js to control and do searches. - */ -GeoNetwork.searchApp = function() { - - // Public Space - return { - advSearchForm : null, - permalinkProvider : null, - init : function() { - this.permalinkProvider = Ext.state.Manager.getProvider(); - - this.generateSimpleSearchForm(); - this.advSearchForm = this.generateAdvancedSearchForm(); - this.createResultsPanel(this.permalinkProvider); - resizeResultsPanel(); - }, - addMetadata : function(uuid, clean, edit) { - // Check integrity of UUID - if (uuid && uuid !== '' && uuid !== '#?') { - catalogue.metadataShow(uuid, true); - - if (edit) { - // We need to edit the metadata (redirection) - app.edit(edit, false); - } - } - }, - /** - * Set event in order to display some search criteria only when user is - * logged in. - */ - setAdminFieldsCallback : function(adminFields) { - // Hide or show extra fields after login event - Ext.each(adminFields, function(item) { - item.setVisible(catalogue.identifiedUser - && catalogue.identifiedUser.role === "Administrator"); - }); - catalogue - .on( - 'afterLogin', - function() { - Ext - .each( - adminFields, - function(item) { - item - .setVisible(catalogue.identifiedUser - && catalogue.identifiedUser.role === "Administrator"); - }); - GeoNetwork.util.SearchFormTools - .refreshGroupFieldValues(); - }); - catalogue.on('afterLogout', function() { - Ext.each(adminFields, function(item) { - item.setVisible(!(catalogue.identifiedUser === undefined)); - }); - GeoNetwork.util.SearchFormTools.refreshGroupFieldValues(); - }); - - }, - generateSimpleSearchForm : function() { - var field = new GeoNetwork.form.OpenSearchSuggestionTextField({ - hideLabel : true, - id : 'fullTextField', - renderTo : 'fullTextField', - width : 170, - minChars : 2, - loadingText : '...', - hideTrigger : true, - url : catalogue.services.opensearchSuggest, - listeners : { - // Updating the hidden search field in the - // search form which is going to be submitted - change : function() { - if (this.getValue().length > 0) - Ext.getCmp('E_trueany').setValue( - this.getValue() + "*"); - else - Ext.getCmp('E_trueany').setValue(this.getValue()); - }, - keyup : function(e, a) { - if (this.getValue().length > 0) - Ext.getCmp('E_trueany').setValue( - this.getValue() + "*"); - else - Ext.getCmp('E_trueany').setValue(this.getValue()); - if (a.ENTER == a.keyCode) { - e.list.hide(); - Ext.getCmp('advanced-search-options-content-form') - .fireEvent('search'); - } - } - } - }); - - }, - generateAdvancedSearchForm : function() { - var advancedCriteria = []; - - // This is the full text search field populated when the - // one from the simple search form is updated. - // This field is hidden - var any = new Ext.form.TextField({ - name : 'E_any_OR_geokeyword', - id : 'E_trueany', - hidden : true - }); - - // These are the basic search (dummy) - var onlineData = new Ext.form.Checkbox({ - name : 'O_dynamic', - id : 'E_dynamic', - hidden : true - }); - - var onlineData_ = new Ext.form.Checkbox({ - name : 'O_dynamic', - id : 'o_dynamic', - boxLabel : OpenLayers.i18n('Online data'), - renderTo : "ck1" - }); - - onlineData_.on("check", function(el) { - Ext.getCmp('E_dynamic').setValue(this.getValue()); - Ext.getCmp('advanced-search-options-content-form').fireEvent( - 'search'); - }); - - var dataForDownload = new Ext.form.Checkbox({ - name : 'O_download', - id : 'E_download', - hidden : true - }); - - var dataForDownload_ = new Ext.form.Checkbox({ - name : 'O_download_', - id : 'o_download', - boxLabel : OpenLayers.i18n('Data for download'), - renderTo : "ck2" - }); - - dataForDownload_.on("check", function(el) { - Ext.getCmp('E_download').setValue(this.getValue()); - Ext.getCmp('advanced-search-options-content-form').fireEvent( - 'search'); - }); - - var noDirectDownload = new Ext.form.Checkbox({ - name : 'O_nodynamicdownload', - id : 'E_nodynamicdownload', - hidden : true - }); - - var noDirectDownload_ = new Ext.form.Checkbox({ - name : 'O_nodynamicdownload_', - id : 'o_nodynamicdownload', - boxLabel : OpenLayers.i18n('No direct download'), - renderTo : "ck3" - }); - - noDirectDownload_.on("check", function(el) { - Ext.getCmp('E_nodynamicdownload').setValue(this.getValue()); - Ext.getCmp('advanced-search-options-content-form').fireEvent( - 'search'); - }); - - // Multi select keyword - var themekeyStore = new GeoNetwork.data.OpenSearchSuggestionStore({ - url : catalogue.services.opensearchSuggest, - rootId : 1, - baseParams : { - field : 'keyword' - } - }); - - var themekeyField = new Ext.ux.form.SuperBoxSelect({ - hideLabel : false, - minChars : 0, - queryParam : 'q', - hideTrigger : false, - id : 'E_themekey', - name : 'E_themekey', - store : themekeyStore, - valueField : 'value', - displayField : 'value', - valueDelimiter : ' or ', - // tpl: tpl, - fieldLabel : OpenLayers.i18n('keyword') - }); - - var orgNameStore = new GeoNetwork.data.OpenSearchSuggestionStore({ - url : catalogue.services.opensearchSuggest, - rootId : 1, - baseParams : { - field : 'orgName' - } - }); - - var orgNameField = new Ext.ux.form.SuperBoxSelect({ - hideLabel : false, - minChars : 0, - queryParam : 'q', - hideTrigger : false, - id : 'E_orgName', - name : 'E_orgName', - store : orgNameStore, - valueField : 'value', - displayField : 'value', - valueDelimiter : ' or ', - // tpl: tpl, - fieldLabel : OpenLayers.i18n('org') - }); - // var denominatorField = GeoNetwork.util.SearchFormTools - // .getScaleDenominatorField(true); - - // var groupField = GeoNetwork.util.SearchFormTools.getGroupField( - // catalogue.services.getGroups, true); - var metadataTypeField = GeoNetwork.util.SearchFormTools - .getMetadataTypeField(true); - // var validField = GeoNetwork.util.SearchFormTools - // .getValidField(true); - - // Add hidden fields to be use by quick metadata links from the - // admin panel (eg. my metadata). - var ownerField = new Ext.form.TextField({ - name : 'E__owner', - hidden : true - }); - var isHarvestedField = new Ext.form.TextField({ - name : 'E__isHarvested', - hidden : true - }); - var siteId = new Ext.form.TextField({ - name : 'E_siteId', - hidden : true - }); - - var whatFields = [themekeyField, orgNameField, metadataTypeField]; - if (GeoNetwork.searchDefault.advSearchShowTitleField) { - var titleStore = new GeoNetwork.data.OpenSearchSuggestionStore({ - url : catalogue.services.opensearchSuggest, - rootId : 1, - baseParams : { - field : 'title' - } - }); - var titleField = new Ext.ux.form.SuperBoxSelect({ - hideLabel : false, - minChars : 0, - queryParam : 'q', - hideTrigger : false, - field: 'title', - id : 'E_title', - name : 'E_title', - store : titleStore, - valueField : 'value', - displayField : 'value', - valueDelimiter : ' or ', - // tpl: tpl, - fieldLabel: OpenLayers.i18n('title') - }); - - whatFields.push(titleField); - } - if (GeoNetwork.searchDefault.advSearchShowAltTitleField) { - var altTitleField = new Ext.form.TextField({ - fieldLabel: OpenLayers.i18n('altTitle'), - name: 'E_altTitle', - id: 'E_altTitle' - }); - - whatFields.push(altTitleField); - } - whatFields.push(ownerField, isHarvestedField, siteId); - - - advancedCriteria = advancedCriteria.concat(whatFields); - - var sortByCombo = new Ext.form.TextField({ - name : 'E_sortBy', - id : 'E_sortBy', - inputType : 'hidden' - }); - - var orderBy = new Ext.form.TextField({ - name : 'E_sortOrder', - id : 'sortOrder', - inputType : 'hidden' - }); - - var what = { - title : OpenLayers.i18n('What'), - id : 'what_adv_search', - bodyStyle : 'padding:4px', - layout : 'form', - defaults : { - anchor : '100%' - }, - forceLayout : true, - items : [ any, onlineData, dataForDownload, noDirectDownload, - sortByCombo, orderBy, advancedCriteria ] - }; - - var mapLayers = []; - for ( var i = 0; i < GeoNetwork.map.BACKGROUND_LAYERS.length; i++) { - mapLayers.push(GeoNetwork.map.BACKGROUND_LAYERS[i].clone()); - } - var geomWithMapField = { - xtype : 'gn_geometrymapfield', - id : 'geometryMap', - layers : mapLayers, - width : '100%', - height : '212', - mapOptions : GeoNetwork.map.MAP_OPTIONS, - activated : false - // restrictToMapExtent: true - }; - var where = { - title : OpenLayers.i18n('Where'), - id : 'where_adv_search', - // bodyStyle : 'padding:4px', - layout : 'form', - defaults : { - anchor : '100%' - }, - items : [ geomWithMapField ] - }; - - var when = { - title : OpenLayers.i18n('When'), - id : 'when_adv_search', - bodyStyle : 'padding:4px', - forceLayout : true, - defaultType : 'datefield', - layout : 'form', - defaults : { - anchor : '100%' - }, - items : GeoNetwork.util.SearchFormTools.getWhen() - }; - - var inspireFields = GeoNetwork.util.INSPIRESearchFormTools - .getINSPIREFields(catalogue.services, true, { - withAnnex : true, - withTheme : true - }); - var serviceTypeField = GeoNetwork.util.INSPIRESearchFormTools - .getServiceTypeField(true); - inspireFields.push(serviceTypeField); - - var inspire = { - title : 'INSPIRE', - id : 'inspire_adv_search', - bodyStyle : 'padding:4px', - defaultType : 'datefield', - layout : 'form', - defaults : { - anchor : '100%' - }, - - items : inspireFields - }; - - var formItems = []; - - formItems.push({ - id : 'advSearchTabs', - layout : { - type : 'hbox', - defaultMargins : '0 5 0 5', - pack : 'left', - align : 'top', - width : '100%' - }, - border : false, - items : [ { - id : 'what-inspire', - layout : 'form', - defaults : { - anchor : '100%' - }, - border : false, - items : [ what, inspire ] - }, where, when ] - }); - - this.setAdminFieldsCallback([ metadataTypeField ]); - - return new GeoNetwork.SearchFormPanel({ - id : 'advanced-search-options-content-form', - renderTo : 'advanced-search-options-content', - stateId : 's', - autoHeight : true, - width : '100%', - border : false, - searchCb : function() { - - var any = Ext.get('E_any'); - if (any) { - if (any.getValue() === OpenLayers - .i18n('fullTextSearch')) { - any.setValue(''); - } - } - - catalogue.startRecord = 1; // Reset start record - searching = true; - catalogue.search('advanced-search-options-content-form', - app.searchApp.loadResults, null, - catalogue.startRecord, true); - app.searchApp.firstSearch = true; - showSearch(); - }, - listeners : { - onreset : function() { - if (Ext.getCmp('facets-panel')) { - Ext.getCmp('facets-panel').reset(); - } - this.fireEvent('search'); - - GeoNetwork.Util.updateHeadInfo({ - title : catalogue.getInfo().name - }); - } - }, - padding : 2, - items : formItems - }); - }, - generateFacetedSearchPanel : function() { - var breadcrumb = new Ext.Panel({ - id : 'bread-crumb', - renderTo : 'bread-crumb-div', - layout : 'table', - cls : 'breadcrumb', - defaultType : 'button', - border : false, - split : false, - layoutConfig : { - columns : 150 //Never fall to a second row - } - }); - var facetsPanel = new GeoNetwork.FacetsPanel( - { - id : 'facets-panel', - renderTo : 'facets-panel-div', - searchForm : Ext - .getCmp('advanced-search-options-content-form'), - breadcrumb : breadcrumb, - switchFacetsMenu : false, - maxDisplayedItems : GeoNetwork.Settings.facetMaxItems || 7, - facetListConfig : GeoNetwork.Settings.facetListConfig - || [] - }); - }, - /** - * Bottom bar - * - * @return - */ - createBBar : function() { - - var previousAction = new Ext.Action({ - id : 'previousBtFooter', - text : '<<', - handler : function() { - var from = catalogue.startRecord - 50; - if (from > 0) { - catalogue.startRecord = from; - catalogue.search( - 'advanced-search-options-content-form', - app.searchApp.loadResults, null, - catalogue.startRecord, true); - } - }, - scope : this - }); - - var nextAction = new Ext.Action({ - id : 'nextBtFooter', - text : '>>', - handler : function() { - catalogue.startRecord += 50; - catalogue.search('advanced-search-options-content-form', - app.searchApp.loadResults, null, - catalogue.startRecord, true); - }, - scope : this - }); - - return new Ext.Toolbar({ - items : [ previousAction, { - xtype : 'tbtext', - text : '', - id : 'infoFooter' - }, nextAction ] - }); - - }, - - /** - * Results panel layout with top, bottom bar and DataView - * - * @return - */ - createResultsPanel : function(permalinkProvider) { - var metadataResultsView = new GeoNetwork.MetadataResultsView({ - catalogue : catalogue, - displaySerieMembers : true, - autoScroll : true, - autoWidth : false, - tpl : GeoNetwork.HTML5UI.Templates.FULL, - templates : { - SIMPLE : GeoNetwork.HTML5UI.Templates.SIMPLE, - THUMBNAIL : GeoNetwork.HTML5UI.Templates.THUMBNAIL, - FULL : GeoNetwork.HTML5UI.Templates.FULL - }, - featurecolor : GeoNetwork.Settings.results.featurecolor, - colormap : GeoNetwork.Settings.results.colormap, - featurecolorCSS : GeoNetwork.Settings.results.featurecolorCSS - }); - - catalogue.resultsView = metadataResultsView; - - // Add results to map - Ext.each(app.mapApp.maps, function(map) { - catalogue.resultsView.addMap(map, true); - }); - - var tBar = new GeoNetwork.MetadataResultsToolbar({ - catalogue : catalogue, - withPaging: true, - searchFormCmp : Ext - .getCmp('advanced-search-options-content-form'), - sortByCmp : Ext.getCmp('E_sortBy'), - metadataResultsView : metadataResultsView - // Permalink provider is broken due to cookie state probably - // so remove it from the NGR GUI FIXME - // permalinkProvider : permalinkProvider - }); - - var bBar = this.createBBar(); - - // Add handlers for the pagination buttons in the top bar - Ext.getCmp('previousBt').on('click', function() { - var from = catalogue.startRecord - 50; - if (from > 0) { - catalogue.startRecord = from; - catalogue.search( - 'advanced-search-options-content-form', - app.searchApp.loadResults, null, - catalogue.startRecord, true); - } - }); - - Ext.getCmp('nextBt').on('click', function() { - catalogue.startRecord += 50; - catalogue.search('advanced-search-options-content-form', - app.searchApp.loadResults, null, - catalogue.startRecord, true); - }); - - var resultPanel = new Ext.Panel({ - id : 'resultsPanel', - border : false, - hidden : true, - bodyCssClass : 'md-view', - autoWidth : true, - layout : 'fit', - tbar : tBar, - items : metadataResultsView, - renderTo : 'result-panel', - // paging bar on the bottom - bbar : bBar - }); - return resultPanel; - }, - loadResults : function(response, query) { - Ext.state.Manager.getProvider().updateLastSearch(query); - // Show "List results" panel - var facetPanel = Ext.getCmp('facets-panel'); - // Init facet panel on first search - if (!facetPanel) { - app.searchApp.generateFacetedSearchPanel(); - } - Ext.getCmp('facets-panel').refresh(response); - - Ext.getCmp('previousBt').setDisabled(catalogue.startRecord === 1); - Ext.getCmp('nextBt') - .setDisabled( - catalogue.startRecord + 50 > catalogue.metadataStore.totalLength); - - Ext.getCmp('previousBtFooter').setDisabled(catalogue.startRecord === 1); - Ext.getCmp('nextBtFooter') - .setDisabled( - catalogue.startRecord + 50 > catalogue.metadataStore.totalLength); - - Ext.getCmp("infoFooter").update(Ext.getCmp("info").el.dom.textContent - || Ext.getCmp("info").el.dom.innerText); - - // Fix for width sortBy combo in toolbar - // See this: - // http://www.sencha.com/forum/showthread.php?122454-TabPanel-deferred-render-false-nested-toolbar-layout-problem - Ext.getCmp('sortByToolBar').syncSize(); - Ext.getCmp('sortByToolBar').setWidth(130); - - // Update page title based on search results and params - var formParams = GeoNetwork.util.SearchTools - .getFormValues(app.searchApp.advSearchForm); - var criteria = '', excludedSearchParam = { - E_hitsperpage : null, - timeType : null, - sortOrder : null, - sortBy : null - }; - for ( var item in formParams) { - if (formParams.hasOwnProperty(item) - && excludedSearchParam[item] === undefined) { - var value = formParams[item]; - if (value !== '') { - fieldName = item.split('_'); - criteria += OpenLayers.i18n(fieldName[1] || item) - + ': ' + value + ' - '; - } - } - } - var title = (catalogue.metadataStore.totalLength || 0) - + OpenLayers.i18n('recordsFound') - + (criteria !== '' ? ' | ' + criteria : ''); - - GeoNetwork.Util.updateHeadInfo({ - title : catalogue.getInfo().name + ' | ' + title - }); - - if (!cookie || !cookie.get('user') || !cookie.get('user').username) { - Ext.each(Ext.DomQuery.select('.md-action-menu'), function(el) { - hide(el); - }); - } - - Ext.state.Manager.getProvider().restoring = false; - } - }; -}; diff --git a/web-client/src/main/resources/apps/html5ui/js/state/History.js b/web-client/src/main/resources/apps/html5ui/js/state/History.js deleted file mode 100644 index b46e2a4bd0c..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/state/History.js +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (C) 2012 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ - -Ext.namespace('GeoNetwork'); - -/** - * Based on the Ext.History class - * - * Helps Permalink.js - */ - -if (!GeoNetwork.state) { - GeoNetwork.state = {}; -} - -GeoNetwork.state.History = (function() { - var iframe, hiddenField; - var ready = false; - var currentToken; - var hash = undefined; - - function timeout_function() { - var newHash = getHash(); - if (newHash !== hash) { - hash = newHash; - handleStateChange(hash); - doSave(); - } - } - function getHash() { - var href = top.location.href, i = href.indexOf("#"); - return i >= 0 ? href.substr(i + 1) : null; - } - - function doSave() { - hiddenField.value = currentToken; - } - - function handleStateChange(token) { - currentToken = token; - GeoNetwork.state.History.fireEvent('change', token); - } - - function updateIFrame(token) { - var html = [ '
      ', token, - '
      ' ].join(''); - try { - var doc = iframe.contentWindow.document; - doc.open(); - doc.write(html); - doc.close(); - return true; - } catch (e) { - return false; - } - } - - function checkIFrame() { - if (!iframe.contentWindow || !iframe.contentWindow.document) { - setTimeout(checkIFrame, 10); - return; - } - - var doc = iframe.contentWindow.document; - var elem = doc.getElementById("state"); - var token = elem ? elem.innerText : null; - - hash = getHash(); - - setInterval(function() { - - doc = iframe.contentWindow.document; - elem = doc.getElementById("state"); - - var newtoken = elem ? elem.innerText : null; - - var newHash = getHash(); - - if (newtoken !== token) { - token = newtoken; - handleStateChange(token); - top.location.hash = token; - hash = token; - doSave(); - } else if (newHash !== hash) { - hash = newHash; - updateIFrame(newHash); - } - - }, 50); - - ready = true; - - GeoNetwork.state.History.fireEvent('ready', GeoNetwork.state.History); - } - - return { - /** - * The id of the hidden field required for storing the current history - * token. - * - * @type String - * @property - */ - fieldId : 'x-history-field', - /** - * The id of the iframe required by IE to manage the history stack. - * - * @type String - * @property - */ - iframeId : 'x-history-frame', - - events : {}, - - startUp : function() { - - currentToken = hiddenField.value ? hiddenField.value : getHash(); - - if (Ext.isIE) { - checkIFrame(); - } else { - this.startEvents(); - if (!ready) { - ready = true; - GeoNetwork.state.History.fireEvent('ready', - GeoNetwork.state.History); - } - } - }, - - startEvents : function() { - GeoNetwork.state.History.suspendEvents(); - hash = getHash(); - setInterval(timeout_function, 50); - }, - - /** - * Initialize the global History instance. - * - * @param {Boolean} - * onReady (optional) A callback function that will be called - * once the history component is fully initialized. - * @param {Object} - * scope (optional) The callback scope - */ - init : function(onReady, scope) { - if (ready) { - Ext.callback(onReady, scope, [ this ]); - return; - } - if (!Ext.isReady) { - Ext.onReady(function() { - GeoNetwork.state.History.init(onReady, scope); - }); - return; - } - hiddenField = Ext.getDom(GeoNetwork.state.History.fieldId); - if (Ext.isIE) { - iframe = Ext.getDom(GeoNetwork.state.History.iframeId); - } - this.addEvents('ready', 'change'); - if (onReady) { - this.on('ready', onReady, scope, { - single : true - }); - } - this.startUp(); - }, - - /** - * Add a new token to the history stack. This can be any arbitrary - * value, although it would commonly be the concatenation of a component - * id and another id marking the specifc history state of that - * component. Example usage: - * - *
      
      -         * // Handle tab changes on a TabPanel
      -         * tabPanel.on('tabchange', function(tabPanel, tab) {
      -         *     Ext.History.add(tabPanel.id + ':' + tab.id);
      -         * });
      -         * 
      - * - * @param {String} - * token The value that defines a particular - * application-specific history state - * @param {Boolean} - * preventDuplicates When true, if the passed token matches - * the current token it will not save a new history step. Set - * to false if the same state can be saved more than once at - * the same history stack location (defaults to true). - */ - add : function(token, preventDup) { - if (preventDup !== false) { - if (this.getToken() == token) { - return true; - } - } - this.suspendEvents(); - var res = false; - if (Ext.isIE) { - res = updateIFrame(token); - } else { - top.location.hash = token; - res = true; - } - currentToken = token; - this.resumeEvents(); - return res; - }, - - /** - * Programmatically steps back one step in browser history (equivalent - * to the user pressing the Back button). - */ - back : function() { - history.go(-1); - }, - - /** - * Programmatically steps forward one step in browser history - * (equivalent to the user pressing the Forward button). - */ - forward : function() { - history.go(1); - }, - - /** - * Retrieves the currently-active history token. - * - * @return {String} The token - */ - getToken : function() { - return ready ? currentToken : getHash(); - } - }; -})(); - -Ext.apply(GeoNetwork.state.History, new Ext.util.Observable()); - -Ext.apply(GeoNetwork.state.History, { - suspendEvents : function(queueSuspended) { - this.eventsSuspended = true; - if (queueSuspended && !this.eventQueue) { - this.eventQueue = []; - } - if (!Ext.isIE) { - window.clearInterval(this.timeout_function); - } - }, - resumeEvents : function() { - var me = this, queued = me.eventQueue || []; - me.eventsSuspended = false; - delete me.eventQueue; - Ext.each(queued, function(e) { - me.fireEvent.apply(me, e); - }); - - if (!Ext.isIE) { - this.startEvents(); - } - } -}); diff --git a/web-client/src/main/resources/apps/html5ui/js/state/PermalinkProvider.js b/web-client/src/main/resources/apps/html5ui/js/state/PermalinkProvider.js deleted file mode 100644 index 990a5cca87d..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/state/PermalinkProvider.js +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Copyright (C) 2012 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ - -Ext.namespace('GeoNetwork'); - -/** - * Extends the PermalinkProvider of GeoExt - * - * Helps App.js - */ - -if (!GeoNetwork.state) { - GeoNetwork.state = {}; -} - -GeoNetwork.state.PermalinkProvider = function(config) { - GeoExt.state.PermalinkProvider.superclass.constructor - .apply(this, arguments); - - config = config || {}; - - var url = config.url; - delete config.url; - - if (!Ext.isIE) { // FIXME - GeoNetwork.state.History.on('change', function() { - Ext.state.Manager.getProvider().restore(); - return false; - }); - } - - Ext.apply(this, config); -}; - -Ext - .extend( - GeoNetwork.state.PermalinkProvider, - GeoExt.state.PermalinkProvider, - { - restoring : false, - lastSearch : '', - metadata_separator : '|', - /** - * Update the last search to show it on the url - * - * @param s - */ - updateLastSearch : function(s) { - if (s == null) - s = ''; - - this.lastSearch = s; - - if (!this.restoring) { - GeoNetwork.state.History.add(s); - } - }, - /** - * private: method[readURL] :param url: ``String`` The URL - * to get the state from. :return: ``Object`` The state - * object. - * - * Create a state object from a URL. - */ - restore : function(url) { - - if (GeoNetwork.state.History.eventsSuspended) - return; - - this.restoring = true; - - var i = window.location.href.indexOf("#"); - if (i < 0) { - i = window.location.href.length; - } - this - .restoreFields(window.location.href.substring( - 0, i)); - - var end = location.hash.indexOf("?"); - if (end <= 0) { - end = location.hash.length; - } - var from = location.hash.indexOf("|"); - if (from < 0) { - from = end; - } - - var restoreSearch = true; - - if (from > 1) { - var search_string = location.hash - .substring(1, from); - - var url_md = 'xml.metadata.get?id='; - var open_file = ""; - var close_file = ""; - var open_char = ""; - var close_char = ""; - - if (search_string.indexOf("id=") == 0) { - var id = search_string.substring(3); - Ext.Ajax.request({ - url : url_md + id, - success : function(response, opts) { - var res = response.responseText; - - var uuid = res.substring(res - .indexOf(open_file) + 21, res - .indexOf(close_file)); - uuid = uuid.substring(uuid - .indexOf(open_char) + 21, uuid - .indexOf(close_char)); - app.searchApp.addMetadata(uuid, true); - } - }); - restoreSearch = false; - } else if (search_string.indexOf("edit=") == 0) { - var id = search_string.substring(5); - Ext.Ajax.request({ - url : url_md + id, - success : function(response, opts) { - var res = response.responseText; - - var uuid = res.substring(res - .indexOf(open_file) + 21, res - .indexOf(close_file)); - uuid = uuid.substring(uuid - .indexOf(open_char) + 21, uuid - .indexOf(close_char)); - app.searchApp.addMetadata(uuid, true, - id); - } - }); - restoreSearch = false; - } else if (search_string.indexOf("create") == 0) { - Ext.getCmp("resultsPanel").getTopToolbar().createMetadataAction - .fireEvent('click'); - } else if (!Ext.isEmpty(search_string)) { - GeoNetwork.util.SearchTools.doQuery( - search_string, catalogue, - catalogue.startRecord, - app.searchApp.loadResults, null, true, - catalogue.metadataStore, - catalogue.summaryStore, true); - - app.searchApp.firstSearch = true; - showSearch(); - - restoreSearch = false; - } - - } - from = location.hash.indexOf("|"); - if (from < 0) { - from = 0; - } else { - restoreSearch = false; - } - Ext.each(location.hash.substring(from, end).split("|"), - function(uuid) { - if (app && app.searchApp - && uuid.indexOf("#") < 0 - && !Ext.isEmpty(uuid)) { - app.searchApp.addMetadata(uuid, true); - restoreSearch = false; - } - }); - - if (OpenLayers.Util.getParameters(url).hasOwnProperty( - "s_search") - && restoreSearch) { - Ext.getCmp('advanced-search-options-content-form') - .fireEvent('search'); - Ext.getCmp('advanced-search-options-content-form') - .getForm().reset(); - - } else { - this.restoreFields(window.location.href); - - Ext.state.Manager.getProvider().restoring = false; - } - - }, - restoreFields : function(url) { - - this.readURL(url); - // Continue with GeoExt stuff - - var all = {}; - - Ext.each(Ext.ComponentMgr.all.items, function(el) { - if (el.stateId) { - all[el.stateId] = el; - } - }); - - for (prop in this.state) { - var obj = this.state[prop]; - - var el = all[prop]; - - if (!el) { - el = Ext.getCmp(prop); - } - if (!el) { - Ext.get(prop); - } - if (el) { - if (el.map) { - this.restoreMap(obj, el.map); - } else if (obj.zoom && obj.x && obj.y) { - - Ext.each(el.initialConfig.items, function( - item) { - Ext.each(item.items, function(it) { - if (it.map) { - map = it.map; - } - }); - }); - - this.restoreMap(obj, map); - } else if (obj.collapsed && el.collapse) { - el.collapse(); - } else { - for (key in obj) { - var el_ = Ext.DomQuery - .select("*[name='" + key + "']"); - - if (el_ && el_.length && el_.length > 0) { - el_ = el_[0]; - } - - if (el_) { - el_ = Ext.get(el_); - if (el_.setValue) { - el_.setValue(obj[key]); - } else if (el_.dom) { - el_.dom.value = obj[key]; - } - } - } - - } - } - } - }, - readURL : function(url) { - this.state = {}; - - var params = OpenLayers.Util.getParameters(url - .substring(url.indexOf("?"))); - var k, split, stateId; - for (k in params) { - if (params.hasOwnProperty(k)) { - split = k.split("_"); - if (split.length > 1) { - stateId = split[0]; - this.state[stateId] = this.state[stateId] - || {}; - this.state[stateId][split.slice(1) - .join("_")] = this.encodeType ? this - .decodeValue(params[k]) - : params[k]; - } - } - } - return this.state; - }, - - /** Pretty link for sharing */ - getPrettyLink : function(base) { - var link = this.getLink(base); - if (link.indexOf("?") >= 0) { - link = link.substring(0, link.indexOf("?")); - } - - link = link.substring(link.indexOf("|") + 1); - - // Get base url and language - var urlParts = window.location.href.match(/(http.*\/.*)\/srv\/(.*)\/.*/, ''); - - return urlParts[1] - + '/srv/' + urlParts[2] + '/search' + "?uuid=" + link; - }, - /** - * api: method[getLink] :param base: ``String`` The base - * URL, optional. :return: ``String`` The permalink. - * - * Return the permalink corresponding to the current state. - */ - getLink : function(base) { - base = base || document.location.href; - - // Before doing GeoExt stuff, add tabs (metadata) - - var tabs = GeoNetwork.state.History.getToken(); - - if (!tabs || tabs == 'null') - tabs = ''; - - var qMark = tabs.indexOf("?"); - if (qMark > 0) { - tabs = tabs.substring(0, qMark); - } - qMark = tabs.indexOf("#"); - if (qMark > 0) { - tabs = tabs.substring(qMark); - } - - base = tabs; - - // Now we continue with GeoExt stuff - var params = {}; - - var id, k, state = this.state; - for (id in state) { - if (state.hasOwnProperty(id)) { - for (k in state[id]) { - params[id + "_" + k] = this.encodeType ? unescape(this - .encodeValue(state[id][k])) - : state[id][k]; - } - } - } - - // merge params in the URL into the state params - OpenLayers.Util.applyDefaults(params, OpenLayers.Util - .getParameters(base)); - - var paramsStr = OpenLayers.Util - .getParameterString(params); - - return Ext.urlAppend(base, paramsStr); - }, - restoreMap : function(state, map) { - - // if we get strings for state.x, state.y or state.zoom - // OpenLayers will take care of converting them to the - // appropriate types so we don't bother with that - map.setCenter(new OpenLayers.LonLat(state.x, state.y), - state.zoom, false, false); - - // set layer visibility and opacity - var i, l, layer, layerId, visibility, opacity; - Ext.each(map.layers, function(layer) { - layerId = layer.name; - visibility = state["visibility_" + layerId]; - if (visibility !== undefined) { - // convert to boolean - visibility = (/^true$/i).test(visibility); - if (layer.isBaseLayer) { - if (visibility) { - map.setBaseLayer(layer); - } - } else { - layer.setVisibility(visibility); - } - } - opacity = state["opacity_" + layerId]; - if (opacity !== undefined) { - layer.setOpacity(opacity); - } - }); - } - }); diff --git a/web-client/src/main/resources/apps/html5ui/js/user/LoginApp.js b/web-client/src/main/resources/apps/html5ui/js/user/LoginApp.js deleted file mode 100644 index 8df03ed4de8..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/user/LoginApp.js +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (C) 2012 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ - -Ext.namespace('GeoNetwork'); - -/** - * Login related stuff. Utility class for App.js. - */ -GeoNetwork.loginApp = function() { - return { - init : function() { - Ext.get("login_button").on( - 'click', - function(e) { - app.loginApp.login(Ext.get("username").getValue(), - Ext.get("password").getValue()); - }); - - catalogue.on('afterBadLogin', this.loginAlert, this); - - // Store user info in cookie to be displayed if user reload the page - // Register events to set cookie values - catalogue - .on( - 'afterLogin', - function(e) { - cookie.set('user', catalogue.identifiedUser); - hide("login-form"); - Ext.getCmp('md-selection-info').show(); - - var user = catalogue.identifiedUser; - Ext.get("username").dom.value = (""); - Ext.get("password").dom.value = (""); - if (Ext.isIE) { - Ext.get("user-button").dom.innerText = OpenLayers - .i18n("logout"); - Ext.get("username_label").dom.innerText = user.username; - Ext.get("name_label").dom.innerText = " " - + user.surname + " "; - Ext.get("profile_label").dom.innerText = "(" - + user.role + ")"; - } else { - Ext.get("user-button").update( - OpenLayers.i18n("logout")); - Ext.get("username_label").update( - user.username); - Ext.get("name_label").update( - " " + user.surname + " "); - Ext.get("profile_label").update( - "(" + user.role + ")"); - } - Ext.get("user-button").dom.href = "javascript:app.loginApp.logout();"; - - show("administration_button"); - - if (user.type && user.type === "advanced") { - user.searchTemplate = 'FULL'; - } else { - user.searchTemplate = 'SIMPLE'; - } - }); - catalogue.on('afterLogout', function() { - cookie.set('user', undefined); - - Ext.getCmp('md-selection-info').hide(); - hide("administration_button"); - if (Ext.isIE) { - Ext.get("user-button").dom.innerText = OpenLayers - .i18n("login"); - - Ext.get("username_label").dom.innerText = (""); - Ext.get("name_label").dom.innerText = (""); - Ext.get("profile_label").dom.innerText = (""); - } else { - Ext.get("user-button").update(OpenLayers.i18n("login")); - - Ext.get("username_label").update(""); - Ext.get("name_label").update(""); - Ext.get("profile_label").update(""); - } - Ext.get("username").dom.value = (""); - Ext.get("password").dom.value = (""); - Ext.get("user-button").dom.href = "javascript:toggleLogin();"; - - // Clean previous user data - catalogue.metadataStore.removeAll(); - catalogue.resultsView.store.removeAll(); - - showBrowse(); - }); - - // Refresh login form if needed - var user = cookie.get('user'); - - if (user) { - catalogue.identifiedUser = user; - } - }, - /** - * Error message in case of bad login - * - * @param cat - * @param user - * @return - */ - loginAlert : function(cat, user) { - GeoNetwork.Message().msg({ - title : OpenLayers.i18n('warning'), - msg : OpenLayers.i18n('Login.error.message'), - status : 'warning', - target : document.body - }); - },// FIXME Until catalog is adapted to spring security login, use this - login : function(username, password) { - var app = this, user; - var intervalID; - var loginAttempts = 0; - var loginWindow; - var params = { - username : username, - password : password - }; - if (catalogueNode) { - params.node = catalogueNode; - } - - Ext.Ajax.request({ - url : '../../j_spring_security_check', - params : params, - headers : { - "Content-Type" : "application/x-www-form-urlencoded" - }, - success : this.isLoggedIn, - failure : this.isLoggedIn, - scope : this - }); - },// FIXME Until catalog is adapted to spring security login, use this - logout : function() { - var params = {}; - if (catalogueNode) { - params.node = catalogueNode; - } - - Ext.Ajax.request({ - url : catalogue.services.rootUrl + '../../j_spring_security_logout', - params : params, - headers : { - "Content-Type" : "application/x-www-form-urlencoded" - }, - success : function() { - catalogue.fireEvent('afterLogout', - catalogue, catalogue.identifiedUser); - }, - failure : function() { - catalogue.fireEvent('afterBadLogout', - catalogue, catalogue.identifiedUser); - }, - scope : this - }); - }, - /** - * api: method[isLoggedIn] - * - * Get the xml.info for me. If user is not identified response xml will - * have a me element with an authenticated attribute. If catalogue URL - * is wrong, response status is 404 (check catalogue URL). In case of - * exception continue catalogue connection validation using the - * xml.main.error service (@see checkError). - */ - isLoggedIn : function() { - var response = OpenLayers.Request.GET({ - url : catalogue.services.rootUrl + 'xml.info?type=me', - async : false - }), exception, authenticated, me; - - me = response.responseXML.getElementsByTagName('me')[0]; - authenticated = me.getAttribute('authenticated') == 'true'; - - // Check status and also check than an Exception is not described in - // the HTML response - // in case of bad startup - exception = response.responseText.indexOf('Exception') !== -1; - - if (response.status === 200 && authenticated) { - - var username = me.getElementsByTagName('username')[0]; - var name = me.getElementsByTagName('name')[0]; - var surname = me.getElementsByTagName('surname')[0]; - var role = me.getElementsByTagName('profile')[0]; - - catalogue.identifiedUser = { - username : username.innerText || username.textContent - || username.text, - name : name.innerText || name.textContent || name.text, - surname : surname.innerText || surname.textContent - || surname.text, - role : role.innerText || role.textContent || role.text - }; - catalogue.onAfterLogin(); - return true; - } else if (response.status === 404) { - this.showError(OpenLayers.i18n('connectIssue'), OpenLayers - .i18n('connectIssueMsg') - + catalogue.services.rootUrl + '.'); - } else if (exception) { - catalogue.checkError(); - return false; - } else { - // Reset user cookie information - if (cookie) { - cookie.set('user', undefined); - } - - catalogue.identifiedUser = undefined; - catalogue.onAfterBadLogin(); - - return false; - } - } - }; -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/js/vendor/modernizr-2.6.1-respond-1.1.0.min.js b/web-client/src/main/resources/apps/html5ui/js/vendor/modernizr-2.6.1-respond-1.1.0.min.js deleted file mode 100644 index 8e708949c07..00000000000 --- a/web-client/src/main/resources/apps/html5ui/js/vendor/modernizr-2.6.1-respond-1.1.0.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/* Modernizr 2.6.1 (Custom Build) | MIT & BSD - * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load - */ -;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(['#modernizr:after{content:"',l,'";visibility:hidden}'].join(""),function(b){a=b.offsetHeight>=1}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f #mq-test-1 { width: 42px; }';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); - -/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ -(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/html5ui/print.html b/web-client/src/main/resources/apps/html5ui/print.html deleted file mode 100644 index 9de76de3d16..00000000000 --- a/web-client/src/main/resources/apps/html5ui/print.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - GeoNetwork - - - - - - - - - - - - - - - - - -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/images/default/accept.png b/web-client/src/main/resources/apps/images/default/accept.png deleted file mode 100755 index 89c8129a490..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/accept.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/add.png b/web-client/src/main/resources/apps/images/default/add.png deleted file mode 100644 index 6332fefea4b..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/admin.png b/web-client/src/main/resources/apps/images/default/admin.png deleted file mode 100644 index 2cad4e7e085..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/admin.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/application_view_tile.png b/web-client/src/main/resources/apps/images/default/application_view_tile.png deleted file mode 100644 index 3bc0bd32fce..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/application_view_tile.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/book.png b/web-client/src/main/resources/apps/images/default/book.png deleted file mode 100755 index b0f4dd7928c..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/book.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/brick_add.png b/web-client/src/main/resources/apps/images/default/brick_add.png deleted file mode 100755 index fac186bfb79..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/brick_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/bullet_arrow_down.png b/web-client/src/main/resources/apps/images/default/bullet_arrow_down.png deleted file mode 100755 index 97bb3fb37c5..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/bullet_arrow_down.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/bullet_arrow_right.png b/web-client/src/main/resources/apps/images/default/bullet_arrow_right.png deleted file mode 100755 index 03ffc4fe59e..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/bullet_arrow_right.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/bullet_arrow_up.png b/web-client/src/main/resources/apps/images/default/bullet_arrow_up.png deleted file mode 100644 index ca77b9644e2..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/bullet_arrow_up.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/bullet_go.png b/web-client/src/main/resources/apps/images/default/bullet_go.png deleted file mode 100755 index bc4faa709e7..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/bullet_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/bullet_toggle_minus.png b/web-client/src/main/resources/apps/images/default/bullet_toggle_minus.png deleted file mode 100644 index 18a85eb8826..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/bullet_toggle_minus.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/bullet_toggle_plus.png b/web-client/src/main/resources/apps/images/default/bullet_toggle_plus.png deleted file mode 100644 index 311331e7ec7..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/bullet_toggle_plus.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/cancel.png b/web-client/src/main/resources/apps/images/default/cancel.png deleted file mode 100755 index c149c2bc017..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/cancel.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/applications.png b/web-client/src/main/resources/apps/images/default/category/applications.png deleted file mode 100644 index 1261ce37da5..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/applications.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/audioVideo.png b/web-client/src/main/resources/apps/images/default/category/audioVideo.png deleted file mode 100644 index 3b3f189005f..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/audioVideo.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/caseStudies.png b/web-client/src/main/resources/apps/images/default/category/caseStudies.png deleted file mode 100644 index ab27c580e6e..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/caseStudies.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/dataset.png b/web-client/src/main/resources/apps/images/default/category/dataset.png deleted file mode 100644 index 9d7db38c1f1..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/dataset.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/datasets.png b/web-client/src/main/resources/apps/images/default/category/datasets.png deleted file mode 100644 index a2444aa9916..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/datasets.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/directories.png b/web-client/src/main/resources/apps/images/default/category/directories.png deleted file mode 100644 index 784e8fa4823..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/directories.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/featureCatalogue.png b/web-client/src/main/resources/apps/images/default/category/featureCatalogue.png deleted file mode 100644 index abcd93689a0..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/featureCatalogue.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/interactiveResources.png b/web-client/src/main/resources/apps/images/default/category/interactiveResources.png deleted file mode 100644 index a9f09e79e32..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/interactiveResources.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/maps.png b/web-client/src/main/resources/apps/images/default/category/maps.png deleted file mode 100644 index b8895ddecf5..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/maps.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/model.png b/web-client/src/main/resources/apps/images/default/category/model.png deleted file mode 100644 index ffe94f67b44..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/model.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/otherResources.png b/web-client/src/main/resources/apps/images/default/category/otherResources.png deleted file mode 100644 index f5ce8935346..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/otherResources.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/photo.png b/web-client/src/main/resources/apps/images/default/category/photo.png deleted file mode 100644 index b0ce7bb198a..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/photo.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/physicalSamples.png b/web-client/src/main/resources/apps/images/default/category/physicalSamples.png deleted file mode 100644 index cb16a60be2b..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/physicalSamples.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/proceedings.png b/web-client/src/main/resources/apps/images/default/category/proceedings.png deleted file mode 100644 index 2c5b41e7f2b..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/proceedings.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/registers.png b/web-client/src/main/resources/apps/images/default/category/registers.png deleted file mode 100644 index 784e8fa4823..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/registers.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/service.png b/web-client/src/main/resources/apps/images/default/category/service.png deleted file mode 100644 index 6ba6711b77f..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/service.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/category/z3950Servers.png b/web-client/src/main/resources/apps/images/default/category/z3950Servers.png deleted file mode 100755 index 8850a83557e..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/category/z3950Servers.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/chart_organisation.png b/web-client/src/main/resources/apps/images/default/chart_organisation.png deleted file mode 100755 index c32d25c16f8..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/chart_organisation.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/cog.png b/web-client/src/main/resources/apps/images/default/cog.png deleted file mode 100755 index 67de2c6ccbe..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/cog.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/color_swatch.png b/web-client/src/main/resources/apps/images/default/color_swatch.png deleted file mode 100755 index 6e6e85212b8..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/color_swatch.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/connect.png b/web-client/src/main/resources/apps/images/default/connect.png deleted file mode 100755 index 024138eb33b..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/connect.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/cross.png b/web-client/src/main/resources/apps/images/default/cross.png deleted file mode 100755 index 1514d51a3cf..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/cross.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/csv.png b/web-client/src/main/resources/apps/images/default/csv.png deleted file mode 100644 index 671501004ad..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/csv.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/database_yellow.png b/web-client/src/main/resources/apps/images/default/database_yellow.png deleted file mode 100644 index de69faa230d..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/database_yellow.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/date_go.png b/web-client/src/main/resources/apps/images/default/date_go.png deleted file mode 100644 index 52dd9f3ae37..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/date_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/del.gif b/web-client/src/main/resources/apps/images/default/del.gif deleted file mode 100644 index fe784234be0..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/del.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/door_out.png b/web-client/src/main/resources/apps/images/default/door_out.png deleted file mode 100755 index 2541d2bcbc2..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/door_out.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/down.gif b/web-client/src/main/resources/apps/images/default/down.gif deleted file mode 100644 index 03c02bd6814..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/down.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/download.png b/web-client/src/main/resources/apps/images/default/download.png deleted file mode 100644 index 4c8204af156..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/download.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/exclamation.png b/web-client/src/main/resources/apps/images/default/exclamation.png deleted file mode 100755 index c37bd062e60..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/exclamation.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/feed.png b/web-client/src/main/resources/apps/images/default/feed.png deleted file mode 100755 index 315c4f4fa62..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/feed.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/feedback.png b/web-client/src/main/resources/apps/images/default/feedback.png deleted file mode 100644 index 607a230e2fa..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/feedback.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/find.png b/web-client/src/main/resources/apps/images/default/find.png deleted file mode 100755 index 15474796467..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/find.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/flag_green.png b/web-client/src/main/resources/apps/images/default/flag_green.png deleted file mode 100755 index a9925a06ab0..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/flag_green.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/flag_orange.png b/web-client/src/main/resources/apps/images/default/flag_orange.png deleted file mode 100755 index e63202420f6..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/flag_orange.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/flag_red.png b/web-client/src/main/resources/apps/images/default/flag_red.png deleted file mode 100755 index 1514d51a3cf..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/flag_red.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/folder.png b/web-client/src/main/resources/apps/images/default/folder.png deleted file mode 100644 index 784e8fa4823..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/folder.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/folder_brick.png b/web-client/src/main/resources/apps/images/default/folder_brick.png deleted file mode 100644 index 5dea9769a2c..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/folder_brick.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/folder_go.png b/web-client/src/main/resources/apps/images/default/folder_go.png deleted file mode 100644 index 34a736f7026..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/folder_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/folder_key.png b/web-client/src/main/resources/apps/images/default/folder_key.png deleted file mode 100644 index fb9b4c2bbc2..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/folder_key.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/folder_page_white.png b/web-client/src/main/resources/apps/images/default/folder_page_white.png deleted file mode 100644 index 14d6b6181f0..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/folder_page_white.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/folder_picture.png b/web-client/src/main/resources/apps/images/default/folder_picture.png deleted file mode 100644 index 052b33638ea..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/folder_picture.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/gn-logo.png b/web-client/src/main/resources/apps/images/default/gn-logo.png deleted file mode 100644 index 0db45c525b9..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/gn-logo.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/google-earth-link.png b/web-client/src/main/resources/apps/images/default/google-earth-link.png deleted file mode 100644 index b5b2a3bb8f1..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/google-earth-link.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/group_key.png b/web-client/src/main/resources/apps/images/default/group_key.png deleted file mode 100755 index 257f111ca8b..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/group_key.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/header-bg.png b/web-client/src/main/resources/apps/images/default/header-bg.png deleted file mode 100644 index 928d79f4016..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/header-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/help.png b/web-client/src/main/resources/apps/images/default/help.png deleted file mode 100644 index 4ab8a346a3f..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/help.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/icon_pan.png b/web-client/src/main/resources/apps/images/default/icon_pan.png deleted file mode 100644 index 904dcefb279..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/icon_pan.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/icon_zoomfull.png b/web-client/src/main/resources/apps/images/default/icon_zoomfull.png deleted file mode 100644 index f313b61d232..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/icon_zoomfull.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/icon_zoomin.png b/web-client/src/main/resources/apps/images/default/icon_zoomin.png deleted file mode 100644 index 59b85a3caec..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/icon_zoomin.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/icon_zoomout.png b/web-client/src/main/resources/apps/images/default/icon_zoomout.png deleted file mode 100644 index 5057fd43d8c..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/icon_zoomout.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/import.png b/web-client/src/main/resources/apps/images/default/import.png deleted file mode 100644 index a2f676b2261..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/import.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/link.png b/web-client/src/main/resources/apps/images/default/link.png deleted file mode 100755 index 25eacb7c252..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/link.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/link_add.png b/web-client/src/main/resources/apps/images/default/link_add.png deleted file mode 100644 index 00be352c578..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/link_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/link_break.png b/web-client/src/main/resources/apps/images/default/link_break.png deleted file mode 100644 index 523575306d5..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/link_break.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/add_layer.png b/web-client/src/main/resources/apps/images/default/map/add_layer.png deleted file mode 100644 index 6332fefea4b..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/add_layer.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/delete_layer.png b/web-client/src/main/resources/apps/images/default/map/delete_layer.png deleted file mode 100644 index 08f249365af..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/delete_layer.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/draw_circle_off.png b/web-client/src/main/resources/apps/images/default/map/draw_circle_off.png deleted file mode 100644 index 8b327e988c1..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/draw_circle_off.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/draw_polygon_clear_off.png b/web-client/src/main/resources/apps/images/default/map/draw_polygon_clear_off.png deleted file mode 100644 index bb73f6ac981..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/draw_polygon_clear_off.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/draw_polygon_off.png b/web-client/src/main/resources/apps/images/default/map/draw_polygon_off.png deleted file mode 100644 index 3968fa593b6..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/draw_polygon_off.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/draw_rectangle_off.png b/web-client/src/main/resources/apps/images/default/map/draw_rectangle_off.png deleted file mode 100644 index 7009f861c8c..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/draw_rectangle_off.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_featureinfo.png b/web-client/src/main/resources/apps/images/default/map/icon_featureinfo.png deleted file mode 100644 index 5ef7e976738..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_featureinfo.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_loadwmc.png b/web-client/src/main/resources/apps/images/default/map/icon_loadwmc.png deleted file mode 100644 index 2d27efc8abb..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_loadwmc.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_measure.png b/web-client/src/main/resources/apps/images/default/map/icon_measure.png deleted file mode 100644 index d636b8c7d08..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_measure.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_pan.png b/web-client/src/main/resources/apps/images/default/map/icon_pan.png deleted file mode 100644 index 904dcefb279..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_pan.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_print.png b/web-client/src/main/resources/apps/images/default/map/icon_print.png deleted file mode 100644 index a350d187153..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_print.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_savewmc.png b/web-client/src/main/resources/apps/images/default/map/icon_savewmc.png deleted file mode 100644 index 14d339d8561..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_savewmc.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_selectfile.png b/web-client/src/main/resources/apps/images/default/map/icon_selectfile.png deleted file mode 100644 index fc5d6139e92..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_selectfile.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_selextent.png b/web-client/src/main/resources/apps/images/default/map/icon_selextent.png deleted file mode 100644 index 66cae4dabf2..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_selextent.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_zoomfull.png b/web-client/src/main/resources/apps/images/default/map/icon_zoomfull.png deleted file mode 100644 index f313b61d232..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_zoomfull.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_zoomin.png b/web-client/src/main/resources/apps/images/default/map/icon_zoomin.png deleted file mode 100644 index 59b85a3caec..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_zoomin.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_zoomlayer.png b/web-client/src/main/resources/apps/images/default/map/icon_zoomlayer.png deleted file mode 100644 index f8c6aca5ba6..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_zoomlayer.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/icon_zoomout.png b/web-client/src/main/resources/apps/images/default/map/icon_zoomout.png deleted file mode 100644 index 5057fd43d8c..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/icon_zoomout.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/indicator_medium.gif b/web-client/src/main/resources/apps/images/default/map/indicator_medium.gif deleted file mode 100644 index 5bb90fd6a49..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/indicator_medium.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/layerstyles.png b/web-client/src/main/resources/apps/images/default/map/layerstyles.png deleted file mode 100644 index bdc03f7cb64..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/layerstyles.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/map_go.png b/web-client/src/main/resources/apps/images/default/map/map_go.png deleted file mode 100644 index 11eab26db5f..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/map_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/opacity.png b/web-client/src/main/resources/apps/images/default/map/opacity.png deleted file mode 100644 index a608dba8d96..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/opacity.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/pan.cur b/web-client/src/main/resources/apps/images/default/map/pan.cur deleted file mode 100644 index 4278e26b63c..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/pan.cur and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/pandown.cur b/web-client/src/main/resources/apps/images/default/map/pandown.cur deleted file mode 100644 index 5abc080d42a..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/pandown.cur and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/resultset_next.png b/web-client/src/main/resources/apps/images/default/map/resultset_next.png deleted file mode 100644 index 5ee20c4232b..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/resultset_next.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/resultset_previous.png b/web-client/src/main/resources/apps/images/default/map/resultset_previous.png deleted file mode 100644 index 7d9039b620d..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/resultset_previous.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/ruler.png b/web-client/src/main/resources/apps/images/default/map/ruler.png deleted file mode 100644 index bc7246c6c8e..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/ruler.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/ruler_square.png b/web-client/src/main/resources/apps/images/default/map/ruler_square.png deleted file mode 100644 index 90da5bbeb42..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/ruler_square.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/server_picture.png b/web-client/src/main/resources/apps/images/default/map/server_picture.png deleted file mode 100644 index db579c17092..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/server_picture.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/server_vector.png b/web-client/src/main/resources/apps/images/default/map/server_vector.png deleted file mode 100644 index c8b103b46c5..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/server_vector.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/wmsinfo.png b/web-client/src/main/resources/apps/images/default/map/wmsinfo.png deleted file mode 100644 index cfc3089867b..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/wmsinfo.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/wmstime.gif b/web-client/src/main/resources/apps/images/default/map/wmstime.gif deleted file mode 100644 index a058fe34b62..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/wmstime.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/zoomin.cur b/web-client/src/main/resources/apps/images/default/map/zoomin.cur deleted file mode 100644 index a1f9d8d6f52..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/zoomin.cur and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/map/zoomout.cur b/web-client/src/main/resources/apps/images/default/map/zoomout.cur deleted file mode 100644 index 1614c523af5..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/map/zoomout.cur and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/mv-full.png b/web-client/src/main/resources/apps/images/default/mv-full.png deleted file mode 100644 index 3fb7fcddb7e..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/mv-full.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/mv-simple.png b/web-client/src/main/resources/apps/images/default/mv-simple.png deleted file mode 100644 index f6eb204aa7a..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/mv-simple.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/mv-thumbnail.png b/web-client/src/main/resources/apps/images/default/mv-thumbnail.png deleted file mode 100644 index 3a98615b192..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/mv-thumbnail.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/newOwner.png b/web-client/src/main/resources/apps/images/default/newOwner.png deleted file mode 100644 index 90f4c86ff49..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/newOwner.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/newwindow.png b/web-client/src/main/resources/apps/images/default/newwindow.png deleted file mode 100644 index 5d2313217cb..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/newwindow.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/nopreview.gif b/web-client/src/main/resources/apps/images/default/nopreview.gif deleted file mode 100644 index ce21ea4a10c..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/nopreview.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_code.png b/web-client/src/main/resources/apps/images/default/page_code.png deleted file mode 100644 index f7ea90419d9..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_code.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_copy.png b/web-client/src/main/resources/apps/images/default/page_copy.png deleted file mode 100755 index 195dc6d6c36..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_copy.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_delete.png b/web-client/src/main/resources/apps/images/default/page_delete.png deleted file mode 100755 index 3141467c678..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_delete.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_edit.png b/web-client/src/main/resources/apps/images/default/page_edit.png deleted file mode 100755 index 046811ed7a6..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_edit.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_gear.png b/web-client/src/main/resources/apps/images/default/page_gear.png deleted file mode 100644 index 8e83281c5f8..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_gear.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_go.png b/web-client/src/main/resources/apps/images/default/page_go.png deleted file mode 100755 index 80fe1ed0cc7..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_lightning.png b/web-client/src/main/resources/apps/images/default/page_lightning.png deleted file mode 100755 index 7e568703d64..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_lightning.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_refresh.png b/web-client/src/main/resources/apps/images/default/page_refresh.png deleted file mode 100755 index cf347c7d468..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_refresh.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_save.png b/web-client/src/main/resources/apps/images/default/page_save.png deleted file mode 100755 index caea546af54..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_save.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_white.png b/web-client/src/main/resources/apps/images/default/page_white.png deleted file mode 100644 index 8b8b1ca0000..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_white.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_white_acrobat.png b/web-client/src/main/resources/apps/images/default/page_white_acrobat.png deleted file mode 100755 index 8f8095e46fa..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_white_acrobat.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_white_compressed.png b/web-client/src/main/resources/apps/images/default/page_white_compressed.png deleted file mode 100755 index 2b6b1007f33..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_white_compressed.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_white_edit.png b/web-client/src/main/resources/apps/images/default/page_white_edit.png deleted file mode 100644 index b93e77600de..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_white_edit.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/page_white_zip.png b/web-client/src/main/resources/apps/images/default/page_white_zip.png deleted file mode 100755 index fd4bbccdf16..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/page_white_zip.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/picture.png b/web-client/src/main/resources/apps/images/default/picture.png deleted file mode 100755 index 4a158fef7e0..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/picture.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/picture_add.png b/web-client/src/main/resources/apps/images/default/picture_add.png deleted file mode 100755 index d6d3f856447..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/picture_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/picture_delete.png b/web-client/src/main/resources/apps/images/default/picture_delete.png deleted file mode 100755 index cca9f535d9a..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/picture_delete.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/picture_go.png b/web-client/src/main/resources/apps/images/default/picture_go.png deleted file mode 100755 index 27c63c5afe3..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/picture_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/plus.gif b/web-client/src/main/resources/apps/images/default/plus.gif deleted file mode 100644 index cade83c7f96..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/report_magnify.png b/web-client/src/main/resources/apps/images/default/report_magnify.png deleted file mode 100644 index aeaa8895342..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/report_magnify.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/spinner.gif b/web-client/src/main/resources/apps/images/default/spinner.gif deleted file mode 100644 index 39615c89252..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/spinner.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/sw-cube.png b/web-client/src/main/resources/apps/images/default/sw-cube.png deleted file mode 100644 index 9067ab8573a..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/sw-cube.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/table_gear.png b/web-client/src/main/resources/apps/images/default/table_gear.png deleted file mode 100644 index cfc2702acd7..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/table_gear.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/tag_blue_add.png b/web-client/src/main/resources/apps/images/default/tag_blue_add.png deleted file mode 100644 index f135248f82e..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/tag_blue_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/tag_orange.png b/web-client/src/main/resources/apps/images/default/tag_orange.png deleted file mode 100644 index 454a59f30ca..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/tag_orange.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/three_dots.png b/web-client/src/main/resources/apps/images/default/three_dots.png deleted file mode 100755 index a2f3d370c0e..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/three_dots.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/tick.png b/web-client/src/main/resources/apps/images/default/tick.png deleted file mode 100755 index a9925a06ab0..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/tick.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/up.gif b/web-client/src/main/resources/apps/images/default/up.gif deleted file mode 100644 index 22e62c14b10..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/up.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/user.png b/web-client/src/main/resources/apps/images/default/user.png deleted file mode 100755 index 79f35ccbdad..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/user.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/user_go.png b/web-client/src/main/resources/apps/images/default/user_go.png deleted file mode 100755 index 0468cf08f37..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/user_go.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/user_location.png b/web-client/src/main/resources/apps/images/default/user_location.png deleted file mode 100644 index 1d6f47724a0..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/user_location.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/vector_add.png b/web-client/src/main/resources/apps/images/default/vector_add.png deleted file mode 100644 index bf91801a77a..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/vector_add.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/images/default/vector_delete.png b/web-client/src/main/resources/apps/images/default/vector_delete.png deleted file mode 100644 index f335546ed01..00000000000 Binary files a/web-client/src/main/resources/apps/images/default/vector_delete.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/index.html b/web-client/src/main/resources/apps/index.html deleted file mode 100644 index 4b9c1cc73c1..00000000000 --- a/web-client/src/main/resources/apps/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - GeoNetwork - The portal to spatial data and information - - - - - - - - - - - - - - -

      Apps

      - - - diff --git a/web-client/src/main/resources/apps/js/GeoExt-ux/LayerOpacitySliderPlugin/LayerOpacitySliderPlugin.js b/web-client/src/main/resources/apps/js/GeoExt-ux/LayerOpacitySliderPlugin/LayerOpacitySliderPlugin.js deleted file mode 100644 index 0c18c75d7c7..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt-ux/LayerOpacitySliderPlugin/LayerOpacitySliderPlugin.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -Ext.namespace("GeoExt.tree"); - -/** api: (define) - * module = GeoExt.tree - * class = LayerOpacitySliderPlugin - * - * Adapted from http://rcoos.org/carolinasrcoosrev2/secoora_interactive_tst.html - */ - -GeoExt.tree.LayerOpacitySliderPlugin = Ext.extend(Ext.util.Observable, { - - // slider: null, - - constructor : function(config) { - Ext.apply(this.initialConfig, Ext.apply({}, config)); - Ext.apply(this, config); - this.addEvents("opacityslide"); - GeoExt.tree.LayerOpacitySliderPlugin.superclass.constructor.apply(this, - arguments); - }, - - init : function(tree) { - tree.on({ - "rendernode" : this.onRenderNode, - //"rawslidenode" : this.onRawSlideNode, - scope : this - }); - }, - - onRenderNode : function(node) { - var a = node.attributes; - var layer = node.layer; - // The loader param slider has to exist as well as another configuration - // option, opacitySlider, that will look - // to see if the individual layer wants to use a slider. It is possible - // that some - // layers grouped together in a node may or may not use a slider. If - // opacitySlider is not defined, the slider will get created. - - if (a.slider) { - this.indentMarkup = node.parentNode ? node.parentNode.ui - .getChildIndent() : ''; - var elID = node.id + '-tree-slider-'; - elID = Ext.id(null, elID); - // Use the table to force the slider onto the same line as the - // indents. Otherwise since the slider object - // creates
      tags the browser will put it on a seperate line. - buf = [ '
      ', '', '', - '
      ', - '', this.indentMarkup, - "", '', - '', this.indentMarkup, - "", '', '', '
      ' ]; - - Ext.DomHelper.insertAfter(node.ui.anchor, buf.join("")); - - var initValue = 100; - var slider = new Ext.Slider({ - minValue : 0, - maxValue : 100, - value : initValue, - width : 100, - aggressive : true, - layer: layer, - plugins : new GeoExt.LayerOpacitySliderTip() - }); - // This is needed to get the thumb on the slider to the correct - // initial point. The base code - // for the Ext.slider calls innerEl.getWidth() which does not work - // since at this point the slider - // isn't rendered. - Ext.override(Ext.Slider, { - getRatio : function() { - var w = this.innerEl.getComputedWidth(); - var v = this.maxValue - this.minValue; - return v == 0 ? w : (w / v); - } - }); - slider.on("change", function(slider, value, oldValue) { - this.layer.setOpacity(value / 100.0); - }); - slider.render(elID); - } - } -}); - -Ext.preg - && Ext.preg("gx_layeropacitysliderplugin", - GeoExt.tree.LayerOpacitySliderPlugin); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt-ux/TabCloseMenu/TabCloseMenu.js b/web-client/src/main/resources/apps/js/GeoExt-ux/TabCloseMenu/TabCloseMenu.js deleted file mode 100644 index d9056de947b..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt-ux/TabCloseMenu/TabCloseMenu.js +++ /dev/null @@ -1,150 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.ux.TabCloseMenu - * @extends Object - * Plugin (ptype = 'tabclosemenu') for adding a close context menu to tabs. Note that the menu respects - * the closable configuration on the tab. As such, commands like remove others and remove all will not - * remove items that are not closable. - * - * @constructor - * @param {Object} config The configuration options - * @ptype tabclosemenu - */ -Ext.ux.TabCloseMenu = Ext.extend(Object, { - /** - * @cfg {String} closeTabText - * The text for closing the current tab. Defaults to 'Close Tab'. - */ - closeTabText: 'Close Tab', - - /** - * @cfg {String} closeOtherTabsText - * The text for closing all tabs except the current one. Defaults to 'Close Other Tabs'. - */ - closeOtherTabsText: 'Close Other Tabs', - - /** - * @cfg {Boolean} showCloseAll - * Indicates whether to show the 'Close All' option. Defaults to true. - */ - showCloseAll: true, - - /** - * @cfg {String} closeAllTabsText - *

      The text for closing all tabs. Defaults to 'Close All Tabs'. - */ - closeAllTabsText: 'Close All Tabs', - - constructor : function(config){ - Ext.apply(this, config || {}); - }, - - //public - init : function(tabs){ - this.tabs = tabs; - tabs.on({ - scope: this, - contextmenu: this.onContextMenu, - destroy: this.destroy - }); - }, - - destroy : function(){ - Ext.destroy(this.menu); - delete this.menu; - delete this.tabs; - delete this.active; - }, - - // private - onContextMenu : function(tabs, item, e){ - this.active = item; - var m = this.createMenu(), - disableAll = true, - disableOthers = true, - closeAll = m.getComponent('closeall'); - - m.getComponent('close').setDisabled(!item.closable); - tabs.items.each(function(){ - if(this.closable){ - disableAll = false; - if(this != item){ - disableOthers = false; - return false; - } - } - }); - m.getComponent('closeothers').setDisabled(disableOthers); - if(closeAll){ - closeAll.setDisabled(disableAll); - } - - e.stopEvent(); - m.showAt(e.getPoint()); - }, - - createMenu : function(){ - if(!this.menu){ - var items = [{ - itemId: 'close', - text: this.closeTabText, - scope: this, - handler: this.onClose - }]; - if(this.showCloseAll){ - items.push('-'); - } - items.push({ - itemId: 'closeothers', - text: this.closeOtherTabsText, - scope: this, - handler: this.onCloseOthers - }); - if(this.showCloseAll){ - items.push({ - itemId: 'closeall', - text: this.closeAllTabsText, - scope: this, - handler: this.onCloseAll - }); - } - this.menu = new Ext.menu.Menu({ - items: items - }); - } - return this.menu; - }, - - onClose : function(){ - this.tabs.remove(this.active); - }, - - onCloseOthers : function(){ - this.doClose(true); - }, - - onCloseAll : function(){ - this.doClose(false); - }, - - doClose : function(excludeActive){ - var items = []; - this.tabs.items.each(function(item){ - if(item.closable){ - if(!excludeActive || item != this.active){ - items.push(item); - } - } - }, this); - Ext.each(items, function(item){ - this.tabs.remove(item); - }, this); - } -}); - -Ext.preg('tabclosemenu', Ext.ux.TabCloseMenu); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt.js deleted file mode 100644 index ae2589416a3..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/* - * The code in this file is based on code taken from OpenLayers. - * - * Copyright (c) 2006-2007 MetaCarta, Inc., published under the Clear BSD - * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the - * full text of the license. - */ - -(function() { - - /** - * Check to see if GeoExt.singleFile is true. It is true if the - * GeoExt/SingleFile.js is included before this one, as it is - * the case in single file builds. - */ - var singleFile = (typeof GeoExt == "object" && GeoExt.singleFile); - - /** - * The relative path of this script. - */ - var scriptName = singleFile ? "GeoExt.js" : "lib/GeoExt.js"; - - /** - * Function returning the path of this script. - */ - var getScriptLocation = function() { - var scriptLocation = ""; - // If we load other scripts right before GeoExt using the same - // mechanism to add script resources dynamically (e.g. OpenLayers), - // document.getElementsByTagName will not find the GeoExt script tag - // in FF2. Using document.documentElement.getElementsByTagName instead - // works around this issue. - var scripts = document.documentElement.getElementsByTagName('script'); - for(var i=0, len=scripts.length; i -1) && (index + scriptName.length == pathLength)) { - scriptLocation = src.slice(0, pathLength - scriptName.length); - break; - } - } - } - return scriptLocation; - }; - - /** - * If GeoExt.singleFile is false then the JavaScript files in the jsfiles - * array are autoloaded. - */ - if(!singleFile) { - var jsfiles = new Array( - "GeoExt/data/AttributeReader.js", - "GeoExt/data/AttributeStore.js", - "GeoExt/data/FeatureRecord.js", - "GeoExt/data/FeatureReader.js", - "GeoExt/data/FeatureStore.js", - "GeoExt/data/LayerRecord.js", - "GeoExt/data/LayerReader.js", - "GeoExt/data/LayerStore.js", - "GeoExt/data/ScaleStore.js", - "GeoExt/data/WMSCapabilitiesReader.js", - "GeoExt/data/WMSCapabilitiesStore.js", - "GeoExt/data/WFSCapabilitiesReader.js", - "GeoExt/data/WFSCapabilitiesStore.js", - "GeoExt/data/WMSDescribeLayerReader.js", - "GeoExt/data/WMSDescribeLayerStore.js", - "GeoExt/data/WMCReader.js", - "GeoExt/widgets/Action.js", - "GeoExt/data/ProtocolProxy.js", - "GeoExt/widgets/FeatureRenderer.js", - "GeoExt/widgets/MapPanel.js", - "GeoExt/widgets/Popup.js", - "GeoExt/widgets/form.js", - "GeoExt/widgets/form/SearchAction.js", - "GeoExt/widgets/form/BasicForm.js", - "GeoExt/widgets/form/FormPanel.js", - "GeoExt/widgets/tips/SliderTip.js", - "GeoExt/widgets/tips/LayerOpacitySliderTip.js", - "GeoExt/widgets/tips/ZoomSliderTip.js", - "GeoExt/widgets/tree/LayerNode.js", - "GeoExt/widgets/tree/TreeNodeUIEventMixin.js", - "GeoExt/plugins/TreeNodeComponent.js", - "GeoExt/plugins/TreeNodeRadioButton.js", - "GeoExt/widgets/tree/LayerLoader.js", - "GeoExt/widgets/tree/LayerContainer.js", - "GeoExt/widgets/tree/BaseLayerContainer.js", - "GeoExt/widgets/tree/OverlayLayerContainer.js", - "GeoExt/widgets/tree/LayerParamNode.js", - "GeoExt/widgets/tree/LayerParamLoader.js", - "GeoExt/widgets/tree/WMSCapabilitiesLoader.js", - "GeoExt/widgets/LayerOpacitySlider.js", - "GeoExt/widgets/LayerLegend.js", - "GeoExt/widgets/LegendImage.js", - "GeoExt/widgets/UrlLegend.js", - "GeoExt/widgets/WMSLegend.js", - "GeoExt/widgets/VectorLegend.js", - "GeoExt/widgets/LegendPanel.js", - "GeoExt/widgets/ZoomSlider.js", - "GeoExt/widgets/grid/FeatureSelectionModel.js", - "GeoExt/data/PrintPage.js", - "GeoExt/data/PrintProvider.js", - "GeoExt/plugins/PrintPageField.js", - "GeoExt/plugins/PrintProviderField.js", - "GeoExt/plugins/PrintExtent.js", - "GeoExt/plugins/AttributeForm.js", - "GeoExt/widgets/PrintMapPanel.js", - "GeoExt/state/PermalinkProvider.js" - ); - - var allScriptTags = new Array(jsfiles.length); - - var host = getScriptLocation() + "lib/"; - for (var i=0, len=jsfiles.length; i"; - } - document.write(allScriptTags.join("")); - } -})(); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/SingleFile.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/SingleFile.js deleted file mode 100644 index 492e4dacf9d..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/SingleFile.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -Ext.namespace("GeoExt"); - -GeoExt.singleFile = true; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/AttributeReader.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/AttributeReader.js deleted file mode 100644 index a9f7de539e8..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/AttributeReader.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.data - * class = AttributeReader - * base_link = `Ext.data.DataReader `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: AttributeReader(meta, recordType) - * - * :arg meta: ``Object`` Reader configuration. - * :arg recordType: ``Array or Ext.data.Record`` An array of field - * configuration objects or a record object. - * - * Create a new attributes reader object. - * - * Valid meta properties: - * - * * format - ``OpenLayers.Format`` A parser for transforming the XHR response - * into an array of objects representing attributes. Defaults to - * an ``OpenLayers.Format.WFSDescribeFeatureType`` parser. - * * ignore - ``Object`` Properties of the ignore object should be field names. - * Values are either arrays or regular expressions. - * * feature - ``OpenLayers.Feature.Vector`` A vector feature. If provided - * records created by the reader will include a field named "value" - * referencing the attribute value as set in the feature. - */ -GeoExt.data.AttributeReader = function(meta, recordType) { - meta = meta || {}; - if(!meta.format) { - meta.format = new OpenLayers.Format.WFSDescribeFeatureType(); - } - GeoExt.data.AttributeReader.superclass.constructor.call( - this, meta, recordType || meta.fields - ); - if(meta.feature) { - this.recordType.prototype.fields.add(new Ext.data.Field("value")); - } -}; - -Ext.extend(GeoExt.data.AttributeReader, Ext.data.DataReader, { - - /** private: method[read] - * :arg request: ``Object`` The XHR object that contains the parsed doc. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Records``. - * - * This method is only used by a DataProxy which has retrieved data from a - * remote server. - */ - read: function(request) { - var data = request.responseXML; - if(!data || !data.documentElement) { - data = request.responseText; - } - return this.readRecords(data); - }, - - /** private: method[readRecords] - * :arg data: ``DOMElement or String or Array`` A document element or XHR - * response string. As an alternative to fetching attributes data from - * a remote source, an array of attribute objects can be provided given - * that the properties of each attribute object map to a provided field - * name. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Records``. - * - * Create a data block containing Ext.data.Records from an XML document. - */ - readRecords: function(data) { - var attributes; - if(data instanceof Array) { - attributes = data; - } else { - // only works with one featureType in the doc - attributes = this.meta.format.read(data).featureTypes[0].properties; - } - var feature = this.meta.feature; - var recordType = this.recordType; - var fields = recordType.prototype.fields; - var numFields = fields.length; - var attr, values, name, record, ignore, value, records = []; - for(var i=0, len=attributes.length; i -1); - } else if(matches instanceof RegExp) { - ignore = (matches.test(value)); - } - } - return ignore; - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/AttributeStore.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/AttributeStore.js deleted file mode 100644 index 4ee81bde4fa..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/AttributeStore.js +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/AttributeReader.js - */ - -/** api: (define) - * module = GeoExt.data - * class = AttributeStore - * base_link = `Ext.data.Store `_ - */ -Ext.namespace("GeoExt.data"); - -/** - * Function: GeoExt.data.AttributeStoreMixin - * - * This function generates a mixin object to be used when extending an Ext.data.Store - * to create an attribute store. - * - * (start code) - * var AttrStore = Ext.extend(Ext.data.Store, GeoExt.data.AttributeStoreMixin); - * var store = new AttrStore(); - * (end) - * - * For convenience, a GeoExt.data.AttributeStore class is available as a - * shortcut to the Ext.extend sequence in the above code snippet. The above - * is equivalent to: - * (start code) - * var store = new GeoExt.data.AttributeStore(); - * (end) - */ -GeoExt.data.AttributeStoreMixin = function() { - return { - /** private */ - constructor: function(c) { - c = c || {}; - arguments.callee.superclass.constructor.call( - this, - Ext.apply(c, { - proxy: c.proxy || (!c.data ? - new Ext.data.HttpProxy({url: c.url, disableCaching: false, method: "GET"}) : - undefined - ), - reader: new GeoExt.data.AttributeReader( - c, c.fields || ["name", "type", "restriction"] - ) - }) - ); - if(this.feature) { - this.bind(); - } - }, - - /** private: method[bind] - */ - bind: function() { - this.on({ - "update": this.onUpdate, - "load": this.onLoad, - "add": this.onAdd, - scope: this - }); - var records = []; - this.each(function(record) { - records.push(record); - }); - this.updateFeature(records); - }, - - /** private: method[onUpdate] - * :param store: ``Ext.data.Store`` - * :param record: ``Ext.data.Record`` - * :param operation: ``String`` - * - * Handler for store update event. - */ - onUpdate: function(store, record, operation) { - this.updateFeature([record]); - }, - - /** private: method[onLoad] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param options: ``Object`` - * - * Handler for store load event - */ - onLoad: function(store, records, options) { - // if options.add is true an "add" event was already - // triggered, and onAdd already did the work of - // adding the features to the layer. - if(!options || options.add !== true) { - this.updateFeature(records); - } - }, - - /** private: method[onAdd] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param index: ``Number`` - * - * Handler for store add event - */ - onAdd: function(store, records, index) { - this.updateFeature(records); - }, - - /** private: method[updateFeature] - * :param records: ``Array(Ext.data.Record)`` - * - * Update feature from records. - */ - updateFeature: function(records) { - var feature = this.feature, layer = feature.layer; - var i, len, record, name, value, oldValue, dirty; - for(i=0,len=records.length; i`_ - */ -Ext.namespace('GeoExt', 'GeoExt.data'); - -/** api: example - * Typical usage in a store: - * - * .. code-block:: javascript - * - * var store = new Ext.data.Store({ - * reader: new GeoExt.data.FeatureReader({}, [ - * {name: 'name', type: 'string'}, - * {name: 'elevation', type: 'float'} - * ]) - * }); - * - */ - -/** api: constructor - * .. class:: FeatureReader(meta, recordType) - * - * Data reader class to create an array of - * :class:`GeoExt.data.FeatureRecord` objects from an - * ``OpenLayers.Protocol.Response`` object for use in a - * :class:`GeoExt.data.FeatureStore` object. - */ -GeoExt.data.FeatureReader = function(meta, recordType) { - meta = meta || {}; - if(!(recordType instanceof Function)) { - recordType = GeoExt.data.FeatureRecord.create( - recordType || meta.fields || {}); - } - GeoExt.data.FeatureReader.superclass.constructor.call( - this, meta, recordType); -}; - -Ext.extend(GeoExt.data.FeatureReader, Ext.data.DataReader, { - - /** - * APIProperty: totalRecords - * {Integer} - */ - totalRecords: null, - - /** private: method[read] - * :param response: ``OpenLayers.Protocol.Response`` - * :return: ``Object`` An object with two properties. The value of the - * ``records`` property is the array of records corresponding to - * the features. The value of the ``totalRecords" property is the - * number of records in the array. - * - * This method is only used by a DataProxy which has retrieved data. - */ - read: function(response) { - return this.readRecords(response.features); - }, - - /** api: method[readRecords] - * :param features: ``Array(OpenLayers.Feature.Vector)`` List of - * features for creating records - * :return: ``Object`` An object with ``records`` and ``totalRecords`` - * properties. - * - * Create a data block containing :class:`GeoExt.data.FeatureRecord` - * objects from an array of features. - */ - readRecords : function(features) { - var records = []; - - if (features) { - var recordType = this.recordType, fields = recordType.prototype.fields; - var i, lenI, j, lenJ, feature, values, field, v; - for (i = 0, lenI = features.length; i < lenI; i++) { - feature = features[i]; - values = {}; - if (feature.attributes) { - for (j = 0, lenJ = fields.length; j < lenJ; j++){ - field = fields.items[j]; - if (/[\[\.]/.test(field.mapping)) { - try { - v = new Function("obj", "return obj." + field.mapping)(feature.attributes); - } catch(e){ - v = field.defaultValue; - } - } - else { - v = feature.attributes[field.mapping || field.name] || field.defaultValue; - } - if (field.convert) { - v = field.convert(v); - } - values[field.name] = v; - } - } - values.feature = feature; - values.state = feature.state; - values.fid = feature.fid; - - // newly inserted features need to be made into phantom records - var id = (feature.state === OpenLayers.State.INSERT) ? undefined : feature.id; - records[records.length] = new recordType(values, id); - } - } - - return { - records: records, - totalRecords: this.totalRecords != null ? this.totalRecords : records.length - }; - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/FeatureRecord.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/FeatureRecord.js deleted file mode 100644 index 5c108c69987..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/FeatureRecord.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.data - * class = FeatureRecord - * base_link = `Ext.data.Record `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: FeatureRecord - * - * A record that represents an ``OpenLayers.Feature.Vector``. This record - * will always have at least the following fields: - * - * * state ``String`` - * * fid ``String`` - * - */ -GeoExt.data.FeatureRecord = Ext.data.Record.create([ - {name: "feature"}, {name: "state"}, {name: "fid"} -]); - -/** api: method[getFeature] - * :return: ``OpenLayers.Feature.Vector`` - * - * Gets the feature for this record. - */ -GeoExt.data.FeatureRecord.prototype.getFeature = function() { - return this.get("feature"); -}; - -/** api: method[setLayer] - * :param layer: ``OpenLayers.Feature.Vector`` - * - * Sets the feature for this record. - */ -GeoExt.data.FeatureRecord.prototype.setFeature = function(feature) { - if (feature !== this.data.feature) { - this.dirty = true; - if (!this.modified) { - this.modified = {}; - } - if (this.modified.feature === undefined) { - this.modified.feature = this.data.feature; - } - this.data.feature = feature; - if (!this.editing){ - this.afterEdit(); - } - } -}; - -/** api: classmethod[create] - * :param o: ``Array`` Field definition as in ``Ext.data.Record.create``. Can - * be omitted if no additional fields are required. - * :return: ``Function`` A specialized :class:`GeoExt.data.FeatureRecord` - * constructor. - * - * Creates a constructor for a :class:`GeoExt.data.FeatureRecord`, optionally - * with additional fields. - */ -GeoExt.data.FeatureRecord.create = function(o) { - var f = Ext.extend(GeoExt.data.FeatureRecord, {}); - var p = f.prototype; - - p.fields = new Ext.util.MixedCollection(false, function(field) { - return field.name; - }); - - GeoExt.data.FeatureRecord.prototype.fields.each(function(f) { - p.fields.add(f); - }); - - if(o) { - for(var i = 0, len = o.length; i < len; i++){ - p.fields.add(new Ext.data.Field(o[i])); - } - } - - f.getField = function(name) { - return p.fields.get(name); - }; - - return f; -}; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/FeatureStore.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/FeatureStore.js deleted file mode 100644 index 07dbc35e78c..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/FeatureStore.js +++ /dev/null @@ -1,428 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/FeatureReader.js - */ - -/** api: (define) - * module = GeoExt.data - * class = FeatureStore - * base_link = `Ext.data.Store `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: FeatureStore - * - * A store containing :class:`GeoExt.data.FeatureRecord` entries that - * optionally synchronizes with an ``OpenLayers.Layer.Vector``. - */ - -/** api: example - * Sample code to create a store with features from a vector layer: - * - * .. code-block:: javascript - * - * var store = new GeoExt.data.FeatureStore({ - * layer: myLayer, - * features: myFeatures - * }); - */ - -/** - * Class: GeoExt.data.FeatureStoreMixin - * A store that synchronizes a features array of an {OpenLayers.Layer.Vector} with a - * feature store holding {} entries. - * - * This class can not be instantiated directly. Instead, it is meant to extend - * {Ext.data.Store} or a subclass of it: - * (start code) - * var store = new (Ext.extend(Ext.data.Store, new GeoExt.data.FeatureStoreMixin))({ - * layer: myLayer, - * features: myFeatures - * }); - * (end) - * - * For convenience, a {} class is available as a - * shortcut to the Ext.extend sequence in the above code snippet. The above - * is equivalent to: - * (start code) - * var store = new GeoExt.data.FeatureStore({ - * layer: myLayer, - * features: myFeatures - * }); - * (end) - */ -GeoExt.data.FeatureStoreMixin = function() { - return { - /** api: config[layer] - * ``OpenLayers.Layer.Vector`` Layer to synchronize the store with. - */ - layer: null, - - /** api: config[features] - * ``Array(OpenLayers.Feature.Vector)`` Features that will be added to the - * store (and the layer if provided). - */ - - /** api: config[reader] - * ``Ext.data.DataReader`` The reader used to produce records from objects - * features. Default is :class:`GeoExt.data.FeatureReader`. - */ - reader: null, - - /** api: config[featureFilter] - * ``OpenLayers.Filter`` This filter is evaluated before a feature - * record is added to the store. - */ - featureFilter: null, - - /** api: config[initDir] - * ``Number`` Bitfields specifying the direction to use for the - * initial sync between the layer and the store, if set to 0 then no - * initial sync is done. Default is - * ``GeoExt.data.FeatureStore.LAYER_TO_STORE|GeoExt.data.FeatureStore.STORE_TO_LAYER``. - */ - - /** private */ - constructor: function(config) { - config = config || {}; - config.reader = config.reader || - new GeoExt.data.FeatureReader({}, config.fields); - var layer = config.layer; - delete config.layer; - // 'features' option - is an alias 'data' option - if (config.features) { - config.data = config.features; - } - delete config.features; - // "initDir" option - var options = {initDir: config.initDir}; - delete config.initDir; - arguments.callee.superclass.constructor.call(this, config); - if(layer) { - this.bind(layer, options); - } - }, - - /** api: method[bind] - * :param layer: ``OpenLayers.Layer`` Layer that the store should be - * synchronized with. - * - * Bind this store to a layer instance, once bound the store - * is synchronized with the layer and vice-versa. - */ - bind: function(layer, options) { - if(this.layer) { - // already bound - return; - } - this.layer = layer; - options = options || {}; - - var initDir = options.initDir; - if(options.initDir == undefined) { - initDir = GeoExt.data.FeatureStore.LAYER_TO_STORE | - GeoExt.data.FeatureStore.STORE_TO_LAYER; - } - - // create a snapshot of the layer's features - var features = layer.features.slice(0); - - if(initDir & GeoExt.data.FeatureStore.STORE_TO_LAYER) { - var records = this.getRange(); - for(var i=records.length - 1; i>=0; i--) { - this.layer.addFeatures([records[i].getFeature()]); - } - } - - if(initDir & GeoExt.data.FeatureStore.LAYER_TO_STORE) { - this.loadData(features, true /* append */); - } - - layer.events.on({ - "featuresadded": this.onFeaturesAdded, - "featuresremoved": this.onFeaturesRemoved, - "featuremodified": this.onFeatureModified, - scope: this - }); - this.on({ - "load": this.onLoad, - "clear": this.onClear, - "add": this.onAdd, - "remove": this.onRemove, - "update": this.onUpdate, - scope: this - }); - }, - - /** api: method[unbind] - * Unbind this store from the layer it is currently bound. - */ - unbind: function() { - if(this.layer) { - this.layer.events.un({ - "featuresadded": this.onFeaturesAdded, - "featuresremoved": this.onFeaturesRemoved, - "featuremodified": this.onFeatureModified, - scope: this - }); - this.un("load", this.onLoad, this); - this.un("clear", this.onClear, this); - this.un("add", this.onAdd, this); - this.un("remove", this.onRemove, this); - this.un("update", this.onUpdate, this); - - this.layer = null; - } - }, - - /** api: method[getRecordFromFeature] - * :arg feature: ``OpenLayers.Vector.Feature`` - * :returns: :class:`GeoExt.data.FeatureRecord` The record corresponding - * to the given feature. Returns null if no record matches. - * - * Get the record corresponding to a feature. - */ - getRecordFromFeature: function(feature) { - var record = null; - if(feature.state !== OpenLayers.State.INSERT) { - record = this.getById(feature.id); - } else { - var index = this.findBy(function(r) { - return r.getFeature() === feature; - }); - if(index > -1) { - record = this.getAt(index); - } - } - return record; - }, - - /** private: method[onFeaturesAdded] - * Handler for layer featuresadded event - */ - onFeaturesAdded: function(evt) { - if(!this._adding) { - var features = evt.features, toAdd = features; - if(this.featureFilter) { - toAdd = []; - var i, len, feature; - for(var i=0, len=features.length; i=0; i--) { - feature = features[i]; - record = this.getRecordFromFeature(feature); - if(record !== undefined) { - this._removing = true; - this.remove(record); - delete this._removing; - } - } - } - }, - - /** private: method[onFeatureModified] - * Handler for layer featuremodified event - */ - onFeatureModified: function(evt) { - if(!this._updating) { - var feature = evt.feature; - var record = this.getRecordFromFeature(feature); - if(record !== undefined) { - record.beginEdit(); - var attributes = feature.attributes; - if(attributes) { - var fields = this.recordType.prototype.fields; - for(var i=0, len=fields.length; i 0) { - this._adding = true; - this.layer.addFeatures(features); - delete this._adding; - } - }, - - /** private: method[onLoad] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param options: ``Object`` - * - * Handler for store load event - */ - onLoad: function(store, records, options) { - // if options.add is true an "add" event was already - // triggered, and onAdd already did the work of - // adding the features to the layer. - if(!options || options.add !== true) { - this._removing = true; - this.layer.removeFeatures(this.layer.features); - delete this._removing; - - this.addFeaturesToLayer(records); - } - }, - - /** private: method[onClear] - * :param store: ``Ext.data.Store`` - * - * Handler for store clear event - */ - onClear: function(store) { - this._removing = true; - this.layer.removeFeatures(this.layer.features); - delete this._removing; - }, - - /** private: method[onAdd] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param index: ``Number`` - * - * Handler for store add event - */ - onAdd: function(store, records, index) { - if(!this._adding) { - // addFeaturesToLayer takes care of setting - // this._adding to true and deleting it - this.addFeaturesToLayer(records); - } - }, - - /** private: method[onRemove] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param index: ``Number`` - * - * Handler for store remove event - */ - onRemove: function(store, record, index){ - if(!this._removing) { - var feature = record.getFeature(); - if (this.layer.getFeatureById(feature.id) != null) { - this._removing = true; - this.layer.removeFeatures([record.getFeature()]); - delete this._removing; - } - } - }, - - /** private: method[onUpdate] - * :param store: ``Ext.data.Store`` - * :param record: ``Ext.data.Record`` - * :param operation: ``String`` - * - * Handler for update. - */ - onUpdate: function(store, record, operation) { - if(!this._updating) { - /** - * TODO: remove this if the FeatureReader adds attributes - * for all fields that map to feature.attributes. - * In that case, it would be sufficient to check (key in feature.attributes). - */ - var defaultFields = new GeoExt.data.FeatureRecord().fields; - var feature = record.getFeature(); - if(record.fields) { - var cont = this.layer.events.triggerEvent( - "beforefeaturemodified", {feature: feature} - ); - if(cont !== false) { - var attributes = feature.attributes; - record.fields.each( - function(field) { - var key = field.mapping || field.name; - if (!defaultFields.containsKey(key)) { - attributes[key] = record.get(field.name); - } - } - ); - this._updating = true; - this.layer.events.triggerEvent( - "featuremodified", {feature: feature} - ); - delete this._updating; - if (this.layer.getFeatureById(feature.id) != null) { - this.layer.drawFeature(feature); - } - } - } - } - } - }; -}; - -GeoExt.data.FeatureStore = Ext.extend( - Ext.data.Store, - new GeoExt.data.FeatureStoreMixin -); - -/** - * Constant: GeoExt.data.FeatureStore.LAYER_TO_STORE - * {Integer} Constant used to make the store be automatically updated - * when changes occur in the layer. - */ -GeoExt.data.FeatureStore.LAYER_TO_STORE = 1; - -/** - * Constant: GeoExt.data.FeatureStore.STORE_TO_LAYER - * {Integer} Constant used to make the layer be automatically updated - * when changes occur in the store. - */ -GeoExt.data.FeatureStore.STORE_TO_LAYER = 2; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerReader.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerReader.js deleted file mode 100644 index b5a62c873e9..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerReader.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/LayerRecord.js - */ - -/** api: (define) - * module = GeoExt.data - * class = LayerReader - * base_link = `Ext.data.DataReader `_ - */ -Ext.namespace("GeoExt", "GeoExt.data"); - -/** api: example - * Sample using a reader to create records from an array of layers: - * - * .. code-block:: javascript - * - * var reader = new GeoExt.data.LayerReader(); - * var layerData = reader.readRecords(map.layers); - * var numRecords = layerData.totalRecords; - * var layerRecords = layerData.records; - */ - -/** api: constructor - * .. class:: LayerReader(meta, recordType) - * - * Data reader class to create an array of - * :class:`GeoExt.data.LayerRecord` objects from an array of - * ``OpenLayers.Layer`` objects for use in a - * :class:`GeoExt.data.LayerStore` object. - */ -GeoExt.data.LayerReader = function(meta, recordType) { - meta = meta || {}; - if(!(recordType instanceof Function)) { - recordType = GeoExt.data.LayerRecord.create( - recordType || meta.fields || {}); - } - GeoExt.data.LayerReader.superclass.constructor.call( - this, meta, recordType); -}; - -Ext.extend(GeoExt.data.LayerReader, Ext.data.DataReader, { - - /** private: property[totalRecords] - * ``Integer`` - */ - totalRecords: null, - - /** api: method[readRecords] - * :param layers: ``Array(OpenLayers.Layer)`` List of layers for creating - * records. - * :return: ``Object`` An object with ``records`` and ``totalRecords`` - * properties. - * - * From an array of ``OpenLayers.Layer`` objects create a data block - * containing :class:`GeoExt.data.LayerRecord` objects. - */ - readRecords : function(layers) { - var records = []; - if(layers) { - var recordType = this.recordType, fields = recordType.prototype.fields; - var i, lenI, j, lenJ, layer, values, field, v; - for(i = 0, lenI = layers.length; i < lenI; i++) { - layer = layers[i]; - values = {}; - for(j = 0, lenJ = fields.length; j < lenJ; j++){ - field = fields.items[j]; - v = layer[field.mapping || field.name] || - field.defaultValue; - v = field.convert(v); - values[field.name] = v; - } - values.layer = layer; - records[records.length] = new recordType(values, layer.id); - } - } - return { - records: records, - totalRecords: this.totalRecords != null ? this.totalRecords : records.length - }; - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerRecord.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerRecord.js deleted file mode 100644 index 05811208f49..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerRecord.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.data - * class = LayerRecord - * base_link = `Ext.data.Record `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: LayerRecord - * - * A record that represents an ``OpenLayers.Layer``. This record - * will always have at least the following fields: - * - * * title ``String`` - */ -GeoExt.data.LayerRecord = Ext.data.Record.create([ - {name: "layer"}, - {name: "title", type: "string", mapping: "name"} -]); - -/** api: method[getLayer] - * :return: ``OpenLayers.Layer`` - * - * Gets the layer for this record. - */ -GeoExt.data.LayerRecord.prototype.getLayer = function() { - return this.get("layer"); -}; - -/** api: method[setLayer] - * :param layer: ``OpenLayers.Layer`` - * - * Sets the layer for this record. - */ -GeoExt.data.LayerRecord.prototype.setLayer = function(layer) { - if (layer !== this.data.layer) { - this.dirty = true; - if(!this.modified) { - this.modified = {}; - } - if(this.modified.layer === undefined) { - this.modified.layer = this.data.layer; - } - this.data.layer = layer; - if(!this.editing) { - this.afterEdit(); - } - } -}; - -/** api: method[clone] - * :param id: ``String`` (optional) A new Record id. - * :return: class:`GeoExt.data.LayerRecord` A new layer record. - * - * Creates a clone of this LayerRecord. - */ -GeoExt.data.LayerRecord.prototype.clone = function(id) { - var layer = this.getLayer() && this.getLayer().clone(); - return new this.constructor( - Ext.applyIf({layer: layer}, this.data), - id || layer.id - ); -}; - -/** api: classmethod[create] - * :param o: ``Array`` Field definition as in ``Ext.data.Record.create``. Can - * be omitted if no additional fields are required. - * :return: ``Function`` A specialized :class:`GeoExt.data.LayerRecord` - * constructor. - * - * Creates a constructor for a :class:`GeoExt.data.LayerRecord`, optionally - * with additional fields. - */ -GeoExt.data.LayerRecord.create = function(o) { - var f = Ext.extend(GeoExt.data.LayerRecord, {}); - var p = f.prototype; - - p.fields = new Ext.util.MixedCollection(false, function(field) { - return field.name; - }); - - GeoExt.data.LayerRecord.prototype.fields.each(function(f) { - p.fields.add(f); - }); - - if(o) { - for(var i = 0, len = o.length; i < len; i++){ - p.fields.add(new Ext.data.Field(o[i])); - } - } - - f.getField = function(name) { - return p.fields.get(name); - }; - - return f; -}; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerStore.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerStore.js deleted file mode 100644 index c8e2a15c07b..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/LayerStore.js +++ /dev/null @@ -1,442 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/LayerReader.js - */ - -/** api: (define) - * module = GeoExt.data - * class = LayerStore - * base_link = `Ext.data.Store `_ - */ -Ext.namespace("GeoExt.data"); - -/** private: constructor - * .. class:: LayerStoreMixin - * A store that synchronizes a layers array of an {OpenLayers.Map} with a - * layer store holding {} entries. - * - * This class can not be instantiated directly. Instead, it is meant to - * extend ``Ext.data.Store`` or a subclass of it. - */ - -/** private: example - * Sample code to extend a store with the LayerStoreMixin. - * - * .. code-block:: javascript - * - * var store = new (Ext.extend(Ext.data.Store, new GeoExt.data.LayerStoreMixin))({ - * map: myMap, - * layers: myLayers - * }); - * - * For convenience, a :class:`GeoExt.data.LayerStore` class is available as a - * shortcut to the ``Ext.extend`` sequence in the above code snippet. - */ - -GeoExt.data.LayerStoreMixin = function() { - return { - /** api: config[map] - * ``OpenLayers.Map`` - * Map that this store will be in sync with. If not provided, the - * store will not be bound to a map. - */ - - /** api: property[map] - * ``OpenLayers.Map`` - * Map that the store is synchronized with, if any. - */ - map: null, - - /** api: config[layers] - * ``Array(OpenLayers.Layer)`` - * Layers that will be added to the store (and the map, depending on the - * value of the ``initDir`` option. - */ - - /** api: config[initDir] - * ``Number`` - * Bitfields specifying the direction to use for the initial sync between - * the map and the store, if set to 0 then no initial sync is done. - * Defaults to ``GeoExt.data.LayerStore.MAP_TO_STORE|GeoExt.data.LayerStore.STORE_TO_MAP`` - */ - - /** api: config[fields] - * ``Array`` - * If provided a custom layer record type with additional fields will be - * used. Default fields for every layer record are `layer` - * (``OpenLayers.Layer``) `title` (``String``). The value of this option is - * either a field definition objects as passed to the - * :meth:`GeoExt.data.LayerRecord.create` function or a - * :class:`GeoExt.data.LayerRecord` constructor created using - * :meth:`GeoExt.data.LayerRecord.create`. - */ - - /** api: config[reader] - * ``Ext.data.DataReader`` The reader used to produce - * :class:`GeoExt.data.LayerRecord` objects from ``OpenLayers.Layer`` - * objects. If not provided, a :class:`GeoExt.data.LayerReader` will be - * used. - */ - reader: null, - - /** private: method[constructor] - */ - constructor: function(config) { - config = config || {}; - config.reader = config.reader || - new GeoExt.data.LayerReader({}, config.fields); - delete config.fields; - // "map" option - var map = config.map instanceof GeoExt.MapPanel ? - config.map.map : config.map; - delete config.map; - // "layers" option - is an alias to "data" option - if(config.layers) { - config.data = config.layers; - } - delete config.layers; - // "initDir" option - var options = {initDir: config.initDir}; - delete config.initDir; - arguments.callee.superclass.constructor.call(this, config); - if(map) { - this.bind(map, options); - } - }, - - /** private: method[bind] - * :param map: ``OpenLayers.Map`` The map instance. - * :param options: ``Object`` - * - * Bind this store to a map instance, once bound the store - * is synchronized with the map and vice-versa. - */ - bind: function(map, options) { - if(this.map) { - // already bound - return; - } - this.map = map; - options = options || {}; - - var initDir = options.initDir; - if(options.initDir == undefined) { - initDir = GeoExt.data.LayerStore.MAP_TO_STORE | - GeoExt.data.LayerStore.STORE_TO_MAP; - } - - // create a snapshot of the map's layers - var layers = map.layers.slice(0); - - if(initDir & GeoExt.data.LayerStore.STORE_TO_MAP) { - this.each(function(record) { - this.map.addLayer(record.getLayer()); - }, this); - } - if(initDir & GeoExt.data.LayerStore.MAP_TO_STORE) { - this.loadData(layers, true); - } - - map.events.on({ - "changelayer": this.onChangeLayer, - "addlayer": this.onAddLayer, - "removelayer": this.onRemoveLayer, - scope: this - }); - this.on({ - "load": this.onLoad, - "clear": this.onClear, - "add": this.onAdd, - "remove": this.onRemove, - "update": this.onUpdate, - scope: this - }); - this.data.on({ - "replace" : this.onReplace, - scope: this - }); - }, - - /** private: method[unbind] - * Unbind this store from the map it is currently bound. - */ - unbind: function() { - if(this.map) { - this.map.events.un({ - "changelayer": this.onChangeLayer, - "addlayer": this.onAddLayer, - "removelayer": this.onRemoveLayer, - scope: this - }); - this.un("load", this.onLoad, this); - this.un("clear", this.onClear, this); - this.un("add", this.onAdd, this); - this.un("remove", this.onRemove, this); - - this.data.un("replace", this.onReplace, this); - - this.map = null; - } - }, - - /** private: method[onChangeLayer] - * :param evt: ``Object`` - * - * Handler for layer changes. When layer order changes, this moves the - * appropriate record within the store. - */ - onChangeLayer: function(evt) { - var layer = evt.layer; - var recordIndex = this.findBy(function(rec, id) { - return rec.getLayer() === layer; - }); - if(recordIndex > -1) { - var record = this.getAt(recordIndex); - if(evt.property === "order") { - if(!this._adding && !this._removing) { - var layerIndex = this.map.getLayerIndex(layer); - if(layerIndex !== recordIndex) { - this._removing = true; - this.remove(record); - delete this._removing; - this._adding = true; - this.insert(layerIndex, [record]); - delete this._adding; - } - } - } else if(evt.property === "name") { - record.set("title", layer.name); - } else { - this.fireEvent("update", this, record, Ext.data.Record.EDIT); - } - } - }, - - /** private: method[onAddLayer] - * :param evt: ``Object`` - * - * Handler for a map's addlayer event - */ - onAddLayer: function(evt) { - if(!this._adding) { - var layer = evt.layer; - this._adding = true; - this.loadData([layer], true); - delete this._adding; - } - }, - - /** private: method[onRemoveLayer] - * :param evt: ``Object`` - * - * Handler for a map's removelayer event - */ - onRemoveLayer: function(evt){ - //TODO replace the check for undloadDestroy with a listener for the - // map's beforedestroy event, doing unbind(). This can be done as soon - // as http://trac.openlayers.org/ticket/2136 is fixed. - if(this.map.unloadDestroy) { - if(!this._removing) { - var layer = evt.layer; - this._removing = true; - this.remove(this.getById(layer.id)); - delete this._removing; - } - } else { - this.unbind(); - } - }, - - /** private: method[onLoad] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param options: ``Object`` - * - * Handler for a store's load event - */ - onLoad: function(store, records, options) { - if (!Ext.isArray(records)) { - records = [records]; - } - if (options && !options.add) { - this._removing = true; - for (var i = this.map.layers.length - 1; i >= 0; i--) { - this.map.removeLayer(this.map.layers[i]); - } - delete this._removing; - - // layers has already been added to map on "add" event - var len = records.length; - if (len > 0) { - var layers = new Array(len); - for (var j = 0; j < len; j++) { - layers[j] = records[j].getLayer(); - } - this._adding = true; - this.map.addLayers(layers); - delete this._adding; - } - } - }, - - /** private: method[onClear] - * :param store: ``Ext.data.Store`` - * - * Handler for a store's clear event - */ - onClear: function(store) { - this._removing = true; - for (var i = this.map.layers.length - 1; i >= 0; i--) { - this.map.removeLayer(this.map.layers[i]); - } - delete this._removing; - }, - - /** private: method[onAdd] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param index: ``Number`` - * - * Handler for a store's add event - */ - onAdd: function(store, records, index) { - if(!this._adding) { - this._adding = true; - var layer; - for(var i=records.length-1; i>=0; --i) { - layer = records[i].getLayer(); - this.map.addLayer(layer); - if(index !== this.map.layers.length-1) { - this.map.setLayerIndex(layer, index); - } - } - delete this._adding; - } - }, - - /** private: method[onRemove] - * :param store: ``Ext.data.Store`` - * :param record: ``Ext.data.Record`` - * :param index: ``Number`` - * - * Handler for a store's remove event - */ - onRemove: function(store, record, index){ - if(!this._removing) { - var layer = record.getLayer(); - if (this.map.getLayer(layer.id) != null) { - this._removing = true; - this.removeMapLayer(record); - delete this._removing; - } - } - }, - - /** private: method[onUpdate] - * :param store: ``Ext.data.Store`` - * :param record: ``Ext.data.Record`` - * :param operation: ``Number`` - * - * Handler for a store's update event - */ - onUpdate: function(store, record, operation) { - if(operation === Ext.data.Record.EDIT) { - if (record.modified && record.modified.title) { - var layer = record.getLayer(); - var title = record.get("title"); - if(title !== layer.name) { - layer.setName(title); - } - } - } - }, - - /** private: method[removeMapLayer] - * :param record: ``Ext.data.Record`` - * - * Removes a record's layer from the bound map. - */ - removeMapLayer: function(record){ - this.map.removeLayer(record.getLayer()); - }, - - /** private: method[onReplace] - * :param key: ``String`` - * :param oldRecord: ``Object`` In this case, a record that has been - * replaced. - * :param newRecord: ``Object`` In this case, a record that is replacing - * oldRecord. - - * Handler for a store's data collections' replace event - */ - onReplace: function(key, oldRecord, newRecord){ - this.removeMapLayer(oldRecord); - }, - - /** public: method[getByLayer] - * :param layer: ``OpenLayers.Layer`` - * :return: :class:`GeoExt.data.LayerRecord` or undefined if not found - * - * Get the record for the specified layer - */ - getByLayer: function(layer) { - var index = this.findBy(function(r) { - return r.getLayer() === layer; - }); - if(index > -1) { - return this.getAt(index); - } - }, - - /** private: method[destroy] - */ - destroy: function() { - this.unbind(); - GeoExt.data.LayerStore.superclass.destroy.call(this); - } - }; -}; - -/** api: example - * Sample to create a new store containing a cache of - * :class:`GeoExt.data.LayerRecord` instances derived from map layers. - * - * .. code-block:: javascript - * - * var store = new GeoExt.data.LayerStore({ - * map: myMap, - * layers: myLayers - * }); - */ - -/** api: constructor - * .. class:: LayerStore - * - * A store that contains a cache of :class:`GeoExt.data.LayerRecord` - * objects. - */ -GeoExt.data.LayerStore = Ext.extend( - Ext.data.Store, - new GeoExt.data.LayerStoreMixin -); - -/** - * Constant: GeoExt.data.LayerStore.MAP_TO_STORE - * {Integer} Constant used to make the store be automatically updated - * when changes occur in the map. - */ -GeoExt.data.LayerStore.MAP_TO_STORE = 1; - -/** - * Constant: GeoExt.data.LayerStore.STORE_TO_MAP - * {Integer} Constant used to make the map be automatically updated - * when changes occur in the store. - */ -GeoExt.data.LayerStore.STORE_TO_MAP = 2; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/PrintPage.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/PrintPage.js deleted file mode 100644 index a0903d15e66..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/PrintPage.js +++ /dev/null @@ -1,328 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ -Ext.namespace("GeoExt.data"); - -/** api: (define) - * module = GeoExt.data - * class = PrintPage - * base_link = `Ext.util.Observable `_ - */ - -/** api: constructor - * .. class:: PrintPage - * - * Provides a representation of a print page for - * :class:`GeoExt.data.PrintProvider`. The extent of the page is stored as - * ``OpenLayers.Feature.Vector``. Widgets can use this to display the print - * extent on the map. - */ -GeoExt.data.PrintPage = Ext.extend(Ext.util.Observable, { - - /** api:config[printProvider] - * :class:`GeoExt.data.PrintProvider` The print provider to use with - * this page. - */ - - /** private: property[printProvider] - * :class:`GeoExt.data.PrintProvider` - */ - printProvider: null, - - /** api: property[feature] - * ``OpenLayers.Feature.Vector`` Feature representing the page extent. To - * get the extent of the print page for a specific map, use - * ``getPrintExtent``. - * Read-only. - */ - feature: null, - - /** api: property[center] - * ``OpenLayers.LonLat`` The current center of the page. Read-only. - */ - center: null, - - /** api: property[scale] - * ``Ext.data.Record`` The current scale record of the page. Read-only. - */ - scale: null, - - /** api: property[rotation] - * ``Float`` The current rotation of the page. Read-only. - */ - rotation: 0, - - /** api:config[customParams] - * ``Object`` Key-value pairs of additional parameters that the - * printProvider will send to the print service for this page. - */ - - /** api: property[customParams] - * ``Object`` Key-value pairs of additional parameters that the - * printProvider will send to the print service for this page. - */ - customParams: null, - - /** private: method[constructor] - * Private constructor override. - */ - constructor: function(config) { - this.initialConfig = config; - Ext.apply(this, config); - - if(!this.customParams) { - this.customParams = {}; - } - - this.addEvents( - /** api: event[change] - * Triggered when any of the page properties have changed - * - * Listener arguments: - * - * * printPage - :class:`GeoExt.data.PrintPage` this printPage - * * modifications - ``Object`` Object with one or more of - * ``scale``, ``center`` and ``rotation``, notifying - * listeners of the changed properties. - */ - "change" - ); - - GeoExt.data.PrintPage.superclass.constructor.apply(this, arguments); - - this.feature = new OpenLayers.Feature.Vector( - OpenLayers.Geometry.fromWKT("POLYGON((-1 -1,1 -1,1 1,-1 1,-1 -1))")); - - if(this.printProvider.capabilities) { - this.setScale(this.printProvider.scales.getAt(0)); - } else { - this.printProvider.on({ - "loadcapabilities": function() { - this.setScale(this.printProvider.scales.getAt(0)); - }, - scope: this, - single: true - }); - } - - this.printProvider.on({ - "layoutchange": this.onLayoutChange, - scope: this - }); - }, - - /** api: method[getPrintExtent] - * :param map: ``OpenLayers.Map`` or :class:`GeoExt.MapPanel` the map to - * get the print extent for. - * :returns: ``OpenLayers.Bounds`` - * - * Gets this page's print extent for the provided map. - */ - getPrintExtent: function(map) { - map = map instanceof GeoExt.MapPanel ? map.map : map; - return this.calculatePageBounds(this.scale, map.getUnits()); - }, - - /** api: method[setScale] - * :param scale: ``Ext.data.Record`` The new scale record. - * :param units: ``String`` map units to use for the scale calculation. - * Optional if the ``feature`` is on a layer which is added to a map. - * If not found, "dd" will be assumed. - * - * Updates the page geometry to match a given scale. Since this takes the - * current layout of the printProvider into account, this can be used to - * update the page geometry feature when the layout has changed. - */ - setScale: function(scale, units) { - var bounds = this.calculatePageBounds(scale, units); - var geom = bounds.toGeometry(); - var rotation = this.rotation; - if(rotation != 0) { - geom.rotate(-rotation, geom.getCentroid()); - } - this.updateFeature(geom, {scale: scale}); - }, - - /** api: method[setCenter] - * :param center: ``OpenLayers.LonLat`` The new center. - * - * Moves the page extent to a new center. - */ - setCenter: function(center) { - var geom = this.feature.geometry; - var oldCenter = geom.getBounds().getCenterLonLat(); - var dx = center.lon - oldCenter.lon; - var dy = center.lat - oldCenter.lat; - geom.move(dx, dy); - this.updateFeature(geom, {center: center}); - }, - - /** api: method[setRotation] - * :param rotation: ``Float`` The new rotation. - * :param force: ``Boolean`` If set to true, the rotation will also be - * set when the layout does not support it. Default is false. - * - * Sets a new rotation for the page geometry. - */ - setRotation: function(rotation, force) { - if(force || this.printProvider.layout.get("rotation") === true) { - var geom = this.feature.geometry; - geom.rotate(this.rotation - rotation, geom.getCentroid()); - this.updateFeature(geom, {rotation: rotation}); - } - }, - - /** api: method[fit] - * :param fitTo: :class:`GeoExt.MapPanel` or ``OpenLayers.Map`` or ``OpenLayers.Feature.Vector`` - * The map or feature to fit the page to. - * :param options: ``Object`` Additional options to determine how to fit - * - * Fits the page layout to a map or feature extent. If the map extent has - * not been centered yet, this will do nothing. - * - * Available options: - * - * * mode - ``String`` How to calculate the print extent? If "closest", - * the closest matching print extent will be chosen. If "printer", the - * chosen print extent will be the closest one that can show the entire - * ``fitTo`` extent on the printer. If "screen", it will be the closest - * one that is entirely visible inside the ``fitTo`` extent. Default is - * "printer". - * - */ - fit: function(fitTo, options) { - options = options || {}; - var map = fitTo, extent; - if(fitTo instanceof GeoExt.MapPanel) { - map = fitTo.map; - } else if(fitTo instanceof OpenLayers.Feature.Vector) { - map = fitTo.layer.map; - extent = fitTo.geometry.getBounds(); - } - if(!extent) { - extent = map.getExtent(); - if(!extent) { - return; - } - } - this._updating = true; - var center = extent.getCenterLonLat(); - this.setCenter(center); - var units = map.getUnits(); - var scale = this.printProvider.scales.getAt(0); - var closest = Number.POSITIVE_INFINITY; - var mapWidth = extent.getWidth(); - var mapHeight = extent.getHeight(); - this.printProvider.scales.each(function(rec) { - var bounds = this.calculatePageBounds(rec, units); - if (options.mode == "closest") { - var diff = - Math.abs(bounds.getWidth() - mapWidth) + - Math.abs(bounds.getHeight() - mapHeight); - if (diff < closest) { - closest = diff; - scale = rec; - } - } else { - var contains = options.mode == "screen" ? - !extent.containsBounds(bounds) : - bounds.containsBounds(extent); - if (contains || (options.mode == "screen" && !contains)) { - scale = rec; - } - return contains; - } - }, this); - this.setScale(scale, units); - delete this._updating; - this.updateFeature(this.feature.geometry, { - center: center, - scale: scale - }); - }, - - /** private: method[updateFeature] - * :param geometry: ``OpenLayers.Geometry`` New geometry for the feature. - * If not provided, the existing geometry will be left unchanged. - * :param mods: ``Object`` An object with one or more of ``scale``, - * ``center`` and ``rotation``, reflecting the page properties to - * update. - * - * Updates the page feature with a new geometry and notifies listeners - * of changed page properties. - */ - updateFeature: function(geometry, mods) { - var f = this.feature; - var modified = f.geometry !== geometry; - geometry.id = f.geometry.id; - f.geometry = geometry; - - if(!this._updating) { - for(var property in mods) { - if(mods[property] === this[property]) { - delete mods[property]; - } else { - this[property] = mods[property]; - modified = true; - } - } - Ext.apply(this, mods); - - f.layer && f.layer.drawFeature(f); - modified && this.fireEvent("change", this, mods); - } - }, - - /** private: method[calculatePageBounds] - * :param scale: ``Ext.data.Record`` Scale record to calculate the page - * bounds for. - * :param units: ``String`` Map units to use for the scale calculation. - * Optional if ``feature`` is added to a layer which is added to a - * map. If not provided, "dd" will be assumed. - * :return: ``OpenLayers.Bounds`` - * - * Calculates the page bounds for a given scale. - */ - calculatePageBounds: function(scale, units) { - var s = scale.get("value"); - var f = this.feature; - var geom = this.feature.geometry; - var center = geom.getBounds().getCenterLonLat(); - - var size = this.printProvider.layout.get("size"); - var units = units || - (f.layer && f.layer.map && f.layer.map.getUnits()) || - "dd"; - var unitsRatio = OpenLayers.INCHES_PER_UNIT[units]; - var w = size.width / 72 / unitsRatio * s / 2; - var h = size.height / 72 / unitsRatio * s / 2; - - return new OpenLayers.Bounds(center.lon - w, center.lat - h, - center.lon + w, center.lat + h); - }, - - /** private: method[onLayoutChange] - * Handler for the printProvider's layoutchange event. - */ - onLayoutChange: function() { - if(this.printProvider.layout.get("rotation") === false) { - this.setRotation(0, true); - } - // at init time the print provider triggers layoutchange - // before loadcapabilities, i.e. before we set this.scale - // to the first scale in the scales store, we need to - // guard against that - this.scale && this.setScale(this.scale); - }, - - /** private: method[destroy] - */ - destroy: function() { - this.printProvider.un("layoutchange", this.onLayoutChange, this); - } - -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/PrintProvider.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/PrintProvider.js deleted file mode 100644 index 03b714aead9..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/PrintProvider.js +++ /dev/null @@ -1,736 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ -Ext.namespace("GeoExt.data"); - -/** api: (define) - * module = GeoExt.data - * class = PrintProvider - * base_link = `Ext.util.Observable `_ - */ - -/** api: example - * Minimal code to print as much of the current map extent as possible as - * soon as the print service capabilities are loaded, using the first layout - * reported by the print service: - * - * .. code-block:: javascript - * - * var mapPanel = new GeoExt.MapPanel({ - * renderTo: "mappanel", - * layers: [new OpenLayers.Layer.WMS("wms", "/geoserver/wms", - * {layers: "topp:tasmania_state_boundaries"})], - * center: [146.56, -41.56], - * zoom: 7 - * }); - * var printProvider = new GeoExt.data.PrintProvider({ - * url: "/geoserver/pdf", - * listeners: { - * "loadcapabilities": function() { - * var printPage = new GeoExt.data.PrintPage({ - * printProvider: printProvider - * }); - * printPage.fit(mapPanel, true); - * printProvider.print(mapPanel, printPage); - * } - * } - * }); - */ - -/** api: constructor - * .. class:: PrintProvider - * - * Provides an interface to a Mapfish or GeoServer print module. For printing, - * one or more instances of :class:`GeoExt.data.PrintPage` are also required - * to tell the PrintProvider about the scale and extent (and optionally - * rotation) of the page(s) we want to print. - */ -GeoExt.data.PrintProvider = Ext.extend(Ext.util.Observable, { - - /** api: config[url] - * ``String`` Base url of the print service. Only required if - * ``capabilities`` is not provided. This - * is usually something like http://path/to/mapfish/print for Mapfish, - * and http://path/to/geoserver/pdf for GeoServer with the printing - * extension installed. This property requires that the print service is - * at the same origin as the application (or accessible via proxy). - */ - - /** private: property[url] - * ``String`` Base url of the print service. Will always have a trailing - * "/". - */ - url: null, - - /** api: config[autoLoad] - * ``Boolean`` If set to true, the capabilities will be loaded upon - * instance creation, and ``loadCapabilities`` does not need to be called - * manually. Setting this when ``capabilities`` and no ``url`` is provided - * has no effect. Default is false. - */ - - /** api: config[capabilities] - * ``Object`` Capabilities of the print service. Only required if ``url`` - * is not provided. This is the object returned by the ``info.json`` - * endpoint of the print service, and is usually obtained by including a - * script tag pointing to - * http://path/to/printservice/info.json?var=myvar in the head of the - * html document, making the capabilities accessible as ``window.myvar``. - * This property should be used when no local print service or proxy is - * available, or when you do not listen for the ``loadcapabilities`` - * events before creating components that require the PrintProvider's - * capabilities to be available. - */ - - /** private: property[capabilities] - * ``Object`` Capabilities as returned from the print service. - */ - capabilities: null, - - /** api: config[method] - * ``String`` Either ``POST`` or ``GET`` (case-sensitive). Method to use - * when sending print requests to the servlet. If the print service is at - * the same origin as the application (or accessible via proxy), then - * ``POST`` is recommended. Use ``GET`` when accessing a remote print - * service with no proxy available, but expect issues with character - * encoding and URLs exceeding the maximum length. Default is ``POST``. - */ - - /** private: property[method] - * ``String`` Either ``POST`` or ``GET`` (case-sensitive). Method to use - * when sending print requests to the servlet. - */ - method: "POST", - - /** api: config[customParams] - * ``Object`` Key-value pairs of custom data to be sent to the print - * service. Optional. This is e.g. useful for complex layout definitions - * on the server side that require additional parameters. - */ - - /** api: property[customParams] - * ``Object`` Key-value pairs of custom data to be sent to the print - * service. Optional. This is e.g. useful for complex layout definitions - * on the server side that require additional parameters. - */ - customParams: null, - - /** api: config[baseParams] - * ``Object`` Key-value pairs of base params to be add to every - * request to the service. Optional. - */ - - /** api: property[scales] - * ``Ext.data.JsonStore`` read-only. A store representing the scales - * available. - * - * Fields of records in this store: - * - * * name - ``String`` the name of the scale - * * value - ``Float`` the scale denominator - */ - scales: null, - - /** api: property[dpis] - * ``Ext.data.JsonStore`` read-only. A store representing the dpis - * available. - * - * Fields of records in this store: - * - * * name - ``String`` the name of the dpi - * * value - ``Float`` the dots per inch - */ - dpis: null, - - /** api: property[layouts] - * ``Ext.data.JsonStore`` read-only. A store representing the layouts - * available. - * - * Fields of records in this store: - * - * * name - ``String`` the name of the layout - * * size - ``Object`` width and height of the map in points - * * rotation - ``Boolean`` indicates if rotation is supported - */ - layouts: null, - - /** api: property[dpi] - * ``Ext.data.Record`` the record for the currently used resolution. - * Read-only, use ``setDpi`` to set the value. - */ - dpi: null, - - /** api: property[layout] - * ``Ext.data.Record`` the record of the currently used layout. Read-only, - * use ``setLayout`` to set the value. - */ - layout: null, - - /** private: method[constructor] - * Private constructor override. - */ - constructor: function(config) { - this.initialConfig = config; - Ext.apply(this, config); - - if(!this.customParams) { - this.customParams = {}; - } - - this.addEvents( - /** api: event[loadcapabilities] - * Triggered when the capabilities have finished loading. This - * event will only fire when ``capabilities`` is not configured. - * - * Listener arguments: - * - * * printProvider - :class:`GeoExt.data.PrintProvider` this - * PrintProvider - * * capabilities - ``Object`` the capabilities - */ - "loadcapabilities", - - /** api: event[layoutchange] - * Triggered when the layout is changed. - * - * Listener arguments: - * - * * printProvider - :class:`GeoExt.data.PrintProvider` this - * PrintProvider - * * layout - ``Ext.data.Record`` the new layout - */ - "layoutchange", - - /** api: event[dpichange] - * Triggered when the dpi value is changed. - * - * Listener arguments: - * - * * printProvider - :class:`GeoExt.data.PrintProvider` this - * PrintProvider - * * dpi - ``Ext.data.Record`` the new dpi record - */ - "dpichange", - - /** api: event[beforeprint] - * Triggered when the print method is called. - * - * Listener arguments: - * - * * printProvider - :class:`GeoExt.data.PrintProvider` this - * PrintProvider - * * map - ``OpenLayers.Map`` the map being printed - * * pages - Array of :class:`GeoExt.data.PrintPage` the print - * pages being printed - * * options - ``Object`` the options to the print command - */ - "beforeprint", - - /** api: event[print] - * Triggered when the print document is opened. - * - * Listener arguments: - * - * * printProvider - :class:`GeoExt.data.PrintProvider` this - * PrintProvider - * * url - ``String`` the url of the print document - */ - "print", - - /** api: event[printexception] - * Triggered when using the ``POST`` method, when the print - * backend returns an exception. - * - * Listener arguments: - * - * * printProvider - :class:`GeoExt.data.PrintProvider` this - * PrintProvider - * * response - ``Object`` the response object of the XHR - */ - "printexception", - - /** api: event[beforeencodelayer] - * Triggered before a layer is encoded. This can be used to - * exclude layers from the printing, by having the listener - * return false. - * - * Listener arguments: - * - * * printProvider - :class:`GeoExt.data.PrintProvider` this - * PrintProvider - * * layer - ``OpenLayers.Layer`` the layer which is about to be - * encoded. - */ - "beforeencodelayer", - - /** api: event[encodelayer] - * Triggered when a layer is encoded. This can be used to modify - * the encoded low-level layer object that will be sent to the - * print service. - * - * Listener arguments: - * - * * printProvider - :class:`GeoExt.data.PrintProvider` this - * PrintProvider - * * layer - ``OpenLayers.Layer`` the layer which is about to be - * encoded. - * * encodedLayer - ``Object`` the encoded layer that will be - * sent to the print service. - */ - "encodelayer" - - ); - - GeoExt.data.PrintProvider.superclass.constructor.apply(this, arguments); - - this.scales = new Ext.data.JsonStore({ - root: "scales", - sortInfo: {field: "value", direction: "DESC"}, - fields: ["name", {name: "value", type: "float"}] - }); - - this.dpis = new Ext.data.JsonStore({ - root: "dpis", - fields: ["name", {name: "value", type: "float"}] - }); - - this.layouts = new Ext.data.JsonStore({ - root: "layouts", - fields: [ - "name", - {name: "size", mapping: "map"}, - {name: "rotation", type: "boolean"} - ] - }); - - if(config.capabilities) { - this.loadStores(); - } else { - if(this.url.split("/").pop()) { - this.url += "/"; - } - this.initialConfig.autoLoad && this.loadCapabilities(); - } - }, - - /** api: method[setLayout] - * :param layout: ``Ext.data.Record`` the record of the layout. - * - * Sets the layout for this printProvider. - */ - setLayout: function(layout) { - this.layout = layout; - this.fireEvent("layoutchange", this, layout); - }, - - /** api: method[setDpi] - * :param dpi: ``Ext.data.Record`` the dpi record. - * - * Sets the dpi for this printProvider. - */ - setDpi: function(dpi) { - this.dpi = dpi; - this.fireEvent("dpichange", this, dpi); - }, - - /** api: method[print] - * :param map: ``GeoExt.MapPanel`` or ``OpenLayers.Map`` The map to print. - * :param pages: ``Array`` of :class:`GeoExt.data.PrintPage` or - * :class:`GeoExt.data.PrintPage` page(s) to print. - * :param options: ``Object`` of additional options, see below. - * - * Sends the print command to the print service and opens a new window - * with the resulting PDF. - * - * Valid properties for the ``options`` argument: - * - * * ``legend`` - :class:`GeoExt.LegendPanel` If provided, the legend - * will be added to the print document. For the printed result to - * look like the LegendPanel, the following ``!legends`` block - * should be included in the ``items`` of your page layout in the - * print module's configuration file: - * - * .. code-block:: none - * - * - !legends - * maxIconWidth: 0 - * maxIconHeight: 0 - * classIndentation: 0 - * layerSpace: 5 - * layerFontSize: 10 - * - * * ``overview`` - :class:`OpenLayers.Control.OverviewMap` If provided, - * the layers for the overview map in the printout will be taken from - * the OverviewMap control. If not provided, the print service will - * use the main map's layers for the overview map. Applies only for - * layouts configured to print an overview map. - */ - print: function(map, pages, options) { - if(map instanceof GeoExt.MapPanel) { - map = map.map; - } - pages = pages instanceof Array ? pages : [pages]; - options = options || {}; - if(this.fireEvent("beforeprint", this, map, pages, options) === false) { - return; - } - - var jsonData = Ext.apply({ - units: map.getUnits(), - srs: map.baseLayer.projection.getCode(), - layout: this.layout.get("name"), - dpi: this.dpi.get("value") - }, this.customParams); - - var pagesLayer = pages[0].feature.layer; - var encodedLayers = []; - Ext.each(map.layers, function(layer){ - if(layer !== pagesLayer && layer.getVisibility() === true) { - var enc = this.encodeLayer(layer); - enc && encodedLayers.push(enc); - } - }, this); - jsonData.layers = encodedLayers; - - var encodedPages = []; - Ext.each(pages, function(page) { - encodedPages.push(Ext.apply({ - center: [page.center.lon, page.center.lat], - scale: page.scale.get("value"), - rotation: page.rotation - }, page.customParams)); - }, this); - jsonData.pages = encodedPages; - - if (options.overview) { - var encodedOverviewLayers = []; - Ext.each(options.overview.layers, function(layer) { - var enc = this.encodeLayer(layer); - enc && encodedOverviewLayers.push(enc); - }, this); - jsonData.overviewLayers = encodedOverviewLayers; - } - - if(options.legend) { - var legend = options.legend; - var rendered = legend.rendered; - if (!rendered) { - legend = legend.cloneConfig({ - renderTo: document.body, - hidden: true - }); - } - var encodedLegends = []; - legend.items.each(function(cmp) { - if(!cmp.hidden) { - var encFn = this.encoders.legends[cmp.getXType()]; - encodedLegends = encodedLegends.concat( - encFn.call(this, cmp)); - } - }, this); - if (!rendered) { - legend.destroy(); - } - jsonData.legends = encodedLegends; - } - - if(this.method === "GET") { - var url = Ext.urlAppend(this.capabilities.printURL, - "spec=" + encodeURIComponent(Ext.encode(jsonData))); - window.open(url); - this.fireEvent("print", this, url); - } else { - Ext.Ajax.request({ - url: this.capabilities.createURL, - jsonData: jsonData, - success: function(response) { - // In IE, using a Content-disposition: attachment header - // may make it hard or impossible to download the pdf due - // to security settings. So we'll display the pdf inline. - var url = Ext.decode(response.responseText).getURL + - (Ext.isIE ? "?inline=true" : ""); - if(Ext.isOpera || Ext.isIE) { - // Make sure that Opera and IE don't replace the - // content tab with the pdf - window.open(url); - } else { - // This avoids popup blockers for all other browsers - window.location.href = url; - } - this.fireEvent("print", this, url); - }, - failure: function(response) { - this.fireEvent("printexception", this, response); - }, - params: this.initialConfig.baseParams, - scope: this - }); - } - }, - - /** api: method[loadCapabilities] - * - * Loads the capabilities from the print service. If this instance is - * configured with either ``capabilities`` or a ``url`` and ``autoLoad`` - * set to true, then this method does not need to be called from the - * application. - */ - loadCapabilities: function() { - if (!this.url) { - return; - } - var url = this.url + "info.json"; - Ext.Ajax.request({ - url: url, - method: "GET", - disableCaching: false, - success: function(response) { - this.capabilities = Ext.decode(response.responseText); - this.loadStores(); - }, - params: this.initialConfig.baseParams, - scope: this - }); - }, - - /** private: method[loadStores] - */ - loadStores: function() { - this.scales.loadData(this.capabilities); - this.dpis.loadData(this.capabilities); - this.layouts.loadData(this.capabilities); - - this.setLayout(this.layouts.getAt(0)); - this.setDpi(this.dpis.getAt(0)); - this.fireEvent("loadcapabilities", this, this.capabilities); - }, - - /** private: method[encodeLayer] - * :param layer: ``OpenLayers.Layer`` - * :return: ``Object`` - * - * Encodes a layer for the print service. - */ - encodeLayer: function(layer) { - var encLayer; - for(var c in this.encoders.layers) { - if(OpenLayers.Layer[c] && layer instanceof OpenLayers.Layer[c]) { - if(this.fireEvent("beforeencodelayer", this, layer) === false) { - return; - } - encLayer = this.encoders.layers[c].call(this, layer); - this.fireEvent("encodelayer", this, layer, encLayer); - break; - } - } - // only return the encLayer object when we have a type. Prevents a - // fallback on base encoders like HTTPRequest. - return (encLayer && encLayer.type) ? encLayer : null; - }, - - /** private: method[getAbsoluteUrl] - * :param url: ``String`` - * :return: ``String`` - * - * Converts the provided url to an absolute url. - */ - getAbsoluteUrl: function(url) { - var a; - if(Ext.isIE) { - a = document.createElement(""); - a.style.display = "none"; - document.body.appendChild(a); - a.href = a.href; - document.body.removeChild(a); - } else { - a = document.createElement("a"); - a.href = url; - } - return a.href; - }, - - /** private: property[encoders] - * ``Object`` Encoders for all print content - */ - encoders: { - "layers": { - "WMS": function(layer) { - var enc = this.encoders.layers.HTTPRequest.call(this, layer); - Ext.apply(enc, { - type: 'WMS', - layers: [layer.params.LAYERS].join(",").split(","), - format: layer.params.FORMAT, - styles: [layer.params.STYLES].join(",").split(",") - }); - var param; - for(var p in layer.params) { - param = p.toLowerCase(); - if(!layer.DEFAULT_PARAMS[param] && - "layers,styles,width,height,srs".indexOf(param) == -1) { - if(!enc.customParams) { - enc.customParams = {}; - } - enc.customParams[p] = layer.params[p]; - } - } - return enc; - }, - "OSM": function(layer) { - var enc = this.encoders.layers.TileCache.call(this, layer); - return Ext.apply(enc, { - type: 'OSM', - baseURL: enc.baseURL.substr(0, enc.baseURL.indexOf("$")), - extension: "png" - }); - }, - "TMS": function(layer) { - var enc = this.encoders.layers.TileCache.call(this, layer); - return Ext.apply(enc, { - type: 'TMS', - format: layer.type - }); - }, - "TileCache": function(layer) { - var enc = this.encoders.layers.HTTPRequest.call(this, layer); - return Ext.apply(enc, { - type: 'TileCache', - layer: layer.layername, - maxExtent: layer.maxExtent.toArray(), - tileSize: [layer.tileSize.w, layer.tileSize.h], - extension: layer.extension, - resolutions: layer.serverResolutions || layer.resolutions - }); - }, - "KaMapCache": function(layer) { - var enc = this.encoders.layers.KaMap.call(this, layer); - return Ext.apply(enc, { - type: 'KaMapCache', - // group param is mandatory when using KaMapCache - group: layer.params['g'], - metaTileWidth: layer.params['metaTileSize']['w'], - metaTileHeight: layer.params['metaTileSize']['h'] - }); - }, - "KaMap": function(layer) { - var enc = this.encoders.layers.HTTPRequest.call(this, layer); - return Ext.apply(enc, { - type: 'KaMap', - map: layer.params['map'], - extension: layer.params['i'], - // group param is optional when using KaMap - group: layer.params['g'] || "", - maxExtent: layer.maxExtent.toArray(), - tileSize: [layer.tileSize.w, layer.tileSize.h], - resolutions: layer.serverResolutions || layer.resolutions - }); - }, - "HTTPRequest": function(layer) { - return { - baseURL: this.getAbsoluteUrl(layer.url instanceof Array ? - layer.url[0] : layer.url), - opacity: (layer.opacity != null) ? layer.opacity : 1.0, - singleTile: layer.singleTile - }; - }, - "Image": function(layer) { - return { - type: 'Image', - baseURL: this.getAbsoluteUrl(layer.getURL(layer.extent)), - opacity: (layer.opacity != null) ? layer.opacity : 1.0, - extent: layer.extent.toArray(), - pixelSize: [layer.size.w, layer.size.h], - name: layer.name - }; - }, - "Vector": function(layer) { - if(!layer.features.length) { - return; - } - - var encFeatures = []; - var encStyles = {}; - var features = layer.features; - var featureFormat = new OpenLayers.Format.GeoJSON(); - var styleFormat = new OpenLayers.Format.JSON(); - var nextId = 1; - var styleDict = {}; - var feature, style, dictKey, dictItem, styleName; - for(var i=0, len=features.length; i`_ - */ -Ext.namespace('GeoExt', 'GeoExt.data'); - -GeoExt.data.ProtocolProxy = function(config) { - Ext.apply(this, config); - GeoExt.data.ProtocolProxy.superclass.constructor.apply(this, arguments); -}; - -/** api: constructor - * .. class:: ProtocolProxy - * - * A data proxy for use with ``OpenLayers.Protocol`` objects. - */ -Ext.extend(GeoExt.data.ProtocolProxy, Ext.data.DataProxy, { - - /** api: config[protocol] - * ``OpenLayers.Protocol`` - * The protocol used to fetch features. - */ - protocol: null, - - /** api: config[abortPrevious] - * ``Boolean`` - * Abort any previous request before issuing another. Default is ``true``. - */ - abortPrevious: true, - - /** api: config[setParamsAsOptions] - * ``Boolean`` - * Should options.params be set directly on options before passing it into - * the protocol's read method? Default is ``false``. - */ - setParamsAsOptions: false, - - /** private: property[response] - * ``OpenLayers.Protocol.Response`` - * The response returned by the read call on the protocol. - */ - response: null, - - /** private: method[load] - * :param params: ``Object`` An object containing properties which are to - * be used as HTTP parameters for the request to the remote server. - * :param reader: ``Ext.data.DataReader`` The Reader object which converts - * the data object into a block of ``Ext.data.Records``. - * :param callback: ``Function`` The function into which to pass the block - * of ``Ext.data.Records``. The function is passed the Record block - * object, the ``args`` argument passed to the load function, and a - * boolean success indicator. - * :param scope: ``Object`` The scope in which to call the callback. - * :param arg: ``Object`` An optional argument which is passed to the - * callback as its second parameter. - * - * Calls ``read`` on the protocol. - */ - load: function(params, reader, callback, scope, arg) { - if (this.fireEvent("beforeload", this, params) !== false) { - var o = { - params: params || {}, - request: { - callback: callback, - scope: scope, - arg: arg - }, - reader: reader - }; - var cb = OpenLayers.Function.bind(this.loadResponse, this, o); - if (this.abortPrevious) { - this.abortRequest(); - } - var options = { - params: params, - callback: cb, - scope: this - }; - Ext.applyIf(options, arg); - if (this.setParamsAsOptions === true) { - Ext.applyIf(options, options.params); - delete options.params; - } - this.response = this.protocol.read(options); - } else { - callback.call(scope || this, null, arg, false); - } - }, - - /** private: method[abortRequest] - * Called to abort any ongoing request. - */ - abortRequest: function() { - if (this.response) { - this.protocol.abort(this.response); - this.response = null; - } - }, - - /** private: method[loadResponse] - * :param o: ``Object`` - * :param response: ``OpenLayers.Protocol.Response`` - * - * Handle response from the protocol - */ - loadResponse: function(o, response) { - if (response.success()) { - var result = o.reader.read(response); - this.fireEvent("load", this, o, o.request.arg); - o.request.callback.call( - o.request.scope, result, o.request.arg, true); - } else { - this.fireEvent("loadexception", this, o, response); - o.request.callback.call( - o.request.scope, null, o.request.arg, false); - } - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/ScaleStore.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/ScaleStore.js deleted file mode 100644 index e1ffc74ac89..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/ScaleStore.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.data - * class = ScaleStore - * base_link = `Ext.data.Store `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: ScaleStore - * - * A store that contains a cache of available zoom levels. The store can - * optionally be kept synchronized with an ``OpenLayers.Map`` or - * :class:`GeoExt.MapPanel` object. - * - * Records have the following fields: - * - * * level - ``Number`` The zoom level. - * * scale - ``Number`` The scale denominator. - * * resolution - ``Number`` The map units per pixel. - */ -GeoExt.data.ScaleStore = Ext.extend(Ext.data.Store, { - - /** api: config[map] - * ``OpenLayers.Map`` or :class:`GeoExt.MapPanel` - * Optional map or map panel from which to derive scale values. - */ - map: null, - - /** private: method[constructor] - * Construct a ScaleStore from a configuration. The ScaleStore accepts - * some custom parameters addition to the fields accepted by Ext.Store. - */ - constructor: function(config) { - var map = (config.map instanceof GeoExt.MapPanel ? config.map.map : config.map); - delete config.map; - config = Ext.applyIf(config, {reader: new Ext.data.JsonReader({}, [ - "level", - "resolution", - "scale" - ])}); - - GeoExt.data.ScaleStore.superclass.constructor.call(this, config); - - if (map) { - this.bind(map); - } - }, - - /** api: method[bind] - * :param map: :class:`GeoExt.MapPanel` or ``OpenLayers.Map`` Panel or map - * to which we should bind. - * - * Bind this store to a map; that is, maintain the zoom list in sync with - * the map's current configuration. If the map does not currently have a - * set scale list, then the store will remain empty until the map is - * configured with one. - */ - bind: function(map, options) { - this.map = (map instanceof GeoExt.MapPanel ? map.map : map); - this.map.events.register('changebaselayer', this, this.populateFromMap); - if (this.map.baseLayer) { - this.populateFromMap(); - } else { - this.map.events.register('addlayer', this, this.populateOnAdd); - } - }, - - /** api: method[unbind] - * Un-bind this store from the map to which it is currently bound. The - * currently stored zoom levels will remain, but no further changes from - * the map will affect it. - */ - unbind: function() { - if (this.map) { - this.map.events.unregister('addlayer', this, this.populateOnAdd); - this.map.events.unregister('changebaselayer', this, this.populateFromMap); - delete this.map; - } - }, - - /** private: method[populateOnAdd] - * :param evt: ``Object`` - * - * This method handles the case where we have bind() called on a - * not-fully-configured map so that the zoom levels can be detected when a - * baselayer is finally added. - */ - populateOnAdd: function(evt) { - if (evt.layer.isBaseLayer) { - this.populateFromMap(); - this.map.events.unregister('addlayer', this, this.populateOnAdd); - } - }, - - /** private: method[populateFromMap] - * This method actually loads the zoom level information from the - * OpenLayers.Map and converts it to Ext Records. - */ - populateFromMap: function() { - var zooms = []; - var resolutions = this.map.baseLayer.resolutions; - var units = this.map.baseLayer.units; - - for (var i=resolutions.length-1; i >= 0; i--) { - var res = resolutions[i]; - zooms.push({ - level: i, - resolution: res, - scale: OpenLayers.Util.getScaleFromResolution(res, units) - }); - } - - this.loadData(zooms); - }, - - /** private: method[destroy] - */ - destroy: function() { - this.unbind(); - GeoExt.data.ScaleStore.superclass.destroy.apply(this, arguments); - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WFSCapabilitiesReader.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WFSCapabilitiesReader.js deleted file mode 100644 index 37b6c83d5ae..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WFSCapabilitiesReader.js +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/LayerRecord.js - */ - -/** api: (define) - * module = GeoExt.data - * class = WFSCapabilitiesReader - * base_link = `Ext.data.DataReader `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: WFSCapabilitiesReader(meta, recordType) - * - * :param meta: ``Object`` Reader configuration. - * :param recordType: ``Array | Ext.data.Record`` An array of field - * configuration objects or a record object. Default is - * :class:`GeoExt.data.LayerRecord`. - * - * Data reader class to create an array of - * :class:`GeoExt.data.LayerRecord` objects from a WFS GetCapabilities - * response. - */ -GeoExt.data.WFSCapabilitiesReader = function(meta, recordType) { - meta = meta || {}; - if(!meta.format) { - meta.format = new OpenLayers.Format.WFSCapabilities(); - } - if(!(typeof recordType === "function")) { - recordType = GeoExt.data.LayerRecord.create( - recordType || meta.fields || [ - {name: "name", type: "string"}, - {name: "title", type: "string"}, - {name: "namespace", type: "string", mapping: "featureNS"}, - {name: "abstract", type: "string"} - ] - ); - } - GeoExt.data.WFSCapabilitiesReader.superclass.constructor.call( - this, meta, recordType - ); -}; - -Ext.extend(GeoExt.data.WFSCapabilitiesReader, Ext.data.DataReader, { - - /** private: method[read] - * :param request: ``Object`` The XHR object which contains the parsed XML - * document. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Record`` objects. - */ - read: function(request) { - var data = request.responseXML; - if(!data || !data.documentElement) { - data = request.responseText; - } - return this.readRecords(data); - }, - - /** private: method[readRecords] - * :param data: ``DOMElement | String | Object`` A document element or XHR - * response string. As an alternative to fetching capabilities data - * from a remote source, an object representing the capabilities can - * be provided given that the structure mirrors that returned from the - * capabilities parser. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Record`` objects. - * - * Create a data block containing Ext.data.Records from an XML document. - */ - readRecords: function(data) { - if(typeof data === "string" || data.nodeType) { - data = this.meta.format.read(data); - } - - var featureTypes = data.featureTypeList.featureTypes; - var fields = this.recordType.prototype.fields; - - var featureType, values, field, v, parts, layer, values; - var layerOptions, protocolOptions; - - var protocolDefaults = { - url: data.capability.request.getfeature.href.post - }; - - var records = []; - - for(var i=0, lenI=featureTypes.length; i`_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: WFSCapabilitiesStore - * - * Small helper class to make creating stores for remote WFS layer data - * easier. The store is pre-configured with a built-in - * ``Ext.data.HttpProxy`` and :class:`GeoExt.data.WFSCapabilitiesReader`. - * The proxy is configured to allow caching and issues requests via GET. - * If you require some other proxy/reader combination then you'll have to - * configure this with your own proxy or create a basic - * :class:`GeoExt.data.LayerStore` and configure as needed. - */ - -/** api: config[format] - * ``OpenLayers.Format`` - * A parser for transforming the XHR response into an array of objects - * representing attributes. Defaults to an ``OpenLayers.Format.WFSCapabilities`` - * parser. - */ - -/** api: config[fields] - * ``Array | Function`` - * Either an Array of field definition objects as passed to - * ``Ext.data.Record.create``, or a record constructor created using - * ``Ext.data.Record.create``. Defaults to ``["name", "type"]``. - */ - -GeoExt.data.WFSCapabilitiesStore = function(c) { - c = c || {}; - GeoExt.data.WFSCapabilitiesStore.superclass.constructor.call( - this, - Ext.apply(c, { - proxy: c.proxy || (!c.data ? - new Ext.data.HttpProxy({url: c.url, disableCaching: false, method: "GET"}) : - undefined - ), - reader: new GeoExt.data.WFSCapabilitiesReader( - c, c.fields - ) - }) - ); -}; -Ext.extend(GeoExt.data.WFSCapabilitiesStore, Ext.data.Store); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMCReader.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMCReader.js deleted file mode 100644 index 14add131977..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMCReader.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/LayerRecord.js - */ - -/** api: (define) - * module = GeoExt.data - * class = WMCReader - * base_link = `Ext.data.DataReader `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: WMCReader(meta, recordType) - * - * :param meta: ``Object`` Reader configuration. - * :param recordType: ``Array | Ext.data.Record`` An array of field - * configuration objects or a record object. Default is - * :class:`GeoExt.data.LayerRecord`. - * - * Data reader class to create an array of - * :class:`GeoExt.data.LayerRecord` objects from a WMS GetCapabilities - * response. - */ -GeoExt.data.WMCReader = function(meta, recordType) { - meta = meta || {}; - if(!meta.format) { - meta.format = new OpenLayers.Format.WMC(); - } - if(!(typeof recordType === "function")) { - recordType = GeoExt.data.LayerRecord.create( - recordType || meta.fields || [ - // give only non-OpenLayers fields as default recordType - {name: "abstract", type: "string"}, - {name: "metadataURL", type: "string"}, - {name: "queryable", type: "boolean"}, - {name: "formats"}, // array - {name: "styles"} // array - ] - ); - } - GeoExt.data.WMCReader.superclass.constructor.call( - this, meta, recordType - ); -}; - -Ext.extend(GeoExt.data.WMCReader, Ext.data.DataReader, { - - /** private: method[read] - * :param request: ``Object`` The XHR object which contains the parsed XML - * document. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Record`` objects. - */ - read: function(request) { - var data = request.responseXML; - if(!data || !data.documentElement) { - data = request.responseText; - } - return this.readRecords(data); - }, - - /** private: method[readRecords] - * :param data: ``DOMElement | String | Object`` A document element or XHR - * response string. As an alternative to fetching capabilities data - * from a remote source, an object representing the capabilities can - * be provided given that the structure mirrors that returned from the - * capabilities parser. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Record`` objects. - * - * Create a data block containing Ext.data.Records from an XML document. - */ - readRecords: function(data) { - var format = this.meta.format; - if(typeof data === "string" || data.nodeType) { - data = format.read(data); - } - var layersContext = data ? data.layersContext : undefined; - var records = []; - - if(layersContext) { - var recordType = this.recordType, fields = recordType.prototype.fields; - var i, lenI, j, lenJ, layerContext, values, field, v; - for (i = 0, lenI = layersContext.length; i < lenI; i++) { - layerContext = layersContext[i]; - values = {}; - for(j = 0, lenJ = fields.length; j < lenJ; j++){ - field = fields.items[j]; - v = layerContext[field.mapping || field.name] || - field.defaultValue; - v = field.convert(v); - values[field.name] = v; - } - values.layer = format.getLayerFromContext(layerContext); - records.push(new this.recordType(values, values.layer.id)); - } - } - - return { - totalRecords: records.length, - success: true, - records: records - }; - - } - -}); - diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSCapabilitiesReader.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSCapabilitiesReader.js deleted file mode 100644 index 26b4e75ab50..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSCapabilitiesReader.js +++ /dev/null @@ -1,265 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/LayerRecord.js - */ - -/** api: (define) - * module = GeoExt.data - * class = WMSCapabilitiesReader - * base_link = `Ext.data.DataReader `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: WMSCapabilitiesReader(meta, recordType) - * - * :param meta: ``Object`` Reader configuration from which: - * ``layerOptions`` is an optional object passed as default options - * to the ``OpenLayers.Layer.WMS`` constructor. - * ``layerParams`` is an optional set of parameters to pass into the - * ``OpenLayers.Layer.WMS`` constructor. - * :param recordType: ``Array | Ext.data.Record`` An array of field - * configuration objects or a record object. Default is - * :class:`GeoExt.data.LayerRecord` with the following fields: - * name, title, abstract, queryable, opaque, noSubsets, cascaded, - * fixedWidth, fixedHeight, minScale, maxScale, prefix, formats, - * styles, srs, dimensions, bbox, llbbox, attribution, keywords, - * identifiers, authorityURLs, metadataURLs. - * The type of these fields is the same as for the matching fields in - * the object returned from - * ``OpenLayers.Format.WMSCapabilities::read()``. - * - * Data reader class to create an array of - * :class:`GeoExt.data.LayerRecord` objects from a WMS GetCapabilities - * response. - */ -GeoExt.data.WMSCapabilitiesReader = function(meta, recordType) { - meta = meta || {}; - if(!meta.format) { - meta.format = new OpenLayers.Format.WMSCapabilities(); - } - if(typeof recordType !== "function") { - recordType = GeoExt.data.LayerRecord.create( - recordType || meta.fields || [ - {name: "name", type: "string"}, - {name: "title", type: "string"}, - {name: "abstract", type: "string"}, - {name: "queryable", type: "boolean"}, - {name: "opaque", type: "boolean"}, - {name: "noSubsets", type: "boolean"}, - {name: "cascaded", type: "int"}, - {name: "fixedWidth", type: "int"}, - {name: "fixedHeight", type: "int"}, - {name: "minScale", type: "float"}, - {name: "maxScale", type: "float"}, - {name: "prefix", type: "string"}, - {name: "formats"}, // array - {name: "styles"}, // array - {name: "srs"}, // object - {name: "dimensions"}, // object - {name: "bbox"}, // object - {name: "llbbox"}, // array - {name: "attribution"}, // object - {name: "keywords"}, // array - {name: "identifiers"}, // object - {name: "authorityURLs"}, // object - {name: "metadataURLs"} // array - ] - ); - } - GeoExt.data.WMSCapabilitiesReader.superclass.constructor.call( - this, meta, recordType - ); -}; - -Ext.extend(GeoExt.data.WMSCapabilitiesReader, Ext.data.DataReader, { - - - /** api: config[attributionCls] - * ``String`` CSS class name for the attribution DOM elements. - * Element class names append "-link", "-image", and "-title" as - * appropriate. Default is "gx-attribution". - */ - attributionCls: "gx-attribution", - - /** private: method[read] - * :param request: ``Object`` The XHR object which contains the parsed XML - * document. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Record`` objects. - */ - read: function(request) { - var data = request.responseXML; - if(!data || !data.documentElement) { - data = request.responseText; - } - return this.readRecords(data); - }, - - /** private: method[serviceExceptionFormat] - * :param formats: ``Array`` An array of service exception format strings. - * :return: ``String`` The (supposedly) best service exception format. - */ - serviceExceptionFormat: function(formats) { - if (OpenLayers.Util.indexOf(formats, - "application/vnd.ogc.se_inimage")>-1) { - return "application/vnd.ogc.se_inimage"; - } - if (OpenLayers.Util.indexOf(formats, - "application/vnd.ogc.se_xml")>-1) { - return "application/vnd.ogc.se_xml"; - } - return formats[0]; - }, - - /** private: method[imageFormat] - * :param layer: ``Object`` The layer's capabilities object. - * :return: ``String`` The (supposedly) best mime type for requesting - * tiles. - */ - imageFormat: function(layer) { - var formats = layer.formats; - if (layer.opaque && - OpenLayers.Util.indexOf(formats, "image/jpeg")>-1) { - return "image/jpeg"; - } - if (OpenLayers.Util.indexOf(formats, "image/png")>-1) { - return "image/png"; - } - if (OpenLayers.Util.indexOf(formats, "image/png; mode=24bit")>-1) { - return "image/png; mode=24bit"; - } - if (OpenLayers.Util.indexOf(formats, "image/gif")>-1) { - return "image/gif"; - } - return formats[0]; - }, - - /** private: method[imageTransparent] - * :param layer: ``Object`` The layer's capabilities object. - * :return: ``Boolean`` The TRANSPARENT param. - */ - imageTransparent: function(layer) { - return layer.opaque == undefined || !layer.opaque; - }, - - /** private: method[readRecords] - * :param data: ``DOMElement | String | Object`` A document element or XHR - * response string. As an alternative to fetching capabilities data - * from a remote source, an object representing the capabilities can - * be provided given that the structure mirrors that returned from the - * capabilities parser. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Record`` objects. - * - * Create a data block containing Ext.data.Records from an XML document. - */ - readRecords: function(data) { - if(typeof data === "string" || data.nodeType) { - data = this.meta.format.read(data); - } - var version = data.version; - var capability = data.capability || {}; - var url = capability.request && capability.request.getmap && - capability.request.getmap.href; - var layers = capability.layers; - var formats = capability.exception ? capability.exception.formats : []; - var exceptions = this.serviceExceptionFormat(formats); - var records = []; - - if(url && layers) { - var fields = this.recordType.prototype.fields; - var layer, values, options, params, field, v; - - for(var i=0, lenI=layers.length; i"); - } - - if (attribution.title) { - markup.push("" - + attribution.title - + ""); - } - - if(attribution.href){ - for(var i = 0; i < markup.length; i++){ - markup[i] = "" - + markup[i] - + ""; - } - } - - return markup.join(" "); - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSCapabilitiesStore.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSCapabilitiesStore.js deleted file mode 100644 index 361dc5cd53c..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSCapabilitiesStore.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/WMSCapabilitiesReader.js - */ - -/** api: (define) - * module = GeoExt.data - * class = WMSCapabilitiesStore - * base_link = `Ext.data.Store `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: WMSCapabilitiesStore - * - * Small helper class to make creating stores for remote WMS layer data - * easier. The store is pre-configured with a built-in - * ``Ext.data.HttpProxy`` and :class:`GeoExt.data.WMSCapabilitiesReader`. - * The proxy is configured to allow caching and issues requests via GET. - * If you require some other proxy/reader combination then you'll have to - * configure this with your own proxy or create a basic - * :class:`GeoExt.data.LayerStore` and configure as needed. - */ - -/** api: config[format] - * ``OpenLayers.Format`` - * A parser for transforming the XHR response into an array of objects - * representing attributes. Defaults to an ``OpenLayers.Format.WMSCapabilities`` - * parser. - */ - -/** api: config[fields] - * ``Array | Function`` - * Either an Array of field definition objects as passed to - * ``Ext.data.Record.create``, or a record constructor created using - * ``Ext.data.Record.create``. Defaults to ``["name", "type"]``. - */ - -GeoExt.data.WMSCapabilitiesStore = function(c) { - c = c || {}; - GeoExt.data.WMSCapabilitiesStore.superclass.constructor.call( - this, - Ext.apply(c, { - proxy: c.proxy || (!c.data ? - new Ext.data.HttpProxy({url: c.url, disableCaching: false, method: "GET"}) : - undefined - ), - reader: new GeoExt.data.WMSCapabilitiesReader( - c, c.fields - ) - }) - ); -}; -Ext.extend(GeoExt.data.WMSCapabilitiesStore, Ext.data.Store); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSDescribeLayerReader.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSDescribeLayerReader.js deleted file mode 100644 index b4f78e136c5..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/data/WMSDescribeLayerReader.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.data - * class = WMSDescribeLayerReader - * base_link = `Ext.data.DataReader `_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: WMSDescribeLayerReader(meta, recordType) - * - * :param meta: ``Object`` Reader configuration. - * :param recordType: ``Array | Ext.data.Record`` An array of field - * configuration objects or a record object. Default has - * fields for owsType, owsURL, and typeName. - * - * Data reader class to create an array of - * layer description objects from a WMS DescribeLayer - * response. - */ -GeoExt.data.WMSDescribeLayerReader = function(meta, recordType) { - meta = meta || {}; - if(!meta.format) { - meta.format = new OpenLayers.Format.WMSDescribeLayer(); - } - if(!(typeof recordType === "function")) { - recordType = Ext.data.Record.create( - recordType || meta.fields || [ - {name: "owsType", type: "string"}, - {name: "owsURL", type: "string"}, - {name: "typeName", type: "string"} - ] - ); - } - GeoExt.data.WMSDescribeLayerReader.superclass.constructor.call( - this, meta, recordType - ); -}; - -Ext.extend(GeoExt.data.WMSDescribeLayerReader, Ext.data.DataReader, { - - /** private: method[read] - * :param request: ``Object`` The XHR object which contains the parsed XML - * document. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Record`` objects. - */ - read: function(request) { - var data = request.responseXML; - if(!data || !data.documentElement) { - data = request.responseText; - } - return this.readRecords(data); - }, - - /** private: method[readRecords] - * :param data: ``DOMElement | Strint | Object`` A document element or XHR - * response string. As an alternative to fetching layer description data - * from a remote source, an object representing the layer descriptions can - * be provided given that the structure mirrors that returned from the - * layer description parser. - * :return: ``Object`` A data block which is used by an ``Ext.data.Store`` - * as a cache of ``Ext.data.Record`` objects. - * - * Create a data block containing Ext.data.Records from an XML document. - */ - readRecords: function(data) { - - if(typeof data === "string" || data.nodeType) { - data = this.meta.format.read(data); - } - var records = [], description; - for(var i=0, len=data.length; i`_ - */ -Ext.namespace("GeoExt.data"); - -/** api: constructor - * .. class:: WMSDescribeLayerStore - * - * Small helper class to make creating stores for remote WMS layer description - * easier. The store is pre-configured with a built-in - * ``Ext.data.HttpProxy`` and :class:`GeoExt.data.WMSDescribeLayerReader`. - * The proxy is configured to allow caching and issues requests via GET. - * If you require some other proxy/reader combination then you'll have to - * configure this with your own proxy or create a basic - * store and configure as needed. - */ - -/** api: config[format] - * ``OpenLayers.Format`` - * A parser for transforming the XHR response into an array of objects - * representing attributes. Defaults to an ``OpenLayers.Format.WMSDescribeLayer`` - * parser. - */ - -/** api: config[fields] - * ``Array | Function`` - * Either an Array of field definition objects as passed to - * ``Ext.data.Record.create``, or a record constructor created using - * ``Ext.data.Record.create``. Defaults to ``["name", "type"]``. - */ - -GeoExt.data.WMSDescribeLayerStore = function(c) { - c = c || {}; - GeoExt.data.WMSDescribeLayerStore.superclass.constructor.call( - this, - Ext.apply(c, { - proxy: c.proxy || (!c.data ? - new Ext.data.HttpProxy({url: c.url, disableCaching: false, method: "GET"}) : - undefined - ), - reader: new GeoExt.data.WMSDescribeLayerReader( - c, c.fields - ) - }) - ); -}; -Ext.extend(GeoExt.data.WMSDescribeLayerStore, Ext.data.Store); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/AttributeForm.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/AttributeForm.js deleted file mode 100644 index f0a0ac158a3..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/AttributeForm.js +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright (c) 2008-2009 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/* - * @include GeoExt/widgets/form.js - */ - -Ext.namespace("GeoExt.plugins"); - -/** api: (define) - * module = GeoExt.plugins - * class = AttributeForm - */ - -/** api: example - * Sample code showing how to use an Ext form panel as a feature - * attribute form (for editing features for example). - * - * .. code-block:: javascript - * - * var formPanel = new Ext.form.FormPanel({ - * autoScroll: true, - * height: 300, - * width: 350, - * defaults: { - * maxLengthText: "too long", - * minLengthText: "too short" - * } - * plugins: [ - * new GeoExt.plugins.AttributeForm({ - * attributeStore: new GeoExt.data.AttributeStore({ - * url: "http://some.wfs", - * baseParams: { - * "SERVICE": "WFS", - * "VERSION": "1.1.0", - * "REQUEST": "DescribeFeatureType", - * "TYPENAME": "the_typename" - * } - * }) - * }) - * ] - * }); - */ - -/** api: constructor - * .. class:: AttributeForm - * - * This plugin allows creating form items from attribute records - * and fill a form panel with these items. - */ - -GeoExt.plugins.AttributeForm = function(config) { - Ext.apply(this, config); -}; - -GeoExt.plugins.AttributeForm.prototype = { - - /** api: config[attributeStore] - * ``Ext.data.Store`` The attribute store to bind to this plugin. - * It can be any Ext store configured with a - * :class:`GeoExt.data.AttributeReader`. If set form items - * will be created from the attribute records in the form. In - * most cases this store will be a :class:`GeoExt.data.AttributeStore`. - */ - /** private: property[attributeStore] - * ``Ext.data.Store`` The attribute store. - */ - attributeStore: null, - - /** private: property[formPanel] - * ``Ext.form.FormPanel`` This form panel. - */ - formPanel: null, - - /** private: method[init] - * :param formPanel: class:`Ext.form.FormPanel` - * - * Initializes the plugin. - */ - init: function(formPanel) { - this.formPanel = formPanel; - if(this.attributeStore instanceof Ext.data.Store) { - this.fillForm(); - this.bind(this.attributeStore); - } - formPanel.on("destroy", this.onFormDestroy, this); - }, - - /** private: method[bind] - * :param store: ``Ext.data.Store`` The attribute store this form panel - * is to be bound to. - * - * Bind the panel to the attribute store passed as a parameter. - */ - bind: function(store) { - this.unbind(); - store.on({ - "load": this.onLoad, - scope: this - }); - this.attributeStore = store; - }, - - /** private: method[unbind] - * - * Unbind the panel from the attribute store it is currently bound - * to, if any. - */ - unbind: function() { - if(this.attributeStore) { - this.attributeStore.un("load", this.onLoad, this); - } - }, - - /** private: method[onLoad] - * - * Callback called when the store is loaded. - */ - onLoad: function() { - if(this.formPanel.items) { - this.formPanel.removeAll(); - } - this.fillForm(); - }, - - /** private: method[fillForm] - * - * For each attribute record in the attribute store create - * a form field and add it to the form. - */ - fillForm: function() { - this.attributeStore.each(function(record) { - var field = GeoExt.form.recordToField(record); - if(field) { - this.formPanel.add(field); - } - }, this); - this.formPanel.doLayout(); - }, - - /** private: method[onFormDestroy] - */ - onFormDestroy: function() { - this.unbind(); - } -}; - -/** api: ptype = gx_attributeform */ -Ext.preg("gx_attributeform", GeoExt.plugins.AttributeForm); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/PrintExtent.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/PrintExtent.js deleted file mode 100644 index 8e1ac5cb8ef..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/PrintExtent.js +++ /dev/null @@ -1,400 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ -Ext.namespace("GeoExt.plugins"); - -/** api: (define) - * module = GeoExt.plugins - * class = PrintExtent - */ - -/** api: example - * Sample code to create a MapPanel with a PrintExtent, and print it - * immediately: - * - * .. code-block:: javascript - * - * var printExtent = new GeoExt.plugins.PrintExtent({ - * printProvider: new GeoExt.data.PrintProvider({ - * capabilities: printCapabilities - * }) - * }); - * - * var mapPanel = new GeoExt.MapPanel({ - * border: false, - * renderTo: "div-id", - * layers: [new OpenLayers.Layer.WMS("Tasmania", "http://demo.opengeo.org/geoserver/wms", - * {layers: "topp:tasmania_state_boundaries"}, {singleTile: true})], - * center: [146.56, -41.56], - * zoom: 6, - * plugins: printExtent - * }); - * - * printExtent.addPage(); - * - * // print the map - * printExtent.print(); - */ - -/** api: constructor - * .. class:: PrintExtent - * - * Provides a way to show and modify the extents of print pages on the map. It - * uses a layer to render the page extent and handle features of print pages, - * and provides a control to modify them. Must be set as a plugin to a - * :class:`GeoExt.MapPanel`. - */ -GeoExt.plugins.PrintExtent = Ext.extend(Ext.util.Observable, { - - /** private: initialConfig - * ``Object`` Holds the initial config object passed to the - * constructor. - */ - initialConfig: null, - - /** api: config[printProvider] - * :class:`GeoExt.data.PrintProvider` The print provider this form - * is connected to. Optional if pages are provided. - */ - /** api: property[printProvider] - * :class:`GeoExt.data.PrintProvider` The print provider this form - * is connected to. Read-only. - */ - printProvider: null, - - /** private: property[map] - * ``OpenLayers.Map`` The map the layer and control are added to. - */ - map: null, - - /** api: config[layer] - * ``OpenLayers.Layer.Vector`` The layer used to render extent and handle - * features to. Optional, will be created if not provided. - */ - /** private: property[layer] - * ``OpenLayers.Layer.Vector`` The layer used to render extent and handle - * features to. - */ - layer: null, - - /** private: property[control] - * ``OpenLayers.Control.TransformFeature`` The control used to change - * extent, center, rotation and scale. - */ - control: null, - - /** api: config[pages] - * Array of :class:`GeoExt.data.PrintPage` The pages that this plugin - * controls. Optional. If not provided, it will be created with one page - * that is completely contained within the visible map extent. - * - * .. note:: All pages must use the same PrintProvider. - */ - /** api: property[pages] - * Array of :class:`GeoExt.data.PrintPage` The pages that this component - * controls. Read-only. - */ - pages: null, - - /** api: property[page] - * :class:`GeoExt.data.PrintPage` The page currently set for - * transformation. - */ - page: null, - - /** private: method[constructor] - * Private constructor override. - */ - constructor: function(config) { - config = config || {}; - - Ext.apply(this, config); - this.initialConfig = config; - - if(!this.printProvider) { - this.printProvider = this.pages[0].printProvider; - } - - if(!this.pages) { - this.pages = []; - } - - this.addEvents( - /** api: event[selectpage] - * Triggered when a page has been selected using the control - * - * Listener arguments: - * * printPage - :class:`GeoExt.data.PrintPage` this printPage - */ - "selectpage" - ); - - GeoExt.plugins.PrintExtent.superclass.constructor.apply(this, arguments); - }, - - /** api: method[print] - * :param options: ``Object`` Options to send to the PrintProvider's - * print method. See :class:`GeoExt.data.PrintProvider` :: ``print``. - * - * Prints all pages as shown on the map. - */ - print: function(options) { - this.printProvider.print(this.map, this.pages, options); - }, - - /** private: method[init] - * :param mapPanel: class:`GeoExt.MapPanel` - * - * Initializes the plugin. - */ - init: function(mapPanel) { - this.map = mapPanel.map; - mapPanel.on("destroy", this.onMapPanelDestroy, this); - - if (!this.layer) { - this.layer = new OpenLayers.Layer.Vector(null, { - displayInLayerSwitcher: false - }); - } - this.createControl(); - - for(var i=0, len=this.pages.length; i=0; i--) { - this.removePage(this.pages[i]); - } - - this.hide(); - - var control = this.control; - if(map && map.events && - control && control.events) { - control.destroy(); - } - - var layer = this.layer; - if(!this.initialConfig.layer && - map && map.events && - layer && layer.events) { - layer.destroy(); - } - - delete this.layer; - delete this.control; - delete this.page; - this.map = null; - }, - - /** private: method[createControl] - */ - createControl: function() { - this.control = new OpenLayers.Control.TransformFeature(this.layer, { - preserveAspectRatio: true, - eventListeners: { - "beforesetfeature": function(e) { - for(var i=0, len=this.pages.length; i`_ - */ - -/** api: example - * A form with a combo box for the scale and text fields for rotation and a - * page title. The page title is a custom parameter of the print module's - * page configuration: - * - * .. code-block:: javascript - * - * var printPage = new GeoExt.data.PrintPage({ - * printProvider: new GeoExt.data.PrintProvider({ - * capabilities: printCapabilities - * }) - * }); - * new Ext.form.FormPanel({ - * renderTo: "form", - * width: 200, - * height: 300, - * items: [{ - * xtype: "combo", - * displayField: "name", - * store: printPage.scales, // printPage.scale - * name: "scale", - * fieldLabel: "Scale", - * typeAhead: true, - * mode: "local", - * forceSelection: true, - * triggerAction: "all", - * selectOnFocus: true, - * plugins: new GeoExt.plugins.PrintPageField({ - * printPage: printPage - * }) - * }, { - * xtype: "textfield", - * name: "rotation", // printPage.rotation - * fieldLabel: "Rotation", - * plugins: new GeoExt.plugins.PrintPageField({ - * printPage: printPage - * }) - * }, { - * xtype: "textfield", - * name: "mapTitle", // printPage.customParams["mapTitle"] - * fieldLabel: "Map Title", - * plugins: new GeoExt.plugins.PrintPageField({ - * printPage: printPage - * }) - * }] - * }); - */ - -/** api: constructor - * .. class:: PrintPageField - * - * A plugin for ``Ext.form.Field`` components which provides synchronization - * with a :class:`GeoExt.data.PrintPage`. The field name has to match the - * respective property of the printPage (e.g. ``scale``, ``rotation``). - */ -GeoExt.plugins.PrintPageField = Ext.extend(Ext.util.Observable, { - - /** api: config[printPage] - * ``GeoExt.data.PrintPage`` The print page to synchronize with. - */ - - /** private: property[printPage] - * ``GeoExt.data.PrintPage`` The print page to synchronize with. - * Read-only. - */ - printPage: null, - - /** private: property[target] - * ``Ext.form.Field`` This plugin's target field. - */ - target: null, - - /** private: method[constructor] - */ - constructor: function(config) { - this.initialConfig = config; - Ext.apply(this, config); - - GeoExt.plugins.PrintPageField.superclass.constructor.apply(this, arguments); - }, - - /** private: method[init] - * :param target: ``Ext.form.Field`` The component that this plugin - * extends. - * @param {Object} target - */ - init: function(target) { - this.target = target; - var onCfg = { - "beforedestroy": this.onBeforeDestroy, - scope: this - }; - var eventName = target instanceof Ext.form.ComboBox ? - "select" : target instanceof Ext.form.Checkbox ? - "check" : "valid"; - onCfg[eventName] = this.onFieldChange; - target.on(onCfg); - this.printPage.on({ - "change": this.onPageChange, - scope: this - }); - this.printPage.printProvider.on({ - "layoutchange": this.onLayoutChange, - scope: this - }); - this.setValue(this.printPage); - }, - - /** private: method[onFieldChange] - * :param field: ``Ext.form.Field`` - * :param record: ``Ext.data.Record`` Optional. - * - * Handler for the target field's "valid" or "select" event. - */ - onFieldChange: function(field, record) { - var printProvider = this.printPage.printProvider; - var value = field.getValue(); - this._updating = true; - if(field.store === printProvider.scales || field.name === "scale") { - this.printPage.setScale(record); - } else if(field.name == "rotation") { - !isNaN(value) && this.printPage.setRotation(value); - } else { - this.printPage.customParams[field.name] = value; - } - delete this._updating; - }, - - /** private: method[onPageChange] - * :param printPage: :class:`GeoExt.data.PrintPage` - * - * Handler for the "change" event for the page this plugin is configured - * with. - */ - onPageChange: function(printPage) { - if(!this._updating) { - this.setValue(printPage); - } - }, - - /** private: method[onPageChange] - * :param printProvider: :class:`GeoExt.data.PrintProvider` - * :param layout: ``Ext.Record`` - * - * Handler for the "layoutchange" event of the printProvider. - */ - onLayoutChange: function(printProvider, layout) { - var t = this.target; - t.name == "rotation" && t.setDisabled(!layout.get("rotation")); - }, - - /** private: method[setValue] - * :param printPage: :class:`GeoExt.data.PrintPage` - * - * Sets the value in the target field. - */ - setValue: function(printPage) { - var t = this.target; - t.suspendEvents(); - if(t.store === printPage.printProvider.scales || t.name === "scale") { - if(printPage.scale) { - t.setValue(printPage.scale.get(t.displayField)); - } - } else if(t.name == "rotation") { - t.setValue(printPage.rotation); - } - t.resumeEvents(); - }, - - /** private: method[onBeforeDestroy] - */ - onBeforeDestroy: function() { - this.target.un("beforedestroy", this.onBeforeDestroy, this); - this.target.un("select", this.onFieldChange, this); - this.target.un("valid", this.onFieldChange, this); - this.printPage.un("change", this.onPageChange, this); - this.printPage.printProvider.un("layoutchange", this.onLayoutChange, - this); - } - -}); - -/** api: ptype = gx_printpagefield */ -Ext.preg("gx_printpagefield", GeoExt.plugins.PrintPageField); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/PrintProviderField.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/PrintProviderField.js deleted file mode 100644 index 8d3053b107b..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/PrintProviderField.js +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ -Ext.namespace("GeoExt.plugins"); - -/** api: (define) - * module = GeoExt.plugins - * class = PrintProviderField - * base_link = `Ext.util.Observable `_ - */ - -/** api: example - * A form with combo boxes for layout and resolution, and a text field for a - * map title. The latter is a custom parameter to the print module, which is - * a default for all print pages. For setting custom parameters on the page - * level, use :class:`GeoExt.plugins.PrintPageField`): - * - * .. code-block:: javascript - * - * var printProvider = new GeoExt.data.PrintProvider({ - * capabilities: printCapabilities - * }); - * new Ext.form.FormPanel({ - * renderTo: "form", - * width: 200, - * height: 300, - * items: [{ - * xtype: "combo", - * displayField: "name", - * store: printProvider.layouts, // printProvider.layout - * fieldLabel: "Layout", - * typeAhead: true, - * mode: "local", - * forceSelection: true, - * triggerAction: "all", - * selectOnFocus: true, - * plugins: new GeoExt.plugins.PrintProviderField({ - * printProvider: printProvider - * }) - * }, { - * xtype: "combo", - * displayField: "name", - * store: printProvider.dpis, // printProvider.dpi - * fieldLabel: "Resolution", - * typeAhead: true, - * mode: "local", - * forceSelection: true, - * triggerAction: "all", - * selectOnFocus: true, - * plugins: new GeoExt.plugins.PrintProviderField({ - * printProvider: printProvider - * }) - * }, { - * xtype: "textfield", - * name: "mapTitle", // printProvider.customParams.mapTitle - * fieldLabel: "Map Title", - * plugins: new GeoExt.plugins.PrintProviderField({ - * printProvider: printProvider - * }) - * }] - * }): - */ - -/** api: constructor - * .. class:: PrintProviderField - * - * A plugin for ``Ext.form.Field`` components which provides synchronization - * with a :class:`GeoExt.data.PrintProvider`. - */ -GeoExt.plugins.PrintProviderField = Ext.extend(Ext.util.Observable, { - - /** api: config[printProvider] - * ``GeoExt.data.PrintProvider`` The print provider to use with this - * plugin's field. Not required if set on the owner container of the - * field. - */ - - /** private: property[target] - * ``Ext.form.Field`` This plugin's target field. - */ - target: null, - - /** private: method[constructor] - */ - constructor: function(config) { - this.initialConfig = config; - Ext.apply(this, config); - - GeoExt.plugins.PrintProviderField.superclass.constructor.apply(this, arguments); - }, - - /** private: method[init] - * :param target: ``Ext.form.Field`` The component that this plugin - * extends. - */ - init: function(target) { - this.target = target; - var onCfg = { - scope: this, - "render": this.onRender, - "beforedestroy": this.onBeforeDestroy - }; - onCfg[target instanceof Ext.form.ComboBox ? "select" : "valid"] = - this.onFieldChange; - target.on(onCfg); - }, - - /** private: method[onRender] - * :param field: ``Ext.Form.Field`` - * - * Handler for the target field's "render" event. - */ - onRender: function(field) { - var printProvider = this.printProvider || field.ownerCt.printProvider; - if(field.store === printProvider.layouts) { - field.setValue(printProvider.layout.get(field.displayField)); - printProvider.on({ - "layoutchange": this.onProviderChange, - scope: this - }); - } else if(field.store === printProvider.dpis) { - field.setValue(printProvider.dpi.get(field.displayField)); - printProvider.on({ - "dpichange": this.onProviderChange, - scope: this - }); - } else if(field.initialConfig.value === undefined) { - field.setValue(printProvider.customParams[field.name]); - } - }, - - /** private: method[onFieldChange] - * :param field: ``Ext.form.Field`` - * :param record: ``Ext.data.Record`` Optional. - * - * Handler for the target field's "valid" or "select" event. - */ - onFieldChange: function(field, record) { - var printProvider = this.printProvider || field.ownerCt.printProvider; - var value = field.getValue(); - this._updating = true; - if(record) { - switch(field.store) { - case printProvider.layouts: - printProvider.setLayout(record); - break; - case printProvider.dpis: - printProvider.setDpi(record); - } - } else { - printProvider.customParams[field.name] = value; - } - delete this._updating; - }, - - /** private: method[onProviderChange] - * :param printProvider: :class:`GeoExt.data.PrintProvider` - * :param rec: ``Ext.data.Record`` - * - * Handler for the printProvider's dpichange and layoutchange event - */ - onProviderChange: function(printProvider, rec) { - if(!this._updating) { - this.target.setValue(rec.get(this.target.displayField)); - } - }, - - /** private: method[onBeforeDestroy] - */ - onBeforeDestroy: function() { - this.target.un("beforedestroy", this.onBeforeDestroy, this); - this.target.un("render", this.onRender, this); - this.target.un("select", this.onFieldChange, this); - this.target.un("valid", this.onFieldChange, this); - this.printProvider.un("layoutchange", this.onProviderChange, this); - this.printProvider.un("dpichange", this.onProviderChange, - this); - } - -}); - -/** api: ptype = gx_printproviderfield */ -Ext.preg("gx_printproviderfield", GeoExt.plugins.PrintProviderField); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/TreeNodeComponent.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/TreeNodeComponent.js deleted file mode 100644 index 1b7df89d263..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/TreeNodeComponent.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) 2008-2009 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -Ext.namespace("GeoExt.plugins"); - -/** api: (define) - * module = GeoExt.plugins - * class = TreeNodeComponent - */ - -/** api: constructor - * A plugin to create tree node UIs that can have an Ext.Component below the - * node's title. Can be plugged into any ``Ext.tree.TreePanel`` and will be - * applied to nodes that are extended with the - * :class:`GeoExt.Tree.TreeNodeUIEventMixin`. - * - * If a node is configured with a ``component`` attribute, it will be rendered - * with the component in addition to icon and title. - */ - -/** api: example - * Sample code to create a tree with a node that has a component: - * - * .. code-block:: javascript - * - * var uiClass = Ext.extend( - * Ext.tree.TreeNodeUI, - * GeoExt.tree.TreeNodeUIEventMixin - * ); - * var tree = new Ext.tree.TreePanel({ - * plugins: [ - * new GeoExt.plugins.TreeNodeRadioButton({ - * listeners: { - * "radiochange": function(node) { - * alert(node.text + "'s radio button was clicked."); - * } - * } - * }) - * ], - * root: { - * nodeType: "node", - * uiProvider: uiClass, - * text: "My Node", - * component: { - * xtype: "box", - * autoEl: { - * tag: "img", - * src: "/images/my-image.jpg" - * } - * } - * } - * } - * - * Sample code to create a layer node UI with a radio button: - * - * .. code-block:: javascript - * - * var uiClass = Ext.extend( - * GeoExt.tree.LayerNodeUI, - * new GeoExt.tree.TreeNodeUIEventMixin - * ); - */ - -GeoExt.plugins.TreeNodeComponent = Ext.extend(Ext.util.Observable, { - - /** private: method[constructor] - * :param config: ``Object`` - */ - constructor: function(config) { - Ext.apply(this.initialConfig, Ext.apply({}, config)); - Ext.apply(this, config); - - GeoExt.plugins.TreeNodeComponent.superclass.constructor.apply(this, arguments); - }, - - /** private: method[init] - * :param tree: ``Ext.tree.TreePanel`` The tree. - */ - init: function(tree) { - tree.on({ - "rendernode": this.onRenderNode, - scope: this - }); - }, - - /** private: method[onRenderNode] - * :param node: ``Ext.tree.TreeNode`` - */ - onRenderNode: function(node) { - var rendered = node.rendered; - var attr = node.attributes; - var component = attr.component || this.component; - if(!rendered && component) { - var elt = Ext.DomHelper.append(node.ui.elNode, [ - {"tag": "div"} - ]); - if(typeof component == "function") { - component = component(node, elt); - } else if (typeof component == "object" && - typeof component.fn == "function") { - component = component.fn.apply( - component.scope, [node, elt] - ); - } - if(typeof component == "object" && - typeof component.xtype == "string") { - component = Ext.ComponentMgr.create(component); - } - if(component instanceof Ext.Component) { - component.render(elt); - node.component = component; - } - } - }, - - /** private: method[destroy] - */ - destroy: function() { - tree.un("rendernode", this.onRenderNode, this); - } - -}); - -/** api: ptype = gx_TreeNodeComponent */ -Ext.preg && Ext.preg("gx_treenodecomponent", GeoExt.plugins.TreeNodeComponent); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/TreeNodeRadioButton.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/TreeNodeRadioButton.js deleted file mode 100644 index c5fe33c5931..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/plugins/TreeNodeRadioButton.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright (c) 2008-2009 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - - /** - * @include GeoExt/widgets/tree/TreeNodeUIEventMixin.js - */ -Ext.namespace("GeoExt.plugins"); - -/** api: (define) - * module = GeoExt.plugins - * class = TreeNodeRadioButton - */ - -/** api: constructor - * A plugin to create tree node UIs with radio buttons. Can be plugged into - * any ``Ext.tree.TreePanel`` and will be applied to nodes that are extended - * with the :class:`GeoExt.Tree.TreeNodeUIEventMixin`, in particular - * :class:`GeoExt.tree.LayerNodeUI` nodes. - * - * A tree with a ``GeoExt.plugins.TreeNodeRadioButton`` fires the additional - * ``radiochange`` event when a node's radio button is clicked. - * - * Only if a node is configured ``radioGroup`` attribute, it will be rendered - * with a radio button next to its icon. The ``radioGroup`` works like a - * HTML checkbox with its ``name`` attribute, and ``radioGroup`` is a string - * that identifies the options group. - * - */ - -/** api: example - * Sample code to create a tree with a node that has a radio button: - * - * .. code-block:: javascript - * - * var UIClass = Ext.extend( - * Ext.tree.TreeNodeUI, - * GeoExt.tree.TreeNodeUIEventMixin - * ); - * var tree = new Ext.tree.TreePanel({ - * plugins: [ - * new GeoExt.plugins.TreeNodeRadioButton({ - * listeners: { - * "radiochange": function(node) { - * alert(node.text + "'s radio button was clicked."); - * } - * } - * }) - * ], - * root: { - * nodeType: "node", - * uiProvider: UIClass, - * text: "My Node", - * radioGroup: "myGroupId" - * } - * } - */ - -GeoExt.plugins.TreeNodeRadioButton = Ext.extend(Ext.util.Observable, { - - /** private: method[constructor] - * :param config: ``Object`` - */ - constructor: function(config) { - Ext.apply(this.initialConfig, Ext.apply({}, config)); - Ext.apply(this, config); - - this.addEvents( - - /** api: event[radiochange] - * Fires when a radio button is clicked. - * - * Listener arguments: - * - * * node - ``Ext.TreeNode`` The node of the clicked radio button. - */ - "radiochange" - ); - - GeoExt.plugins.TreeNodeRadioButton.superclass.constructor.apply(this, arguments); - }, - - /** private: method[init] - * :param tree: ``Ext.tree.TreePanel`` The tree. - */ - init: function(tree) { - tree.on({ - "rendernode": this.onRenderNode, - "rawclicknode": this.onRawClickNode, - "beforedestroy": this.onBeforeDestroy, - scope: this - }); - }, - - /** private: method[onRenderNode] - * :param node: ``Ext.tree.TreeNode`` - */ - onRenderNode: function(node) { - var a = node.attributes; - if(a.radioGroup && !a.radio) { - a.radio = Ext.DomHelper.insertBefore(node.ui.anchor, - [''].join("")); - } - }, - - /** private: method[onRawClickNode] - * :param node: ``Ext.tree.TreeNode`` - * :param e: ``Ext.EventObject`` - */ - onRawClickNode: function(node, e) { - var el = e.getTarget('.gx-tree-radio', 1); - if(el) { - el.defaultChecked = el.checked; - this.fireEvent("radiochange", node); - return false; - } - }, - - /** private: method[onBeforeDestroy] - */ - onBeforeDestroy: function(tree) { - tree.un("rendernode", this.onRenderNode, this); - tree.un("rawclicknode", this.onRenderNode, this); - tree.un("beforedestroy", this.onBeforeDestroy, this); - } - -}); - -/** api: ptype = gx_treenoderadiobutton */ -Ext.preg("gx_treenoderadiobutton", GeoExt.plugins.TreeNodeRadioButton); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/state/PermalinkProvider.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/state/PermalinkProvider.js deleted file mode 100644 index cb728c904fe..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/state/PermalinkProvider.js +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright (c) 2008-2009 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.state - * class = PermalinkProvider - * base_link = `Ext.state.Provider `_ - */ -Ext.namespace("GeoExt.state"); - -/** api: example - * Sample code displaying a new permalink each time the map is moved. - * - * .. code-block:: javascript - * - * // create permalink provider - * var permalinkProvider = new GeoExt.state.PermalinkProvider(); - * - * // set it in the state manager - * Ext.state.Manager.setProvider(permalinkProvider); - * - * // create a map panel, and make it stateful - * var mapPanel = new GeoExt.MapPanel({ - * renderTo: "map", - * layers: [ - * new OpenLayers.Layer.WMS( - * "Global Imagery", - * "http://maps.opengeo.org/geowebcache/service/wms", - * {layers: "bluemarble"} - * ) - * ], - * stateId: "map", - * prettyStateKeys: true // for pretty permalinks - * }); - * - * // display permalink each time state is changed - * permalinkProvider.on({ - * statechanged: function(provider, name, value) { - * alert(provider.getLink()); - * } - * }); - */ - -/** api: constructor - * .. class:: PermalinkProvider(config) - * - * Create a permalink provider. - * - */ -GeoExt.state.PermalinkProvider = function(config) { - GeoExt.state.PermalinkProvider.superclass.constructor.apply(this, arguments); - - config = config || {}; - - var url = config.url; - delete config.url; - - Ext.apply(this, config); - - this.state = this.readURL(url); -}; - -Ext.extend(GeoExt.state.PermalinkProvider, Ext.state.Provider, { - - /** api: config[encodeType] - * ``Boolean`` Specifies whether type of state values should be encoded - * and decoded. Set it to false if you work with components that don't - * require encoding types, and want pretty permalinks. Defaults to true. - */ - /** private: property[encodeType] - * ``Boolean`` - */ - encodeType: true, - - /** private: method[readURL] - * :param url: ``String`` The URL to get the state from. - * :return: ``Object`` The state object. - * - * Create a state object from a URL. - */ - readURL: function(url) { - var state = {}; - var params = OpenLayers.Util.getParameters(url); - var k, split, stateId; - for(k in params) { - if(params.hasOwnProperty(k)) { - split = k.split("_"); - if(split.length > 1) { - stateId = split[0]; - state[stateId] = state[stateId] || {}; - state[stateId][split.slice(1).join("_")] = this.encodeType ? - this.decodeValue(params[k]) : params[k]; - } - } - } - return state; - }, - - /** api: method[getLink] - * :param base: ``String`` The base URL, optional. - * :return: ``String`` The permalink. - * - * Return the permalink corresponding to the current state. - */ - getLink: function(base) { - base = base || document.location.href; - - var params = {}; - - var id, k, state = this.state; - for(id in state) { - if(state.hasOwnProperty(id)) { - for(k in state[id]) { - params[id + "_" + k] = this.encodeType ? - unescape(this.encodeValue(state[id][k])) : state[id][k]; - } - } - } - - // merge params in the URL into the state params - OpenLayers.Util.applyDefaults( - params, OpenLayers.Util.getParameters(base)); - - var paramsStr = OpenLayers.Util.getParameterString(params); - - var qMark = base.indexOf("?"); - if(qMark > 0) { - base = base.substring(0, qMark); - } - - return Ext.urlAppend(base, paramsStr); - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/Action.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/Action.js deleted file mode 100644 index 6dc36c7d449..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/Action.js +++ /dev/null @@ -1,227 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt - * class = Action - * base_link = `Ext.Action `_ - */ -Ext.namespace("GeoExt"); - -/** api: example - * Sample code to create a toolbar with an OpenLayers control into it. - * - * .. code-block:: javascript - * - * var action = new GeoExt.Action({ - * text: "max extent", - * control: new OpenLayers.Control.ZoomToMaxExtent(), - * map: map - * }); - * var toolbar = new Ext.Toolbar([action]); - */ - -/** api: constructor - * .. class:: Action(config) - * - * Create a GeoExt.Action instance. A GeoExt.Action is created - * to insert an OpenLayers control in a toolbar as a button or - * in a menu as a menu item. A GeoExt.Action instance can be - * used like a regular Ext.Action, look at the Ext.Action API - * doc for more detail. - */ -GeoExt.Action = Ext.extend(Ext.Action, { - - /** api: config[control] - * ``OpenLayers.Control`` The OpenLayers control wrapped in this action. - */ - control: null, - - /** api: config[map] - * ``OpenLayers.Map`` The OpenLayers map that the control should be added - * to. For controls that don't need to be added to a map or have already - * been added to one, this config property may be omitted. - */ - map: null, - - /** private: property[uScope] - * ``Object`` The user-provided scope, used when calling uHandler, - * uToggleHandler, and uCheckHandler. - */ - uScope: null, - - /** private: property[uHandler] - * ``Function`` References the function the user passes through - * the "handler" property. - */ - uHandler: null, - - /** private: property[uToggleHandler] - * ``Function`` References the function the user passes through - * the "toggleHandler" property. - */ - uToggleHandler: null, - - /** private: property[uCheckHandler] - * ``Function`` References the function the user passes through - * the "checkHandler" property. - */ - uCheckHandler: null, - - /** private */ - constructor: function(config) { - - // store the user scope and handlers - this.uScope = config.scope; - this.uHandler = config.handler; - this.uToggleHandler = config.toggleHandler; - this.uCheckHandler = config.checkHandler; - - config.scope = this; - config.handler = this.pHandler; - config.toggleHandler = this.pToggleHandler; - config.checkHandler = this.pCheckHandler; - - // set control in the instance, the Ext.Action - // constructor won't do it for us - var ctrl = this.control = config.control; - delete config.control; - - // register "activate" and "deactivate" listeners - // on the control - if(ctrl) { - // If map is provided in config, add control to map. - if(config.map) { - config.map.addControl(ctrl); - delete config.map; - } - if((config.pressed || config.checked) && ctrl.map) { - ctrl.activate(); - } - ctrl.events.on({ - activate: this.onCtrlActivate, - deactivate: this.onCtrlDeactivate, - scope: this - }); - } - - arguments.callee.superclass.constructor.call(this, config); - }, - - /** private: method[pHandler] - * :param cmp: ``Ext.Component`` The component that triggers the handler. - * - * The private handler. - */ - pHandler: function(cmp) { - var ctrl = this.control; - if(ctrl && - ctrl.type == OpenLayers.Control.TYPE_BUTTON) { - ctrl.trigger(); - } - if(this.uHandler) { - this.uHandler.apply(this.uScope, arguments); - } - }, - - /** private: method[pTogleHandler] - * :param cmp: ``Ext.Component`` The component that triggers the toggle handler. - * :param state: ``Boolean`` The state of the toggle. - * - * The private toggle handler. - */ - pToggleHandler: function(cmp, state) { - this.changeControlState(state); - if(this.uToggleHandler) { - this.uToggleHandler.apply(this.uScope, arguments); - } - }, - - /** private: method[pCheckHandler] - * :param cmp: ``Ext.Component`` The component that triggers the check handler. - * :param state: ``Boolean`` The state of the toggle. - * - * The private check handler. - */ - pCheckHandler: function(cmp, state) { - this.changeControlState(state); - if(this.uCheckHandler) { - this.uCheckHandler.apply(this.uScope, arguments); - } - }, - - /** private: method[changeControlState] - * :param state: ``Boolean`` The state of the toggle. - * - * Change the control state depending on the state boolean. - */ - changeControlState: function(state) { - if(state) { - if(!this._activating) { - this._activating = true; - this.control.activate(); - this._activating = false; - } - } else { - if(!this._deactivating) { - this._deactivating = true; - this.control.deactivate(); - this._deactivating = false; - } - } - }, - - /** private: method[onCtrlActivate] - * - * Called when this action's control is activated. - */ - onCtrlActivate: function() { - var ctrl = this.control; - if(ctrl.type == OpenLayers.Control.TYPE_BUTTON) { - this.enable(); - } else { - // deal with buttons - this.safeCallEach("toggle", [true]); - // deal with check items - this.safeCallEach("setChecked", [true]); - } - }, - - /** private: method[onCtrlDeactivate] - * - * Called when this action's control is deactivated. - */ - onCtrlDeactivate: function() { - var ctrl = this.control; - if(ctrl.type == OpenLayers.Control.TYPE_BUTTON) { - this.disable(); - } else { - // deal with buttons - this.safeCallEach("toggle", [false]); - // deal with check items - this.safeCallEach("setChecked", [false]); - } - }, - - /** private: method[safeCallEach] - * - */ - safeCallEach: function(fnName, args) { - var cs = this.items; - for(var i = 0, len = cs.length; i < len; i++){ - if(cs[i][fnName]) { - cs[i].rendered ? - cs[i][fnName].apply(cs[i], args) : - cs[i].on({ - "render": cs[i][fnName].createDelegate(cs[i], args), - single: true - }); - } - } - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/FeatureRenderer.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/FeatureRenderer.js deleted file mode 100644 index 760b19e5060..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/FeatureRenderer.js +++ /dev/null @@ -1,377 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt - * class = FeatureRenderer - * base_link = `Ext.BoxComponent `_ - */ -Ext.namespace('GeoExt'); - -/** api: constructor - * .. class:: FeatureRenderer(config) - * - * Create a box component for rendering a vector feature. - */ -GeoExt.FeatureRenderer = Ext.extend(Ext.BoxComponent, { - - /** api: config[feature] - * ``OpenLayers.Feature.Vector`` - * Optional vector to be drawn. If not provided, and if ``symbolizers`` - * is configured with an array of plain symbolizer objects, ``symbolType`` - * should be configured. - */ - feature: undefined, - - /** api: config[symbolizers] - * ``Array(Object)`` - * An array of ``OpenLayers.Symbolizer`` instances or plain symbolizer - * objects (in painters order) for rendering a feature. If no - * symbolizers are provided, the OpenLayers default will be used. If a - * symbolizer is an instance of ``OpenLayers.Symbolizer``, its type will - * override the symbolType for rendering. - */ - symbolizers: [OpenLayers.Feature.Vector.style["default"]], - - /** api: config[symbolType] - * ``String`` - * One of ``"Point"``, ``"Line"``, or ``"Polygon"``. Only pertinent if - * OpenLayers.Symbolizer objects are not used. If ``feature`` - * is provided, it will be preferred. The default is "Polygon". - */ - symbolType: "Polygon", - - /** private: property[resolution] - * ``Number`` - * The resolution for the renderer. - */ - resolution: 1, - - /** private: property[minWidth] - * ``Number`` - */ - minWidth: 20, - - /** private: property[minHeight] - * ``Number`` - */ - minHeight: 20, - - /** private: property[renderers] - * ``Array(String)`` - * List of supported Renderer classes. Add to this list to add support for - * additional renderers. The first renderer in the list that returns - * ``true`` for the ``supported`` method will be used, if not defined in - * the ``renderer`` config property. - */ - renderers: ["SVG", "VML", "Canvas"], - - /** private: property[rendererOptions] - * ``Object`` - * Options for the renderer. See ``OpenLayers.Renderer`` for supported - * options. - */ - rendererOptions: null, - - /** private: property[pointFeature] - * ``OpenLayers.Feature.Vector`` - * Feature with point geometry. - */ - pointFeature: undefined, - - /** private: property[lineFeature] - * ``OpenLayers.Feature.Vector`` - * Feature with LineString geometry. Default zig-zag is provided. - */ - lineFeature: undefined, - - /** private: property[polygonFeature] - * ``OpenLayers.Feature.Vector`` - * Feature with Polygon geometry. Default is a soft cornered rectangle. - */ - polygonFeature: undefined, - - /** private: property[renderer] - * ``OpenLayers.Renderer`` - */ - renderer: null, - - /** private: method[initComponent] - */ - initComponent: function() { - GeoExt.FeatureRenderer.superclass.initComponent.apply(this, arguments); - Ext.applyIf(this, { - pointFeature: new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.Point(0, 0) - ), - lineFeature: new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.LineString([ - new OpenLayers.Geometry.Point(-8, -3), - new OpenLayers.Geometry.Point(-3, 3), - new OpenLayers.Geometry.Point(3, -3), - new OpenLayers.Geometry.Point(8, 3) - ]) - ), - polygonFeature: new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.Polygon([ - new OpenLayers.Geometry.LinearRing([ - new OpenLayers.Geometry.Point(-8, -4), - new OpenLayers.Geometry.Point(-6, -6), - new OpenLayers.Geometry.Point(6, -6), - new OpenLayers.Geometry.Point(8, -4), - new OpenLayers.Geometry.Point(8, 4), - new OpenLayers.Geometry.Point(6, 6), - new OpenLayers.Geometry.Point(-6, 6), - new OpenLayers.Geometry.Point(-8, 4) - ]) - ]) - ) - }); - if(!this.feature) { - this.setFeature(null, {draw: false}); - } - this.addEvents( - /** api: event[click] - * Fires when the feature is clicked on. - * - * Listener arguments: - * - * * renderer - :class:`GeoExt.FeatureRenderer` This feature renderer. - */ - "click" - ); - }, - - /** private: method[initCustomEvents] - */ - initCustomEvents: function() { - this.clearCustomEvents(); - this.el.on("click", this.onClick, this); - }, - - /** private: method[clearCustomEvents] - */ - clearCustomEvents: function() { - if (this.el && this.el.removeAllListeners) { - this.el.removeAllListeners(); - } - }, - - /** private: method[onClick] - */ - onClick: function() { - this.fireEvent("click", this); - }, - - /** private: method[onRender] - */ - onRender: function(ct, position) { - if(!this.el) { - this.el = document.createElement("div"); - this.el.id = this.getId(); - } - if(!this.renderer || !this.renderer.supported()) { - this.assignRenderer(); - } - // monkey-patch renderer so we always get a resolution - this.renderer.map = { - getResolution: (function() { - return this.resolution; - }).createDelegate(this) - }; - - GeoExt.FeatureRenderer.superclass.onRender.apply(this, arguments); - - this.drawFeature(); - }, - - /** private: method[afterRender] - */ - afterRender: function() { - GeoExt.FeatureRenderer.superclass.afterRender.apply(this, arguments); - this.initCustomEvents(); - }, - - /** private: method[onResize] - */ - onResize: function(w, h) { - this.setRendererDimensions(); - GeoExt.FeatureRenderer.superclass.onResize.apply(this, arguments); - }, - - /** private: method[setRendererDimensions] - */ - setRendererDimensions: function() { - var gb = this.feature.geometry.getBounds(); - var gw = gb.getWidth(); - var gh = gb.getHeight(); - /** - * Determine resolution based on the following rules: - * 1) always use value specified in config - * 2) if not specified, use max res based on width or height of element - * 3) if no width or height, assume a resolution of 1 - */ - var resolution = this.initialConfig.resolution; - if(!resolution) { - resolution = Math.max(gw / this.width || 0, gh / this.height || 0) || 1; - } - this.resolution = resolution; - // determine height and width of element - var width = Math.max(this.width || this.minWidth, gw / resolution); - var height = Math.max(this.height || this.minHeight, gh / resolution); - // determine bounds of renderer - var center = gb.getCenterPixel(); - var bhalfw = width * resolution / 2; - var bhalfh = height * resolution / 2; - var bounds = new OpenLayers.Bounds( - center.x - bhalfw, center.y - bhalfh, - center.x + bhalfw, center.y + bhalfh - ); - this.renderer.setSize(new OpenLayers.Size(Math.round(width), Math.round(height))); - this.renderer.setExtent(bounds, true); - }, - - /** private: method[assignRenderer] - * Iterate through the available renderer implementations and selects - * and assign the first one whose ``supported`` method returns ``true``. - */ - assignRenderer: function() { - for(var i=0, len=this.renderers.length; i`_ - */ - -Ext.namespace('GeoExt'); - -/** api: constructor - * .. class:: LayerLegend(config) - * - * Base class for components of :class:`GeoExt.LegendPanel`. - */ -GeoExt.LayerLegend = Ext.extend(Ext.Container, { - - /** api: config[layerRecord] - * :class:`GeoExt.data.LayerRecord` The layer record for the legend - */ - layerRecord: null, - - /** api: config[showTitle] - * ``Boolean`` - * Whether or not to show the title of a layer. This can be overridden - * on the LayerStore record using the hideTitle property. - */ - showTitle: true, - - /** api: config[legendTitle] - * ``String`` - * Optional title to be displayed instead of the layer title. If this is - * set, the value of ``showTitle`` will be ignored (assumed to be true). - */ - legendTitle: null, - - /** api: config[labelCls] - * ``String`` - * Optional css class to use for the layer title labels. - */ - labelCls: null, - - /** private: property[layerStore] - * :class:`GeoExt.data.LayerStore` - */ - layerStore: null, - - /** private: method[initComponent] - */ - initComponent: function() { - GeoExt.LayerLegend.superclass.initComponent.call(this); - this.autoEl = {}; - this.add({ - xtype: "label", - text: this.getLayerTitle(this.layerRecord), - cls: 'x-form-item x-form-item-label' + - (this.labelCls ? ' ' + this.labelCls : '') - }); - if (this.layerRecord && this.layerRecord.store) { - this.layerStore = this.layerRecord.store; - this.layerStore.on("update", this.onStoreUpdate, this); - } - }, - - /** private: method[onStoreUpdate] - * Update a the legend. Gets called when the store fires the update event. - * This usually means the visibility of the layer, its style or title - * has changed. - * - * :param store: ``Ext.data.Store`` The store in which the record was - * changed. - * :param record: ``Ext.data.Record`` The record object corresponding - * to the updated layer. - * :param operation: ``String`` The type of operation. - */ - onStoreUpdate: function(store, record, operation) { - // if we don't have items, we are already awaiting garbage - // collection after being removed by LegendPanel::removeLegend, and - // updating will cause errors - if (record === this.layerRecord && this.items.getCount() > 0) { - var layer = record.getLayer(); - this.setVisible(layer.getVisibility() && - layer.calculateInRange() && layer.displayInLayerSwitcher && - !record.get('hideInLegend')); - this.update(); - } - }, - - /** private: method[update] - * Updates the legend. - */ - update: function() { - var title = this.getLayerTitle(this.layerRecord); - if (this.items.get(0).text !== title) { - // we need to update the title - this.items.get(0).setText(title); - } - }, - - /** private: method[getLayerTitle] - * :arg record: :class:GeoExt.data.LayerRecord - * :returns: ``String`` - * - * Get a title for the layer. If the record doesn't have a title, use the - * name. - */ - getLayerTitle: function(record) { - var title = this.legendTitle || ""; - if (this.showTitle && !title) { - if (record && !record.get("hideTitle")) { - title = record.get("title") || - record.get("name") || - record.getLayer().name || ""; - } - } - return title; - }, - - /** private: method[beforeDestroy] - */ - beforeDestroy: function() { - this.layerStore && - this.layerStore.un("update", this.onStoreUpdate, this); - GeoExt.LayerLegend.superclass.beforeDestroy.apply(this, arguments); - } - -}); - -/** class: method[getTypes] - * :param layerRecord: class:`GeoExt.data.LayerRecord` A layer record to get - * legend types for. If not provided, all registered types will be - * returned. - * :param preferredTypes: ``Array(String)`` Types that should be considered. - * first. If not provided, all legend types will be returned in the order - * they were registered. - * :return: ``Array(String)`` xtypes of legend types that can be used with - * the provided ``layerRecord``. - * - * Gets an array of legend xtypes that support the provided layer record, - * with optionally provided preferred types listed first. - */ -GeoExt.LayerLegend.getTypes = function(layerRecord, preferredTypes) { - var types = (preferredTypes || []).concat(); - var goodTypes = []; - for(var type in GeoExt.LayerLegend.types) { - if(GeoExt.LayerLegend.types[type].supports(layerRecord)) { - // add to goodTypes if not preferred - types.indexOf(type) == -1 && goodTypes.push(type); - } else { - // preferred, but not supported - types.remove(type); - } - } - // take the remaining preferred types, and add other good types - return types.concat(goodTypes); -}; - -/** private: method[supports] - * :param layerRecord: :class:`GeoExt.data.LayerRecord` The layer record - * to check support for. - * :return: ``Boolean`` true if this legend type supports the layer - * record. - * - * Checks whether this legend type supports the provided layerRecord. - */ -GeoExt.LayerLegend.supports = function(layerRecord) { - // to be implemented by subclasses -}; - -/** class: constant[GeoExt.LayerLegend.types] - * An object containing a name-class mapping of LayerLegend subclasses. - * To register as LayerLegend, a subclass should add itself to this object: - * - * .. code-block:: javascript - * - * GeoExt.GetLegendGraphicLegend = Ext.extend(GeoExt.LayerLegend, { - * }); - * - * GeoExt.LayerLegend.types["getlegendgraphic"] = - * GeoExt.GetLegendGraphicLegend; - */ -GeoExt.LayerLegend.types = {}; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LayerOpacitySlider.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LayerOpacitySlider.js deleted file mode 100644 index 1dcddb97678..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LayerOpacitySlider.js +++ /dev/null @@ -1,381 +0,0 @@ -/* Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * Published under the BSD license. - * See http://geoext.org/svn/geoext/core/trunk/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/widgets/tips/LayerOpacitySliderTip.js - * @include GeoExt/data/LayerRecord.js - */ - -/** api: (define) - * module = GeoExt - * class = LayerOpacitySlider - * base_link = `Ext.Slider `_ - */ -Ext.namespace("GeoExt"); - -/** api: example - * Sample code to render a slider outside the map viewport: - * - * .. code-block:: javascript - * - * var slider = new GeoExt.LayerOpacitySlider({ - * renderTo: document.body, - * width: 200, - * layer: layer - * }); - * - * Sample code to add a slider to a map panel: - * - * .. code-block:: javascript - * - * var layer = new OpenLayers.Layer.WMS( - * "Global Imagery", - * "http://maps.opengeo.org/geowebcache/service/wms", - * {layers: "bluemarble"} - * ); - * var panel = new GeoExt.MapPanel({ - * renderTo: document.body, - * height: 300, - * width: 400, - * map: { - * controls: [new OpenLayers.Control.Navigation()] - * }, - * layers: [layer], - * extent: [-5, 35, 15, 55], - * items: [{ - * xtype: "gx_opacityslider", - * layer: layer, - * aggressive: true, - * vertical: true, - * height: 100, - * x: 10, - * y: 20 - * }] - * }); - */ - -/** api: constructor - * .. class:: LayerOpacitySlider(config) - * - * Create a slider for controlling a layer's opacity. - */ -GeoExt.LayerOpacitySlider = Ext.extend(Ext.Slider, { - - /** api: config[layer] - * ``OpenLayers.Layer`` or :class:`GeoExt.data.LayerRecord` - * The layer this slider changes the opacity of. (required) - */ - /** private: property[layer] - * ``OpenLayers.Layer`` - */ - layer: null, - - /** api: config[complementaryLayer] - * ``OpenLayers.Layer`` or :class:`GeoExt.data.LayerRecord` - * If provided, a layer that will be made invisible (its visibility is - * set to false) when the slider value is set to its max value. If this - * slider is used to fade visibility between to layers, setting - * ``complementaryLayer`` and ``changeVisibility`` will make sure that - * only visible tiles are loaded when the slider is set to its min or max - * value. (optional) - */ - complementaryLayer: null, - - /** api: config[delay] - * ``Number`` Time in milliseconds before setting the opacity value to the - * layer. If the value change again within that time, the original value - * is not set. Only applicable if aggressive is true. - */ - delay: 5, - - /** api: config[changeVisibilityDelay] - * ``Number`` Time in milliseconds before changing the layer's visibility. - * If the value changes again within that time, the layer's visibility - * change does not occur. Only applicable if changeVisibility is true. - * Defaults to 5. - */ - changeVisibilityDelay: 5, - - /** api: config[aggressive] - * ``Boolean`` - * If set to true, the opacity is changed as soon as the thumb is moved. - * Otherwise when the thumb is released (default). - */ - aggressive: false, - - /** api: config[changeVisibility] - * ``Boolean`` - * If set to true, the layer's visibility is handled by the - * slider, the slider makes the layer invisible when its - * value is changed to the min value, and makes the layer - * visible again when its value goes from the min value - * to some other value. The layer passed to the constructor - * must be visible, as its visibility is fully handled by - * the slider. Defaults to false. - */ - changeVisibility: false, - - /** api: config[value] - * ``Number`` - * The value to initialize the slider with. This value is - * taken into account only if the layer's opacity is null. - * If the layer's opacity is null and this value is not - * defined in the config object then the slider initializes - * it to the max value. - */ - value: null, - - /** api: config[inverse] - * ``Boolean`` - * If true, we will work with transparency instead of with opacity. - * Defaults to false. - */ - /** private: property[inverse] - * ``Boolean`` - */ - inverse: false, - - /** private: method[constructor] - * Construct the component. - */ - constructor: function(config) { - if (config.layer) { - this.layer = this.getLayer(config.layer); - this.bind(); - this.complementaryLayer = this.getLayer(config.complementaryLayer); - // before we call getOpacityValue inverse should be set - if (config.inverse !== undefined) { - this.inverse = config.inverse; - } - config.value = (config.value !== undefined) ? - config.value : this.getOpacityValue(this.layer); - delete config.layer; - delete config.complementaryLayer; - } - GeoExt.LayerOpacitySlider.superclass.constructor.call(this, config); - }, - - /** private: method[bind] - */ - bind: function() { - if (this.layer && this.layer.map) { - this.layer.map.events.on({ - changelayer: this.update, - scope: this - }); - } - }, - - /** private: method[unbind] - */ - unbind: function() { - if (this.layer && this.layer.map) { - this.layer.map.events.un({ - changelayer: this.update, - scope: this - }); - } - }, - - /** private: method[update] - * Registered as a listener for opacity change. Updates the value of the slider. - */ - update: function(evt) { - if (evt.property === "opacity" && evt.layer == this.layer) { - this.setValue(this.getOpacityValue(this.layer)); - } - }, - - /** api: method[setLayer] - * :param layer: ``OpenLayers.Layer`` or :class:`GeoExt.data.LayerRecord` - * - * Bind a new layer to the opacity slider. - */ - setLayer: function(layer) { - this.unbind(); - this.layer = this.getLayer(layer); - this.setValue(this.getOpacityValue(layer)); - this.bind(); - }, - - /** private: method[getOpacityValue] - * :param layer: ``OpenLayers.Layer`` or :class:`GeoExt.data.LayerRecord` - * :return: ``Integer`` The opacity for the layer. - * - * Returns the opacity value for the layer. - */ - getOpacityValue: function(layer) { - var value; - if (layer && layer.opacity !== null) { - value = parseInt(layer.opacity * (this.maxValue - this.minValue)); - } else { - value = this.maxValue; - } - if (this.inverse === true) { - value = (this.maxValue - this.minValue) - value; - } - return value; - }, - - /** private: method[getLayer] - * :param layer: ``OpenLayers.Layer`` or :class:`GeoExt.data.LayerRecord` - * :return: ``OpenLayers.Layer`` The OpenLayers layer object - * - * Returns the OpenLayers layer object for a layer record or a plain layer - * object. - */ - getLayer: function(layer) { - if (layer instanceof OpenLayers.Layer) { - return layer; - } else if (layer instanceof GeoExt.data.LayerRecord) { - return layer.getLayer(); - } - }, - - /** private: method[initComponent] - * Initialize the component. - */ - initComponent: function() { - - GeoExt.LayerOpacitySlider.superclass.initComponent.call(this); - - if (this.changeVisibility && this.layer && - (this.layer.opacity == 0 || - (this.inverse === false && this.value == this.minValue) || - (this.inverse === true && this.value == this.maxValue))) { - this.layer.setVisibility(false); - } - - if (this.complementaryLayer && - ((this.layer && this.layer.opacity == 1) || - (this.inverse === false && this.value == this.maxValue) || - (this.inverse === true && this.value == this.minValue))) { - this.complementaryLayer.setVisibility(false); - } - - if (this.aggressive === true) { - this.on('change', this.changeLayerOpacity, this, { - buffer: this.delay - }); - } else { - this.on('changecomplete', this.changeLayerOpacity, this); - } - - if (this.changeVisibility === true) { - this.on('change', this.changeLayerVisibility, this, { - buffer: this.changeVisibilityDelay - }); - } - - if (this.complementaryLayer) { - this.on('change', this.changeComplementaryLayerVisibility, this, { - buffer: this.changeVisibilityDelay - }); - } - this.on("beforedestroy", this.unbind, this); - }, - - /** private: method[changeLayerOpacity] - * :param slider: :class:`GeoExt.LayerOpacitySlider` - * :param value: ``Number`` The slider value - * - * Updates the ``OpenLayers.Layer`` opacity value. - */ - changeLayerOpacity: function(slider, value) { - if (this.layer) { - value = value / (this.maxValue - this.minValue); - if (this.inverse === true) { - value = 1 - value; - } - this.layer.setOpacity(value); - } - }, - - /** private: method[changeLayerVisibility] - * :param slider: :class:`GeoExt.LayerOpacitySlider` - * :param value: ``Number`` The slider value - * - * Updates the ``OpenLayers.Layer`` visibility. - */ - changeLayerVisibility: function(slider, value) { - var currentVisibility = this.layer.getVisibility(); - if ((this.inverse === false && value == this.minValue) || - (this.inverse === true && value == this.maxValue) && - currentVisibility === true) { - this.layer.setVisibility(false); - } else if ((this.inverse === false && value > this.minValue) || - (this.inverse === true && value < this.maxValue) && - currentVisibility == false) { - this.layer.setVisibility(true); - } - }, - - /** private: method[changeComplementaryLayerVisibility] - * :param slider: :class:`GeoExt.LayerOpacitySlider` - * :param value: ``Number`` The slider value - * - * Updates the complementary ``OpenLayers.Layer`` visibility. - */ - changeComplementaryLayerVisibility: function(slider, value) { - var currentVisibility = this.complementaryLayer.getVisibility(); - if ((this.inverse === false && value == this.maxValue) || - (this.inverse === true && value == this.minValue) && - currentVisibility === true) { - this.complementaryLayer.setVisibility(false); - } else if ((this.inverse === false && value < this.maxValue) || - (this.inverse === true && value > this.minValue) && - currentVisibility == false) { - this.complementaryLayer.setVisibility(true); - } - }, - - /** private: method[addToMapPanel] - * :param panel: :class:`GeoExt.MapPanel` - * - * Called by a MapPanel if this component is one of the items in the panel. - */ - addToMapPanel: function(panel) { - this.on({ - render: function() { - var el = this.getEl(); - el.setStyle({ - position: "absolute", - zIndex: panel.map.Z_INDEX_BASE.Control - }); - el.on({ - mousedown: this.stopMouseEvents, - click: this.stopMouseEvents - }); - }, - scope: this - }); - }, - - /** private: method[removeFromMapPanel] - * :param panel: :class:`GeoExt.MapPanel` - * - * Called by a MapPanel if this component is one of the items in the panel. - */ - removeFromMapPanel: function(panel) { - var el = this.getEl(); - el.un({ - mousedown: this.stopMouseEvents, - click: this.stopMouseEvents, - scope: this - }); - this.unbind(); - }, - - /** private: method[stopMouseEvents] - * :param e: ``Object`` - */ - stopMouseEvents: function(e) { - e.stopEvent(); - } -}); - -/** api: xtype = gx_opacityslider */ -Ext.reg('gx_opacityslider', GeoExt.LayerOpacitySlider); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LegendImage.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LegendImage.js deleted file mode 100644 index 25914621ae6..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LegendImage.js +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt - * class = LegendImage - * base_link = `Ext.BoxComponent `_ - */ - -Ext.namespace('GeoExt'); - -/** api: constructor - * .. class:: LegendImage(config) - * - * Show a legend image in a BoxComponent and make sure load errors are - * dealt with. - */ -GeoExt.LegendImage = Ext.extend(Ext.BoxComponent, { - - /** api: config[url] - * ``String`` The url of the image to load - */ - url: null, - - /** api: config[defaultImgSrc] - * ``String`` Path to image that will be used if the legend image fails - * to load. Default is Ext.BLANK_IMAGE_URL. - */ - defaultImgSrc: null, - - /** api: config[imgCls] - * ``String`` Optional css class to apply to img tag - */ - imgCls: null, - - /** private: method[initComponent] - * Initializes the legend image component. - */ - initComponent: function() { - GeoExt.LegendImage.superclass.initComponent.call(this); - if(this.defaultImgSrc === null) { - this.defaultImgSrc = Ext.BLANK_IMAGE_URL; - } - this.autoEl = { - tag: "img", - "class": (this.imgCls ? this.imgCls : ""), - src: this.defaultImgSrc - }; - }, - - /** api: method[setUrl] - * :param url: ``String`` The new URL. - * - * Sets the url of the legend image. - */ - setUrl: function(url) { - this.url = url; - var el = this.getEl(); - if (el) { - el.un("error", this.onImageLoadError, this); - el.on("error", this.onImageLoadError, this, {single: true}); - el.dom.src = url; - } - }, - - /** private: method[onRender] - * Private method called when the legend image component is being - * rendered. - */ - onRender: function(ct, position) { - GeoExt.LegendImage.superclass.onRender.call(this, ct, position); - if(this.url) { - this.setUrl(this.url); - } - }, - - /** private: method[onDestroy] - * Private method called during the destroy sequence. - */ - onDestroy: function() { - var el = this.getEl(); - if(el) { - el.un("error", this.onImageLoadError, this); - } - GeoExt.LegendImage.superclass.onDestroy.apply(this, arguments); - }, - - /** private: method[onImageLoadError] - * Private method called if the legend image fails loading. - */ - onImageLoadError: function() { - this.getEl().dom.src = this.defaultImgSrc; - } - -}); - -/** api: xtype = gx_legendimage */ -Ext.reg('gx_legendimage', GeoExt.LegendImage); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LegendPanel.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LegendPanel.js deleted file mode 100644 index 7dbbf3088da..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/LegendPanel.js +++ /dev/null @@ -1,234 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt - * class = LegendPanel - * base_link = `Ext.Panel `_ - */ - -Ext.namespace('GeoExt'); - -/** api: constructor - * .. class:: LegendPanel(config) - * - * A panel showing legends of all layers in a layer store. - * Depending on the layer type, a legend renderer will be chosen. - */ -GeoExt.LegendPanel = Ext.extend(Ext.Panel, { - - /** api: config[dynamic] - * ``Boolean`` - * If false the LegendPanel will not listen to the add, remove and change - * events of the LayerStore. So it will load with the initial state of - * the LayerStore and not change anymore. - */ - dynamic: true, - - /** api: config[layerStore] - * ``GeoExt.data.LayerStore`` - * The layer store containing layers to be displayed in the legend - * container. If not provided it will be taken from the MapPanel. - */ - layerStore: null, - - /** api: config[preferredTypes] - * ``Array(String)`` An array of preferred legend types. - */ - - /** private: property[preferredTypes] - */ - preferredTypes: null, - - /** api: config[filter] - * ``Function`` - * A function, called in the scope of the legend panel, with a layer record - * as argument. Is expected to return true for layers to be displayed, false - * otherwise. By default, all layers will be displayed. - * - * .. code-block:: javascript - * - * filter: function(record) { - * return record.getLayer().isBaseLayer; - * } - */ - filter: function(record) { - return true; - }, - - /** private: method[initComponent] - * Initializes the legend panel. - */ - initComponent: function() { - GeoExt.LegendPanel.superclass.initComponent.call(this); - }, - - /** private: method[onRender] - * Private method called when the legend panel is being rendered. - */ - onRender: function() { - GeoExt.LegendPanel.superclass.onRender.apply(this, arguments); - if(!this.layerStore) { - this.layerStore = GeoExt.MapPanel.guess().layers; - } - this.layerStore.each(function(record) { - this.addLegend(record); - }, this); - if (this.dynamic) { - this.layerStore.on({ - "add": this.onStoreAdd, - "remove": this.onStoreRemove, - "clear": this.onStoreClear, - scope: this - }); - } - }, - - /** private: method[recordIndexToPanelIndex] - * Private method to get the panel index for a layer represented by a - * record. - * - * :param index ``Integer`` The index of the record in the store. - * - * :return: ``Integer`` The index of the sub panel in this panel. - */ - recordIndexToPanelIndex: function(index) { - var store = this.layerStore; - var count = store.getCount(); - var panelIndex = -1; - var legendCount = this.items ? this.items.length : 0; - var record, layer; - for(var i=count-1; i>=0; --i) { - record = store.getAt(i); - layer = record.getLayer(); - var types = GeoExt.LayerLegend.getTypes(record); - if(layer.displayInLayerSwitcher && types.length > 0 && - (store.getAt(i).get("hideInLegend") !== true)) { - ++panelIndex; - if(index === i || panelIndex > legendCount-1) { - break; - } - } - } - return panelIndex; - }, - - /** private: method[getIdForLayer] - * :arg layer: ``OpenLayers.Layer`` - * :returns: ``String`` - * - * Generate an element id that is unique to this panel/layer combo. - */ - getIdForLayer: function(layer) { - return this.id + "-" + layer.id; - }, - - /** private: method[onStoreAdd] - * Private method called when a layer is added to the store. - * - * :param store: ``Ext.data.Store`` The store to which the record(s) was - * added. - * :param record: ``Ext.data.Record`` The record object(s) corresponding - * to the added layers. - * :param index: ``Integer`` The index of the inserted record. - */ - onStoreAdd: function(store, records, index) { - var panelIndex = this.recordIndexToPanelIndex(index+records.length-1); - for (var i=0, len=records.length; i 0) { - this.insert(index, { - xtype: types[0], - id: this.getIdForLayer(layer), - layerRecord: record, - hidden: !((!layer.map && layer.visibility) || - (layer.getVisibility() && layer.calculateInRange())) - }); - } - } - }, - - /** private: method[onDestroy] - * Private method called during the destroy sequence. - */ - onDestroy: function() { - if(this.layerStore) { - this.layerStore.un("add", this.onStoreAdd, this); - this.layerStore.un("remove", this.onStoreRemove, this); - this.layerStore.un("clear", this.onStoreClear, this); - } - GeoExt.LegendPanel.superclass.onDestroy.apply(this, arguments); - } -}); - -/** api: xtype = gx_legendpanel */ -Ext.reg('gx_legendpanel', GeoExt.LegendPanel); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/MapPanel.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/MapPanel.js deleted file mode 100644 index c18b4cdfc5c..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/MapPanel.js +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/data/LayerStore.js - */ - -/** api: (define) - * module = GeoExt - * class = MapPanel - * base_link = `Ext.Panel `_ - */ -Ext.namespace("GeoExt"); - -/** api: example - * Sample code to create a panel with a new map: - * - * .. code-block:: javascript - * - * var mapPanel = new GeoExt.MapPanel({ - * border: false, - * renderTo: "div-id", - * map: { - * maxExtent: new OpenLayers.Bounds(-90, -45, 90, 45) - * } - * }); - * - * Sample code to create a map panel with a bottom toolbar in a Window: - * - * .. code-block:: javascript - * - * var win = new Ext.Window({ - * title: "My Map", - * items: [{ - * xtype: "gx_mappanel", - * bbar: new Ext.Toolbar() - * }] - * }); - */ - -/** api: constructor - * .. class:: MapPanel(config) - * - * Create a panel container for a map. - */ -GeoExt.MapPanel = Ext.extend(Ext.Panel, { - - /** api: config[map] - * ``OpenLayers.Map or Object`` A configured map or a configuration object - * for the map constructor. A configured map will be available after - * construction through the :attr:`map` property. - */ - - /** api: property[map] - * ``OpenLayers.Map`` or ``Object`` A map or map configuration. - */ - map: null, - - /** api: config[layers] - * ``GeoExt.data.LayerStore or GeoExt.data.GroupingStore or Array(OpenLayers.Layer)`` - * A store holding records. The layers provided here will be added to this - * MapPanel's map when it is rendered. - */ - - /** api: property[layers] - * :class:`GeoExt.data.LayerStore` A store containing - * :class:`GeoExt.data.LayerRecord` objects. - */ - layers: null, - - - /** api: config[center] - * ``OpenLayers.LonLat or Array(Number)`` A location for the map center. If - * an array is provided, the first two items should represent x & y coordinates. - */ - center: null, - - /** api: config[zoom] - * ``Number`` An initial zoom level for the map. - */ - zoom: null, - - /** api: config[prettyStateKeys] - * ``Boolean`` Set this to true if you want pretty strings in the MapPanel's - * state keys. More specifically, layer.name instead of layer.id will be used - * in the state keys if this option is set to true. But in that case you have - * to make sure you don't have two layers with the same name. Defaults to - * false. - */ - prettyStateKeys: false, - - /** api: config[extent] - * ``OpenLayers.Bounds or Array(Number)`` An initial extent for the map (used - * if center and zoom are not provided. If an array, the first four items - * should be minx, miny, maxx, maxy. - */ - extent: null, - - /** private: property[stateEvents] - * ``Array(String)`` Array of state events - */ - stateEvents: ["aftermapmove", - "afterlayervisibilitychange", - "afterlayeropacitychange"], - - /** private: method[initComponent] - * Initializes the map panel. Creates an OpenLayers map if - * none was provided in the config options passed to the - * constructor. - */ - initComponent: function(){ - if(!(this.map instanceof OpenLayers.Map)) { - this.map = new OpenLayers.Map( - Ext.applyIf(this.map || {}, {allOverlays: true}) - ); - } - var layers = this.layers; - if(!layers || layers instanceof Array) { - this.layers = new GeoExt.data.LayerStore({ - layers: layers, - map: this.map.layers.length > 0 ? this.map : null - }); - } - - if(typeof this.center == "string") { - this.center = OpenLayers.LonLat.fromString(this.center); - } else if(this.center instanceof Array) { - this.center = new OpenLayers.LonLat(this.center[0], this.center[1]); - } - if(typeof this.extent == "string") { - this.extent = OpenLayers.Bounds.fromString(this.extent); - } else if(this.extent instanceof Array) { - this.extent = OpenLayers.Bounds.fromArray(this.extent); - } - - GeoExt.MapPanel.superclass.initComponent.call(this); - - this.addEvents( - /** private: event[aftermapmove] - * Fires after the map is moved. - */ - "aftermapmove", - - /** private: event[afterlayervisibilitychange] - * Fires after a layer changed visibility. - */ - "afterlayervisibilitychange", - - /** private: event[afterlayeropacitychange] - * Fires after a layer changed opacity. - */ - "afterlayeropacitychange" - ); - this.map.events.on({ - "moveend": this.onMoveend, - "changelayer": this.onLayerchange, - scope: this - }); - }, - - /** private: method[onMoveend] - * - * The "moveend" listener. - */ - onMoveend: function() { - this.fireEvent("aftermapmove"); - }, - - /** private: method[onLayerchange] - * :param e: ``Object`` - * - * The "changelayer" listener. - */ - onLayerchange: function(e) { - if(e.property) { - if(e.property === "visibility") { - this.fireEvent("afterlayervisibilitychange"); - } else if(e.property === "opacity") { - this.fireEvent("afterlayeropacitychange"); - } - } - }, - - /** private: method[applyState] - * :param state: ``Object`` The state to apply. - * - * Apply the state provided as an argument. - */ - applyState: function(state) { - - // if we get strings for state.x, state.y or state.zoom - // OpenLayers will take care of converting them to the - // appropriate types so we don't bother with that - this.center = new OpenLayers.LonLat(state.x, state.y); - this.zoom = state.zoom; - - // set layer visibility and opacity - var i, l, layer, layerId, visibility, opacity; - var layers = this.map.layers; - for(i=0, l=layers.length; i 0) { - if(this.center || this.zoom != null) { - // both do not have to be defined - map.setCenter(this.center, this.zoom); - } else if(this.extent) { - map.zoomToExtent(this.extent); - } else { - map.zoomToMaxExtent(); - } - } - }, - - /** private: method[afterRender] - * Private method called after the panel has been rendered. - */ - afterRender: function() { - GeoExt.MapPanel.superclass.afterRender.apply(this, arguments); - if(!this.ownerCt) { - this.renderMap(); - } else { - this.ownerCt.on("move", this.updateMapSize, this); - this.ownerCt.on({ - "afterlayout": { - fn: this.renderMap, - scope: this, - single: true - } - }); - } - }, - - /** private: method[onResize] - * Private method called after the panel has been resized. - */ - onResize: function() { - GeoExt.MapPanel.superclass.onResize.apply(this, arguments); - this.updateMapSize(); - }, - - /** private: method[onBeforeAdd] - * Private method called before a component is added to the panel. - */ - onBeforeAdd: function(item) { - if(typeof item.addToMapPanel === "function") { - item.addToMapPanel(this); - } - GeoExt.MapPanel.superclass.onBeforeAdd.apply(this, arguments); - }, - - /** private: method[remove] - * Private method called when a component is removed from the panel. - */ - remove: function(item, autoDestroy) { - if(typeof item.removeFromMapPanel === "function") { - item.removeFromMapPanel(this); - } - GeoExt.MapPanel.superclass.remove.apply(this, arguments); - }, - - /** private: method[beforeDestroy] - * Private method called during the destroy sequence. - */ - beforeDestroy: function() { - if(this.ownerCt) { - this.ownerCt.un("move", this.updateMapSize, this); - } - if(this.map && this.map.events) { - this.map.events.un({ - "moveend": this.onMoveend, - "changelayer": this.onLayerchange, - scope: this - }); - } - // if the map panel was passed a map instance, this map instance - // is under the user's responsibility - if(!this.initialConfig.map || - !(this.initialConfig.map instanceof OpenLayers.Map)) { - // we created the map, we destroy it - if(this.map && this.map.destroy) { - this.map.destroy(); - } - } - delete this.map; - GeoExt.MapPanel.superclass.beforeDestroy.apply(this, arguments); - } - -}); - -/** api: function[guess] - * :return: ``GeoExt.MapPanel`` The first map panel found by the Ext - * component manager. - * - * Convenience function for guessing the map panel of an application. This - * can reliably be used for all applications that just have one map panel - * in the viewport. - */ -GeoExt.MapPanel.guess = function() { - return Ext.ComponentMgr.all.find(function(o) { - return o instanceof GeoExt.MapPanel; - }); -}; - - -/** api: xtype = gx_mappanel */ -Ext.reg('gx_mappanel', GeoExt.MapPanel); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/Popup.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/Popup.js deleted file mode 100644 index 7736882f2d0..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/Popup.js +++ /dev/null @@ -1,361 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/widgets/MapPanel.js - */ - -/** api: (define) - * module = GeoExt - * class = Popup - * base_link = `Ext.Window `_ - */ -Ext.namespace("GeoExt"); - -/** api: example - * Sample code to create a popup anchored to a feature: - * - * .. code-block:: javascript - * - * var popup = new GeoExt.Popup({ - * title: "My Popup", - * location: feature, - * width: 200, - * html: "

      Popup content
      ", - * collapsible: true - * }); - */ - -/** api: constructor - * .. class:: Popup(config) - * - * Popups are a specialized Window that supports anchoring - * to a particular location in a MapPanel. When a popup - * is anchored to a location, that means that the popup - * will visibly point to the location on the map, and move - * accordingly when the map is panned or zoomed. - */ -GeoExt.Popup = Ext.extend(Ext.Window, { - - /** api: config[anchored] - * ``Boolean`` The popup begins anchored to its location. Default is - * ``true``. - */ - anchored: true, - - /** api: config[map] - * ``OpenLayers.Map`` or :class:`GeoExt.MapPanel` - * The map this popup will be anchored to (only required if ``anchored`` - * is set to true and the map cannot be derived from the ``location``'s - * layer. - */ - map: null, - - /** api: config[panIn] - * ``Boolean`` The popup should pan the map so that the popup is - * fully in view when it is rendered. Default is ``true``. - */ - panIn: true, - - /** api: config[unpinnable] - * ``Boolean`` The popup should have a "unpin" tool that unanchors it from - * its location. Default is ``true``. - */ - unpinnable: true, - - /** api: config[location] - * ``OpenLayers.Feature.Vector`` or ``OpenLayers.LonLat`` or - * ``OpenLayers.Pixel`` or ``OpenLayers.Geometry`` A location for this - * popup's anchor. - */ - - /** private: property[location] - * ``OpenLayers.LonLat`` - */ - location: null, - - /** - * Some Ext.Window defaults need to be overriden here - * because some Ext.Window behavior is not currently supported. - */ - - /** private: config[animCollapse] - * ``Boolean`` Animate the transition when the panel is collapsed. - * Default is ``false``. Collapsing animation is not supported yet for - * popups. - */ - animCollapse: false, - - /** private: config[draggable] - * ``Boolean`` Enable dragging of this Panel. Defaults to ``false`` - * because the popup defaults to being anchored, and anchored popups - * should not be draggable. - */ - draggable: false, - - /** private: config[shadow] - * ``Boolean`` Give the popup window a shadow. Defaults to ``false`` - * because shadows are not supported yet for popups (the shadow does - * not look good with the anchor). - */ - shadow: false, - - /** api: config[popupCls] - * ``String`` CSS class name for the popup DOM elements. Default is - * "gx-popup". - */ - popupCls: "gx-popup", - - /** api: config[ancCls] - * ``String`` CSS class name for the popup's anchor. - */ - ancCls: null, - - /** private: method[initComponent] - * Initializes the popup. - */ - initComponent: function() { - if(this.map instanceof GeoExt.MapPanel) { - this.map = this.map.map; - } - if(!this.map && this.location instanceof OpenLayers.Feature.Vector && - this.location.layer) { - this.map = this.location.layer.map; - } - if (this.location instanceof OpenLayers.Feature.Vector) { - this.location = this.location.geometry; - } - if (this.location instanceof OpenLayers.Geometry) { - if (typeof this.location.getCentroid == "function") { - this.location = this.location.getCentroid(); - } - this.location = this.location.getBounds().getCenterLonLat(); - } else if (this.location instanceof OpenLayers.Pixel) { - this.location = this.map.getLonLatFromViewPortPx(this.location); - } - - if(this.anchored) { - this.addAnchorEvents(); - } - - this.baseCls = this.popupCls + " " + this.baseCls; - - this.elements += ',anc'; - - GeoExt.Popup.superclass.initComponent.call(this); - }, - - /** private: method[onRender] - * Executes when the popup is rendered. - */ - onRender: function(ct, position) { - GeoExt.Popup.superclass.onRender.call(this, ct, position); - this.ancCls = this.popupCls + "-anc"; - - //create anchor dom element. - this.createElement("anc", this.el.dom); - }, - - /** private: method[initTools] - * Initializes the tools on the popup. In particular, - * it adds the 'unpin' tool if the popup is unpinnable. - */ - initTools : function() { - if(this.unpinnable) { - this.addTool({ - id: 'unpin', - handler: this.unanchorPopup.createDelegate(this, []) - }); - } - - GeoExt.Popup.superclass.initTools.call(this); - }, - - /** private: method[show] - * Override. - */ - show: function() { - GeoExt.Popup.superclass.show.apply(this, arguments); - if(this.anchored) { - this.position(); - if(this.panIn && !this._mapMove) { - this.panIntoView(); - } - } - }, - - /** private: method[maximize] - * Override. - */ - maximize: function() { - if(!this.maximized && this.anc) { - this.unanchorPopup(); - } - GeoExt.Popup.superclass.maximize.apply(this, arguments); - }, - - /** api: method[setSize] - * :param w: ``Integer`` - * :param h: ``Integer`` - * - * Sets the size of the popup, taking into account the size of the anchor. - */ - setSize: function(w, h) { - if(this.anc) { - var ancSize = this.anc.getSize(); - if(typeof w == 'object') { - h = w.height - ancSize.height; - w = w.width; - } else if(!isNaN(h)){ - h = h - ancSize.height; - } - } - GeoExt.Popup.superclass.setSize.call(this, w, h); - }, - - /** private: method[position] - * Positions the popup relative to its location - */ - position: function() { - if(this._mapMove === true) { - var visible = this.map.getExtent().containsLonLat(this.location); - if(visible !== this.isVisible()) { - this.setVisible(visible); - } - } - - if(this.isVisible()) { - var centerPx = this.map.getViewPortPxFromLonLat(this.location); - var mapBox = Ext.fly(this.map.div).getBox(); - - //This works for positioning with the anchor on the bottom. - - var anc = this.anc; - var dx = anc.getLeft(true) + anc.getWidth() / 2; - var dy = this.el.getHeight(); - - //Assuming for now that the map viewport takes up - //the entire area of the MapPanel - this.setPosition(centerPx.x + mapBox.x - dx, centerPx.y + mapBox.y - dy); - } - }, - - /** private: method[unanchorPopup] - * Unanchors a popup from its location. This removes the popup from its - * MapPanel and adds it to the page body. - */ - unanchorPopup: function() { - this.removeAnchorEvents(); - - //make the window draggable - this.draggable = true; - this.header.addClass("x-window-draggable"); - this.dd = new Ext.Window.DD(this); - - //remove anchor - this.anc.remove(); - this.anc = null; - - //hide unpin tool - this.tools.unpin.hide(); - }, - - /** private: method[panIntoView] - * Pans the MapPanel's map so that an anchored popup can come entirely - * into view, with padding specified as per normal OpenLayers.Map popup - * padding. - */ - panIntoView: function() { - var mapBox = Ext.fly(this.map.div).getBox(); - - //assumed viewport takes up whole body element of map panel - var popupPos = this.getPosition(true); - popupPos[0] -= mapBox.x; - popupPos[1] -= mapBox.y; - - var panelSize = [mapBox.width, mapBox.height]; // [X,Y] - - var popupSize = this.getSize(); - - var newPos = [popupPos[0], popupPos[1]]; - - //For now, using native OpenLayers popup padding. This may not be ideal. - var padding = this.map.paddingForPopups; - - // X - if(popupPos[0] < padding.left) { - newPos[0] = padding.left; - } else if(popupPos[0] + popupSize.width > panelSize[0] - padding.right) { - newPos[0] = panelSize[0] - padding.right - popupSize.width; - } - - // Y - if(popupPos[1] < padding.top) { - newPos[1] = padding.top; - } else if(popupPos[1] + popupSize.height > panelSize[1] - padding.bottom) { - newPos[1] = panelSize[1] - padding.bottom - popupSize.height; - } - - var dx = popupPos[0] - newPos[0]; - var dy = popupPos[1] - newPos[1]; - - this.map.pan(dx, dy); - }, - - /** private: method[onMapMove] - */ - onMapMove: function() { - this._mapMove = true; - this.position(); - delete this._mapMove; - }, - - /** private: method[addAnchorEvents] - */ - addAnchorEvents: function() { - this.map.events.on({ - "move" : this.onMapMove, - scope : this - }); - - this.on({ - "resize": this.position, - "collapse": this.position, - "expand": this.position, - scope: this - }); - }, - - /** private: method[removeAnchorEvents] - */ - removeAnchorEvents: function() { - //stop position with location - this.map.events.un({ - "move" : this.onMapMove, - scope : this - }); - - this.un("resize", this.position, this); - this.un("collapse", this.position, this); - this.un("expand", this.position, this); - - }, - - /** private: method[beforeDestroy] - * Cleanup events before destroying the popup. - */ - beforeDestroy: function() { - if(this.anchored) { - this.removeAnchorEvents(); - } - GeoExt.Popup.superclass.beforeDestroy.call(this); - } -}); - -/** api: xtype = gx_popup */ -Ext.reg('gx_popup', GeoExt.Popup); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/PrintMapPanel.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/PrintMapPanel.js deleted file mode 100644 index 9dff34250a1..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/PrintMapPanel.js +++ /dev/null @@ -1,373 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @requires GeoExt/widgets/MapPanel.js - * @include GeoExt/data/PrintProvider.js - * @include GeoExt/data/PrintPage.js - */ -Ext.namespace("GeoExt"); - -/** api: (define) - * module = GeoExt - * class = PrintMapPanel - */ - -/** api: (extends) - * GeoExt/widgets/MapPanel.js - */ - -/** api: example - * A map with a "Print..." button. If clicked, a dialog containing a - * PrintMapPanel will open, with a "Create PDF" button. - * - * .. code-block:: javascript - * - * var mapPanel = new GeoExt.MapPanel({ - * renderTo: "map", - * layers: [new OpenLayers.Layer.WMS("Tasmania State Boundaries", - * "http://demo.opengeo.org/geoserver/wms", - * {layers: "topp:tasmania_state_boundaries"}, {singleTile: true})], - * center: [146.56, -41.56], - * zoom: 6, - * bbar: [{ - * text: "Print...", - * handler: function() { - * var printDialog = new Ext.Window({ - * autoHeight: true, - * width: 350, - * items: [new GeoExt.PrintMapPanel({ - * sourceMap: mapPanel, - * printProvider: { - * capabilities: printCapabilities - * } - * })], - * bbar: [{ - * text: "Create PDF", - * handler: function() { - * printDialog.items.get(0).print(); - * } - * }] - * }); - * printDialog.show(); - * } - * }] - * }); - */ - -/** api: constructor - * .. class:: PrintMapPanel - * - * A map panel that controls scale and center of a print page. Based on the - * current view (i.e. layers and extent) of a source map, this panel will be - * sized according to the aspect ratio of the print page. As the user zooms - * and pans in the :class:`GeoExt.PrintMapPanel`, the print page will update - * its scale and center accordingly. If the scale on the print page changes - * (e.g. by setting it using a combo box with a - * :class:`GeoExt.plugins.PrintPageField`), the extent of the - * :class:`GeoExt.PrintMapPanel` will be updated to match the page bounds. - * - * .. note:: The ``zoom``, ``center`` and ``extent`` config options will have - * no affect, as they will be determined by the ``sourceMap``. - */ -GeoExt.PrintMapPanel = Ext.extend(GeoExt.MapPanel, { - - /** api: config[map] - * ``Object`` Optional configuration for the ``OpenLayers.Map`` object - * that this PrintMapPanel creates. Useful e.g. to configure a map with a - * custom set of controls, or to add a ``preaddlayer`` listener for - * filtering out layer types that cannot be printed. - */ - - /** api: config[sourceMap] - * :class:`GeoExt.MapPanel` or ``OpenLayers.Map`` The map that is to be - * printed. - */ - - /** private: property[sourceMap] - * ``OpenLayers.Map`` - */ - sourceMap: null, - - /** api: config[printProvider] - * :class:`GeoExt.data.PrintProvider` or ``Object`` PrintProvider to use - * for printing. If an ``Object`` is provided, a new PrintProvider will - * be created and configured with the object. - * - * .. note:: The PrintMapPanel requires the printProvider's capabilities - * to be available upon initialization. This means that a PrintMapPanel - * configured with an ``Object`` as ``printProvider`` will only work - * when ``capabilities`` is provided in the printProvider's - * configuration object. If ``printProvider`` is provided as an instance - * of :class:`GeoExt.data.PrintProvider`, the capabilities must be - * loaded before PrintMapPanel initialization. - */ - - /** api: property[printProvider] - * :class:`GeoExt.data.PrintProvider` PrintProvider for this - * PrintMapPanel. - */ - printProvider: null, - - /** api: property[printPage] - * :class:`GeoExt.data.PrintPage` PrintPage for this PrintMapPanel. - * Read-only. - */ - printPage: null, - - /** api: config[limitScales] - * ``Boolean`` If set to true, the printPage cannot be set to scales that - * would generate a preview in this :class:`GeoExt.PrintMapPanel` with a - * completely different extent than the one that would appear on the - * printed map. Default is false. - */ - - /** api: property[previewScales] - * ``Ext.data.Store`` A data store with a subset of the printProvider's - * scales. By default, this contains all the scales of the printProvider. - * If ``limitScales`` is set to true, it will only contain print scales - * that can properly be previewed with this :class:`GeoExt.PrintMapPanel`. - */ - previewScales: null, - - /** api: config[center] - * ``OpenLayers.LonLat`` or ``Array(Number)`` A location for the map - * center. Do not set, as this will be overridden with the ``sourceMap`` - * center. - */ - center: null, - - /** api: config[zoom] - * ``Number`` An initial zoom level for the map. Do not set, because the - * initial extent will be determined by the ``sourceMap``. - */ - zoom: null, - - /** api: config[extent] - * ``OpenLayers.Bounds or Array(Number)`` An initial extent for the map. - * Do not set, because the initial extent will be determined by the - * ``sourceMap``. - */ - extent: null, - - /** private: property[currentZoom] - * ``Number`` - */ - currentZoom: null, - - /** - * private: method[initComponent] - * private override - */ - initComponent: function() { - if(this.sourceMap instanceof GeoExt.MapPanel) { - this.sourceMap = this.sourceMap.map; - } - - if (!this.map) { - this.map = {}; - } - Ext.applyIf(this.map, { - projection: this.sourceMap.getProjection(), - maxExtent: this.sourceMap.getMaxExtent(), - maxResolution: this.sourceMap.getMaxResolution(), - units: this.sourceMap.getUnits() - }); - - if(!(this.printProvider instanceof GeoExt.data.PrintProvider)) { - this.printProvider = new GeoExt.data.PrintProvider( - this.printProvider); - } - this.printPage = new GeoExt.data.PrintPage({ - printProvider: this.printProvider - }); - - this.previewScales = new Ext.data.Store(); - this.previewScales.add(this.printProvider.scales.getRange()); - - this.layers = []; - var layer; - Ext.each(this.sourceMap.layers, function(layer) { - var clone = layer.clone(); - layer.getVisibility() === true && this.layers.push(clone); - }, this); - - this.extent = this.sourceMap.getExtent(); - - GeoExt.PrintMapPanel.superclass.initComponent.call(this); - - this.printProvider.on("layoutchange", this.syncSize, this); - this.printPage.on("change", this.fitZoom, this); - this.map.events.register("moveend", this, this.updatePage); - }, - - /** private: method[afterRender] - * Private method called after the panel has been rendered. - */ - afterRender: function() { - GeoExt.PrintMapPanel.superclass.afterRender.apply(this, arguments); - this.syncSize(); - if (this.initialConfig.limitScales === true) { - if (!this.ownerCt) { - this.calculatePreviewScales(); - } else { - this.ownerCt.on({ - "afterlayout": { - fn: this.calculatePreviewScales, - scope: this, - single: true - } - }); - } - this.on("resize", this.calculatePreviewScales, this); - } - }, - - /** private: method[adjustSize] - * :param width: ``Number`` If not provided or 0, initialConfig.width will - * be used. - * :param height: ``Number`` If not provided or 0, initialConfig.height - * will be used. - * Private override - sizing this component always takes the aspect ratio - * of the print page into account. - */ - adjustSize: function(width, height) { - var printSize = this.printProvider.layout.get("size"); - var ratio = printSize.width / printSize.height; - // respect width & height when sizing according to the print page's - // aspect ratio - do not exceed either, but don't take values for - // granted if container is configured with autoWidth or autoHeight. - var ownerCt = this.ownerCt; - var targetWidth = (ownerCt && ownerCt.autoWidth) ? 0 : - (width || this.initialConfig.width); - var targetHeight = (ownerCt && ownerCt.autoHeight) ? 0 : - (height || this.initialConfig.height); - if (targetWidth) { - height = targetWidth / ratio; - if (targetHeight && height > targetHeight) { - height = targetHeight; - width = height * ratio; - } else { - width = targetWidth; - } - } else if (targetHeight) { - width = targetHeight * ratio; - height = targetHeight; - } - - return {width: width, height: height}; - }, - - /** private: method[fitZoom] - * Fits this PrintMapPanel's zoom to the print scale. - */ - fitZoom: function() { - if (!this._updating && this.printPage.scale) { - this._updating = true; - var printBounds = this.printPage.getPrintExtent(this.map); - this.currentZoom = this.map.getZoomForExtent(printBounds); - this.map.zoomToExtent(printBounds); - delete this._updating; - } - }, - - /** private: method[updatePage] - * updates the print page to match this PrintMapPanel's center and scale. - */ - updatePage: function() { - if (!this._updating) { - var zoom = this.map.getZoom(); - this._updating = true; - if (zoom === this.currentZoom) { - this.printPage.setCenter(this.map.getCenter()); - } else { - this.printPage.fit(this.map); - } - delete this._updating; - this.currentZoom = zoom; - } - }, - - /** private: method[calculatePreviewScales] - */ - calculatePreviewScales: function() { - this.previewScales.removeAll(); - - this.printPage.suspendEvents(); - var scale = this.printPage.scale; - - // group print scales by the zoom level they would be previewed at - var viewSize = this.map.getSize(); - var scalesByZoom = {}; - var zooms = []; - this.printProvider.scales.each(function(rec) { - this.printPage.setScale(rec); - var extent = this.printPage.getPrintExtent(this.map); - var zoom = this.map.getZoomForExtent(extent); - - var idealResolution = Math.max( - extent.getWidth() / viewSize.w, - extent.getHeight() / viewSize.h - ); - var resolution = this.map.getResolutionForZoom(zoom); - // the closer to the ideal resolution, the better the fit - var diff = Math.abs(idealResolution - resolution); - if (!(zoom in scalesByZoom) || scalesByZoom[zoom].diff > diff) { - scalesByZoom[zoom] = { - rec: rec, - diff: diff - }; - zooms.indexOf(zoom) == -1 && zooms.push(zoom); - } - }, this); - - // add only the preview scales that closely fit print extents - for (var i=0, ii=zooms.length; i 0) { - var maxScale = this.previewScales.getAt(0); - var minScale = this.previewScales.getAt(this.previewScales.getCount()-1); - if (scale.get("value") < minScale.get("value")) { - this.printPage.setScale(minScale); - } else if (scale.get("value") > maxScale.get("value")) { - this.printPage.setScale(maxScale); - } - } - - this.fitZoom(); - }, - - /** api: method[print] - * :param options: ``Object`` options for - * the :class:`GeoExt.data.PrintProvider` :: ``print`` method. - * - * Convenience method for printing the map, without the need to - * interact with the printProvider and printPage. - */ - print: function(options) { - this.printProvider.print(this.map, [this.printPage], options); - }, - - /** private: method[beforeDestroy] - */ - beforeDestroy: function() { - this.map.events.unregister("moveend", this, this.updatePage); - this.printPage.un("change", this.fitZoom, this); - this.printProvider.un("layoutchange", this.syncSize, this); - GeoExt.PrintMapPanel.superclass.beforeDestroy.apply(this, arguments); - } -}); - -/** api: xtype = gx_printmappanel */ -Ext.reg('gx_printmappanel', GeoExt.PrintMapPanel); - diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/UrlLegend.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/UrlLegend.js deleted file mode 100644 index 38c2bba33b6..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/UrlLegend.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/widgets/LegendImage.js - * @requires GeoExt/widgets/LayerLegend.js - */ - -/** api: (define) - * module = GeoExt - * class = UrlLegend - */ - -/** api: (extends) - * GeoExt/widgets/LayerLegend.js - */ - -Ext.namespace('GeoExt'); - -/** api: constructor - * .. class:: UrlLegend(config) - * - * Show a legend image in a BoxComponent and make sure load errors are - * dealt with. - */ -GeoExt.UrlLegend = Ext.extend(GeoExt.LayerLegend, { - - /** private: method[initComponent] - * Initializes the legend image component. - */ - initComponent: function() { - GeoExt.UrlLegend.superclass.initComponent.call(this); - this.add(new GeoExt.LegendImage({ - url: this.layerRecord.get("legendURL") - })); - }, - - /** private: method[update] - * Private override - */ - update: function() { - GeoExt.UrlLegend.superclass.update.apply(this, arguments); - this.items.get(1).setUrl(this.layerRecord.get("legendURL")); - } - -}); - -/** private: method[supports] - * Private override - */ -GeoExt.UrlLegend.supports = function(layerRecord) { - return layerRecord.get("legendURL") != null; -}; - -/** api: legendtype = gx_urllegend */ -GeoExt.LayerLegend.types["gx_urllegend"] = GeoExt.UrlLegend; - -/** api: xtype = gx_urllegend */ -Ext.reg('gx_urllegend', GeoExt.UrlLegend); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/VectorLegend.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/VectorLegend.js deleted file mode 100644 index 3ec9f6cda24..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/VectorLegend.js +++ /dev/null @@ -1,671 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/widgets/FeatureRenderer.js - * @requires GeoExt/widgets/LayerLegend.js - */ - -/** api: (define) - * module = GeoExt - * class = VectorLegend - */ - -/** api: (extends) - * GeoExt/widgets/LayerLegend.js - */ - -Ext.namespace('GeoExt'); - -/** api: constructor - * .. class:: VectorLegend(config) - * - * Create a vector legend. - */ -GeoExt.VectorLegend = Ext.extend(GeoExt.LayerLegend, { - - /** api: config[layerRecord] - * :class:`GeoExt.data.LayerRecord` - * The record containing a vector layer that this legend will be based on. - * One of ``layerRecord``, ``layer``, or ``rules`` must be specified in - * the config. - */ - layerRecord: null, - - /** api: config[layer] - * ``OpenLayers.Layer.Vector`` - * The layer that this legend will be based on. One of ``layer``, - * ``rules``, or ``layerRecord`` must be specified in the config. - */ - layer: null, - - /** api: config[rules] - * ``Array(OpenLayers.Rule)`` - * List of rules. One of ``rules``, ``layer``, or ``layerRecord`` must be - * specified in the config. The ``symbolType`` property must also be - * provided if only ``rules`` are given in the config. - */ - rules: null, - - /** api: config[symbolType] - * ``String`` - * The symbol type for legend swatches. Must be one of ``"Point"``, - * ``"Line"``, or ``"Polygon"``. If not provided, the ``layer`` or - * ``layerRecord`` config property must be specified, and the geometry type - * of the first feature found on the layer will be used. If a rule does - * not have a symbolizer for ``symbolType``, we look at the symbolizers - * for the rule, and see if it has a ``"Point"``, ``"Line"`` or - * ``"Polygon"`` symbolizer, which we use for rendering a swatch of the - * respective geometry type. - */ - symbolType: null, - - /** api: config[untitledPrefix] - * ``String`` - * The prefix to use as a title for rules with no title or - * name. Default is ``"Untitled "``. Prefix will be appended with a - * number that corresponds to the index of the rule (1 for first rule). - */ - untitledPrefix: "Untitled ", - - /** api: config[clickableSymbol] - * ``Boolean`` - * Set cursor style to "pointer" for symbolizers. Register for - * the ``symbolclick`` event to handle clicks. Note that click events - * are fired regardless of this value. If ``false``, no cursor style will - * be set. Default is ``false``. - */ - clickableSymbol: false, - - /** api: config[clickableTitle] - * ``Boolean`` - * Set cursor style to "pointer" for rule titles. Register for - * the ``titleclick`` event to handle clicks. Note that click events - * are fired regardless of this value. If ``false``, no cursor style will - * be set. Default is ``false``. - */ - clickableTitle: false, - - /** api: config[selectOnClick] - * ``Boolean`` - * Set to true if a rule should be selected by clicking on the - * symbol or title. Selection will trigger the ruleselected event, and - * a click on a selected rule will unselect it and trigger the - * ``ruleunselected`` event. Default is ``false``. - */ - selectOnClick: false, - - /** api: config[enableDD] - * ``Boolean`` - * Allow drag and drop of rules. Default is ``false``. - */ - enableDD: false, - - /** api: config[bodyBorder] - * ``Boolean`` - * Show a border around the legend panel. Default is ``false``. - */ - bodyBorder: false, - - /** private: property[feature] - * ``OpenLayers.Feature.Vector`` - * Cached feature for rendering. - */ - feature: null, - - /** private: property[selectedRule] - * ``OpenLayers.Rule`` - * The rule that is currently selected. - */ - selectedRule: null, - - /** private: property[currentScaleDenominator] - * ``Number`` - * The current scale denominator of any map associated with this - * legend. Use :meth`setCurrentScaleDenominator` to change this. If not - * set an entry for each rule will be rendered. If set, only rules that - * apply for the given scale will be rendered. - */ - currentScaleDenominator: null, - - /** private: method[initComponent] - * Initializes the Vector legend. - */ - initComponent: function() { - GeoExt.VectorLegend.superclass.initComponent.call(this); - if (this.layerRecord) { - this.layer = this.layerRecord.getLayer(); - if (this.layer.map) { - this.currentScaleDenominator = this.layer.map.getScale(); - this.layer.map.events.on({ - "zoomend": this.onMapZoom, - scope: this - }); - } - } - - // determine symbol type - if (!this.symbolType) { - if (this.feature) { - this.symbolType = this.symbolTypeFromFeature(this.feature); - } else if (this.layer) { - if (this.layer.features.length > 0) { - var feature = this.layer.features[0].clone(); - feature.attributes = {}; - this.feature = feature; - this.symbolType = this.symbolTypeFromFeature(this.feature); - } else { - this.layer.events.on({ - featuresadded: this.onFeaturesAdded, - scope: this - }); - } - } - } - - // set rules if not provided - if (this.layer && this.feature && !this.rules) { - this.setRules(); - } - - this.rulesContainer = new Ext.Container({ - autoEl: {} - }); - - this.add(this.rulesContainer); - - this.addEvents( - /** api: event[titleclick] - * Fires when a rule title is clicked. - * - * Listener arguments: - * - * * comp - :class:`GeoExt.VectorLegend`` This component. - * * rule - ``OpenLayers.Rule`` The rule whose title was clicked. - */ - "titleclick", - - /** api: event[symbolclick] - * Fires when a rule symbolizer is clicked. - * - * Listener arguments: - * - * * comp - :class:`GeoExt.VectorLegend`` This component. - * * rule - ``OpenLayers.Rule`` The rule whose symbol was clicked. - */ - "symbolclick", - - /** api: event[ruleclick] - * Fires when a rule entry is clicked (fired with symbolizer or - * title click). - * - * Listener arguments: - * - * * comp - :class:`GeoExt.VectorLegend`` This component. - * * rule - ``OpenLayers.Rule`` The rule that was clicked. - */ - "ruleclick", - - /** api: event[ruleselected] - * Fires when a rule is clicked and ``selectOnClick`` is set to - * ``true``. - * - * Listener arguments: - * - * * comp - :class:`GeoExt.VectorLegend`` This component. - * * rule - ``OpenLayers.Rule`` The rule that was selected. - */ - "ruleselected", - - /** api: event[ruleunselected] - * Fires when the selected rule is clicked and ``selectOnClick`` - * is set to ``true``, or when a rule is unselected by selecting a - * different one. - * - * Listener arguments: - * - * * comp - :class:`GeoExt.VectorLegend`` This component. - * * rule - ``OpenLayers.Rule`` The rule that was unselected. - */ - "ruleunselected", - - /** api: event[rulemoved] - * Fires when a rule is moved. - * - * Listener arguments: - * - * * comp - :class:`GeoExt.VectorLegend`` This component. - * * rule - ``OpenLayers.Rule`` The rule that was moved. - */ - "rulemoved" - ); - - this.update(); - }, - - /** private: method[onMapZoom] - * Listener for map zoomend. - */ - onMapZoom: function() { - this.setCurrentScaleDenominator( - this.layer.map.getScale() - ); - }, - - /** private: method[symbolTypeFromFeature] - * :arg feature: ``OpenLayers.Feature.Vector`` - * - * Determine the symbol type given a feature. - */ - symbolTypeFromFeature: function(feature) { - var match = feature.geometry.CLASS_NAME.match(/Point|Line|Polygon/); - return (match && match[0]) || "Point"; - }, - - /** private: method[onFeaturesAdded] - * Set as a one time listener for the ``featuresadded`` event on the layer - * if it was provided with no features originally. - */ - onFeaturesAdded: function() { - this.layer.events.un({ - featuresadded: this.onFeaturesAdded, - scope: this - }); - var feature = this.layer.features[0].clone(); - feature.attributes = {}; - this.feature = feature; - this.symbolType = this.symbolTypeFromFeature(this.feature); - if (!this.rules) { - this.setRules(); - } - this.update(); - }, - - /** private: method[setRules] - * Sets the ``rules`` property for this. This is called when the component - * is constructed without rules. Rules will be derived from the layer's - * style map if it has one. - */ - setRules: function() { - var style = this.layer.styleMap && this.layer.styleMap.styles["default"]; - if (!style) { - style = new OpenLayers.Style(); - } - if (style.rules.length === 0) { - this.rules = [ - new OpenLayers.Rule({ - symbolizer: style.createSymbolizer(this.feature) - }) - ]; - } else { - this.rules = style.rules; - } - }, - - /** api: method[setCurrentScaleDenominator] - * :arg scale: ``Number`` The scale denominator. - * - * Set the current scale denominator. This will hide entries for any - * rules that don't apply at the current scale. - */ - setCurrentScaleDenominator: function(scale) { - if (scale !== this.currentScaleDenominator) { - this.currentScaleDenominator = scale; - this.update(); - } - }, - - /** private: method[getRuleEntry] - * :arg rule: ``OpenLayers.Rule`` - * :returns: ``Ext.Container`` - * - * Get the item corresponding to the rule. - */ - getRuleEntry: function(rule) { - return this.rulesContainer.items.get(this.rules.indexOf(rule)); - }, - - /** private: method[addRuleEntry] - * :arg rule: ``OpenLayers.Rule`` - * :arg noDoLayout: ``Boolean`` Don't call doLayout after adding rule. - * Default is ``false``. - * - * Add a new rule entry in the rules container. This - * method does not add the rule to the rules array. - */ - addRuleEntry: function(rule, noDoLayout) { - this.rulesContainer.add(this.createRuleEntry(rule)); - if (!noDoLayout) { - this.doLayout(); - } - }, - - /** private: method[removeRuleEntry] - * :arg rule: ``OpenLayers.Rule`` - * :arg noDoLayout: ``Boolean`` Don't call doLayout after removing rule. - * Default is ``false``. - * - * Remove a rule entry from the rules container, this - * method assumes the rule is in the rules array, and - * it does not remove the rule from the rules array. - */ - removeRuleEntry: function(rule, noDoLayout) { - var ruleEntry = this.getRuleEntry(rule); - if (ruleEntry) { - this.rulesContainer.remove(ruleEntry); - if (!noDoLayout) { - this.doLayout(); - } - } - }, - - /** private: method[selectRuleEntry] - */ - selectRuleEntry: function(rule) { - var newSelection = rule != this.selectedRule; - if (this.selectedRule) { - this.unselect(); - } - if (newSelection) { - var ruleEntry = this.getRuleEntry(rule); - ruleEntry.body.addClass("x-grid3-row-selected"); - this.selectedRule = rule; - this.fireEvent("ruleselected", this, rule); - } - }, - - /** private: method[unselect] - */ - unselect: function() { - this.rulesContainer.items.each(function(item, i) { - if (this.rules[i] == this.selectedRule) { - item.body.removeClass("x-grid3-row-selected"); - this.selectedRule = null; - this.fireEvent("ruleunselected", this, this.rules[i]); - } - }, this); - }, - - /** private: method[createRuleEntry] - */ - createRuleEntry: function(rule) { - var applies = true; - if (this.currentScaleDenominator != null) { - if (rule.minScaleDenominator) { - applies = applies && (this.currentScaleDenominator >= rule.minScaleDenominator); - } - if (rule.maxScaleDenominator) { - applies = applies && (this.currentScaleDenominator < rule.maxScaleDenominator); - } - } - return { - xtype: "panel", - layout: "column", - border: false, - hidden: !applies, - bodyStyle: this.selectOnClick ? {cursor: "pointer"} : undefined, - defaults: { - border: false - }, - items: [ - this.createRuleRenderer(rule), - this.createRuleTitle(rule) - ], - listeners: { - render: function(comp){ - this.selectOnClick && comp.getEl().on({ - click: function(comp){ - this.selectRuleEntry(rule); - }, - scope: this - }); - if (this.enableDD == true) { - this.addDD(comp); - } - }, - scope: this - } - }; - }, - - /** private: method[createRuleRenderer] - * :arg rule: ``OpenLayers.Rule`` - * :returns: ``GeoExt.FeatureRenderer`` - * - * Create a renderer for the rule. - */ - createRuleRenderer: function(rule) { - var types = [this.symbolType, "Point", "Line", "Polygon"]; - var type, haveType; - var symbolizers = rule.symbolizers; - if (!symbolizers) { - // TODO: remove this when OpenLayers.Symbolizer is used everywhere - var symbolizer = rule.symbolizer; - for (var i=0, len=types.length; i targetPos) { - cls = "gx-ruledrag-insert-above"; - } else if (sourcePos < targetPos) { - cls = "gx-ruledrag-insert-below"; - } - cls && target.addClass(cls); - return Ext.dd.DragZone.prototype.onDragEnter.apply(this, arguments); - }, - onDragDrop: function(e, targetId) { - panel.moveRule(ct.items.indexOf(component), - ct.items.indexOf(Ext.getCmp(targetId))); - return Ext.dd.DragZone.prototype.onDragDrop.apply(this, arguments); - }, - getDragData: function(e) { - var sourceEl = e.getTarget(".x-column-inner"); - if(sourceEl) { - var d = sourceEl.cloneNode(true); - d.id = Ext.id(); - return { - sourceEl: sourceEl, - repairXY: Ext.fly(sourceEl).getXY(), - ddel: d - } - } - } - }); - new Ext.dd.DropTarget(component.getEl(), { - ddGroup: ct.id, - notifyDrop: function() { - return true; - } - }); - }, - - /** api: method[update] - * Update rule titles and symbolizers. - */ - update: function() { - GeoExt.VectorLegend.superclass.update.apply(this, arguments); - if (this.symbolType && this.rules) { - if (this.rulesContainer.items) { - var comp; - for (var i=this.rulesContainer.items.length-1; i>=0; --i) { - comp = this.rulesContainer.getComponent(i); - this.rulesContainer.remove(comp, true); - } - } - for (var i=0, ii=this.rules.length; i 0) { - if(styleName) { - Ext.each(styles, function(s) { - url = (s.name == styleName && s.legend) && s.legend.href; - return !url; - }); - } else if(this.defaultStyleIsFirst === true && !styleNames && - !layer.params.SLD && !layer.params.SLD_BODY) { - url = styles[0].legend && styles[0].legend.href; - } - } - if(!url) { - url = layer.getFullRequestString({ - REQUEST: "GetLegendGraphic", - WIDTH: null, - HEIGHT: null, - EXCEPTIONS: "application/vnd.ogc.se_xml", - LAYER: layerName, - LAYERS: null, - STYLE: (styleName !== '') ? styleName: null, - STYLES: null, - SRS: null, - FORMAT: null - }); - } - // add scale parameter - also if we have the url from the record's - // styles data field and it is actually a GetLegendGraphic request. - if(this.useScaleParameter === true && - url.toLowerCase().indexOf("request=getlegendgraphic") != -1) { - var scale = layer.map.getScale(); - url = Ext.urlAppend(url, "SCALE=" + scale); - } - var params = this.baseParams || {}; - Ext.applyIf(params, {FORMAT: 'image/gif'}); - if(url.indexOf('?') > 0) { - url = Ext.urlEncode(params, url); - } - - return url; - }, - - /** private: method[update] - * Update the legend, adding, removing or updating - * the per-sublayer box component. - */ - update: function() { - var layer = this.layerRecord.getLayer(); - // In some cases, this update function is called on a layer - // that has just been removed, see ticket #238. - // The following check bypass the update if map is not set. - if(!(layer && layer.map)) { - return; - } - GeoExt.WMSLegend.superclass.update.apply(this, arguments); - - var layerNames, layerName, i, len; - - layerNames = [layer.params.LAYERS].join(",").split(","); - - var destroyList = []; - var textCmp = this.items.get(0); - this.items.each(function(cmp) { - i = layerNames.indexOf(cmp.itemId); - if(i < 0 && cmp != textCmp) { - destroyList.push(cmp); - } else if(cmp !== textCmp){ - layerName = layerNames[i]; - var newUrl = this.getLegendUrl(layerName, layerNames); - if(!OpenLayers.Util.isEquivalentUrl(newUrl, cmp.url)) { - cmp.setUrl(newUrl); - } - } - }, this); - for(i = 0, len = destroyList.length; i`_ - */ -Ext.namespace("GeoExt"); - -/** api: example - * Sample code to render a slider outside the map viewport: - * - * .. code-block:: javascript - * - * var slider = new GeoExt.ZoomSlider({ - * renderTo: document.body, - * width: 200, - * map: map - * }); - * - * Sample code to add a slider to a map panel: - * - * .. code-block:: javascript - * - * var panel = new GeoExt.MapPanel({ - * renderTo: document.body, - * height: 300, - * width: 400, - * map: { - * controls: [new OpenLayers.Control.Navigation()] - * }, - * layers: [new OpenLayers.Layer.WMS( - * "Global Imagery", - * "http://maps.opengeo.org/geowebcache/service/wms", - * {layers: "bluemarble"} - * )], - * extent: [-5, 35, 15, 55], - * items: [{ - * xtype: "gx_zoomslider", - * aggressive: true, - * vertical: true, - * height: 100, - * x: 10, - * y: 20 - * }] - * }); - */ - -/** api: constructor - * .. class:: ZoomSlider(config) - * - * Create a slider for controlling a map's zoom level. - */ -GeoExt.ZoomSlider = Ext.extend(Ext.Slider, { - - /** api: config[map] - * ``OpenLayers.Map`` or :class:`GeoExt.MapPanel` - * The map that the slider controls. - */ - map: null, - - /** api: config[baseCls] - * ``String`` - * The CSS class name for the slider elements. Default is "gx-zoomslider". - */ - baseCls: "gx-zoomslider", - - /** api: config[aggressive] - * ``Boolean`` - * If set to true, the map is zoomed as soon as the thumb is moved. Otherwise - * the map is zoomed when the thumb is released (default). - */ - aggressive: false, - - /** private: property[updating] - * ``Boolean`` - * The slider position is being updated by itself (based on map zoomend). - */ - updating: false, - - /** private: method[initComponent] - * Initialize the component. - */ - initComponent: function() { - GeoExt.ZoomSlider.superclass.initComponent.call(this); - - if(this.map) { - if(this.map instanceof GeoExt.MapPanel) { - this.map = this.map.map; - } - this.bind(this.map); - } - - if (this.aggressive === true) { - this.on('change', this.changeHandler, this); - } else { - this.on('changecomplete', this.changeHandler, this); - } - this.on("beforedestroy", this.unbind, this); - }, - - /** private: method[onRender] - * Override onRender to set base css class. - */ - onRender: function() { - GeoExt.ZoomSlider.superclass.onRender.apply(this, arguments); - this.el.addClass(this.baseCls); - }, - - /** private: method[afterRender] - * Override afterRender because the render event is fired too early - * to call update. - */ - afterRender : function(){ - Ext.Slider.superclass.afterRender.apply(this, arguments); - this.update(); - }, - - /** private: method[addToMapPanel] - * :param panel: :class:`GeoExt.MapPanel` - * - * Called by a MapPanel if this component is one of the items in the panel. - */ - addToMapPanel: function(panel) { - this.on({ - render: function() { - var el = this.getEl(); - el.setStyle({ - position: "absolute", - zIndex: panel.map.Z_INDEX_BASE.Control - }); - el.on({ - mousedown: this.stopMouseEvents, - click: this.stopMouseEvents - }); - }, - afterrender: function() { - this.bind(panel.map); - }, - scope: this - }); - }, - - /** private: method[stopMouseEvents] - * :param e: ``Object`` - */ - stopMouseEvents: function(e) { - e.stopEvent(); - }, - - /** private: method[removeFromMapPanel] - * :param panel: :class:`GeoExt.MapPanel` - * - * Called by a MapPanel if this component is one of the items in the panel. - */ - removeFromMapPanel: function(panel) { - var el = this.getEl(); - el.un("mousedown", this.stopMouseEvents, this); - el.un("click", this.stopMouseEvents, this); - this.unbind(); - }, - - /** private: method[bind] - * :param map: ``OpenLayers.Map`` - */ - bind: function(map) { - this.map = map; - this.map.events.on({ - zoomend: this.update, - changebaselayer: this.initZoomValues, - scope: this - }); - if(this.map.baseLayer) { - this.initZoomValues(); - this.update(); - } - }, - - /** private: method[unbind] - */ - unbind: function() { - if(this.map) { - this.map.events.un({ - zoomend: this.update, - changebaselayer: this.initZoomValues, - scope: this - }); - } - }, - - /** private: method[initZoomValues] - * Set the min/max values for the slider if not set in the config. - */ - initZoomValues: function() { - var layer = this.map.baseLayer; - if(this.initialConfig.minValue === undefined) { - this.minValue = layer.minZoomLevel || 0; - } - if(this.initialConfig.maxValue === undefined) { - this.maxValue = layer.minZoomLevel == null ? - layer.numZoomLevels - 1 : layer.maxZoomLevel; - } - }, - - /** api: method[getZoom] - * :return: ``Number`` The map zoom level. - * - * Get the zoom level for the associated map based on the slider value. - */ - getZoom: function() { - return this.getValue(); - }, - - /** api: method[getScale] - * :return: ``Number`` The map scale denominator. - * - * Get the scale denominator for the associated map based on the slider value. - */ - getScale: function() { - return OpenLayers.Util.getScaleFromResolution( - this.map.getResolutionForZoom(this.getValue()), - this.map.getUnits() - ); - }, - - /** api: method[getResolution] - * :return: ``Number`` The map resolution. - * - * Get the resolution for the associated map based on the slider value. - */ - getResolution: function() { - return this.map.getResolutionForZoom(this.getValue()); - }, - - /** private: method[changeHandler] - * Registered as a listener for slider changecomplete. Zooms the map. - */ - changeHandler: function() { - if(this.map && !this.updating) { - this.map.zoomTo(this.getValue()); - } - }, - - /** private: method[update] - * Registered as a listener for map zoomend. Updates the value of the slider. - */ - update: function() { - if(this.rendered && this.map) { - this.updating = true; - this.setValue(this.map.getZoom()); - this.updating = false; - } - } - -}); - -/** api: xtype = gx_zoomslider */ -Ext.reg('gx_zoomslider', GeoExt.ZoomSlider); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form.js deleted file mode 100644 index 873d6622af5..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form.js +++ /dev/null @@ -1,184 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -Ext.namespace("GeoExt.form"); - -/** private: function[toFilter] - * :param form: ``Ext.form.BasicForm|Ext.form.FormPanel`` - * :param logicalOp: ``String`` Either ``OpenLayers.Filter.Logical.AND`` or - * ``OpenLayers.Filter.Logical.OR``, set to - * ``OpenLayers.Filter.Logical.AND`` if null or undefined - * :param wildcard: ``Integer`` Determines the wildcard behaviour of like - * queries. This behaviour can either be: none, prepend, append or both. - * - * :return: ``OpenLayers.Filter`` - * - * Create an {OpenLayers.Filter} object from a {Ext.form.BasicForm} - * or a {Ext.form.FormPanel} instance. - */ -GeoExt.form.toFilter = function(form, logicalOp, wildcard) { - if(form instanceof Ext.form.FormPanel) { - form = form.getForm(); - } - var filters = [], values = form.getValues(false); - for(var prop in values) { - var s = prop.split("__"); - - var value = values[prop], type; - - if(s.length > 1 && - (type = GeoExt.form.toFilter.FILTER_MAP[s[1]]) !== undefined) { - prop = s[0]; - } else { - type = OpenLayers.Filter.Comparison.EQUAL_TO; - } - - if (type === OpenLayers.Filter.Comparison.LIKE) { - switch(wildcard) { - case GeoExt.form.ENDS_WITH: - value = '.*' + value; - break; - case GeoExt.form.STARTS_WITH: - value += '.*'; - break; - case GeoExt.form.CONTAINS: - value = '.*' + value + '.*'; - break; - default: - // do nothing, just take the value - break; - } - } - - filters.push( - new OpenLayers.Filter.Comparison({ - type: type, - value: value, - property: prop - }) - ); - } - - return new OpenLayers.Filter.Logical({ - type: logicalOp || OpenLayers.Filter.Logical.AND, - filters: filters - }); -}; - -/** private: constant[FILTER_MAP] - * An object mapping operator strings as found in field names to - * ``OpenLayers.Filter.Comparison`` types. - */ -GeoExt.form.toFilter.FILTER_MAP = { - "eq": OpenLayers.Filter.Comparison.EQUAL_TO, - "ne": OpenLayers.Filter.Comparison.NOT_EQUAL_TO, - "lt": OpenLayers.Filter.Comparison.LESS_THAN, - "le": OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO, - "gt": OpenLayers.Filter.Comparison.GREATER_THAN, - "ge": OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, - "like": OpenLayers.Filter.Comparison.LIKE -}; - -GeoExt.form.ENDS_WITH = 1; -GeoExt.form.STARTS_WITH = 2; -GeoExt.form.CONTAINS = 3; - -/** private: function[recordToField] - * :param record: ``Ext.data.Record``, typically from an attributeStore - * - * :return: ``Object`` An object literal with a xtype property, use - * ``Ext.ComponentMgr.create`` (or ``Ext.create`` in Ext 3) to create - * an ``Ext.form.Field`` from this object. - * - * This function can be used to create an ``Ext.form.Field`` from - * an ``Ext.data.Record`` containing name, type, restriction and - * label fields. - */ -GeoExt.form.recordToField = function(record) { - var type = record.get("type"); - - if(typeof type === "object" && type.xtype) { - // we have an xtype'd object literal in the type - // field, just return it - return type; - } - - var field; - - var name = record.get("name"); - var label = record.get("label"); - var restriction = record.get("restriction") || {}; - - // use name for label if label isn't defined in the record - if(label == null) { - label = name; - } - - type = type.split(":").pop(); // remove ns prefix - - var r = GeoExt.form.recordToField.REGEXES; - - if(type.match(r["text"])) { - var maxLength = restriction["maxLength"] !== undefined ? - parseFloat(restriction["maxLength"]) : undefined; - var minLength = restriction["minLength"] !== undefined ? - parseFloat(restriction["minLength"]) : undefined; - field = { - xtype: "textfield", - name: name, - fieldLabel: label, - maxLength: maxLength, - minLength: minLength - }; - } else if(type.match(r["number"])) { - var maxValue = restriction["maxInclusive"] !== undefined ? - parseFloat(restriction["maxInclusive"]) : undefined; - var minValue = restriction["minInclusive"] !== undefined ? - parseFloat(restriction["minInclusive"]) : undefined; - field = { - xtype: "numberfield", - name: name, - fieldLabel: label, - maxValue: maxValue, - minValue: minValue - }; - } else if(type.match(r["boolean"])) { - field = { - xtype: "checkbox", - name: name, - boxLabel: label - }; - } else if(type.match(r["date"])) { - field = { - xtype: "datefield", - fieldLabel: label, - name: name - }; - } - - return field; -} - -/** private: constant[REGEXES] - * ``Object`` Regular expressions for determining what type - * of field to create from an attribute record. - */ -GeoExt.form.recordToField.REGEXES = { - "text": new RegExp( - "^(text|string)$", "i" - ), - "number": new RegExp( - "^(number|float|decimal|double|int|long|integer|short)$", "i" - ), - "boolean": new RegExp( - "^(boolean)$", "i" - ), - "date": new RegExp( - "^(dateTime)$", "i" - ) -}; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/BasicForm.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/BasicForm.js deleted file mode 100644 index ac5c9cde410..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/BasicForm.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/widgets/form/SearchAction.js - */ - -/** api: (define) - * module = GeoExt.form - * class = BasicForm - * base_link = `Ext.form.BasicForm `_ - */ - -Ext.namespace("GeoExt.form"); - -/** api: constructor - * .. class:: BasicForm(config) - * - * A specific ``Ext.form.BasicForm`` whose doAction method creates - * a :class:`GeoExt.form.SearchAction` if it is passed the string - * "search" as its first argument. - * - * In most cases one would not use this class directly, but - * :class:`GeoExt.form.FormPanel` instead. - */ -GeoExt.form.BasicForm = Ext.extend(Ext.form.BasicForm, { - /** private: property[protocol] - * ``OpenLayers.Protocol`` The protocol configured in this - * instance. - */ - protocol: null, - - /** - * private: property[prevResponse] - * ``OpenLayers.Protocol.Response`` The response return by a call to - * protocol.read method. - */ - prevResponse: null, - - /** - * api: config[autoAbort] - * ``Boolean`` Tells if pending requests should be aborted - * when a new action is performed. - */ - autoAbort: true, - - /** api: method[doAction] - * :param action: ``String or Ext.form.Action`` Either the name - * of the action or a ``Ext.form.Action`` instance. - * :param options: ``Object`` The options passed to the Action - * constructor. - * :return: :class:`GeoExt.form.BasicForm` This form. - * - * Performs the action, if the string "search" is passed as the - * first argument then a :class:`GeoExt.form.SearchAction` is created. - */ - doAction: function(action, options) { - if(action == "search") { - options = Ext.applyIf(options || {}, { - protocol: this.protocol, - abortPrevious: this.autoAbort - }); - action = new GeoExt.form.SearchAction(this, options); - } - return GeoExt.form.BasicForm.superclass.doAction.call( - this, action, options - ); - }, - - /** api: method[search] - * :param options: ``Object`` The options passed to the Action - * constructor. - * :return: :class:`GeoExt.form.BasicForm` This form. - * - * Shortcut to do a search action. - */ - search: function(options) { - return this.doAction("search", options); - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/FormPanel.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/FormPanel.js deleted file mode 100644 index 8fca747e9f1..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/FormPanel.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.form - * class = FormPanel - * base_link = `Ext.form.FormPanel `_ - */ - -/** - * @include GeoExt/widgets/form/BasicForm.js - */ - -Ext.namespace("GeoExt.form"); - -/** api: example - * Sample code showing how to use a GeoExt form panel. - * - * .. code-block:: javascript - * - * var formPanel = new GeoExt.form.FormPanel({ - * renderTo: "formpanel", - * protocol: new OpenLayers.Protocol.WFS({ - * url: "http://publicus.opengeo.org/geoserver/wfs", - * featureType: "tasmania_roads", - * featureNS: "http://www.openplans.org/topp" - * }), - * items: [{ - * xtype: "textfield", - * name: "name__ilike", - * value: "mont" - * }, { - * xtype: "textfield", - * name: "elevation__ge", - * value: "2000" - * }], - * listeners: { - * actioncomplete: function(form, action) { - * // this listener triggers when the search request - * // is complete, the OpenLayers.Protocol.Response - * // resulting from the request is available - * // in "action.response" - * } - * } - * }); - * - * formPanel.addButton({ - * text: "search", - * handler: function() { - * this.search(); - * }, - * scope: formPanel - * }); - */ - -/** api: constructor - * .. class:: FormPanel(config) - * - * A specific ``Ext.form.FormPanel`` whose internal form is a - * :class:`GeoExt.form.BasicForm` instead of ``Ext.form.BasicForm``. - * One would use this form to do search requests through - * an ``OpenLayers.Protocol`` object (``OpenLayers.Protocol.WFS`` - * for example). - * - * Look at :class:`GeoExt.form.SearchAction` to understand how - * form fields must be named for appropriate filters to be - * passed to the protocol. - */ -GeoExt.form.FormPanel = Ext.extend(Ext.form.FormPanel, { - /** api: config[protocol] - * ``OpenLayers.Protocol`` The protocol instance this form panel - * is configured with, actions resulting from this form - * will be performed through the protocol. - */ - protocol: null, - - /** private: method[createForm] - * Create the internal :class:`GeoExt.form.BasicForm` instance. - */ - createForm: function() { - delete this.initialConfig.listeners; - return new GeoExt.form.BasicForm(null, this.initialConfig); - }, - - /** api: method[search] - * :param options: ``Object`` The options passed to the - * :class:`GeoExt.form.SearchAction` constructor. - * - * Shortcut to the internal form's search method. - */ - search: function(options) { - this.getForm().search(options); - } -}); - -/** api: xtype = gx_formpanel */ -Ext.reg("gx_formpanel", GeoExt.form.FormPanel); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/SearchAction.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/SearchAction.js deleted file mode 100644 index 75e4c4eccd9..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/form/SearchAction.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.form - * class = SearchAction - * base_link = `Ext.form.Action `_ - */ - -/** - * @include GeoExt/widgets/form.js - */ - -Ext.namespace("GeoExt.form"); - -/** api: example - * Sample code showing how to use a GeoExt SearchAction with an Ext form panel: - * - * .. code-block:: javascript - * - * var formPanel = new Ext.form.Panel({ - * renderTo: "formpanel", - * items: [{ - * xtype: "textfield", - * name: "name__like", - * value: "mont" - * }, { - * xtype: "textfield", - * name: "elevation__ge", - * value: "2000" - * }] - * }); - * - * var searchAction = new GeoExt.form.SearchAction(formPanel.getForm(), { - * protocol: new OpenLayers.Protocol.WFS({ - * url: "http://publicus.opengeo.org/geoserver/wfs", - * featureType: "tasmania_roads", - * featureNS: "http://www.openplans.org/topp" - * }), - * abortPrevious: true - * }); - * - * formPanel.getForm().doAction(searchAction, { - * callback: function(response) { - * // response.features includes the features read - * // from the server through the protocol - * } - * }); - */ - -/** api: constructor - * .. class:: SearchAction(form, options) - * - * A specific ``Ext.form.Action`` to be used when using a form to do - * trigger search requests througn an ``OpenLayers.Protocol``. - * - * Arguments: - * - * * form ``Ext.form.BasicForm`` A basic form instance. - * * options ``Object`` Options passed to the protocol'read method - * One can add an abortPrevious property to these options, if set - * to true, the abort method will be called on the protocol if - * there's a pending request. - * - * When run this action builds an ``OpenLayers.Filter`` from the form - * and passes this filter to its protocol's read method. The form fields - * must be named after a specific convention, so that an appropriate - * ``OpenLayers.Filter.Comparison`` filter is created for each - * field. - * - * For example a field with the name ``foo__like`` would result in an - * ``OpenLayers.Filter.Comparison`` of type - * ``OpenLayers.Filter.Comparison.LIKE`` being created. - * - * Here is the convention: - * - * * ``__eq: OpenLayers.Filter.Comparison.EQUAL_TO`` - * * ``__ne: OpenLayers.Filter.Comparison.NOT_EQUAL_TO`` - * * ``__lt: OpenLayers.Filter.Comparison.LESS_THAN`` - * * ``__le: OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO`` - * * ``__gt: OpenLayers.Filter.Comparison.GREATER_THAN`` - * * ``__ge: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO`` - * * ``__like: OpenLayers.Filter.Comparison.LIKE`` - * - * In most cases your would not directly create ``GeoExt.form.SearchAction`` - * objects, but use :class:`GeoExt.form.FormPanel` instead. - */ -GeoExt.form.SearchAction = Ext.extend(Ext.form.Action, { - /** private: property[type] - * ``String`` The action type string. - */ - type: "search", - - /** api: property[response] - * ``OpenLayers.Protocol.Response`` A reference to the response - * resulting from the search request. Read-only. - */ - response: null, - - /** private */ - constructor: function(form, options) { - GeoExt.form.SearchAction.superclass.constructor.call(this, form, options); - }, - - /** private: method[run] - * Run the action. - */ - run: function() { - var o = this.options; - var f = GeoExt.form.toFilter(this.form, o.logicalOp, o.wildcard); - if(o.clientValidation === false || this.form.isValid()){ - - if (o.abortPrevious && this.form.prevResponse) { - o.protocol.abort(this.form.prevResponse); - } - - this.form.prevResponse = o.protocol.read( - Ext.applyIf({ - filter: f, - callback: this.handleResponse, - scope: this - }, o) - ); - - } else if(o.clientValidation !== false){ - // client validation failed - this.failureType = Ext.form.Action.CLIENT_INVALID; - this.form.afterAction(this, false); - } - }, - - /** private: method[handleResponse] - * :param response: ``OpenLayers.Protocol.Response`` The response - * object. - * - * Handle the response to the search query. - */ - handleResponse: function(response) { - this.form.prevResponse = null; - this.response = response; - if(response.success()) { - this.form.afterAction(this, true); - } else { - this.form.afterAction(this, false); - } - var o = this.options; - if(o.callback) { - o.callback.call(o.scope, response); - } - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/grid/FeatureSelectionModel.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/grid/FeatureSelectionModel.js deleted file mode 100644 index 85247eb0285..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/grid/FeatureSelectionModel.js +++ /dev/null @@ -1,317 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt.grid - * class = FeatureSelectionModel - * base_link = `Ext.grid.RowSelectionModel `_ - */ - -Ext.namespace('GeoExt.grid'); - -/** api: constructor - * .. class:: FeatureSelectionModel - * - * A row selection model which enables automatic selection of features - * in the map when rows are selected in the grid and vice-versa. - */ - -/** api: example - * Sample code to create a feature grid with a feature selection model: - * - * .. code-block:: javascript - * - * var gridPanel = new Ext.grid.GridPanel({ - * title: "Feature Grid", - * region: "east", - * store: store, - * width: 320, - * columns: [{ - * header: "Name", - * width: 200, - * dataIndex: "name" - * }, { - * header: "Elevation", - * width: 100, - * dataIndex: "elevation" - * }], - * sm: new GeoExt.grid.FeatureSelectionModel() - * }); - */ - -GeoExt.grid.FeatureSelectionModelMixin = function() { - return { - /** api: config[autoActivateControl] - * ``Boolean`` If true the select feature control is activated and - * deactivated when binding and unbinding. Defaults to true. - */ - autoActivateControl: true, - - /** api: config[layerFromStore] - * ``Boolean`` If true, and if the constructor is passed neither a - * layer nor a select feature control, a select feature control is - * created using the layer found in the grid's store. Set it to - * false if you want to manually bind the selection model to a - * layer. Defaults to true. - */ - layerFromStore: true, - - /** api: config[selectControl] - * - * ``OpenLayers.Control.SelectFeature`` A select feature control. If not - * provided one will be created. If provided any "layer" config option - * will be ignored, and its "multiple" option will be used to configure - * the selectionModel. If an ``Object`` is provided here, it will be - * passed as config to the SelectFeature constructor, and the "layer" - * config option will be used for the layer. - */ - - /** private: property[selectControl] - * ``OpenLayers.Control.SelectFeature`` The select feature control - * instance. - */ - selectControl: null, - - /** api: config[layer] - * ``OpenLayers.Layer.Vector`` The vector layer used for the creation of - * the select feature control, it must already be added to the map. If not - * provided, the layer bound to the grid's store, if any, will be used. - */ - - /** private: property[bound] - * ``Boolean`` Flag indicating if the selection model is bound. - */ - bound: false, - - /** private: property[superclass] - * ``Ext.grid.AbstractSelectionModel`` Our superclass. - */ - superclass: null, - - /** private */ - constructor: function(config) { - config = config || {}; - if(config.selectControl instanceof OpenLayers.Control.SelectFeature) { - if(!config.singleSelect) { - var ctrl = config.selectControl; - config.singleSelect = !(ctrl.multiple || !!ctrl.multipleKey); - } - } else if(config.layer instanceof OpenLayers.Layer.Vector) { - this.selectControl = this.createSelectControl( - config.layer, config.selectControl - ); - delete config.layer; - delete config.selectControl; - } - this.superclass = arguments.callee.superclass; - this.superclass.constructor.call(this, config); - }, - - /** private: method[initEvents] - * - * Called after this.grid is defined - */ - initEvents: function() { - this.superclass.initEvents.call(this); - if(this.layerFromStore) { - var layer = this.grid.getStore() && this.grid.getStore().layer; - if(layer && - !(this.selectControl instanceof OpenLayers.Control.SelectFeature)) { - this.selectControl = this.createSelectControl( - layer, this.selectControl - ); - } - } - if(this.selectControl) { - this.bind(this.selectControl); - } - }, - - /** private: createSelectControl - * :param layer: ``OpenLayers.Layer.Vector`` The vector layer. - * :param config: ``Object`` The select feature control config. - * - * Create the select feature control. - */ - createSelectControl: function(layer, config) { - config = config || {}; - var singleSelect = config.singleSelect !== undefined ? - config.singleSelect : this.singleSelect; - config = OpenLayers.Util.extend({ - toggle: true, - multipleKey: singleSelect ? null : - (Ext.isMac ? "metaKey" : "ctrlKey") - }, config); - var selectControl = new OpenLayers.Control.SelectFeature( - layer, config - ); - layer.map.addControl(selectControl); - return selectControl; - }, - - /** api: method[bind] - * - * :param obj: ``OpenLayers.Layer.Vector`` or - * ``OpenLayers.Control.SelectFeature`` The object this selection model - * should be bound to, either a vector layer or a select feature - * control. - * :param options: ``Object`` An object with a "controlConfig" - * property referencing the configuration object to pass to the - * ``OpenLayers.Control.SelectFeature`` constructor. - * :return: ``OpenLayers.Control.SelectFeature`` The select feature - * control this selection model uses. - * - * Bind the selection model to a layer or a SelectFeature control. - */ - bind: function(obj, options) { - if(!this.bound) { - options = options || {}; - this.selectControl = obj; - if(obj instanceof OpenLayers.Layer.Vector) { - this.selectControl = this.createSelectControl( - obj, options.controlConfig - ); - } - if(this.autoActivateControl) { - this.selectControl.activate(); - } - var layers = this.getLayers(); - for(var i = 0, len = layers.length; i < len; i++) { - layers[i].events.on({ - featureselected: this.featureSelected, - featureunselected: this.featureUnselected, - scope: this - }); - } - this.on("rowselect", this.rowSelected, this); - this.on("rowdeselect", this.rowDeselected, this); - this.bound = true; - } - return this.selectControl; - }, - - /** api: method[unbind] - * :return: ``OpenLayers.Control.SelectFeature`` The select feature - * control this selection model used. - * - * Unbind the selection model from the layer or SelectFeature control. - */ - unbind: function() { - var selectControl = this.selectControl; - if(this.bound) { - var layers = this.getLayers(); - for(var i = 0, len = layers.length; i < len; i++) { - layers[i].events.un({ - featureselected: this.featureSelected, - featureunselected: this.featureUnselected, - scope: this - }); - } - this.un("rowselect", this.rowSelected, this); - this.un("rowdeselect", this.rowDeselected, this); - if(this.autoActivateControl) { - selectControl.deactivate(); - } - this.selectControl = null; - this.bound = false; - } - return selectControl; - }, - - /** private: method[featureSelected] - * :param evt: ``Object`` An object with a feature property referencing - * the selected feature. - */ - featureSelected: function(evt) { - if(!this._selecting) { - var store = this.grid.store; - var row = store.findBy(function(record, id) { - return record.getFeature() == evt.feature; - }); - if(row != -1 && !this.isSelected(row)) { - this._selecting = true; - this.selectRow(row, !this.singleSelect); - this._selecting = false; - // focus the row in the grid to ensure it is visible - this.grid.getView().focusRow(row); - } - } - }, - - /** private: method[featureUnselected] - * :param evt: ``Object`` An object with a feature property referencing - * the unselected feature. - */ - featureUnselected: function(evt) { - if(!this._selecting) { - var store = this.grid.store; - var row = store.findBy(function(record, id) { - return record.getFeature() == evt.feature; - }); - if(row != -1 && this.isSelected(row)) { - this._selecting = true; - this.deselectRow(row); - this._selecting = false; - this.grid.getView().focusRow(row); - } - } - }, - - /** private: method[rowSelected] - * :param model: ``Ext.grid.RowSelectModel`` The row select model. - * :param row: ``Integer`` The row index. - * :param record: ``Ext.data.Record`` The record. - */ - rowSelected: function(model, row, record) { - var feature = record.getFeature(); - if(!this._selecting && feature) { - var layers = this.getLayers(); - for(var i = 0, len = layers.length; i < len; i++) { - if(layers[i].selectedFeatures.indexOf(feature) == -1) { - this._selecting = true; - this.selectControl.select(feature); - this._selecting = false; - break; - } - } - } - }, - - /** private: method[rowDeselected] - * :param model: ``Ext.grid.RowSelectModel`` The row select model. - * :param row: ``Integer`` The row index. - * :param record: ``Ext.data.Record`` The record. - */ - rowDeselected: function(model, row, record) { - var feature = record.getFeature(); - if(!this._selecting && feature) { - var layers = this.getLayers(); - for(var i = 0, len = layers.length; i < len; i++) { - if(layers[i].selectedFeatures.indexOf(feature) != -1) { - this._selecting = true; - this.selectControl.unselect(feature); - this._selecting = false; - break; - } - } - } - }, - - /** private: method[getLayers] - * Return the layers attached to the select feature control. - */ - getLayers: function() { - return this.selectControl.layers || [this.selectControl.layer]; - } - }; -}; - -GeoExt.grid.FeatureSelectionModel = Ext.extend( - Ext.grid.RowSelectionModel, - new GeoExt.grid.FeatureSelectionModelMixin -); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tips/LayerOpacitySliderTip.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tips/LayerOpacitySliderTip.js deleted file mode 100644 index 062ce102962..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tips/LayerOpacitySliderTip.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @requires GeoExt/widgets/tips/SliderTip.js - */ - -/** api: (extends) - * GeoExt/widgets/tips/SliderTip.js - */ - -/** api: (define) - * module = GeoExt - * class = LayerOpacitySliderTip - * base_link = `Ext.Tip `_ - */ -Ext.namespace("GeoExt"); - -/** api: example - * Sample code to create a slider tip to display scale and resolution: - * - * .. code-block:: javascript - * - * var slider = new GeoExt.LayerOpacitySlider({ - * renderTo: document.body, - * width: 200, - * layer: layer, - * plugins: new GeoExt.LayerOpacitySliderTip({ - * template: "Opacity: {opacity}%" - * }) - * }); - */ - -/** api: constructor - * .. class:: LayerOpacitySliderTip(config) - * - * Create a slider tip displaying :class:`GeoExt.LayerOpacitySlider` values. - */ -GeoExt.LayerOpacitySliderTip = Ext.extend(GeoExt.SliderTip, { - - /** api: config[template] - * ``String`` - * Template for the tip. Can be customized using the following keywords in - * curly braces: - * - * * ``opacity`` - the opacity value in percent. - */ - template: '
      {opacity}%
      ', - - /** private: property[compiledTemplate] - * ``Ext.Template`` - * The template compiled from the ``template`` string on init. - */ - compiledTemplate: null, - - /** private: method[init] - * Called to initialize the plugin. - */ - init: function(slider) { - this.compiledTemplate = new Ext.Template(this.template); - GeoExt.LayerOpacitySliderTip.superclass.init.call(this, slider); - }, - - /** private: method[getText] - * :param slider: ``Ext.Slider`` The slider this tip is attached to. - */ - getText: function(thumb) { - var data = { - opacity: thumb.value - }; - return this.compiledTemplate.apply(data); - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tips/SliderTip.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tips/SliderTip.js deleted file mode 100644 index c986f1c282c..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tips/SliderTip.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: (define) - * module = GeoExt - * class = SliderTip - * base_link = `Ext.Tip `_ - */ -Ext.namespace("GeoExt"); - -/** api: example - * Sample code to create a slider tip to display slider value on hover: - * - * .. code-block:: javascript - * - * var slider = new Ext.Slider({ - * renderTo: document.body, - * width: 200, - * plugins: new GeoExt.SliderTip() - * }); - */ - -/** api: constructor - * .. class:: SliderTip(config) - * - * Create a slider tip displaying ``Ext.Slider`` values over slider thumbs. - */ -GeoExt.SliderTip = Ext.extend(Ext.slider.Tip, { - - /** api: config[hover] - * ``Boolean`` - * Display the tip when hovering over the thumb. If ``false``, tip will - * only be displayed while dragging. Default is ``true``. - */ - hover: true, - - /** api: config[minWidth] - * ``Number`` - * Minimum width of the tip. Default is 10. - */ - minWidth: 10, - - /** api: config[offsets] - * ``Array(Number)`` - * A two item list that provides x, y offsets for the tip. Default is - * [0, -10]. - */ - offsets : [0, -10], - - /** private: property[dragging] - * ``Boolean`` - * The thumb is currently being dragged. - */ - dragging: false, - - /** private: method[init] - * :param slider: ``Ext.Slider`` - * - * Called when the plugin is initialized. - */ - init: function(slider) { - GeoExt.SliderTip.superclass.init.apply(this, arguments); - if (this.hover) { - slider.on("render", this.registerThumbListeners, this); - } - this.slider = slider; - }, - - /** private: method[registerThumbListeners] - * Set as a listener for 'render' if hover is true. - */ - registerThumbListeners: function() { - var thumb, el; - for (var i=0, ii=this.slider.thumbs.length; i`_ - */ -Ext.namespace("GeoExt"); - -/** api: example - * Sample code to create a slider tip to display scale and resolution: - * - * .. code-block:: javascript - * - * var slider = new GeoExt.ZoomSlider({ - * renderTo: document.body, - * width: 200, - * map: map, - * plugins: new GeoExt.ZoomSliderTip({ - * template: "Scale: 1 : {scale}
      Resolution: {resolution}" - * }) - * }); - */ - -/** api: constructor - * .. class:: ZoomSliderTip(config) - * - * Create a slider tip displaying :class:`GeoExt.ZoomSlider` values. - */ -GeoExt.ZoomSliderTip = Ext.extend(GeoExt.SliderTip, { - - /** api: config[template] - * ``String`` - * Template for the tip. Can be customized using the following keywords in - * curly braces: - * - * * ``zoom`` - the zoom level - * * ``resolution`` - the resolution - * * ``scale`` - the scale denominator - */ - template: '
      Zoom Level: {zoom}
      ' + - '
      Resolution: {resolution}
      ' + - '
      Scale: 1 : {scale}
      ', - - /** private: property[compiledTemplate] - * ``Ext.Template`` - * The template compiled from the ``template`` string on init. - */ - compiledTemplate: null, - - /** private: method[init] - * Called to initialize the plugin. - */ - init: function(slider) { - this.compiledTemplate = new Ext.Template(this.template); - GeoExt.ZoomSliderTip.superclass.init.call(this, slider); - }, - - /** private: method[getText] - * :param slider: ``Ext.Slider`` The slider this tip is attached to. - */ - getText: function(thumb) { - var data = { - zoom: thumb.value, - resolution: this.slider.getResolution(), - scale: Math.round(this.slider.getScale()) - }; - return this.compiledTemplate.apply(data); - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/BaseLayerContainer.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/BaseLayerContainer.js deleted file mode 100644 index 6338201e8a1..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/BaseLayerContainer.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @requires GeoExt/widgets/tree/LayerContainer.js - */ -Ext.namespace("GeoExt.tree"); - -/** api: (define) - * module = GeoExt.tree - * class = BaseLayerContainer - */ - -/** api: (extends) - * GeoExt/widgets/tree/LayerContainer.js - */ - -/** api: constructor - * .. class:: BaseLayerContainer - * - * A layer container that will collect all base layers of an OpenLayers - * map. Only layers that have displayInLayerSwitcher set to true will be - * included. The childrens' iconCls defaults to "gx-tree-baselayer-icon". - * - * Children will be rendered with a radio button instead of a checkbox, - * showing the user that only one base layer can be active at a time. - * - * To use this node type in ``TreePanel`` config, set nodeType to - * "gx_baselayercontainer". - */ -GeoExt.tree.BaseLayerContainer = Ext.extend(GeoExt.tree.LayerContainer, { - - /** private: method[constructor] - * Private constructor override. - */ - constructor: function(config) { - config = Ext.applyIf(config || {}, { - text: "Base Layer", - loader: {} - }); - config.loader = Ext.applyIf(config.loader, { - baseAttrs: Ext.applyIf(config.loader.baseAttrs || {}, { - iconCls: 'gx-tree-baselayer-icon', - checkedGroup: 'baselayer' - }), - filter: function(record) { - var layer = record.getLayer(); - return layer.displayInLayerSwitcher === true && - layer.isBaseLayer === true; - } - }); - - GeoExt.tree.BaseLayerContainer.superclass.constructor.call(this, - config); - } -}); - -/** - * NodeType: gx_baselayercontainer - */ -Ext.tree.TreePanel.nodeTypes.gx_baselayercontainer = GeoExt.tree.BaseLayerContainer; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerContainer.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerContainer.js deleted file mode 100644 index cab6b89b898..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerContainer.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/widgets/tree/LayerLoader.js - */ -Ext.namespace("GeoExt.tree"); - -/** api: (define) - * module = GeoExt.tree - * class = LayerContainer - * base_link = `Ext.tree.AsyncTreeNode `_ - */ - -/** api: constructor - * .. class:: LayerContainer - * - * A subclass of ``Ext.tree.AsyncTreeNode`` that will collect all layers of an - * OpenLayers map. Only layers that have displayInLayerSwitcher set to true - * will be included. The childrens' iconCls defaults to - * "gx-tree-layer-icon". - * - * Note: if this container is loaded by an ``Ext.tree.TreeLoader``, the - * ``applyLoader`` config option of that loader needs to be set to - * "false". Also note that the list of available uiProviders will be - * taken from the ownerTree if this container's loader is configured - * without one. - * - * To use this node type in ``TreePanel`` config, set nodeType to - * "gx_layercontainer". - */ -GeoExt.tree.LayerContainer = Ext.extend(Ext.tree.AsyncTreeNode, { - - /** api: config[loader] - * :class:`GeoExt.tree.LayerLoader` or ``Object`` The loader to use with - * this container. If an ``Object`` is provided, a - * :class:`GeoExt.tree.LayerLoader`, configured with the the properties - * from the provided object, will be created. - */ - - /** api: config[layerStore] - * :class:`GeoExt.data.LayerStore` The layer store containing layers to be - * displayed in the container. If loader is not provided or provided as - * ``Object``, this property will be set as the store option of the - * loader. Otherwise it will be ignored. - */ - - /** private: method[constructor] - * Private constructor override. - */ - constructor: function(config) { - config = Ext.applyIf(config || {}, { - text: "Layers" - }); - this.loader = config.loader instanceof GeoExt.tree.LayerLoader ? - config.loader : - new GeoExt.tree.LayerLoader(Ext.applyIf(config.loader || {}, { - store: config.layerStore - })); - - GeoExt.tree.LayerContainer.superclass.constructor.call(this, config); - }, - - /** private: method[recordIndexToNodeIndex] - * :param index: ``Number`` The record index in the layer store. - * :return: ``Number`` The appropriate child node index for the record. - */ - recordIndexToNodeIndex: function(index) { - var store = this.loader.store; - var count = store.getCount(); - var nodeCount = this.childNodes.length; - var nodeIndex = -1; - for(var i=count-1; i>=0; --i) { - if(this.loader.filter(store.getAt(i)) === true) { - ++nodeIndex; - if(index === i || nodeIndex > nodeCount-1) { - break; - } - } - } - return nodeIndex; - }, - - /** private: method[destroy] - */ - destroy: function() { - delete this.layerStore; - GeoExt.tree.LayerContainer.superclass.destroy.apply(this, arguments); - } -}); - -/** - * NodeType: gx_layercontainer - */ -Ext.tree.TreePanel.nodeTypes.gx_layercontainer = GeoExt.tree.LayerContainer; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerLoader.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerLoader.js deleted file mode 100644 index 27985107ebc..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerLoader.js +++ /dev/null @@ -1,326 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @include GeoExt/widgets/tree/LayerNode.js - * @include GeoExt/widgets/tree/LayerContainer.js - */ -Ext.namespace("GeoExt.tree"); - -/** api: (define) - * module = GeoExt.tree - * class = LayerLoader - * base_link = `Ext.util.Observable `_ - */ - -/** api: constructor - * .. class:: LayerLoader - * - * A loader that will load all layers of a :class:`GeoExt.data.LayerStore` - * By default, only layers that have displayInLayerSwitcher set to true - * will be included. The childrens' iconCls defaults to - * "gx-tree-layer-icon". - */ -GeoExt.tree.LayerLoader = function(config) { - Ext.apply(this, config); - this.addEvents( - - /** api: event[beforeload] - * Triggered before loading children. Return false to avoid - * loading children. - * - * Listener arguments: - * - * * loader - :class:`GeoExt.tree.LayerLoader` this loader - * * node - ``Ex.tree.TreeNode`` the node that this loader is - * configured with - */ - "beforeload", - - /** api: event[load] - * Triggered after children wer loaded. - * - * Listener arguments: - * - * * loader - :class:`GeoExt.tree.LayerLoader` this loader - * * node - ``Ex.tree.TreeNode`` the node that this loader is - * configured with - */ - "load" - ); - - GeoExt.tree.LayerLoader.superclass.constructor.call(this); -}; - -Ext.extend(GeoExt.tree.LayerLoader, Ext.util.Observable, { - - /** api: config[store] - * :class:`GeoExt.data.LayerStore` - * The layer store containing layers to be added by this loader. - */ - store: null, - - /** api: config[filter] - * ``Function`` - * A function, called in the scope of this loader, with a layer record - * as argument. Is expected to return true for layers to be loaded, false - * otherwise. By default, the filter checks for displayInLayerSwitcher: - * - * .. code-block:: javascript - * - * filter: function(record) { - * return record.getLayer().displayInLayerSwitcher == true - * } - */ - filter: function(record) { - return record.getLayer().displayInLayerSwitcher == true; - }, - - /** api: config[baseAttrs] - * An object containing attributes to be added to all nodes created by - * this loader. - */ - baseAttrs: null, - - /** api: config[uiProviders] - * ``Object`` - * An optional object containing properties which specify custom - * GeoExt.tree.LayerNodeUI implementations. If the optional uiProvider - * attribute for child nodes is a string rather than a reference to a - * TreeNodeUI implementation, then that string value is used as a - * property name in the uiProviders object. If not provided, the - * uiProviders object will be taken from the ownerTree's loader. - */ - uiProviders: null, - - /** private: method[load] - * :param node: ``Ext.tree.TreeNode`` The node to add children to. - * :param callback: ``Function`` - */ - load: function(node, callback) { - if(this.fireEvent("beforeload", this, node)) { - this.removeStoreHandlers(); - while (node.firstChild) { - node.removeChild(node.firstChild); - } - - if(!this.uiProviders) { - this.uiProviders = node.getOwnerTree().getLoader().uiProviders; - } - - if(!this.store) { - this.store = GeoExt.MapPanel.guess().layers; - } - this.store.each(function(record) { - this.addLayerNode(node, record); - }, this); - this.addStoreHandlers(node); - - if(typeof callback == "function"){ - callback(); - } - - this.fireEvent("load", this, node); - } - }, - - /** private: method[onStoreAdd] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param index: ``Number`` - * :param node: ``Ext.tree.TreeNode`` - * - * Listener for the store's add event. - */ - onStoreAdd: function(store, records, index, node) { - if(!this._reordering) { - var nodeIndex = node.recordIndexToNodeIndex(index+records.length-1); - for(var i=0; i 1) { - // find index by neighboring node in the same container - var searchIndex = (index === 0) ? index + 1 : index - 1; - newRecordIndex = this.store.findBy(function(r) { - return newParent.childNodes[searchIndex].layer === r.getLayer(); - }); - index === 0 && newRecordIndex++; - } else if(oldParent.parentNode === newParent.parentNode){ - // find index by last node of a container above - var prev = newParent; - do { - prev = prev.previousSibling; - } while (prev && !(prev instanceof GeoExt.tree.LayerContainer && prev.lastChild)); - if(prev) { - newRecordIndex = this.store.findBy(function(r) { - return prev.lastChild.layer === r.getLayer(); - }); - } else { - // find indext by first node of a container below - var next = newParent; - do { - next = next.nextSibling; - } while (next && !(next instanceof GeoExt.tree.LayerContainer && next.firstChild)); - if(next) { - newRecordIndex = this.store.findBy(function(r) { - return next.firstChild.layer === r.getLayer(); - }); - } - newRecordIndex++; - } - } - if(newRecordIndex !== undefined) { - this.store.insert(newRecordIndex, [record]); - window.setTimeout(function() { - newParent.reload(); - oldParent.reload(); - }); - } else { - this.store.insert(oldRecordIndex, [record]); - } - delete newParent.loader._reordering; - } - delete this._reordering; - }, - - /** private: method[addStoreHandlers] - * :param node: :class:`GeoExt.tree.LayerNode` - */ - addStoreHandlers: function(node) { - if(!this._storeHandlers) { - this._storeHandlers = { - "add": this.onStoreAdd.createDelegate(this, [node], true), - "remove": this.onStoreRemove.createDelegate(this, [node], true) - }; - for(var evt in this._storeHandlers) { - this.store.on(evt, this._storeHandlers[evt], this); - } - } - }, - - /** private: method[removeStoreHandlers] - */ - removeStoreHandlers: function() { - if(this._storeHandlers) { - for(var evt in this._storeHandlers) { - this.store.un(evt, this._storeHandlers[evt], this); - } - delete this._storeHandlers; - } - }, - - /** api: method[createNode] - * :param attr: ``Object`` attributes for the new node - * - * Override this function for custom TreeNode node implementation, or to - * modify the attributes at creation time. - */ - createNode: function(attr) { - if(this.baseAttrs){ - Ext.apply(attr, this.baseAttrs); - } - if(typeof attr.uiProvider == 'string'){ - attr.uiProvider = this.uiProviders[attr.uiProvider] || eval(attr.uiProvider); - } - attr.nodeType = attr.nodeType || "gx_layer"; - - return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr); - }, - - /** private: method[destroy] - */ - destroy: function() { - this.removeStoreHandlers(); - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerNode.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerNode.js deleted file mode 100644 index b6fa4f675ad..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerNode.js +++ /dev/null @@ -1,389 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -Ext.namespace("GeoExt.tree"); - -/** private: constructor - * .. class:: LayerNodeUI - * - * Place in a separate file if this should be documented. - */ -GeoExt.tree.LayerNodeUI = Ext.extend(Ext.tree.TreeNodeUI, { - - /** private: method[constructor] - */ - constructor: function(config) { - GeoExt.tree.LayerNodeUI.superclass.constructor.apply(this, arguments); - }, - - /** private: method[render] - * :param bulkRender: ``Boolean`` - */ - render: function(bulkRender) { - var a = this.node.attributes; - if (a.checked === undefined) { - a.checked = this.node.layer.getVisibility(); - } - GeoExt.tree.LayerNodeUI.superclass.render.apply(this, arguments); - var cb = this.checkbox; - if(a.checkedGroup) { - // replace the checkbox with a radio button - var radio = Ext.DomHelper.insertAfter(cb, - [''].join("")); - radio.defaultChecked = cb.defaultChecked; - Ext.get(cb).remove(); - this.checkbox = radio; - } - this.enforceOneVisible(); - }, - - /** private: method[onClick] - * :param e: ``Object`` - */ - onClick: function(e) { - if(e.getTarget('.x-tree-node-cb', 1)) { - this.toggleCheck(this.isChecked()); - } else { - GeoExt.tree.LayerNodeUI.superclass.onClick.apply(this, arguments); - } - }, - - /** private: method[toggleCheck] - * :param value: ``Boolean`` - */ - toggleCheck: function(value) { - value = (value === undefined ? !this.isChecked() : value); - GeoExt.tree.LayerNodeUI.superclass.toggleCheck.call(this, value); - - this.enforceOneVisible(); - }, - - /** private: method[enforceOneVisible] - * - * Makes sure that only one layer is visible if checkedGroup is set. - */ - enforceOneVisible: function() { - var attributes = this.node.attributes; - var group = attributes.checkedGroup; - // If we are in the baselayer group, the map will take care of - // enforcing visibility. - if(group && group !== "gx_baselayer") { - var layer = this.node.layer; - var checkedNodes = this.node.getOwnerTree().getChecked(); - var checkedCount = 0; - // enforce "not more than one visible" - Ext.each(checkedNodes, function(n){ - var l = n.layer - if(!n.hidden && n.attributes.checkedGroup === group) { - checkedCount++; - if(l != layer && attributes.checked) { - l.setVisibility(false); - } - } - }); - // enforce "at least one visible" - if(checkedCount === 0 && attributes.checked == false) { - layer.setVisibility(true); - } - } - }, - - /** private: method[appendDDGhost] - * :param ghostNode ``DOMElement`` - * - * For radio buttons, makes sure that we do not use the option group of - * the original, otherwise only the original or the clone can be checked - */ - appendDDGhost : function(ghostNode){ - var n = this.elNode.cloneNode(true); - var radio = Ext.DomQuery.select("input[type='radio']", n); - Ext.each(radio, function(r) { - r.name = r.name + "_clone"; - }); - ghostNode.appendChild(n); - } -}); - - -/** api: (define) - * module = GeoExt.tree - * class = LayerNode - * base_link = `Ext.tree.TreeNode `_ - */ - -/** api: constructor - * .. class:: LayerNode(config) - * - * A subclass of ``Ext.tree.TreeNode`` that is connected to an - * ``OpenLayers.Layer`` by setting the node's layer property. Checking or - * unchecking the checkbox of this node will directly affect the layer and - * vice versa. The default iconCls for this node's icon is - * "gx-tree-layer-icon", unless it has children. - * - * Setting the node's layer property to a layer name instead of an object - * will also work. As soon as a layer is found, it will be stored as layer - * property in the attributes hash. - * - * The node's text property defaults to the layer name. - * - * If the node has a checkedGroup attribute configured, it will be - * rendered with a radio button instead of the checkbox. The value of - * the checkedGroup attribute is a string, identifying the options group - * for the node. - * - * To use this node type in a ``TreePanel`` config, set ``nodeType`` to - * "gx_layer". - */ -GeoExt.tree.LayerNode = Ext.extend(Ext.tree.AsyncTreeNode, { - - /** api: config[layer] - * ``OpenLayers.Layer or String`` - * The layer that this layer node will - * be bound to, or the name of the layer (has to match the layer's - * name property). If a layer name is provided, ``layerStore`` also has - * to be provided. - */ - - /** api: property[layer] - * ``OpenLayers.Layer`` - * The layer this node is bound to. - */ - layer: null, - - /** api: config[layerStore] - * :class:`GeoExt.data.LayerStore` ``or "auto"`` - * The layer store containing the layer that this node represents. If set - * to "auto", the node will query the ComponentManager for a - * :class:`GeoExt.MapPanel`, take the first one it finds and take its layer - * store. This property is only required if ``layer`` is provided as a - * string. - */ - layerStore: null, - - /** api: config[loader] - * ``Ext.tree.TreeLoader|Object`` If provided, subnodes will be added to - * this LayerNode. Obviously, only loaders that process an - * ``OpenLayers.Layer`` or :class:`GeoExt.data.LayerRecord` (like - * :class:`GeoExt.tree.LayerParamsLoader`) will actually generate child - * nodes here. If provided as ``Object``, a - * :class:`GeoExt.tree.LayerParamLoader` instance will be created, with - * the provided object as configuration. - */ - - /** private: method[constructor] - * Private constructor override. - */ - constructor: function(config) { - config.leaf = config.leaf || !(config.children || config.loader); - - if(!config.iconCls && !config.children) { - config.iconCls = "gx-tree-layer-icon"; - } - if(config.loader && !(config.loader instanceof Ext.tree.TreeLoader)) { - config.loader = new GeoExt.tree.LayerParamLoader(config.loader); - } - - this.defaultUI = this.defaultUI || GeoExt.tree.LayerNodeUI; - - Ext.apply(this, { - layer: config.layer, - layerStore: config.layerStore - }); - if (config.text) { - this.fixedText = true; - } - GeoExt.tree.LayerNode.superclass.constructor.apply(this, arguments); - }, - - /** private: method[render] - * :param bulkRender: ``Boolean`` - */ - render: function(bulkRender) { - var layer = this.layer instanceof OpenLayers.Layer && this.layer; - if(!layer) { - // guess the store if not provided - if(!this.layerStore || this.layerStore == "auto") { - this.layerStore = GeoExt.MapPanel.guess().layers; - } - // now we try to find the layer by its name in the layer store - var i = this.layerStore.findBy(function(o) { - return o.get("title") == this.layer; - }, this); - if(i != -1) { - // if we found the layer, we can assign it and everything - // will be fine - layer = this.layerStore.getAt(i).getLayer(); - } - } - if (!this.rendered || !layer) { - var ui = this.getUI(); - - if(layer) { - this.layer = layer; - // no DD and radio buttons for base layers - if(layer.isBaseLayer) { - this.draggable = false; - Ext.applyIf(this.attributes, { - checkedGroup: "gx_baselayer" - }); - } - if(!this.text) { - this.text = layer.name; - } - - ui.show(); - this.addVisibilityEventHandlers(); - } else { - ui.hide(); - } - - if(this.layerStore instanceof GeoExt.data.LayerStore) { - this.addStoreEventHandlers(layer); - } - } - GeoExt.tree.LayerNode.superclass.render.apply(this, arguments); - }, - - /** private: method[addVisibilityHandlers] - * Adds handlers that sync the checkbox state with the layer's visibility - * state - */ - addVisibilityEventHandlers: function() { - this.layer.events.on({ - "visibilitychanged": this.onLayerVisibilityChanged, - scope: this - }); - this.on({ - "checkchange": this.onCheckChange, - scope: this - }); - }, - - /** private: method[onLayerVisiilityChanged - * handler for visibilitychanged events on the layer - */ - onLayerVisibilityChanged: function() { - if(!this._visibilityChanging) { - this.getUI().toggleCheck(this.layer.getVisibility()); - } - }, - - /** private: method[onCheckChange] - * :param node: ``GeoExt.tree.LayerNode`` - * :param checked: ``Boolean`` - * - * handler for checkchange events - */ - onCheckChange: function(node, checked) { - if(checked != this.layer.getVisibility()) { - this._visibilityChanging = true; - var layer = this.layer; - if(checked && layer.isBaseLayer && layer.map) { - layer.map.setBaseLayer(layer); - } else { - layer.setVisibility(checked); - } - delete this._visibilityChanging; - } - }, - - /** private: method[addStoreEventHandlers] - * Adds handlers that make sure the node disappeares when the layer is - * removed from the store, and appears when it is re-added. - */ - addStoreEventHandlers: function() { - this.layerStore.on({ - "add": this.onStoreAdd, - "remove": this.onStoreRemove, - "update": this.onStoreUpdate, - scope: this - }); - }, - - /** private: method[onStoreAdd] - * :param store: ``Ext.data.Store`` - * :param records: ``Array(Ext.data.Record)`` - * :param index: ``Number`` - * - * handler for add events on the store - */ - onStoreAdd: function(store, records, index) { - var l; - for(var i=0; i`_ - */ - -/** api: constructor - * .. class:: LayerParamLoader - * - * A loader that creates children from its node's layer - * (``OpenLayers.Layer.HTTPRequest``) by items in one of the values in - * the layer's params object. - */ -GeoExt.tree.LayerParamLoader = function(config) { - Ext.apply(this, config); - this.addEvents( - - /** api: event[beforeload] - * Triggered before loading children. Return false to avoid - * loading children. - * - * Listener arguments: - * - * * loader - :class:`GeoExt.tree.LayerLoader` this loader - * * node - ``Ex.tree.TreeNode`` the node that this loader is - * configured with - */ - "beforeload", - - /** api: event[load] - * Triggered after children were loaded. - * - * Listener arguments: - * - * * loader - :class:`GeoExt.tree.LayerLoader` this loader - * * node - ``Ex.tree.TreeNode`` the node that this loader is - * configured with - */ - "load" - ); - - GeoExt.tree.LayerParamLoader.superclass.constructor.call(this); -}; - -Ext.extend(GeoExt.tree.LayerParamLoader, Ext.util.Observable, { - - /** api: config[param] - * ``String`` Key for a param (key-value pair in the params object of the - * layer) that this loader uses to create childnodes from its items. The - * value can either be an ``Array`` or a ``String``, delimited by the - * character (or string) provided as ``delimiter`` config option. - */ - - /** private: property[param] - * ``String`` - */ - param: null, - - /** api: config[delimiter] - * ``String`` Delimiter of the ``param``'s value's items. Default is - * ``,`` (comma). If the ``param``'s value is an array, this property has - * no effect. - */ - - /** private: property[delimiter] - * ``String`` - */ - delimiter: ",", - - /** private: method[load] - * :param node: ``Ext.tree.TreeNode`` The node to add children to. - * :param callback: ``Function`` - */ - load: function(node, callback) { - if(this.fireEvent("beforeload", this, node)) { - while (node.firstChild) { - node.removeChild(node.firstChild); - } - - var paramValue = - (node.layer instanceof OpenLayers.Layer.HTTPRequest) && - node.layer.params[this.param]; - if(paramValue) { - var items = (paramValue instanceof Array) ? - paramValue.slice() : - paramValue.split(this.delimiter); - - Ext.each(items, function(item, index, allItems) { - this.addParamNode(item, allItems, node); - }, this); - } - - if(typeof callback == "function"){ - callback(); - } - - this.fireEvent("load", this, node); - } - }, - - /** private: method[addParamNode] - * :param paramItem: ``String`` The param item that the child node will - * represent. - * :param allParamItems: ``Array`` The full list of param items. - * :param node: :class:`GeoExt.tree.LayerNode`` The node that the param - * node will be added to as child. - * - * Adds a child node representing a param value of the layer - */ - addParamNode: function(paramItem, allParamItems, node) { - var child = this.createNode({ - layer: node.layer, - param: this.param, - item: paramItem, - allItems: allParamItems, - delimiter: this.delimiter - }); - var sibling = node.item(0); - if(sibling) { - node.insertBefore(child, sibling); - } else { - node.appendChild(child); - } - }, - - /** api: method[createNode] - * :param attr: ``Object`` attributes for the new node - * - * Override this function for custom TreeNode node implementation, or to - * modify the attributes at creation time. - */ - createNode: function(attr){ - if(this.baseAttrs){ - Ext.apply(attr, this.baseAttrs); - } - if(typeof attr.uiProvider == 'string'){ - attr.uiProvider = this.uiProviders[attr.uiProvider] || eval(attr.uiProvider); - } - attr.nodeType = attr.nodeType || "gx_layerparam"; - - return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr); - } -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerParamNode.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerParamNode.js deleted file mode 100644 index a4e2ada73e5..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/LayerParamNode.js +++ /dev/null @@ -1,250 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ -Ext.namespace("GeoExt.tree"); - -/** api: (define) - * module = GeoExt.tree - * class = LayerParamNode - * base_link = `Ext.tree.TreeNode `_ - */ - -/** api: constructor - * .. class:: LayerParamNode - * - * A subclass of ``Ext.tree.TreeNode`` that represents a value of a list of - * values provided as one of an ``OpenLayers.Layer.HTTPRequest``'s params. - * The default iconCls for this node's icon is "gx-tree-layerparam-icon". - * - * To use this node type in a ``TreePanel`` config, set ``nodeType`` to - * "gx_layerparam". - */ -GeoExt.tree.LayerParamNode = Ext.extend(Ext.tree.TreeNode, { - - /** api: config[layer] - * ``OpenLayers.Layer.HTTPRequest|String`` The layer that this node - * represents a subnode of. If provided as string, the string has to - * match the title of one of the records in the ``layerStore``. - */ - - /** private: property[layer] - * ``OpenLayers.Layer.HTTPRequest`` - */ - layer: null, - - /** api: config[layerStore] - * :class:`GeoExt.data.LayerStore` Only used if layer is provided as - * string. The store where we can find the layer. If not provided, the - * store of a map panel found by ``GeoExt.MapPanel::guess`` will be used. - */ - - /** api: config[param] - * ``String`` Key for a param (key-value pair in the params object of the - * layer) that this node represents an item of. The value can either be an - * ``Array`` or a ``String``, delimited by the character (or string) - * provided as ``delimiter`` config option. - */ - - /** private: property[param] - * ``String`` - */ - param: null, - - /** api: config[item] - * ``String`` The param's value's item that this node represents. - */ - - /** private: property[item] - * ``String`` - */ - item: null, - - /** api: config[delimiter] - * ``String`` Delimiter of the ``param``'s value's items. Default is - * ``,`` (comma). If the ``param``'s value is an array, this property - * has no effect. - */ - - /** private: property[delimiter] - * ``String`` - */ - delimiter: null, - - /** private: property[allItems] - * ``Array`` All items in the param value. - */ - allItems: null, - - /** private: method[constructor] - * Private constructor override. - */ - constructor: function(attributes) { - var config = attributes || {}; - config.iconCls = config.iconCls || "gx-tree-layerparam-icon"; - config.text = config.text || config.item; - - this.param = config.param; - this.item = config.item; - this.delimiter = config.delimiter || ","; - this.allItems = config.allItems; - - GeoExt.tree.LayerParamNode.superclass.constructor.apply(this, arguments); - - this.getLayer(); - - if(this.layer) { - - // read items from layer if allItems isn't set - // in the attributes - if(!this.allItems) { - this.allItems = this.getItemsFromLayer(); - } - - // if the "checked" attribute isn't set we derive - // it from what we have in the layer. Else, we need - // to update the layer param based on the value of - // the "checked" attribute - if(this.attributes.checked == null) { - this.attributes.checked = - this.layer.getVisibility() && - this.getItemsFromLayer().indexOf(this.item) >= 0; - } else { - this.onCheckChange(this, this.attributes.checked); - } - - this.layer.events.on({ - "visibilitychanged": this.onLayerVisibilityChanged, - scope: this - }); - - this.on({ - "checkchange": this.onCheckChange, - scope: this - }); - } - }, - - /** private: method[getLayer] - * :return: ``OpenLayers.Layer.HTTPRequest`` the layer - * - * Sets this.layer and returns the layer. - */ - getLayer: function() { - if(!this.layer) { - var layer = this.attributes.layer; - if(typeof layer == "string") { - var store = this.attributes.layerStore || - GeoExt.MapPanel.guess().layers; - var i = store.findBy(function(o) { - return o.get("title") == layer; - }); - layer = i != -1 ? store.getAt(i).getLayer() : null; - } - this.layer = layer; - } - return this.layer; - }, - - /** private: method[getItemsFromLayer] - * :return: ``Array`` the items of this node's layer's param - */ - getItemsFromLayer: function() { - var paramValue = this.layer.params[this.param]; - return paramValue instanceof Array ? - paramValue : - (paramValue ? paramValue.split(this.delimiter) : []); - }, - - /** private: method[createParams] - * :param items: ``Array`` - * :return: ``Object`` The params object to pass to mergeNewParams - */ - createParams: function(items) { - var params = {}; - params[this.param] = this.layer.params[this.param] instanceof Array ? - items : - items.join(this.delimiter); - return params; - }, - - /** private: method[onLayerVisibilityChanged] - * Handler for visibilitychanged events on the layer. - */ - onLayerVisibilityChanged: function() { - if(this.getItemsFromLayer().length === 0) { - this.layer.mergeNewParams(this.createParams(this.allItems)); - } - var visible = this.layer.getVisibility(); - if(visible && this.getItemsFromLayer().indexOf(this.item) !== -1) { - this.getUI().toggleCheck(true); - } - if(!visible) { - this.layer.mergeNewParams(this.createParams([])); - this.getUI().toggleCheck(false); - } - }, - - /** private: method[onCheckChange] - * :param node: :class:`GeoExt.tree.LayerParamNode`` - * :param checked: ``Boolean`` - * - * Handler for checkchange events. - */ - onCheckChange: function(node, checked) { - var layer = this.layer; - - var newItems = []; - var curItems = this.getItemsFromLayer(); - // if the layer is invisible, and a subnode is checked for the first - // time, we need to pretend that no subnode param items are set. - if(checked === true && layer.getVisibility() === false && - curItems.length === this.allItems.length) { - curItems = []; - - } - Ext.each(this.allItems, function(item) { - if((item !== this.item && curItems.indexOf(item) !== -1) || - (checked === true && item === this.item)) { - newItems.push(item); - } - }, this); - - var visible = (newItems.length > 0); - // if there is something to display, we want to update the params - // before the layer is turned on - visible && layer.mergeNewParams(this.createParams(newItems)); - if(visible !== layer.getVisibility()) { - layer.setVisibility(visible); - } - // if there is nothing to display, we want to update the params - // when the layer is turned off, so we don't fire illegal requests - // (i.e. param value being empty) - (!visible) && layer.mergeNewParams(this.createParams([])); - }, - - /** private: method[destroy] - */ - destroy: function() { - var layer = this.layer; - if (layer instanceof OpenLayers.Layer) { - layer.events.un({ - "visibilitychanged": this.onLayerVisibilityChanged, - scope: this - }); - } - delete this.layer; - - this.un("checkchange", this.onCheckChange, this); - - GeoExt.tree.LayerParamNode.superclass.destroy.apply(this, arguments); - } -}); - -/** - * NodeType: gx_layerparam - */ -Ext.tree.TreePanel.nodeTypes.gx_layerparam = GeoExt.tree.LayerParamNode; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/OverlayLayerContainer.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/OverlayLayerContainer.js deleted file mode 100644 index 729faf5de91..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/OverlayLayerContainer.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** - * @requires GeoExt/widgets/tree/LayerContainer.js - */ -Ext.namespace("GeoExt.tree"); - -/** api: (define) - * module = GeoExt.tree - * class = OverlayLayerContainer - */ - -/** api: (extends) - * GeoExt/widgets/tree/LayerContainer.js - */ - -/** api: constructor - * .. class:: OverlayLayerContainer - * - * A layer container that will collect all overlay layers of an OpenLayers - * map. Only layers that have displayInLayerSwitcher set to true will be - * included. - * - * To use this node type in ``TreePanel`` config, set nodeType to - * "gx_overlaylayercontainer". - */ -GeoExt.tree.OverlayLayerContainer = Ext.extend(GeoExt.tree.LayerContainer, { - - /** private: method[constructor] - * Private constructor override. - */ - constructor: function(config) { - config = Ext.applyIf(config || {}, { - text: "Overlays" - }); - config.loader = Ext.applyIf(config.loader || {}, { - filter: function(record){ - var layer = record.getLayer(); - return layer.displayInLayerSwitcher === true && - layer.isBaseLayer === false; - } - }); - - GeoExt.tree.OverlayLayerContainer.superclass.constructor.call(this, - config); - } -}); - -/** - * NodeType: gx_overlaylayercontainer - */ -Ext.tree.TreePanel.nodeTypes.gx_overlaylayercontainer = GeoExt.tree.OverlayLayerContainer; diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/TreeNodeUIEventMixin.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/TreeNodeUIEventMixin.js deleted file mode 100644 index 2090c1b2fa7..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/TreeNodeUIEventMixin.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (c) 2008-2009 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -Ext.namespace("GeoExt.tree"); - -/** api: (define) - * module = GeoExt.tree - * class = TreeNodeUIEventMixin - */ - -/** api: constructor - * A mixin that adds events to TreeNodeUIs. With these events, tree plugins - * can modify the node ui's DOM when it is rendered, and react to raw click - * events on tree nodes. - */ - - /** api: example - * Sample code to create a tree with a node that uses the - * :class:`GeoExt.tree.TreeNodeUIEventMixin`: - * - * .. code-block:: javascript - * - * var UIClass = Ext.extend( - * Ext.tree.TreeNodeUI, - * GeoExt.tree.TreeNodeUIEventMixin - * ); - * var tree = new Ext.tree.TreePanel({ - * root: { - * nodeType: "node", - * uiProvider: UIClass, - * text: "My Node" - * } - * } - */ - -GeoExt.tree.TreeNodeUIEventMixin = function(){ - return { - - constructor: function(node) { - - node.addEvents( - - /** api: event[rendernode] - * Fires on the tree when a node is rendered. - * - * Listener arguments: - * - * * node - ``Ext.TreeNode`` The rendered node. - */ - "rendernode", - - /** api: event[rawclicknode] - * Fires on the tree when a node is clicked. - * - * Listener arguments: - * - * * node - ``Ext.TreeNode`` The clicked node. - * * event - ``Ext.EventObject`` The click event. - */ - "rawclicknode" - ); - this.superclass = arguments.callee.superclass; - this.superclass.constructor.apply(this, arguments); - - }, - - /** private: method[render] - * :param bulkRender: ``Boolean`` - */ - render: function(bulkRender) { - if(!this.rendered) { - this.superclass.render.apply(this, arguments); - this.fireEvent("rendernode", this.node); - } - }, - - /** private: method[onClick] - * :param e: ``Ext.EventObject`` - */ - onClick: function(e) { - if(this.fireEvent("rawclicknode", this.node, e) !== false) { - this.superclass.onClick.apply(this, arguments); - } - } - } -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/WMSCapabilitiesLoader.js b/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/WMSCapabilitiesLoader.js deleted file mode 100644 index 89287932fab..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/GeoExt/widgets/tree/WMSCapabilitiesLoader.js +++ /dev/null @@ -1,132 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -Ext.namespace("GeoExt.tree"); - -/** api: (define) - * module = GeoExt.tree - * class = WMSCapabilitiesLoader - * base_link = `Ext.tree.TreeLoader `_ - */ - -/** api: constructor - * .. class:: WMSCapabilitiesLoader - * - * A loader that will load create a tree of all layers of a Web Map - * Service (WMS), maintaining its tree structure. Nodes created by this - * loader are instances of ``Ext.tree.TreeNode``. If the WMS Capabilities - * advertise a name for a layer, an OpenLayers.Layer.WMS instance will - * be set on the node in its ``layer`` attribute. - */ -GeoExt.tree.WMSCapabilitiesLoader = function(config) { - Ext.apply(this, config); - GeoExt.tree.WMSCapabilitiesLoader.superclass.constructor.call(this); -}; - -Ext.extend(GeoExt.tree.WMSCapabilitiesLoader, Ext.tree.TreeLoader, { - - /** api: config[url] - * ``String`` - * The online resource of the Web Map Service. - */ - url: null, - - /** api: config[layerOptions] - * ``Object`` - * Optional options to set on the WMS layers which will be created by - * this loader. - */ - layerOptions: null, - - /** api: config[layerParams] - * ``Object`` - * Optional parameters to set on the WMS layers which will be created by - * this loader. - */ - layerParams: null, - - /** private: property[requestMethod] - * ``String`` WMS GetCapabilities request needs to be done using HTTP GET - */ - requestMethod: 'GET', - - /** private: method[getParams] - * Private getParams override. - */ - getParams: function(node) { - return {'service': 'WMS', 'request': 'GetCapabilities'}; - }, - - /** private: method[processResponse] - * :param response: ``Object`` The XHR object - * :param node: ``Ext.tree.TreeNode`` - * :param callback: ``Function`` - * :param scope: ``Object`` - * - * Private processResponse override. - */ - processResponse : function(response, node, callback, scope){ - var capabilities = new OpenLayers.Format.WMSCapabilities().read( - response.responseXML || response.responseText); - this.processLayer(capabilities.capability, - capabilities.capability.request.getmap.href, node); - if (typeof callback == "function") { - callback.apply(scope || node, [node]); - } - }, - - /** private: method[createWMSLayer] - * :param layer: ``Object`` The layer object from the WMS GetCapabilities - * parser - * :param url: ``String`` The online resource of the WMS - * :return: ``OpenLayers.Layer.WMS`` or ``null`` The WMS layer created or - * null. - * - * Create a WMS layer which will be attached as an attribute to the - * node. - */ - createWMSLayer: function(layer, url) { - if (layer.name) { - return new OpenLayers.Layer.WMS( layer.title, url, - OpenLayers.Util.extend({formats: layer.formats[0], - layers: layer.name}, this.layerParams), - OpenLayers.Util.extend({minScale: layer.minScale, - queryable: layer.queryable, maxScale: layer.maxScale, - metadata: layer - }, this.layerOptions)); - } else { - return null; - } - }, - - /** private: method[processLayer] - * :param layer: ``Object`` The layer object from the WMS GetCapabilities - * parser - * :param url: ``String`` The online resource of the WMS - * :param node: ``Ext.tree.TreeNode`` - * - * Recursive function to create the tree nodes for the layer structure - * of a WMS GetCapabilities response. - */ - processLayer: function(layer, url, node) { - Ext.each(layer.nestedLayers, function(el) { - var n = this.createNode({text: el.title || el.name, - // use nodeType 'node' so no AsyncTreeNodes are created - nodeType: 'node', - layer: this.createWMSLayer(el, url), - leaf: (el.nestedLayers.length === 0)}); - if(n){ - node.appendChild(n); - } - if (el.nestedLayers) { - this.processLayer(el, url, n); - } - }, this); - } - -}); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/overrides/override-ext-ajax.js b/web-client/src/main/resources/apps/js/GeoExt/lib/overrides/override-ext-ajax.js deleted file mode 100644 index b3268eb8a0a..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/overrides/override-ext-ajax.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2008-2010 The Open Source Geospatial Foundation - * - * Published under the BSD license. - * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text - * of the license. - */ - -/** api: override = Ext.Ajax */ -(function() { - - /** private: function[createComplete] - * ``Function`` - */ - var createComplete = function(fn, cb) { - return function(request) { - if(cb && cb[fn]) { - cb[fn].call(cb.scope || window, { - responseText: request.responseText, - responseXML: request.responseXML, - argument: cb.argument - }); - } - }; - }; - - Ext.apply(Ext.lib.Ajax, { - /** private: method[request] - */ - request: function(method, uri, cb, data, options) { - options = options || {}; - method = method || options.method; - var hs = options.headers; - if(options.xmlData) { - if(!hs || !hs["Content-Type"]) { - hs = hs || {}; - hs["Content-Type"] = "text/xml"; - } - method = method || "POST"; - data = options.xmlData; - } else if(options.jsonData) { - if(!hs || !hs["Content-Type"]) { - hs = hs || {}; - hs["Content-Type"] = "application/json"; - } - method = method || "POST"; - data = typeof options.jsonData == "object" ? - Ext.encode(options.jsonData) : options.jsonData; - } - // if POST method, options.form or options.params means - // form-encoded data, so change content-type - if ((method && method.toLowerCase() == "post") && - (options.form || options.params) && - (!hs || !hs["Content-Type"])) { - hs = hs || {}; - hs["Content-Type"] = "application/x-www-form-urlencoded"; - } - return OpenLayers.Request.issue({ - success: createComplete("success", cb), - failure: createComplete("failure", cb), - method: method, - headers: hs, - data: data, - url: uri - }); - }, - - /** private: method[isCallInProgress] - * :params request: ``Object`` The XHR object. - */ - isCallInProgress: function(request) { - // do not prevent our caller from calling abort() - return true; - }, - - /** private: method[abort] - * :params request: ``Object`` The XHR object. - */ - abort: function(request) { - request.abort(); - } - }); -})(); diff --git a/web-client/src/main/resources/apps/js/GeoExt/lib/overrides/override-ext-ajax.jst b/web-client/src/main/resources/apps/js/GeoExt/lib/overrides/override-ext-ajax.jst deleted file mode 100644 index 098c8a068d8..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/lib/overrides/override-ext-ajax.jst +++ /dev/null @@ -1,64 +0,0 @@ -.. _overrides.ext.ajax: - -Ext.Ajax Overrides -================== - -GeoExt provides an override for the functionality in -`Ext.Ajax `_. If you include -the :file:`override-ext-ajax.js` file in your build, any calls to ``Ext.Ajax`` -methods will be routed through ``OpenLayers.Request`` methods. The practical -implication of this is that you can set the ``OpenLayers.ProxyHost`` property -in your application and have this proxy used by Ext components that call -``Ext.Ajax`` methods. - -To include :file:`override-ext-ajax.js` in your build, the GeoExt section in -your build config should look like one of the following: - -.. code-block:: ini - - # include everything (including override-ext-ajax.js) - [GeoExt.js] - root = ../lib - license = geoext-license.js - exclude = - GeoExt.js - GeoExt/SingleFile.js - - -or - -.. code-block:: ini - - # custom build - [GeoExt.js] - root = ../lib - license = geoext-license.js - include = - overrides/override-ext-ajax.js - # other files listed here ... - - -Workaround for Existing Builds ------------------------------- - -If you are using a build of GeoExt that includes the Ajax overrides (e.g. the -0.6 release or earlier), you can work around any issues you may have using this -override in your appliction by protecting the ``Ext.lib.Ajax`` object before -loading file:`GeoExt.js`. - -The example markup below will remove the effect of the override on Ajax methods. - -.. code-block:: html - - - - - - -Note that issues with the Ajax override present in 0.6 will be fixed in -subsequent releases. diff --git a/web-client/src/main/resources/apps/js/GeoExt/license.txt b/web-client/src/main/resources/apps/js/GeoExt/license.txt deleted file mode 100644 index 2e0fc00be9b..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/license.txt +++ /dev/null @@ -1,44 +0,0 @@ -This license applies to all code and content hosted in the "core" directory of -this repository (http://svn.geoext.org/core/) - including the "trunk", -"branches", and "tags" subdirectories. This license does not apply to external -code and content which may be checked out in working copies (due to -svn:externals properties on subdirectories). - -License -======= - -Copyright (c) 2008-2010, The Open Source Geospatial Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Open Source Geospatial Foundation nor the names - of its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - - -Notice about ExtJS -================== - -The GeoExt library is for use with the ExtJS library. ExtJS is distributed -under the terms of the GPL v3. See http://www.sencha.com/products/license.php -for details on ExtJS licensing. diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/css/geoext-all-debug.css b/web-client/src/main/resources/apps/js/GeoExt/resources/css/geoext-all-debug.css deleted file mode 100644 index 84c754709b0..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/resources/css/geoext-all-debug.css +++ /dev/null @@ -1 +0,0 @@ -@import popup.css;@import layerlegend.css; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/css/geoext-all.css b/web-client/src/main/resources/apps/js/GeoExt/resources/css/geoext-all.css deleted file mode 100644 index ff4c8240ae6..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/resources/css/geoext-all.css +++ /dev/null @@ -1,2 +0,0 @@ - -.gx-popup-anc{background:transparent url(../images/default/anchor.png) no-repeat 0 0;position:relative;top:-1px;left:5px;z-index:2;height:16px;width:31px;}.gx-ruledrag-insert-below{border-bottom:1px dotted;}.gx-ruledrag-insert-above{border-top:1px dotted;} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/css/gxtheme-gray.css b/web-client/src/main/resources/apps/js/GeoExt/resources/css/gxtheme-gray.css deleted file mode 100644 index dad4266d6e9..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/resources/css/gxtheme-gray.css +++ /dev/null @@ -1 +0,0 @@ -.gx-popup-anc{background:transparent url(../images/gray/anchor.png) no-repeat 0 0;position:relative;top:-1px;left:5px;z-index:2;height:16px;width:31px;} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/css/gxtheme-slate.css b/web-client/src/main/resources/apps/js/GeoExt/resources/css/gxtheme-slate.css deleted file mode 100644 index 34fb90b144d..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/resources/css/gxtheme-slate.css +++ /dev/null @@ -1 +0,0 @@ -.gx-popup-anc{background:transparent url(../images/slate/anchor.png) no-repeat 0 0;position:relative;top:-1px;left:5px;z-index:2;height:16px;width:31px;} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/css/layerlegend.css b/web-client/src/main/resources/apps/js/GeoExt/resources/css/layerlegend.css deleted file mode 100644 index b19c40f8ce0..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/resources/css/layerlegend.css +++ /dev/null @@ -1 +0,0 @@ -.gx-ruledrag-insert-below{border-bottom:1px dotted;}.gx-ruledrag-insert-above{border-top:1px dotted;} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/css/popup.css b/web-client/src/main/resources/apps/js/GeoExt/resources/css/popup.css deleted file mode 100644 index 665b10e7edf..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/resources/css/popup.css +++ /dev/null @@ -1 +0,0 @@ -.gx-popup-anc{background:transparent url(../images/default/anchor.png) no-repeat 0 0;position:relative;top:-1px;left:5px;z-index:2;height:16px;width:31px;} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/images/default/anchor.png b/web-client/src/main/resources/apps/js/GeoExt/resources/images/default/anchor.png deleted file mode 100644 index 0cffbc37776..00000000000 Binary files a/web-client/src/main/resources/apps/js/GeoExt/resources/images/default/anchor.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/images/gray/anchor.png b/web-client/src/main/resources/apps/js/GeoExt/resources/images/gray/anchor.png deleted file mode 100644 index 1a7e9c2b878..00000000000 Binary files a/web-client/src/main/resources/apps/js/GeoExt/resources/images/gray/anchor.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/GeoExt/resources/images/slate/anchor.png b/web-client/src/main/resources/apps/js/GeoExt/resources/images/slate/anchor.png deleted file mode 100644 index 18d1ac6f4e1..00000000000 Binary files a/web-client/src/main/resources/apps/js/GeoExt/resources/images/slate/anchor.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/GeoExt/script/GeoExt.js b/web-client/src/main/resources/apps/js/GeoExt/script/GeoExt.js deleted file mode 100644 index 52bf48006cc..00000000000 --- a/web-client/src/main/resources/apps/js/GeoExt/script/GeoExt.js +++ /dev/null @@ -1,331 +0,0 @@ -/* -AA -Copyright (c) 2008-2010, The Open Source Geospatial Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Open Source Geospatial Foundation nor the names - of its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -Ext.namespace('GeoExt');GeoExt.LayerLegend=Ext.extend(Ext.Container,{layerRecord:null,showTitle:true,legendTitle:null,labelCls:null,layerStore:null,initComponent:function(){GeoExt.LayerLegend.superclass.initComponent.call(this);this.autoEl={};this.add({xtype:"label",text:this.getLayerTitle(this.layerRecord),cls:'x-form-item x-form-item-label'+ -(this.labelCls?' '+this.labelCls:'')});if(this.layerRecord&&this.layerRecord.store){this.layerStore=this.layerRecord.store;this.layerStore.on("update",this.onStoreUpdate,this);}},onStoreUpdate:function(store,record,operation){if(record===this.layerRecord&&this.items.getCount()>0){var layer=record.getLayer();this.setVisible(layer.getVisibility()&&layer.calculateInRange()&&layer.displayInLayerSwitcher&&!record.get('hideInLegend'));this.update();}},update:function(){var title=this.getLayerTitle(this.layerRecord);if(this.items.get(0).text!==title){this.items.get(0).setText(title);}},getLayerTitle:function(record){var title=this.legendTitle||"";if(this.showTitle&&!title){if(record&&!record.get("hideTitle")){title=record.get("title")||record.get("name")||record.getLayer().name||"";}} -return title;},beforeDestroy:function(){this.layerStore&&this.layerStore.un("update",this.onStoreUpdate,this);GeoExt.LayerLegend.superclass.beforeDestroy.apply(this,arguments);}});GeoExt.LayerLegend.getTypes=function(layerRecord,preferredTypes){var types=(preferredTypes||[]).concat();var goodTypes=[];for(var type in GeoExt.LayerLegend.types){if(GeoExt.LayerLegend.types[type].supports(layerRecord)){types.indexOf(type)==-1&&goodTypes.push(type);}else{types.remove(type);}} -return types.concat(goodTypes);};GeoExt.LayerLegend.supports=function(layerRecord){};GeoExt.LayerLegend.types={};Ext.namespace('GeoExt');GeoExt.VectorLegend=Ext.extend(GeoExt.LayerLegend,{layerRecord:null,layer:null,rules:null,symbolType:null,untitledPrefix:"Untitled ",clickableSymbol:false,clickableTitle:false,selectOnClick:false,enableDD:false,bodyBorder:false,feature:null,selectedRule:null,currentScaleDenominator:null,initComponent:function(){GeoExt.VectorLegend.superclass.initComponent.call(this);if(this.layerRecord){this.layer=this.layerRecord.getLayer();if(this.layer.map){this.currentScaleDenominator=this.layer.map.getScale();this.layer.map.events.on({"zoomend":this.onMapZoom,scope:this});}} -if(!this.symbolType){if(this.feature){this.symbolType=this.symbolTypeFromFeature(this.feature);}else if(this.layer){if(this.layer.features.length>0){var feature=this.layer.features[0].clone();feature.attributes={};this.feature=feature;this.symbolType=this.symbolTypeFromFeature(this.feature);}else{this.layer.events.on({featuresadded:this.onFeaturesAdded,scope:this});}}} -if(this.layer&&this.feature&&!this.rules){this.setRules();} -this.rulesContainer=new Ext.Container({autoEl:{}});this.add(this.rulesContainer);this.addEvents("titleclick","symbolclick","ruleclick","ruleselected","ruleunselected","rulemoved");this.update();},onMapZoom:function(){this.setCurrentScaleDenominator(this.layer.map.getScale());},symbolTypeFromFeature:function(feature){var match=feature.geometry.CLASS_NAME.match(/Point|Line|Polygon/);return(match&&match[0])||"Point";},onFeaturesAdded:function(){this.layer.events.un({featuresadded:this.onFeaturesAdded,scope:this});var feature=this.layer.features[0].clone();feature.attributes={};this.feature=feature;this.symbolType=this.symbolTypeFromFeature(this.feature);if(!this.rules){this.setRules();} -this.update();},setRules:function(){var style=this.layer.styleMap&&this.layer.styleMap.styles["default"];if(!style){style=new OpenLayers.Style();} -if(style.rules.length===0){this.rules=[new OpenLayers.Rule({symbolizer:style.createSymbolizer(this.feature)})];}else{this.rules=style.rules;}},setCurrentScaleDenominator:function(scale){if(scale!==this.currentScaleDenominator){this.currentScaleDenominator=scale;this.update();}},getRuleEntry:function(rule){return this.rulesContainer.items.get(this.rules.indexOf(rule));},addRuleEntry:function(rule,noDoLayout){this.rulesContainer.add(this.createRuleEntry(rule));if(!noDoLayout){this.doLayout();}},removeRuleEntry:function(rule,noDoLayout){var ruleEntry=this.getRuleEntry(rule);if(ruleEntry){this.rulesContainer.remove(ruleEntry);if(!noDoLayout){this.doLayout();}}},selectRuleEntry:function(rule){var newSelection=rule!=this.selectedRule;if(this.selectedRule){this.unselect();} -if(newSelection){var ruleEntry=this.getRuleEntry(rule);ruleEntry.body.addClass("x-grid3-row-selected");this.selectedRule=rule;this.fireEvent("ruleselected",this,rule);}},unselect:function(){this.rulesContainer.items.each(function(item,i){if(this.rules[i]==this.selectedRule){item.body.removeClass("x-grid3-row-selected");this.selectedRule=null;this.fireEvent("ruleunselected",this,this.rules[i]);}},this);},createRuleEntry:function(rule){var applies=true;if(this.currentScaleDenominator!=null){if(rule.minScaleDenominator){applies=applies&&(this.currentScaleDenominator>=rule.minScaleDenominator);} -if(rule.maxScaleDenominator){applies=applies&&(this.currentScaleDenominatortargetPos){cls="gx-ruledrag-insert-above";}else if(sourcePos=0;--i){comp=this.rulesContainer.getComponent(i);this.rulesContainer.remove(comp,true);}} -for(var i=0,ii=this.rules.length;i=0;--i){if(this.loader.filter(store.getAt(i))===true){++nodeIndex;if(index===i||nodeIndex>nodeCount-1){break;}}} -return nodeIndex;},destroy:function(){delete this.layerStore;GeoExt.tree.LayerContainer.superclass.destroy.apply(this,arguments);}});Ext.tree.TreePanel.nodeTypes.gx_layercontainer=GeoExt.tree.LayerContainer;Ext.namespace("GeoExt.tree");GeoExt.tree.BaseLayerContainer=Ext.extend(GeoExt.tree.LayerContainer,{constructor:function(config){config=Ext.applyIf(config||{},{text:"Base Layer",loader:{}});config.loader=Ext.applyIf(config.loader,{baseAttrs:Ext.applyIf(config.loader.baseAttrs||{},{iconCls:'gx-tree-baselayer-icon',checkedGroup:'baselayer'}),filter:function(record){var layer=record.getLayer();return layer.displayInLayerSwitcher===true&&layer.isBaseLayer===true;}});GeoExt.tree.BaseLayerContainer.superclass.constructor.call(this,config);}});Ext.tree.TreePanel.nodeTypes.gx_baselayercontainer=GeoExt.tree.BaseLayerContainer;Ext.namespace("GeoExt.plugins");GeoExt.plugins.PrintExtent=Ext.extend(Ext.util.Observable,{initialConfig:null,printProvider:null,map:null,layer:null,control:null,pages:null,page:null,constructor:function(config){config=config||{};Ext.apply(this,config);this.initialConfig=config;if(!this.printProvider){this.printProvider=this.pages[0].printProvider;} -if(!this.pages){this.pages=[];} -this.addEvents("selectpage");GeoExt.plugins.PrintExtent.superclass.constructor.apply(this,arguments);},print:function(options){this.printProvider.print(this.map,this.pages,options);},init:function(mapPanel){this.map=mapPanel.map;mapPanel.on("destroy",this.onMapPanelDestroy,this);if(!this.layer){this.layer=new OpenLayers.Layer.Vector(null,{displayInLayerSwitcher:false});} -this.createControl();for(var i=0,len=this.pages.length;i=0;i--){this.removePage(this.pages[i]);} -this.hide();var control=this.control;if(map&&map.events&&control&&control.events){control.destroy();} -var layer=this.layer;if(!this.initialConfig.layer&&map&&map.events&&layer&&layer.events){layer.destroy();} -delete this.layer;delete this.control;delete this.page;this.map=null;},createControl:function(){this.control=new OpenLayers.Control.TransformFeature(this.layer,{preserveAspectRatio:true,eventListeners:{"beforesetfeature":function(e){for(var i=0,len=this.pages.length;i-1){return"application/vnd.ogc.se_inimage";} -if(OpenLayers.Util.indexOf(formats,"application/vnd.ogc.se_xml")>-1){return"application/vnd.ogc.se_xml";} -return formats[0];},imageFormat:function(layer){var formats=layer.formats;if(layer.opaque&&OpenLayers.Util.indexOf(formats,"image/jpeg")>-1){return"image/jpeg";} -if(OpenLayers.Util.indexOf(formats,"image/png")>-1){return"image/png";} -if(OpenLayers.Util.indexOf(formats,"image/png; mode=24bit")>-1){return"image/png; mode=24bit";} -if(OpenLayers.Util.indexOf(formats,"image/gif")>-1){return"image/gif";} -return formats[0];},imageTransparent:function(layer){return layer.opaque==undefined||!layer.opaque;},readRecords:function(data){if(typeof data==="string"||data.nodeType){data=this.meta.format.read(data);} -var version=data.version;var capability=data.capability||{};var url=capability.request&&capability.request.getmap&&capability.request.getmap.href;var layers=capability.layers;var formats=capability.exception?capability.exception.formats:[];var exceptions=this.serviceExceptionFormat(formats);var records=[];if(url&&layers){var fields=this.recordType.prototype.fields;var layer,values,options,params,field,v;for(var i=0,lenI=layers.length;i");} -if(attribution.title){markup.push("" -+attribution.title -+"");} -if(attribution.href){for(var i=0;i" -+markup[i] -+"";}} -return markup.join(" ");}});Ext.namespace("GeoExt.data");GeoExt.data.LayerStoreMixin=function(){return{map:null,reader:null,constructor:function(config){config=config||{};config.reader=config.reader||new GeoExt.data.LayerReader({},config.fields);delete config.fields;var map=config.map instanceof GeoExt.MapPanel?config.map.map:config.map;delete config.map;if(config.layers){config.data=config.layers;} -delete config.layers;var options={initDir:config.initDir};delete config.initDir;arguments.callee.superclass.constructor.call(this,config);if(map){this.bind(map,options);}},bind:function(map,options){if(this.map){return;} -this.map=map;options=options||{};var initDir=options.initDir;if(options.initDir==undefined){initDir=GeoExt.data.LayerStore.MAP_TO_STORE|GeoExt.data.LayerStore.STORE_TO_MAP;} -var layers=map.layers.slice(0);if(initDir&GeoExt.data.LayerStore.STORE_TO_MAP){this.each(function(record){this.map.addLayer(record.getLayer());},this);} -if(initDir&GeoExt.data.LayerStore.MAP_TO_STORE){this.loadData(layers,true);} -map.events.on({"changelayer":this.onChangeLayer,"addlayer":this.onAddLayer,"removelayer":this.onRemoveLayer,scope:this});this.on({"load":this.onLoad,"clear":this.onClear,"add":this.onAdd,"remove":this.onRemove,"update":this.onUpdate,scope:this});this.data.on({"replace":this.onReplace,scope:this});},unbind:function(){if(this.map){this.map.events.un({"changelayer":this.onChangeLayer,"addlayer":this.onAddLayer,"removelayer":this.onRemoveLayer,scope:this});this.un("load",this.onLoad,this);this.un("clear",this.onClear,this);this.un("add",this.onAdd,this);this.un("remove",this.onRemove,this);this.data.un("replace",this.onReplace,this);this.map=null;}},onChangeLayer:function(evt){var layer=evt.layer;var recordIndex=this.findBy(function(rec,id){return rec.getLayer()===layer;});if(recordIndex>-1){var record=this.getAt(recordIndex);if(evt.property==="order"){if(!this._adding&&!this._removing){var layerIndex=this.map.getLayerIndex(layer);if(layerIndex!==recordIndex){this._removing=true;this.remove(record);delete this._removing;this._adding=true;this.insert(layerIndex,[record]);delete this._adding;}}}else if(evt.property==="name"){record.set("title",layer.name);}else{this.fireEvent("update",this,record,Ext.data.Record.EDIT);}}},onAddLayer:function(evt){if(!this._adding){var layer=evt.layer;this._adding=true;this.loadData([layer],true);delete this._adding;}},onRemoveLayer:function(evt){if(this.map.unloadDestroy){if(!this._removing){var layer=evt.layer;this._removing=true;this.remove(this.getById(layer.id));delete this._removing;}}else{this.unbind();}},onLoad:function(store,records,options){if(!Ext.isArray(records)){records=[records];} -if(options&&!options.add){this._removing=true;for(var i=this.map.layers.length-1;i>=0;i--){this.map.removeLayer(this.map.layers[i]);} -delete this._removing;var len=records.length;if(len>0){var layers=new Array(len);for(var j=0;j=0;i--){this.map.removeLayer(this.map.layers[i]);} -delete this._removing;},onAdd:function(store,records,index){if(!this._adding){this._adding=true;var layer;for(var i=records.length-1;i>=0;--i){layer=records[i].getLayer();this.map.addLayer(layer);if(index!==this.map.layers.length-1){this.map.setLayerIndex(layer,index);}} -delete this._adding;}},onRemove:function(store,record,index){if(!this._removing){var layer=record.getLayer();if(this.map.getLayer(layer.id)!=null){this._removing=true;this.removeMapLayer(record);delete this._removing;}}},onUpdate:function(store,record,operation){if(operation===Ext.data.Record.EDIT){if(record.modified&&record.modified.title){var layer=record.getLayer();var title=record.get("title");if(title!==layer.name){layer.setName(title);}}}},removeMapLayer:function(record){this.map.removeLayer(record.getLayer());},onReplace:function(key,oldRecord,newRecord){this.removeMapLayer(oldRecord);},getByLayer:function(layer){var index=this.findBy(function(r){return r.getLayer()===layer;});if(index>-1){return this.getAt(index);}},destroy:function(){this.unbind();GeoExt.data.LayerStore.superclass.destroy.call(this);}};};GeoExt.data.LayerStore=Ext.extend(Ext.data.Store,new GeoExt.data.LayerStoreMixin);GeoExt.data.LayerStore.MAP_TO_STORE=1;GeoExt.data.LayerStore.STORE_TO_MAP=2;Ext.namespace("GeoExt.tree");GeoExt.tree.LayerLoader=function(config){Ext.apply(this,config);this.addEvents("beforeload","load");GeoExt.tree.LayerLoader.superclass.constructor.call(this);};Ext.extend(GeoExt.tree.LayerLoader,Ext.util.Observable,{store:null,filter:function(record){return record.getLayer().displayInLayerSwitcher==true;},baseAttrs:null,uiProviders:null,load:function(node,callback){if(this.fireEvent("beforeload",this,node)){this.removeStoreHandlers();while(node.firstChild){node.removeChild(node.firstChild);} -if(!this.uiProviders){this.uiProviders=node.getOwnerTree().getLoader().uiProviders;} -if(!this.store){this.store=GeoExt.MapPanel.guess().layers;} -this.store.each(function(record){this.addLayerNode(node,record);},this);this.addStoreHandlers(node);if(typeof callback=="function"){callback();} -this.fireEvent("load",this,node);}},onStoreAdd:function(store,records,index,node){if(!this._reordering){var nodeIndex=node.recordIndexToNodeIndex(index+records.length-1);for(var i=0;i1){var searchIndex=(index===0)?index+1:index-1;newRecordIndex=this.store.findBy(function(r){return newParent.childNodes[searchIndex].layer===r.getLayer();});index===0&&newRecordIndex++;}else if(oldParent.parentNode===newParent.parentNode){var prev=newParent;do{prev=prev.previousSibling;}while(prev&&!(prev instanceof GeoExt.tree.LayerContainer&&prev.lastChild));if(prev){newRecordIndex=this.store.findBy(function(r){return prev.lastChild.layer===r.getLayer();});}else{var next=newParent;do{next=next.nextSibling;}while(next&&!(next instanceof GeoExt.tree.LayerContainer&&next.firstChild));if(next){newRecordIndex=this.store.findBy(function(r){return next.firstChild.layer===r.getLayer();});} -newRecordIndex++;}} -if(newRecordIndex!==undefined){this.store.insert(newRecordIndex,[record]);window.setTimeout(function(){newParent.reload();oldParent.reload();});}else{this.store.insert(oldRecordIndex,[record]);} -delete newParent.loader._reordering;} -delete this._reordering;},addStoreHandlers:function(node){if(!this._storeHandlers){this._storeHandlers={"add":this.onStoreAdd.createDelegate(this,[node],true),"remove":this.onStoreRemove.createDelegate(this,[node],true)};for(var evt in this._storeHandlers){this.store.on(evt,this._storeHandlers[evt],this);}}},removeStoreHandlers:function(){if(this._storeHandlers){for(var evt in this._storeHandlers){this.store.un(evt,this._storeHandlers[evt],this);} -delete this._storeHandlers;}},createNode:function(attr){if(this.baseAttrs){Ext.apply(attr,this.baseAttrs);} -if(typeof attr.uiProvider=='string'){attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider);} -attr.nodeType=attr.nodeType||"gx_layer";return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr);},destroy:function(){this.removeStoreHandlers();}});Ext.namespace("GeoExt.plugins");GeoExt.plugins.PrintProviderField=Ext.extend(Ext.util.Observable,{target:null,constructor:function(config){this.initialConfig=config;Ext.apply(this,config);GeoExt.plugins.PrintProviderField.superclass.constructor.apply(this,arguments);},init:function(target){this.target=target;var onCfg={scope:this,"render":this.onRender,"beforedestroy":this.onBeforeDestroy};onCfg[target instanceof Ext.form.ComboBox?"select":"valid"]=this.onFieldChange;target.on(onCfg);},onRender:function(field){var printProvider=this.printProvider||field.ownerCt.printProvider;if(field.store===printProvider.layouts){field.setValue(printProvider.layout.get(field.displayField));printProvider.on({"layoutchange":this.onProviderChange,scope:this});}else if(field.store===printProvider.dpis){field.setValue(printProvider.dpi.get(field.displayField));printProvider.on({"dpichange":this.onProviderChange,scope:this});}else if(field.initialConfig.value===undefined){field.setValue(printProvider.customParams[field.name]);}},onFieldChange:function(field,record){var printProvider=this.printProvider||field.ownerCt.printProvider;var value=field.getValue();this._updating=true;if(record){switch(field.store){case printProvider.layouts:printProvider.setLayout(record);break;case printProvider.dpis:printProvider.setDpi(record);}}else{printProvider.customParams[field.name]=value;} -delete this._updating;},onProviderChange:function(printProvider,rec){if(!this._updating){this.target.setValue(rec.get(this.target.displayField));}},onBeforeDestroy:function(){this.target.un("beforedestroy",this.onBeforeDestroy,this);this.target.un("render",this.onRender,this);this.target.un("select",this.onFieldChange,this);this.target.un("valid",this.onFieldChange,this);this.printProvider.un("layoutchange",this.onProviderChange,this);this.printProvider.un("dpichange",this.onProviderChange,this);}});Ext.preg("gx_printproviderfield",GeoExt.plugins.PrintProviderField);Ext.namespace("GeoExt","GeoExt.data");GeoExt.data.LayerReader=function(meta,recordType){meta=meta||{};if(!(recordType instanceof Function)){recordType=GeoExt.data.LayerRecord.create(recordType||meta.fields||{});} -GeoExt.data.LayerReader.superclass.constructor.call(this,meta,recordType);};Ext.extend(GeoExt.data.LayerReader,Ext.data.DataReader,{totalRecords:null,readRecords:function(layers){var records=[];if(layers){var recordType=this.recordType,fields=recordType.prototype.fields;var i,lenI,j,lenJ,layer,values,field,v;for(i=0,lenI=layers.length;i0){if(styleName){Ext.each(styles,function(s){url=(s.name==styleName&&s.legend)&&s.legend.href;return!url;});}else if(this.defaultStyleIsFirst===true&&!styleNames&&!layer.params.SLD&&!layer.params.SLD_BODY){url=styles[0].legend&&styles[0].legend.href;}} -if(!url){url=layer.getFullRequestString({REQUEST:"GetLegendGraphic",WIDTH:null,HEIGHT:null,EXCEPTIONS:"application/vnd.ogc.se_xml",LAYER:layerName,LAYERS:null,STYLE:(styleName!=='')?styleName:null,STYLES:null,SRS:null,FORMAT:null});} -if(this.useScaleParameter===true&&url.toLowerCase().indexOf("request=getlegendgraphic")!=-1){var scale=layer.map.getScale();url=Ext.urlAppend(url,"SCALE="+scale);} -var params=this.baseParams||{};Ext.applyIf(params,{FORMAT:'image/gif'});if(url.indexOf('?')>0){url=Ext.urlEncode(params,url);} -return url;},update:function(){var layer=this.layerRecord.getLayer();if(!(layer&&layer.map)){return;} -GeoExt.WMSLegend.superclass.update.apply(this,arguments);var layerNames,layerName,i,len;layerNames=[layer.params.LAYERS].join(",").split(",");var destroyList=[];var textCmp=this.items.get(0);this.items.each(function(cmp){i=layerNames.indexOf(cmp.itemId);if(i<0&&cmp!=textCmp){destroyList.push(cmp);}else if(cmp!==textCmp){layerName=layerNames[i];var newUrl=this.getLegendUrl(layerName,layerNames);if(!OpenLayers.Util.isEquivalentUrl(newUrl,cmp.url)){cmp.setUrl(newUrl);}}},this);for(i=0,len=destroyList.length;ipanelSize[0]-padding.right){newPos[0]=panelSize[0]-padding.right-popupSize.width;} -if(popupPos[1]panelSize[1]-padding.bottom){newPos[1]=panelSize[1]-padding.bottom-popupSize.height;} -var dx=popupPos[0]-newPos[0];var dy=popupPos[1]-newPos[1];this.map.pan(dx,dy);},onMapMove:function(){this._mapMove=true;this.position();delete this._mapMove;},addAnchorEvents:function(){this.map.events.on({"move":this.onMapMove,scope:this});this.on({"resize":this.position,"collapse":this.position,"expand":this.position,scope:this});},removeAnchorEvents:function(){this.map.events.un({"move":this.onMapMove,scope:this});this.un("resize",this.position,this);this.un("collapse",this.position,this);this.un("expand",this.position,this);},beforeDestroy:function(){if(this.anchored){this.removeAnchorEvents();} -GeoExt.Popup.superclass.beforeDestroy.call(this);}});Ext.reg('gx_popup',GeoExt.Popup);Ext.namespace("GeoExt.data");GeoExt.data.AttributeStoreMixin=function(){return{constructor:function(c){c=c||{};arguments.callee.superclass.constructor.call(this,Ext.apply(c,{proxy:c.proxy||(!c.data?new Ext.data.HttpProxy({url:c.url,disableCaching:false,method:"GET"}):undefined),reader:new GeoExt.data.AttributeReader(c,c.fields||["name","type","restriction"])}));if(this.feature){this.bind();}},bind:function(){this.on({"update":this.onUpdate,"load":this.onLoad,"add":this.onAdd,scope:this});var records=[];this.each(function(record){records.push(record);});this.updateFeature(records);},onUpdate:function(store,record,operation){this.updateFeature([record]);},onLoad:function(store,records,options){if(!options||options.add!==true){this.updateFeature(records);}},onAdd:function(store,records,index){this.updateFeature(records);},updateFeature:function(records){var feature=this.feature,layer=feature.layer;var i,len,record,name,value,oldValue,dirty;for(i=0,len=records.length;i=0;--i){record=store.getAt(i);layer=record.getLayer();var types=GeoExt.LayerLegend.getTypes(record);if(layer.displayInLayerSwitcher&&types.length>0&&(store.getAt(i).get("hideInLegend")!==true)){++panelIndex;if(index===i||panelIndex>legendCount-1){break;}}} -return panelIndex;},getIdForLayer:function(layer){return this.id+"-"+layer.id;},onStoreAdd:function(store,records,index){var panelIndex=this.recordIndexToPanelIndex(index+records.length-1);for(var i=0,len=records.length;i0){this.insert(index,{xtype:types[0],id:this.getIdForLayer(layer),layerRecord:record,hidden:!((!layer.map&&layer.visibility)||(layer.getVisibility()&&layer.calculateInRange()))});}}},onDestroy:function(){if(this.layerStore){this.layerStore.un("add",this.onStoreAdd,this);this.layerStore.un("remove",this.onStoreRemove,this);this.layerStore.un("clear",this.onStoreClear,this);} -GeoExt.LegendPanel.superclass.onDestroy.apply(this,arguments);}});Ext.reg('gx_legendpanel',GeoExt.LegendPanel);Ext.namespace("GeoExt.form");GeoExt.form.toFilter=function(form,logicalOp,wildcard){if(form instanceof Ext.form.FormPanel){form=form.getForm();} -var filters=[],values=form.getValues(false);for(var prop in values){var s=prop.split("__");var value=values[prop],type;if(s.length>1&&(type=GeoExt.form.toFilter.FILTER_MAP[s[1]])!==undefined){prop=s[0];}else{type=OpenLayers.Filter.Comparison.EQUAL_TO;} -if(type===OpenLayers.Filter.Comparison.LIKE){switch(wildcard){case GeoExt.form.ENDS_WITH:value='.*'+value;break;case GeoExt.form.STARTS_WITH:value+='.*';break;case GeoExt.form.CONTAINS:value='.*'+value+'.*';break;default:break;}} -filters.push(new OpenLayers.Filter.Comparison({type:type,value:value,property:prop}));} -return new OpenLayers.Filter.Logical({type:logicalOp||OpenLayers.Filter.Logical.AND,filters:filters});};GeoExt.form.toFilter.FILTER_MAP={"eq":OpenLayers.Filter.Comparison.EQUAL_TO,"ne":OpenLayers.Filter.Comparison.NOT_EQUAL_TO,"lt":OpenLayers.Filter.Comparison.LESS_THAN,"le":OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,"gt":OpenLayers.Filter.Comparison.GREATER_THAN,"ge":OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,"like":OpenLayers.Filter.Comparison.LIKE};GeoExt.form.ENDS_WITH=1;GeoExt.form.STARTS_WITH=2;GeoExt.form.CONTAINS=3;GeoExt.form.recordToField=function(record){var type=record.get("type");if(typeof type==="object"&&type.xtype){return type;} -var field;var name=record.get("name");var label=record.get("label");var restriction=record.get("restriction")||{};if(label==null){label=name;} -type=type.split(":").pop();var r=GeoExt.form.recordToField.REGEXES;if(type.match(r["text"])){var maxLength=restriction["maxLength"]!==undefined?parseFloat(restriction["maxLength"]):undefined;var minLength=restriction["minLength"]!==undefined?parseFloat(restriction["minLength"]):undefined;field={xtype:"textfield",name:name,fieldLabel:label,maxLength:maxLength,minLength:minLength};}else if(type.match(r["number"])){var maxValue=restriction["maxInclusive"]!==undefined?parseFloat(restriction["maxInclusive"]):undefined;var minValue=restriction["minInclusive"]!==undefined?parseFloat(restriction["minInclusive"]):undefined;field={xtype:"numberfield",name:name,fieldLabel:label,maxValue:maxValue,minValue:minValue};}else if(type.match(r["boolean"])){field={xtype:"checkbox",name:name,boxLabel:label};}else if(type.match(r["date"])){field={xtype:"datefield",fieldLabel:label,name:name};} -return field;} -GeoExt.form.recordToField.REGEXES={"text":new RegExp("^(text|string)$","i"),"number":new RegExp("^(number|float|decimal|double|int|long|integer|short)$","i"),"boolean":new RegExp("^(boolean)$","i"),"date":new RegExp("^(dateTime)$","i")};Ext.namespace("GeoExt.plugins");GeoExt.plugins.PrintPageField=Ext.extend(Ext.util.Observable,{printPage:null,target:null,constructor:function(config){this.initialConfig=config;Ext.apply(this,config);GeoExt.plugins.PrintPageField.superclass.constructor.apply(this,arguments);},init:function(target){this.target=target;var onCfg={"beforedestroy":this.onBeforeDestroy,scope:this};var eventName=target instanceof Ext.form.ComboBox?"select":target instanceof Ext.form.Checkbox?"check":"valid";onCfg[eventName]=this.onFieldChange;target.on(onCfg);this.printPage.on({"change":this.onPageChange,scope:this});this.printPage.printProvider.on({"layoutchange":this.onLayoutChange,scope:this});this.setValue(this.printPage);},onFieldChange:function(field,record){var printProvider=this.printPage.printProvider;var value=field.getValue();this._updating=true;if(field.store===printProvider.scales||field.name==="scale"){this.printPage.setScale(record);}else if(field.name=="rotation"){!isNaN(value)&&this.printPage.setRotation(value);}else{this.printPage.customParams[field.name]=value;} -delete this._updating;},onPageChange:function(printPage){if(!this._updating){this.setValue(printPage);}},onLayoutChange:function(printProvider,layout){var t=this.target;t.name=="rotation"&&t.setDisabled(!layout.get("rotation"));},setValue:function(printPage){var t=this.target;t.suspendEvents();if(t.store===printPage.printProvider.scales||t.name==="scale"){if(printPage.scale){t.setValue(printPage.scale.get(t.displayField));}}else if(t.name=="rotation"){t.setValue(printPage.rotation);} -t.resumeEvents();},onBeforeDestroy:function(){this.target.un("beforedestroy",this.onBeforeDestroy,this);this.target.un("select",this.onFieldChange,this);this.target.un("valid",this.onFieldChange,this);this.printPage.un("change",this.onPageChange,this);this.printPage.printProvider.un("layoutchange",this.onLayoutChange,this);}});Ext.preg("gx_printpagefield",GeoExt.plugins.PrintPageField);Ext.namespace("GeoExt.tree");GeoExt.tree.LayerNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{constructor:function(config){GeoExt.tree.LayerNodeUI.superclass.constructor.apply(this,arguments);},render:function(bulkRender){var a=this.node.attributes;if(a.checked===undefined){a.checked=this.node.layer.getVisibility();} -GeoExt.tree.LayerNodeUI.superclass.render.apply(this,arguments);var cb=this.checkbox;if(a.checkedGroup){var radio=Ext.DomHelper.insertAfter(cb,[''].join(""));radio.defaultChecked=cb.defaultChecked;Ext.get(cb).remove();this.checkbox=radio;} -this.enforceOneVisible();},onClick:function(e){if(e.getTarget('.x-tree-node-cb',1)){this.toggleCheck(this.isChecked());}else{GeoExt.tree.LayerNodeUI.superclass.onClick.apply(this,arguments);}},toggleCheck:function(value){value=(value===undefined?!this.isChecked():value);GeoExt.tree.LayerNodeUI.superclass.toggleCheck.call(this,value);this.enforceOneVisible();},enforceOneVisible:function(){var attributes=this.node.attributes;var group=attributes.checkedGroup;if(group&&group!=="gx_baselayer"){var layer=this.node.layer;var checkedNodes=this.node.getOwnerTree().getChecked();var checkedCount=0;Ext.each(checkedNodes,function(n){var l=n.layer -if(!n.hidden&&n.attributes.checkedGroup===group){checkedCount++;if(l!=layer&&attributes.checked){l.setVisibility(false);}}});if(checkedCount===0&&attributes.checked==false){layer.setVisibility(true);}}},appendDDGhost:function(ghostNode){var n=this.elNode.cloneNode(true);var radio=Ext.DomQuery.select("input[type='radio']",n);Ext.each(radio,function(r){r.name=r.name+"_clone";});ghostNode.appendChild(n);}});GeoExt.tree.LayerNode=Ext.extend(Ext.tree.AsyncTreeNode,{layer:null,layerStore:null,constructor:function(config){config.leaf=config.leaf||!(config.children||config.loader);if(!config.iconCls&&!config.children){config.iconCls="gx-tree-layer-icon";} -if(config.loader&&!(config.loader instanceof Ext.tree.TreeLoader)){config.loader=new GeoExt.tree.LayerParamLoader(config.loader);} -this.defaultUI=this.defaultUI||GeoExt.tree.LayerNodeUI;Ext.apply(this,{layer:config.layer,layerStore:config.layerStore});if(config.text){this.fixedText=true;} -GeoExt.tree.LayerNode.superclass.constructor.apply(this,arguments);},render:function(bulkRender){var layer=this.layer instanceof OpenLayers.Layer&&this.layer;if(!layer){if(!this.layerStore||this.layerStore=="auto"){this.layerStore=GeoExt.MapPanel.guess().layers;} -var i=this.layerStore.findBy(function(o){return o.get("title")==this.layer;},this);if(i!=-1){layer=this.layerStore.getAt(i).getLayer();}} -if(!this.rendered||!layer){var ui=this.getUI();if(layer){this.layer=layer;if(layer.isBaseLayer){this.draggable=false;Ext.applyIf(this.attributes,{checkedGroup:"gx_baselayer"});} -if(!this.text){this.text=layer.name;} -ui.show();this.addVisibilityEventHandlers();}else{ui.hide();} -if(this.layerStore instanceof GeoExt.data.LayerStore){this.addStoreEventHandlers(layer);}} -GeoExt.tree.LayerNode.superclass.render.apply(this,arguments);},addVisibilityEventHandlers:function(){this.layer.events.on({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});this.on({"checkchange":this.onCheckChange,scope:this});},onLayerVisibilityChanged:function(){if(!this._visibilityChanging){this.getUI().toggleCheck(this.layer.getVisibility());}},onCheckChange:function(node,checked){if(checked!=this.layer.getVisibility()){this._visibilityChanging=true;var layer=this.layer;if(checked&&layer.isBaseLayer&&layer.map){layer.map.setBaseLayer(layer);}else{layer.setVisibility(checked);} -delete this._visibilityChanging;}},addStoreEventHandlers:function(){this.layerStore.on({"add":this.onStoreAdd,"remove":this.onStoreRemove,"update":this.onStoreUpdate,scope:this});},onStoreAdd:function(store,records,index){var l;for(var i=0;i=0;}else{this.onCheckChange(this,this.attributes.checked);} -this.layer.events.on({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});this.on({"checkchange":this.onCheckChange,scope:this});}},getLayer:function(){if(!this.layer){var layer=this.attributes.layer;if(typeof layer=="string"){var store=this.attributes.layerStore||GeoExt.MapPanel.guess().layers;var i=store.findBy(function(o){return o.get("title")==layer;});layer=i!=-1?store.getAt(i).getLayer():null;} -this.layer=layer;} -return this.layer;},getItemsFromLayer:function(){var paramValue=this.layer.params[this.param];return paramValue instanceof Array?paramValue:(paramValue?paramValue.split(this.delimiter):[]);},createParams:function(items){var params={};params[this.param]=this.layer.params[this.param]instanceof Array?items:items.join(this.delimiter);return params;},onLayerVisibilityChanged:function(){if(this.getItemsFromLayer().length===0){this.layer.mergeNewParams(this.createParams(this.allItems));} -var visible=this.layer.getVisibility();if(visible&&this.getItemsFromLayer().indexOf(this.item)!==-1){this.getUI().toggleCheck(true);} -if(!visible){this.layer.mergeNewParams(this.createParams([]));this.getUI().toggleCheck(false);}},onCheckChange:function(node,checked){var layer=this.layer;var newItems=[];var curItems=this.getItemsFromLayer();if(checked===true&&layer.getVisibility()===false&&curItems.length===this.allItems.length){curItems=[];} -Ext.each(this.allItems,function(item){if((item!==this.item&&curItems.indexOf(item)!==-1)||(checked===true&&item===this.item)){newItems.push(item);}},this);var visible=(newItems.length>0);visible&&layer.mergeNewParams(this.createParams(newItems));if(visible!==layer.getVisibility()){layer.setVisibility(visible);} -(!visible)&&layer.mergeNewParams(this.createParams([]));},destroy:function(){var layer=this.layer;if(layer instanceof OpenLayers.Layer){layer.events.un({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});} -delete this.layer;this.un("checkchange",this.onCheckChange,this);GeoExt.tree.LayerParamNode.superclass.destroy.apply(this,arguments);}});Ext.tree.TreePanel.nodeTypes.gx_layerparam=GeoExt.tree.LayerParamNode;Ext.namespace('GeoExt');GeoExt.UrlLegend=Ext.extend(GeoExt.LayerLegend,{initComponent:function(){GeoExt.UrlLegend.superclass.initComponent.call(this);this.add(new GeoExt.LegendImage({url:this.layerRecord.get("legendURL")}));},update:function(){GeoExt.UrlLegend.superclass.update.apply(this,arguments);this.items.get(1).setUrl(this.layerRecord.get("legendURL"));}});GeoExt.UrlLegend.supports=function(layerRecord){return layerRecord.get("legendURL")!=null;};GeoExt.LayerLegend.types["gx_urllegend"]=GeoExt.UrlLegend;Ext.reg('gx_urllegend',GeoExt.UrlLegend);Ext.namespace("GeoExt.state");GeoExt.state.PermalinkProvider=function(config){GeoExt.state.PermalinkProvider.superclass.constructor.apply(this,arguments);config=config||{};var url=config.url;delete config.url;Ext.apply(this,config);this.state=this.readURL(url);};Ext.extend(GeoExt.state.PermalinkProvider,Ext.state.Provider,{encodeType:true,readURL:function(url){var state={};var params=OpenLayers.Util.getParameters(url);var k,split,stateId;for(k in params){if(params.hasOwnProperty(k)){split=k.split("_");if(split.length>1){stateId=split[0];state[stateId]=state[stateId]||{};state[stateId][split.slice(1).join("_")]=this.encodeType?this.decodeValue(params[k]):params[k];}}} -return state;},getLink:function(base){base=base||document.location.href;var params={};var id,k,state=this.state;for(id in state){if(state.hasOwnProperty(id)){for(k in state[id]){params[id+"_"+k]=this.encodeType?unescape(this.encodeValue(state[id][k])):state[id][k];}}} -OpenLayers.Util.applyDefaults(params,OpenLayers.Util.getParameters(base));var paramsStr=OpenLayers.Util.getParameterString(params);var qMark=base.indexOf("?");if(qMark>0){base=base.substring(0,qMark);} -return Ext.urlAppend(base,paramsStr);}});Ext.namespace('GeoExt');GeoExt.LegendImage=Ext.extend(Ext.BoxComponent,{url:null,defaultImgSrc:null,imgCls:null,initComponent:function(){GeoExt.LegendImage.superclass.initComponent.call(this);if(this.defaultImgSrc===null){this.defaultImgSrc=Ext.BLANK_IMAGE_URL;} -this.autoEl={tag:"img","class":(this.imgCls?this.imgCls:""),src:this.defaultImgSrc};},setUrl:function(url){this.url=url;var el=this.getEl();if(el){el.un("error",this.onImageLoadError,this);el.on("error",this.onImageLoadError,this,{single:true});el.dom.src=url;}},onRender:function(ct,position){GeoExt.LegendImage.superclass.onRender.call(this,ct,position);if(this.url){this.setUrl(this.url);}},onDestroy:function(){var el=this.getEl();if(el){el.un("error",this.onImageLoadError,this);} -GeoExt.LegendImage.superclass.onDestroy.apply(this,arguments);},onImageLoadError:function(){this.getEl().dom.src=this.defaultImgSrc;}});Ext.reg('gx_legendimage',GeoExt.LegendImage);Ext.namespace("GeoExt");GeoExt.LayerOpacitySlider=Ext.extend(Ext.Slider,{layer:null,complementaryLayer:null,delay:5,changeVisibilityDelay:5,aggressive:false,changeVisibility:false,value:null,inverse:false,constructor:function(config){if(config.layer){this.layer=this.getLayer(config.layer);this.bind();this.complementaryLayer=this.getLayer(config.complementaryLayer);if(config.inverse!==undefined){this.inverse=config.inverse;} -config.value=(config.value!==undefined)?config.value:this.getOpacityValue(this.layer);delete config.layer;delete config.complementaryLayer;} -GeoExt.LayerOpacitySlider.superclass.constructor.call(this,config);},bind:function(){if(this.layer&&this.layer.map){this.layer.map.events.on({changelayer:this.update,scope:this});}},unbind:function(){if(this.layer&&this.layer.map){this.layer.map.events.un({changelayer:this.update,scope:this});}},update:function(evt){if(evt.property==="opacity"&&evt.layer==this.layer){this.setValue(this.getOpacityValue(this.layer));}},setLayer:function(layer){this.unbind();this.layer=this.getLayer(layer);this.setValue(this.getOpacityValue(layer));this.bind();},getOpacityValue:function(layer){var value;if(layer&&layer.opacity!==null){value=parseInt(layer.opacity*(this.maxValue-this.minValue));}else{value=this.maxValue;} -if(this.inverse===true){value=(this.maxValue-this.minValue)-value;} -return value;},getLayer:function(layer){if(layer instanceof OpenLayers.Layer){return layer;}else if(layer instanceof GeoExt.data.LayerRecord){return layer.getLayer();}},initComponent:function(){GeoExt.LayerOpacitySlider.superclass.initComponent.call(this);if(this.changeVisibility&&this.layer&&(this.layer.opacity==0||(this.inverse===false&&this.value==this.minValue)||(this.inverse===true&&this.value==this.maxValue))){this.layer.setVisibility(false);} -if(this.complementaryLayer&&((this.layer&&this.layer.opacity==1)||(this.inverse===false&&this.value==this.maxValue)||(this.inverse===true&&this.value==this.minValue))){this.complementaryLayer.setVisibility(false);} -if(this.aggressive===true){this.on('change',this.changeLayerOpacity,this,{buffer:this.delay});}else{this.on('changecomplete',this.changeLayerOpacity,this);} -if(this.changeVisibility===true){this.on('change',this.changeLayerVisibility,this,{buffer:this.changeVisibilityDelay});} -if(this.complementaryLayer){this.on('change',this.changeComplementaryLayerVisibility,this,{buffer:this.changeVisibilityDelay});} -this.on("beforedestroy",this.unbind,this);},changeLayerOpacity:function(slider,value){if(this.layer){value=value/(this.maxValue-this.minValue);if(this.inverse===true){value=1-value;} -this.layer.setOpacity(value);}},changeLayerVisibility:function(slider,value){var currentVisibility=this.layer.getVisibility();if((this.inverse===false&&value==this.minValue)||(this.inverse===true&&value==this.maxValue)&¤tVisibility===true){this.layer.setVisibility(false);}else if((this.inverse===false&&value>this.minValue)||(this.inverse===true&&valuethis.minValue)&¤tVisibility==false){this.complementaryLayer.setVisibility(true);}},addToMapPanel:function(panel){this.on({render:function(){var el=this.getEl();el.setStyle({position:"absolute",zIndex:panel.map.Z_INDEX_BASE.Control});el.on({mousedown:this.stopMouseEvents,click:this.stopMouseEvents});},scope:this});},removeFromMapPanel:function(panel){var el=this.getEl();el.un({mousedown:this.stopMouseEvents,click:this.stopMouseEvents,scope:this});this.unbind();},stopMouseEvents:function(e){e.stopEvent();}});Ext.reg('gx_opacityslider',GeoExt.LayerOpacitySlider);Ext.namespace("GeoExt.data");GeoExt.data.AttributeReader=function(meta,recordType){meta=meta||{};if(!meta.format){meta.format=new OpenLayers.Format.WFSDescribeFeatureType();} -GeoExt.data.AttributeReader.superclass.constructor.call(this,meta,recordType||meta.fields);if(meta.feature){this.recordType.prototype.fields.add(new Ext.data.Field("value"));}};Ext.extend(GeoExt.data.AttributeReader,Ext.data.DataReader,{read:function(request){var data=request.responseXML;if(!data||!data.documentElement){data=request.responseText;} -return this.readRecords(data);},readRecords:function(data){var attributes;if(data instanceof Array){attributes=data;}else{attributes=this.meta.format.read(data).featureTypes[0].properties;} -var feature=this.meta.feature;var recordType=this.recordType;var fields=recordType.prototype.fields;var numFields=fields.length;var attr,values,name,record,ignore,value,records=[];for(var i=0,len=attributes.length;i-1);}else if(matches instanceof RegExp){ignore=(matches.test(value));}} -return ignore;}});Ext.namespace("GeoExt.plugins");GeoExt.plugins.TreeNodeComponent=Ext.extend(Ext.util.Observable,{constructor:function(config){Ext.apply(this.initialConfig,Ext.apply({},config));Ext.apply(this,config);GeoExt.plugins.TreeNodeComponent.superclass.constructor.apply(this,arguments);},init:function(tree){tree.on({"rendernode":this.onRenderNode,scope:this});},onRenderNode:function(node){var rendered=node.rendered;var attr=node.attributes;var component=attr.component||this.component;if(!rendered&&component){var elt=Ext.DomHelper.append(node.ui.elNode,[{"tag":"div"}]);if(typeof component=="function"){component=component(node,elt);}else if(typeof component=="object"&&typeof component.fn=="function"){component=component.fn.apply(component.scope,[node,elt]);} -if(typeof component=="object"&&typeof component.xtype=="string"){component=Ext.ComponentMgr.create(component);} -if(component instanceof Ext.Component){component.render(elt);node.component=component;}}},destroy:function(){tree.un("rendernode",this.onRenderNode,this);}});Ext.preg&&Ext.preg("gx_treenodecomponent",GeoExt.plugins.TreeNodeComponent);Ext.namespace("GeoExt");GeoExt.ZoomSliderTip=Ext.extend(GeoExt.SliderTip,{template:'
      Zoom Level: {zoom}
      '+'
      Resolution: {resolution}
      '+'
      Scale: 1 : {scale}
      ',compiledTemplate:null,init:function(slider){this.compiledTemplate=new Ext.Template(this.template);GeoExt.ZoomSliderTip.superclass.init.call(this,slider);},getText:function(thumb){var data={zoom:thumb.value,resolution:this.slider.getResolution(),scale:Math.round(this.slider.getScale())};return this.compiledTemplate.apply(data);}});Ext.namespace("GeoExt.data");GeoExt.data.PrintProvider=Ext.extend(Ext.util.Observable,{url:null,capabilities:null,method:"POST",customParams:null,scales:null,dpis:null,layouts:null,dpi:null,layout:null,constructor:function(config){this.initialConfig=config;Ext.apply(this,config);if(!this.customParams){this.customParams={};} -this.addEvents("loadcapabilities","layoutchange","dpichange","beforeprint","print","printexception","beforeencodelayer","encodelayer");GeoExt.data.PrintProvider.superclass.constructor.apply(this,arguments);this.scales=new Ext.data.JsonStore({root:"scales",sortInfo:{field:"value",direction:"DESC"},fields:["name",{name:"value",type:"float"}]});this.dpis=new Ext.data.JsonStore({root:"dpis",fields:["name",{name:"value",type:"float"}]});this.layouts=new Ext.data.JsonStore({root:"layouts",fields:["name",{name:"size",mapping:"map"},{name:"rotation",type:"boolean"}]});if(config.capabilities){this.loadStores();}else{if(this.url.split("/").pop()){this.url+="/";} -this.initialConfig.autoLoad&&this.loadCapabilities();}},setLayout:function(layout){this.layout=layout;this.fireEvent("layoutchange",this,layout);},setDpi:function(dpi){this.dpi=dpi;this.fireEvent("dpichange",this,dpi);},print:function(map,pages,options){if(map instanceof GeoExt.MapPanel){map=map.map;} -pages=pages instanceof Array?pages:[pages];options=options||{};if(this.fireEvent("beforeprint",this,map,pages,options)===false){return;} -var jsonData=Ext.apply({units:map.getUnits(),srs:map.baseLayer.projection.getCode(),layout:this.layout.get("name"),dpi:this.dpi.get("value")},this.customParams);var pagesLayer=pages[0].feature.layer;var encodedLayers=[];Ext.each(map.layers,function(layer){if(layer!==pagesLayer&&layer.getVisibility()===true){var enc=this.encodeLayer(layer);enc&&encodedLayers.push(enc);}},this);jsonData.layers=encodedLayers;var encodedPages=[];Ext.each(pages,function(page){encodedPages.push(Ext.apply({center:[page.center.lon,page.center.lat],scale:page.scale.get("value"),rotation:page.rotation},page.customParams));},this);jsonData.pages=encodedPages;if(options.overview){var encodedOverviewLayers=[];Ext.each(options.overview.layers,function(layer){var enc=this.encodeLayer(layer);enc&&encodedOverviewLayers.push(enc);},this);jsonData.overviewLayers=encodedOverviewLayers;} -if(options.legend){var legend=options.legend;var rendered=legend.rendered;if(!rendered){legend=legend.cloneConfig({renderTo:document.body,hidden:true});} -var encodedLegends=[];legend.items.each(function(cmp){if(!cmp.hidden){var encFn=this.encoders.legends[cmp.getXType()];encodedLegends=encodedLegends.concat(encFn.call(this,cmp));}},this);if(!rendered){legend.destroy();} -jsonData.legends=encodedLegends;} -if(this.method==="GET"){var url=Ext.urlAppend(this.capabilities.printURL,"spec="+encodeURIComponent(Ext.encode(jsonData)));window.open(url);this.fireEvent("print",this,url);}else{Ext.Ajax.request({url:this.capabilities.createURL,jsonData:jsonData,success:function(response){var url=Ext.decode(response.responseText).getURL+ -(Ext.isIE?"?inline=true":"");if(Ext.isOpera||Ext.isIE){window.open(url);}else{window.location.href=url;} -this.fireEvent("print",this,url);},failure:function(response){this.fireEvent("printexception",this,response);},params:this.initialConfig.baseParams,scope:this});}},loadCapabilities:function(){if(!this.url){return;} -var url=this.url+"info.json";Ext.Ajax.request({url:url,method:"GET",disableCaching:false,success:function(response){this.capabilities=Ext.decode(response.responseText);this.loadStores();},params:this.initialConfig.baseParams,scope:this});},loadStores:function(){this.scales.loadData(this.capabilities);this.dpis.loadData(this.capabilities);this.layouts.loadData(this.capabilities);this.setLayout(this.layouts.getAt(0));this.setDpi(this.dpis.getAt(0));this.fireEvent("loadcapabilities",this,this.capabilities);},encodeLayer:function(layer){var encLayer;for(var c in this.encoders.layers){if(OpenLayers.Layer[c]&&layer instanceof OpenLayers.Layer[c]){if(this.fireEvent("beforeencodelayer",this,layer)===false){return;} -encLayer=this.encoders.layers[c].call(this,layer);this.fireEvent("encodelayer",this,layer,encLayer);break;}} -return(encLayer&&encLayer.type)?encLayer:null;},getAbsoluteUrl:function(url){var a;if(Ext.isIE){a=document.createElement("");a.style.display="none";document.body.appendChild(a);a.href=a.href;document.body.removeChild(a);}else{a=document.createElement("a");a.href=url;} -return a.href;},encoders:{"layers":{"WMS":function(layer){var enc=this.encoders.layers.HTTPRequest.call(this,layer);Ext.apply(enc,{type:'WMS',layers:[layer.params.LAYERS].join(",").split(","),format:layer.params.FORMAT,styles:[layer.params.STYLES].join(",").split(",")});var param;for(var p in layer.params){param=p.toLowerCase();if(!layer.DEFAULT_PARAMS[param]&&"layers,styles,width,height,srs".indexOf(param)==-1){if(!enc.customParams){enc.customParams={};} -enc.customParams[p]=layer.params[p];}} -return enc;},"OSM":function(layer){var enc=this.encoders.layers.TileCache.call(this,layer);return Ext.apply(enc,{type:'OSM',baseURL:enc.baseURL.substr(0,enc.baseURL.indexOf("$")),extension:"png"});},"TMS":function(layer){var enc=this.encoders.layers.TileCache.call(this,layer);return Ext.apply(enc,{type:'TMS',format:layer.type});},"TileCache":function(layer){var enc=this.encoders.layers.HTTPRequest.call(this,layer);return Ext.apply(enc,{type:'TileCache',layer:layer.layername,maxExtent:layer.maxExtent.toArray(),tileSize:[layer.tileSize.w,layer.tileSize.h],extension:layer.extension,resolutions:layer.serverResolutions||layer.resolutions});},"KaMapCache":function(layer){var enc=this.encoders.layers.KaMap.call(this,layer);return Ext.apply(enc,{type:'KaMapCache',group:layer.params['g'],metaTileWidth:layer.params['metaTileSize']['w'],metaTileHeight:layer.params['metaTileSize']['h']});},"KaMap":function(layer){var enc=this.encoders.layers.HTTPRequest.call(this,layer);return Ext.apply(enc,{type:'KaMap',map:layer.params['map'],extension:layer.params['i'],group:layer.params['g']||"",maxExtent:layer.maxExtent.toArray(),tileSize:[layer.tileSize.w,layer.tileSize.h],resolutions:layer.serverResolutions||layer.resolutions});},"HTTPRequest":function(layer){return{baseURL:this.getAbsoluteUrl(layer.url instanceof Array?layer.url[0]:layer.url),opacity:(layer.opacity!=null)?layer.opacity:1.0,singleTile:layer.singleTile};},"Image":function(layer){return{type:'Image',baseURL:this.getAbsoluteUrl(layer.getURL(layer.extent)),opacity:(layer.opacity!=null)?layer.opacity:1.0,extent:layer.extent.toArray(),pixelSize:[layer.size.w,layer.size.h],name:layer.name};},"Vector":function(layer){if(!layer.features.length){return;} -var encFeatures=[];var encStyles={};var features=layer.features;var featureFormat=new OpenLayers.Format.GeoJSON();var styleFormat=new OpenLayers.Format.JSON();var nextId=1;var styleDict={};var feature,style,dictKey,dictItem,styleName;for(var i=0,len=features.length;i0?this.map:null});} -if(typeof this.center=="string"){this.center=OpenLayers.LonLat.fromString(this.center);}else if(this.center instanceof Array){this.center=new OpenLayers.LonLat(this.center[0],this.center[1]);} -if(typeof this.extent=="string"){this.extent=OpenLayers.Bounds.fromString(this.extent);}else if(this.extent instanceof Array){this.extent=OpenLayers.Bounds.fromArray(this.extent);} -GeoExt.MapPanel.superclass.initComponent.call(this);this.addEvents("aftermapmove","afterlayervisibilitychange","afterlayeropacitychange");this.map.events.on({"moveend":this.onMoveend,"changelayer":this.onLayerchange,scope:this});},onMoveend:function(){this.fireEvent("aftermapmove");},onLayerchange:function(e){if(e.property){if(e.property==="visibility"){this.fireEvent("afterlayervisibilitychange");}else if(e.property==="opacity"){this.fireEvent("afterlayeropacitychange");}}},applyState:function(state){this.center=new OpenLayers.LonLat(state.x,state.y);this.zoom=state.zoom;var i,l,layer,layerId,visibility,opacity;var layers=this.map.layers;for(i=0,l=layers.length;i0){if(this.center||this.zoom!=null){map.setCenter(this.center,this.zoom);}else if(this.extent){map.zoomToExtent(this.extent);}else{map.zoomToMaxExtent();}}},afterRender:function(){GeoExt.MapPanel.superclass.afterRender.apply(this,arguments);if(!this.ownerCt){this.renderMap();}else{this.ownerCt.on("move",this.updateMapSize,this);this.ownerCt.on({"afterlayout":{fn:this.renderMap,scope:this,single:true}});}},onResize:function(){GeoExt.MapPanel.superclass.onResize.apply(this,arguments);this.updateMapSize();},onBeforeAdd:function(item){if(typeof item.addToMapPanel==="function"){item.addToMapPanel(this);} -GeoExt.MapPanel.superclass.onBeforeAdd.apply(this,arguments);},remove:function(item,autoDestroy){if(typeof item.removeFromMapPanel==="function"){item.removeFromMapPanel(this);} -GeoExt.MapPanel.superclass.remove.apply(this,arguments);},beforeDestroy:function(){if(this.ownerCt){this.ownerCt.un("move",this.updateMapSize,this);} -if(this.map&&this.map.events){this.map.events.un({"moveend":this.onMoveend,"changelayer":this.onLayerchange,scope:this});} -if(!this.initialConfig.map||!(this.initialConfig.map instanceof OpenLayers.Map)){if(this.map&&this.map.destroy){this.map.destroy();}} -delete this.map;GeoExt.MapPanel.superclass.beforeDestroy.apply(this,arguments);}});GeoExt.MapPanel.guess=function(){return Ext.ComponentMgr.all.find(function(o){return o instanceof GeoExt.MapPanel;});};Ext.reg('gx_mappanel',GeoExt.MapPanel);Ext.namespace("GeoExt");GeoExt.PrintMapPanel=Ext.extend(GeoExt.MapPanel,{sourceMap:null,printProvider:null,printPage:null,previewScales:null,center:null,zoom:null,extent:null,currentZoom:null,initComponent:function(){if(this.sourceMap instanceof GeoExt.MapPanel){this.sourceMap=this.sourceMap.map;} -if(!this.map){this.map={};} -Ext.applyIf(this.map,{projection:this.sourceMap.getProjection(),maxExtent:this.sourceMap.getMaxExtent(),maxResolution:this.sourceMap.getMaxResolution(),units:this.sourceMap.getUnits()});if(!(this.printProvider instanceof GeoExt.data.PrintProvider)){this.printProvider=new GeoExt.data.PrintProvider(this.printProvider);} -this.printPage=new GeoExt.data.PrintPage({printProvider:this.printProvider});this.previewScales=new Ext.data.Store();this.previewScales.add(this.printProvider.scales.getRange());this.layers=[];var layer;Ext.each(this.sourceMap.layers,function(layer){var clone=layer.clone();layer.getVisibility()===true&&this.layers.push(clone);},this);this.extent=this.sourceMap.getExtent();GeoExt.PrintMapPanel.superclass.initComponent.call(this);this.printProvider.on("layoutchange",this.syncSize,this);this.printPage.on("change",this.fitZoom,this);this.map.events.register("moveend",this,this.updatePage);},afterRender:function(){GeoExt.PrintMapPanel.superclass.afterRender.apply(this,arguments);this.syncSize();if(this.initialConfig.limitScales===true){if(!this.ownerCt){this.calculatePreviewScales();}else{this.ownerCt.on({"afterlayout":{fn:this.calculatePreviewScales,scope:this,single:true}});} -this.on("resize",this.calculatePreviewScales,this);}},adjustSize:function(width,height){var printSize=this.printProvider.layout.get("size");var ratio=printSize.width/printSize.height;var ownerCt=this.ownerCt;var targetWidth=(ownerCt&&ownerCt.autoWidth)?0:(width||this.initialConfig.width);var targetHeight=(ownerCt&&ownerCt.autoHeight)?0:(height||this.initialConfig.height);if(targetWidth){height=targetWidth/ratio;if(targetHeight&&height>targetHeight){height=targetHeight;width=height*ratio;}else{width=targetWidth;}}else if(targetHeight){width=targetHeight*ratio;height=targetHeight;} -return{width:width,height:height};},fitZoom:function(){if(!this._updating&&this.printPage.scale){this._updating=true;var printBounds=this.printPage.getPrintExtent(this.map);this.currentZoom=this.map.getZoomForExtent(printBounds);this.map.zoomToExtent(printBounds);delete this._updating;}},updatePage:function(){if(!this._updating){var zoom=this.map.getZoom();this._updating=true;if(zoom===this.currentZoom){this.printPage.setCenter(this.map.getCenter());}else{this.printPage.fit(this.map);} -delete this._updating;this.currentZoom=zoom;}},calculatePreviewScales:function(){this.previewScales.removeAll();this.printPage.suspendEvents();var scale=this.printPage.scale;var viewSize=this.map.getSize();var scalesByZoom={};var zooms=[];this.printProvider.scales.each(function(rec){this.printPage.setScale(rec);var extent=this.printPage.getPrintExtent(this.map);var zoom=this.map.getZoomForExtent(extent);var idealResolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);var resolution=this.map.getResolutionForZoom(zoom);var diff=Math.abs(idealResolution-resolution);if(!(zoom in scalesByZoom)||scalesByZoom[zoom].diff>diff){scalesByZoom[zoom]={rec:rec,diff:diff};zooms.indexOf(zoom)==-1&&zooms.push(zoom);}},this);for(var i=0,ii=zooms.length;i0){var maxScale=this.previewScales.getAt(0);var minScale=this.previewScales.getAt(this.previewScales.getCount()-1);if(scale.get("value")maxScale.get("value")){this.printPage.setScale(maxScale);}} -this.fitZoom();},print:function(options){this.printProvider.print(this.map,[this.printPage],options);},beforeDestroy:function(){this.map.events.unregister("moveend",this,this.updatePage);this.printPage.un("change",this.fitZoom,this);this.printProvider.un("layoutchange",this.syncSize,this);GeoExt.PrintMapPanel.superclass.beforeDestroy.apply(this,arguments);}});Ext.reg('gx_printmappanel',GeoExt.PrintMapPanel);Ext.namespace("GeoExt.data");GeoExt.data.ScaleStore=Ext.extend(Ext.data.Store,{map:null,constructor:function(config){var map=(config.map instanceof GeoExt.MapPanel?config.map.map:config.map);delete config.map;config=Ext.applyIf(config,{reader:new Ext.data.JsonReader({},["level","resolution","scale"])});GeoExt.data.ScaleStore.superclass.constructor.call(this,config);if(map){this.bind(map);}},bind:function(map,options){this.map=(map instanceof GeoExt.MapPanel?map.map:map);this.map.events.register('changebaselayer',this,this.populateFromMap);if(this.map.baseLayer){this.populateFromMap();}else{this.map.events.register('addlayer',this,this.populateOnAdd);}},unbind:function(){if(this.map){this.map.events.unregister('addlayer',this,this.populateOnAdd);this.map.events.unregister('changebaselayer',this,this.populateFromMap);delete this.map;}},populateOnAdd:function(evt){if(evt.layer.isBaseLayer){this.populateFromMap();this.map.events.unregister('addlayer',this,this.populateOnAdd);}},populateFromMap:function(){var zooms=[];var resolutions=this.map.baseLayer.resolutions;var units=this.map.baseLayer.units;for(var i=resolutions.length-1;i>=0;i--){var res=resolutions[i];zooms.push({level:i,resolution:res,scale:OpenLayers.Util.getScaleFromResolution(res,units)});} -this.loadData(zooms);},destroy:function(){this.unbind();GeoExt.data.ScaleStore.superclass.destroy.apply(this,arguments);}});Ext.namespace("GeoExt.data");GeoExt.data.FeatureStoreMixin=function(){return{layer:null,reader:null,featureFilter:null,constructor:function(config){config=config||{};config.reader=config.reader||new GeoExt.data.FeatureReader({},config.fields);var layer=config.layer;delete config.layer;if(config.features){config.data=config.features;} -delete config.features;var options={initDir:config.initDir};delete config.initDir;arguments.callee.superclass.constructor.call(this,config);if(layer){this.bind(layer,options);}},bind:function(layer,options){if(this.layer){return;} -this.layer=layer;options=options||{};var initDir=options.initDir;if(options.initDir==undefined){initDir=GeoExt.data.FeatureStore.LAYER_TO_STORE|GeoExt.data.FeatureStore.STORE_TO_LAYER;} -var features=layer.features.slice(0);if(initDir&GeoExt.data.FeatureStore.STORE_TO_LAYER){var records=this.getRange();for(var i=records.length-1;i>=0;i--){this.layer.addFeatures([records[i].getFeature()]);}} -if(initDir&GeoExt.data.FeatureStore.LAYER_TO_STORE){this.loadData(features,true);} -layer.events.on({"featuresadded":this.onFeaturesAdded,"featuresremoved":this.onFeaturesRemoved,"featuremodified":this.onFeatureModified,scope:this});this.on({"load":this.onLoad,"clear":this.onClear,"add":this.onAdd,"remove":this.onRemove,"update":this.onUpdate,scope:this});},unbind:function(){if(this.layer){this.layer.events.un({"featuresadded":this.onFeaturesAdded,"featuresremoved":this.onFeaturesRemoved,"featuremodified":this.onFeatureModified,scope:this});this.un("load",this.onLoad,this);this.un("clear",this.onClear,this);this.un("add",this.onAdd,this);this.un("remove",this.onRemove,this);this.un("update",this.onUpdate,this);this.layer=null;}},getRecordFromFeature:function(feature){var record=null;if(feature.state!==OpenLayers.State.INSERT){record=this.getById(feature.id);}else{var index=this.findBy(function(r){return r.getFeature()===feature;});if(index>-1){record=this.getAt(index);}} -return record;},onFeaturesAdded:function(evt){if(!this._adding){var features=evt.features,toAdd=features;if(this.featureFilter){toAdd=[];var i,len,feature;for(var i=0,len=features.length;i=0;i--){feature=features[i];record=this.getRecordFromFeature(feature);if(record!==undefined){this._removing=true;this.remove(record);delete this._removing;}}}},onFeatureModified:function(evt){if(!this._updating){var feature=evt.feature;var record=this.getRecordFromFeature(feature);if(record!==undefined){record.beginEdit();var attributes=feature.attributes;if(attributes){var fields=this.recordType.prototype.fields;for(var i=0,len=fields.length;i0){this._adding=true;this.layer.addFeatures(features);delete this._adding;}},onLoad:function(store,records,options){if(!options||options.add!==true){this._removing=true;this.layer.removeFeatures(this.layer.features);delete this._removing;this.addFeaturesToLayer(records);}},onClear:function(store){this._removing=true;this.layer.removeFeatures(this.layer.features);delete this._removing;},onAdd:function(store,records,index){if(!this._adding){this.addFeaturesToLayer(records);}},onRemove:function(store,record,index){if(!this._removing){var feature=record.getFeature();if(this.layer.getFeatureById(feature.id)!=null){this._removing=true;this.layer.removeFeatures([record.getFeature()]);delete this._removing;}}},onUpdate:function(store,record,operation){if(!this._updating){var defaultFields=new GeoExt.data.FeatureRecord().fields;var feature=record.getFeature();if(record.fields){var cont=this.layer.events.triggerEvent("beforefeaturemodified",{feature:feature});if(cont!==false){var attributes=feature.attributes;record.fields.each(function(field){var key=field.mapping||field.name;if(!defaultFields.containsKey(key)){attributes[key]=record.get(field.name);}});this._updating=true;this.layer.events.triggerEvent("featuremodified",{feature:feature});delete this._updating;if(this.layer.getFeatureById(feature.id)!=null){this.layer.drawFeature(feature);}}}}}};};GeoExt.data.FeatureStore=Ext.extend(Ext.data.Store,new GeoExt.data.FeatureStoreMixin);GeoExt.data.FeatureStore.LAYER_TO_STORE=1;GeoExt.data.FeatureStore.STORE_TO_LAYER=2;Ext.namespace("GeoExt.data");GeoExt.data.WFSCapabilitiesStore=function(c){c=c||{};GeoExt.data.WFSCapabilitiesStore.superclass.constructor.call(this,Ext.apply(c,{proxy:c.proxy||(!c.data?new Ext.data.HttpProxy({url:c.url,disableCaching:false,method:"GET"}):undefined),reader:new GeoExt.data.WFSCapabilitiesReader(c,c.fields)}));};Ext.extend(GeoExt.data.WFSCapabilitiesStore,Ext.data.Store);Ext.namespace("GeoExt.plugins");GeoExt.plugins.AttributeForm=function(config){Ext.apply(this,config);};GeoExt.plugins.AttributeForm.prototype={attributeStore:null,formPanel:null,init:function(formPanel){this.formPanel=formPanel;if(this.attributeStore instanceof Ext.data.Store){this.fillForm();this.bind(this.attributeStore);} -formPanel.on("destroy",this.onFormDestroy,this);},bind:function(store){this.unbind();store.on({"load":this.onLoad,scope:this});this.attributeStore=store;},unbind:function(){if(this.attributeStore){this.attributeStore.un("load",this.onLoad,this);}},onLoad:function(){if(this.formPanel.items){this.formPanel.removeAll();} -this.fillForm();},fillForm:function(){this.attributeStore.each(function(record){var field=GeoExt.form.recordToField(record);if(field){this.formPanel.add(field);}},this);this.formPanel.doLayout();},onFormDestroy:function(){this.unbind();}};Ext.preg("gx_attributeform",GeoExt.plugins.AttributeForm);Ext.namespace('GeoExt','GeoExt.data');GeoExt.data.ProtocolProxy=function(config){Ext.apply(this,config);GeoExt.data.ProtocolProxy.superclass.constructor.apply(this,arguments);};Ext.extend(GeoExt.data.ProtocolProxy,Ext.data.DataProxy,{protocol:null,abortPrevious:true,setParamsAsOptions:false,response:null,load:function(params,reader,callback,scope,arg){if(this.fireEvent("beforeload",this,params)!==false){var o={params:params||{},request:{callback:callback,scope:scope,arg:arg},reader:reader};var cb=OpenLayers.Function.bind(this.loadResponse,this,o);if(this.abortPrevious){this.abortRequest();} -var options={params:params,callback:cb,scope:this};Ext.applyIf(options,arg);if(this.setParamsAsOptions===true){Ext.applyIf(options,options.params);delete options.params;} -this.response=this.protocol.read(options);}else{callback.call(scope||this,null,arg,false);}},abortRequest:function(){if(this.response){this.protocol.abort(this.response);this.response=null;}},loadResponse:function(o,response){if(response.success()){var result=o.reader.read(response);this.fireEvent("load",this,o,o.request.arg);o.request.callback.call(o.request.scope,result,o.request.arg,true);}else{this.fireEvent("loadexception",this,o,response);o.request.callback.call(o.request.scope,null,o.request.arg,false);}}});Ext.namespace("GeoExt");GeoExt.Action=Ext.extend(Ext.Action,{control:null,map:null,uScope:null,uHandler:null,uToggleHandler:null,uCheckHandler:null,constructor:function(config){this.uScope=config.scope;this.uHandler=config.handler;this.uToggleHandler=config.toggleHandler;this.uCheckHandler=config.checkHandler;config.scope=this;config.handler=this.pHandler;config.toggleHandler=this.pToggleHandler;config.checkHandler=this.pCheckHandler;var ctrl=this.control=config.control;delete config.control;if(ctrl){if(config.map){config.map.addControl(ctrl);delete config.map;} -if((config.pressed||config.checked)&&ctrl.map){ctrl.activate();} -ctrl.events.on({activate:this.onCtrlActivate,deactivate:this.onCtrlDeactivate,scope:this});} -arguments.callee.superclass.constructor.call(this,config);},pHandler:function(cmp){var ctrl=this.control;if(ctrl&&ctrl.type==OpenLayers.Control.TYPE_BUTTON){ctrl.trigger();} -if(this.uHandler){this.uHandler.apply(this.uScope,arguments);}},pToggleHandler:function(cmp,state){this.changeControlState(state);if(this.uToggleHandler){this.uToggleHandler.apply(this.uScope,arguments);}},pCheckHandler:function(cmp,state){this.changeControlState(state);if(this.uCheckHandler){this.uCheckHandler.apply(this.uScope,arguments);}},changeControlState:function(state){if(state){if(!this._activating){this._activating=true;this.control.activate();this._activating=false;}}else{if(!this._deactivating){this._deactivating=true;this.control.deactivate();this._deactivating=false;}}},onCtrlActivate:function(){var ctrl=this.control;if(ctrl.type==OpenLayers.Control.TYPE_BUTTON){this.enable();}else{this.safeCallEach("toggle",[true]);this.safeCallEach("setChecked",[true]);}},onCtrlDeactivate:function(){var ctrl=this.control;if(ctrl.type==OpenLayers.Control.TYPE_BUTTON){this.disable();}else{this.safeCallEach("toggle",[false]);this.safeCallEach("setChecked",[false]);}},safeCallEach:function(fnName,args){var cs=this.items;for(var i=0,len=cs.length;i'].join(""));}},onRawClickNode:function(node,e){var el=e.getTarget('.gx-tree-radio',1);if(el){el.defaultChecked=el.checked;this.fireEvent("radiochange",node);return false;}},onBeforeDestroy:function(tree){tree.un("rendernode",this.onRenderNode,this);tree.un("rawclicknode",this.onRenderNode,this);tree.un("beforedestroy",this.onBeforeDestroy,this);}});Ext.preg("gx_treenoderadiobutton",GeoExt.plugins.TreeNodeRadioButton);Ext.namespace("GeoExt.data");GeoExt.data.WMSCapabilitiesStore=function(c){c=c||{};GeoExt.data.WMSCapabilitiesStore.superclass.constructor.call(this,Ext.apply(c,{proxy:c.proxy||(!c.data?new Ext.data.HttpProxy({url:c.url,disableCaching:false,method:"GET"}):undefined),reader:new GeoExt.data.WMSCapabilitiesReader(c,c.fields)}));};Ext.extend(GeoExt.data.WMSCapabilitiesStore,Ext.data.Store);Ext.namespace("GeoExt");GeoExt.LayerOpacitySliderTip=Ext.extend(GeoExt.SliderTip,{template:'
      {opacity}%
      ',compiledTemplate:null,init:function(slider){this.compiledTemplate=new Ext.Template(this.template);GeoExt.LayerOpacitySliderTip.superclass.init.call(this,slider);},getText:function(thumb){var data={opacity:thumb.value};return this.compiledTemplate.apply(data);}});GeoExt.version='1.0'; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork.js b/web-client/src/main/resources/apps/js/GeoNetwork.js deleted file mode 100644 index 5772fb1785b..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork.js +++ /dev/null @@ -1,11804 +0,0 @@ -Ext.namespace("Ext.ux.form"); -Ext.ux.form.TwinTriggerComboBox=function(a){Ext.ux.form.TwinTriggerComboBox.superclass.constructor.apply(this,arguments) -}; -Ext.extend(Ext.ux.form.TwinTriggerComboBox,Ext.form.ComboBox,{trigger1Class:"x-form-clear-trigger",trigger2Class:"",trigger3Class:"x-form-trigger3-trigger",hideTrigger1:true,tooltipType:"qtip",initComponent:function(){Ext.ux.form.TwinTriggerComboBox.superclass.initComponent.call(this); -this.addEvents({clear:true,trigger3:true}); -this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger3Class}]} -},getTrigger:function(a){return this.triggers[a] -},initTrigger:function(){var c=this.trigger.select(".x-form-trigger",true); -var e=this; -c.each(function(g,i,f){g.hide=function(){var j=e.wrap.getWidth(); -this.dom.style.display="none"; -e.el.setWidth(j-e.trigger.getWidth()) -}; -g.show=function(){var j=e.wrap.getWidth(); -this.dom.style.display=""; -e.el.setWidth(j-e.trigger.getWidth()) -}; -var h="Trigger"+(f+1); -if(this["hide"+h]){g.dom.style.display="none" -}g.on("click",this["on"+h+"Click"],this,{preventDefault:true}); -g.addClassOnOver("x-form-trigger-over"); -g.addClassOnClick("x-form-trigger-click") -},this); -this.triggers=c.elements; -if(this.trigger3TipConfig){var a={target:this.getTrigger(2)}; -for(var b in this.helpTipConfig){a[b]=this.helpTipConfig[b] -}var d=new Ext.ToolTip(a) -}if(this.trigger3TipConfig){if(typeof this.trigger3TipConfig=="object"){Ext.QuickTips.register(Ext.apply({target:this.getTrigger(2)},this.trigger3TipConfig)) -}else{this.getTrigger(2).dom[this.tooltipType]=this.trigger3TipConfig -}}},onTrigger1Click:function(){this.clearValue(); -this.triggerBlur.defer(50,this) -},onTrigger2Click:function(){this.onTriggerClick() -},onTrigger3Click:function(){this.fireEvent("trigger3Click",this) -},onSelect:function(a,b){Ext.ux.form.TwinTriggerComboBox.superclass.onSelect.apply(this,[a,b]); -this.triggers[0].show() -},clearValue:function(){Ext.ux.form.TwinTriggerComboBox.superclass.clearValue.call(this); -this.triggers[0].hide(); -this.fireEvent("clear",this) -},insert:function(a,b){this.reset(); -var c=new this.store.recordType(b); -c.id=c.data.id; -this.store.insert(a,c); -this.setValue(c.data.id); -this.fireEvent("select",this,c,a) -}}); -Ext.reg("twintriggercombo",Ext.ux.form.TwinTriggerComboBox);/* - * Ext Core Library $version http://extjs.com/ Copyright(c) 2006-2009, $author. The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -Ext.ns("Ext.ux"); -Ext.ux.RatingItem=Ext.extend(Ext.Component,{starWidth:16,resetValue:"",defaultConfig:{defaultSelected:-1,nbStars:5,split:1,selected:-1,showTitles:true,cls:"",disabled:false},constructor:function(c,a){Ext.apply(this,a); -Ext.applyIf(this,this.defaultConfig); -Ext.ux.RatingItem.superclass.constructor.call(this); -this.addEvents("change","reset"); -if(c==undefined){c=document.createElement("div"); -c.className=this.itemCls; -this.text=""; -for(var b=0; -b<(this.nbStars*this.split); -b++){this.text+='' -}c.innerHTML=this.text -}this.el=Ext.get(c); -this.init() -},onRender:function(){Ext.ux.RatingItem.superclass.onRender.apply(this,arguments) -},init:function(){var a=this.disabled; -this.values=[]; -this.titles=[]; -this.stars=[]; -this.container=this.el.createChild({cls:"ux-rating-container ux-rating-clearfix"+this.cls}); -if(this.canReset){this.resetEl=this.container.createChild({cls:"ux-rating-reset",cn:[{tag:"a",title:this.showTitles?(this.resetTitle||"Reset your vote"):"",html:"Reset"}]}); -this.resetEl.visibilityMode=Ext.Element.DISPLAY; -this.resetEl.hover(function(){Ext.fly(this).addClass("ux-rating-reset-hover") -},function(){Ext.fly(this).removeClass("ux-rating-reset-hover") -}); -this.resetEl.on("click",this.reset,this) -}this.radioBoxes=this.el.select("input[type=radio]"); -this.radioBoxes.each(this.initStar,this); -this.input=this.container.createChild({tag:"input",type:"hidden",name:this.name,value:this.values[this.defaultSelected]||this.resetValue}); -this.radioBoxes.remove(); -this.select(this.defaultSelected===undefined?false:this.defaultSelected); -if(a){this.disable() -}else{this.enable() -}},initStar:function(d,c,b){var a=Math.floor(this.starWidth/this.split); -if(b==0){this.name=d.dom.name; -this.disabled=d.dom.disabled -}this.values[b]=d.dom.value; -this.titles[b]=d.dom.title; -if(d.dom.checked){this.defaultSelected=b -}var g=this.container.createChild({cls:"ux-rating-star"}); -var f=g.createChild({tag:"a",html:this.values[b],title:this.showTitles?this.titles[b]:""}); -if(this.split){var e=(b%this.split); -g.setWidth(a); -f.setStyle("margin-left","-"+(e*a)+"px") -}this.stars.push(g.dom) -},onStarClick:function(b,a){if(!this.disabled){this.select(this.stars.indexOf(a)) -}},onStarOver:function(b,a){if(!this.disabled){this.fillTo(this.stars.indexOf(a),true) -}},onStarOut:function(b,a){if(!this.disabled){this.fillTo(this.selected,false) -}},reset:function(b,a){this.select(-1) -},select:function(a){if(a===false||a===-1){this.value=this.resetValue; -this.title=""; -this.input.dom.value=""; -if(this.canReset){this.resetEl.setOpacity(0.5) -}this.fillNone(); -if(this.selected!==-1){this.fireEvent("change",this,this.values[a],this.stars[a]) -}this.selected=-1 -}else{if(a!==this.selected){this.selected=a; -this.value=this.values[a]; -this.title=this.titles[a]; -this.input.dom.value=this.value; -if(this.canReset){this.resetEl.setOpacity(0.99) -}this.fillTo(a,false); -this.fireEvent("change",this,this.values[a],this.stars[a]) -}}},fillTo:function(a,b){if(a!=-1){var c=b?"ux-rating-star-hover":"ux-rating-star-on"; -var d=b?"ux-rating-star-on":"ux-rating-star-hover"; -Ext.each(this.stars.slice(0,a+1),function(){Ext.fly(this).removeClass(d).addClass(c) -}); -Ext.each(this.stars.slice(a+1),function(){Ext.fly(this).removeClass([d,c]) -}) -}else{this.fillNone() -}},fillNone:function(){this.container.select(".ux-rating-star").removeClass(["ux-rating-star-hover","ux-rating-star-on"]) -},enable:function(){if(this.canReset){this.resetEl.show() -}this.input.dom.disabled=null; -this.disabled=false; -this.container.removeClass("ux-rating-disabled"); -this.container.on({click:this.onStarClick,mouseover:this.onStarOver,mouseout:this.onStarOut,scope:this,delegate:"div.ux-rating-star"}) -},disable:function(){if(this.canReset){this.resetEl.hide() -}this.input.dom.disabled=true; -this.disabled=true; -this.container.addClass("ux-rating-disabled"); -this.container.un({click:this.onStarClick,mouseover:this.onStarOver,mouseout:this.onStarOut,scope:this,delegate:"div.ux-rating-star"}) -},getValue:function(){return this.values[this.selected]||this.resetValue -},destroy:function(){this.disable(); -this.container.remove(); -this.radioBoxes.appendTo(this.el); -if(this.selected!==-1){this.radioBoxes.elements[this.selected].checked=true -}}}); -Ext.reg("ratingitem",Ext.ux.RatingItem);Ext.form.FileUploadField=Ext.extend(Ext.form.TextField,{buttonText:"Browse...",buttonOnly:false,buttonOffset:3,readOnly:true,autoSize:Ext.emptyFn,initComponent:function(){Ext.form.FileUploadField.superclass.initComponent.call(this); -this.addEvents("fileselected") -},onRender:function(c,a){Ext.form.FileUploadField.superclass.onRender.call(this,c,a); -this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-file-wrap"}); -this.el.addClass("x-form-file-text"); -this.el.dom.removeAttribute("name"); -this.fileInput=this.wrap.createChild({id:this.getFileInputId(),name:this.name||this.getId(),cls:"x-form-file",tag:"input",type:"file",size:1}); -var b=Ext.applyIf(this.buttonCfg||{},{text:this.buttonText}); -this.button=new Ext.Button(Ext.apply(b,{renderTo:this.wrap,cls:"x-form-file-btn"+(b.iconCls?" x-btn-icon":"")})); -if(this.buttonOnly){this.el.hide(); -this.wrap.setWidth(this.button.getEl().getWidth()) -}this.fileInput.on("change",function(){var d=this.fileInput.dom.value; -this.setValue(d); -this.fireEvent("fileselected",this,d) -},this) -},getFileInputId:function(){return this.id+"-file" -},onResize:function(a,b){Ext.form.FileUploadField.superclass.onResize.call(this,a,b); -this.wrap.setWidth(a); -if(!this.buttonOnly){var a=this.wrap.getWidth()-this.button.getEl().getWidth()-this.buttonOffset; -this.el.setWidth(a) -}},preFocus:Ext.emptyFn,getResizeEl:function(){return this.wrap -},getPositionEl:function(){return this.wrap -},alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0]) -}}); -Ext.reg("fileuploadfield",Ext.form.FileUploadField);var OpenLayers={singleFile:true};(function(){var j=(typeof OpenLayers=="object"&&OpenLayers.singleFile); -var a; -window.OpenLayers={_scriptName:(!j)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){if(a!=undefined){return a -}a=""; -var r=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)"); -var n=document.getElementsByTagName("script"); -for(var p=0,h=n.length; -p<\/script>" -}else{var m=document.createElement("script"); -m.src=l+k[d]; -var f=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body; -f.appendChild(m) -}}if(e){document.write(b.join("")) -}}})(); -OpenLayers.VERSION_NUMBER="OpenLayers 2.9.1 -- $Revision: 10129 $";OpenLayers.Util={}; -OpenLayers.Util.getElement=function(){var d=[]; -for(var c=0,a=arguments.length; -c=0; -a--){if(c[a]==b){c.splice(a,1) -}}return c -}; -OpenLayers.Util.clearArray=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"array = []"})); -a.length=0 -}; -OpenLayers.Util.indexOf=function(d,c){if(typeof d.indexOf=="function"){return d.indexOf(c) -}else{for(var b=0,a=d.length; -b=0&&parseFloat(b)<1){e.style.filter="alpha(opacity="+(b*100)+")"; -e.style.opacity=b -}else{if(parseFloat(b)==1){e.style.filter=""; -e.style.opacity="" -}}}; -OpenLayers.Util.createDiv=function(a,i,h,f,e,c,b,g){var d=document.createElement("div"); -if(f){d.style.backgroundImage="url("+f+")" -}if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv") -}if(!e){e="absolute" -}OpenLayers.Util.modifyDOMElement(d,a,i,h,e,c,b,g); -return d -}; -OpenLayers.Util.createImage=function(a,h,g,e,d,c,f,i){var b=document.createElement("img"); -if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv") -}if(!d){d="relative" -}OpenLayers.Util.modifyDOMElement(b,a,h,g,d,c,null,f); -if(i){b.style.display="none"; -OpenLayers.Event.observe(b,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,b)); -OpenLayers.Event.observe(b,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,b)) -}b.style.alt=a; -b.galleryImg="no"; -if(e){b.src=e -}return b -}; -OpenLayers.Util.setOpacity=function(b,a){OpenLayers.Util.modifyDOMElement(b,null,null,null,null,null,null,a) -}; -OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.map&&this.viewRequestID==this.map.viewRequestID)){this.style.display="" -}OpenLayers.Element.removeClass(this,"olImageLoadError") -}; -OpenLayers.IMAGE_RELOAD_ATTEMPTS=0; -OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1; -if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){var d=this.urls; -if(d&&d instanceof Array&&d.length>1){var e=this.src.toString(); -var c,a; -for(a=0; -c=d[a]; -a++){if(e.indexOf(c)!=-1){break -}}var f=Math.floor(d.length*Math.random()); -var b=d[f]; -a=0; -while(b==c&&a++<4){f=Math.floor(d.length*Math.random()); -b=d[f] -}this.src=e.replace(c,b) -}else{this.src=this.src -}}else{OpenLayers.Element.addClass(this,"olImageLoadError") -}this.style.display="" -}; -OpenLayers.Util.alphaHackNeeded=null; -OpenLayers.Util.alphaHack=function(){if(OpenLayers.Util.alphaHackNeeded==null){var d=navigator.appVersion.split("MSIE"); -var a=parseFloat(d[1]); -var b=false; -try{b=!!(document.body.filters) -}catch(c){}OpenLayers.Util.alphaHackNeeded=(b&&(a>=5.5)&&(a<7)) -}return OpenLayers.Util.alphaHackNeeded -}; -OpenLayers.Util.modifyAlphaImageDiv=function(a,b,j,i,g,f,c,d,h){OpenLayers.Util.modifyDOMElement(a,b,j,i,f,null,null,h); -var e=a.childNodes[0]; -if(g){e.src=g -}OpenLayers.Util.modifyDOMElement(e,a.id+"_innerImage",null,i,"relative",c); -if(OpenLayers.Util.alphaHack()){if(a.style.display!="none"){a.style.display="inline-block" -}if(d==null){d="scale" -}a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e.src+"', sizingMethod='"+d+"')"; -if(parseFloat(a.style.opacity)>=0&&parseFloat(a.style.opacity)<1){a.style.filter+=" alpha(opacity="+a.style.opacity*100+")" -}e.style.filter="alpha(opacity=0)" -}}; -OpenLayers.Util.createAlphaImageDiv=function(b,j,i,g,f,c,d,h,k){var a=OpenLayers.Util.createDiv(); -var e=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false); -a.appendChild(e); -if(k){e.style.display="none"; -OpenLayers.Event.observe(e,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,a)); -OpenLayers.Event.observe(e,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,a)) -}OpenLayers.Util.modifyAlphaImageDiv(a,b,j,i,g,f,c,d,h); -return a -}; -OpenLayers.Util.upperCaseObject=function(b){var a={}; -for(var c in b){a[c.toUpperCase()]=b[c] -}return a -}; -OpenLayers.Util.applyDefaults=function(d,c){d=d||{}; -var b=typeof window.Event=="function"&&c instanceof window.Event; -for(var a in c){if(d[a]===undefined||(!b&&c.hasOwnProperty&&c.hasOwnProperty(a)&&!d.hasOwnProperty(a))){d[a]=c[a] -}}if(!b&&c&&c.hasOwnProperty&&c.hasOwnProperty("toString")&&!d.hasOwnProperty("toString")){d.toString=c.toString -}return d -}; -OpenLayers.Util.getParameterString=function(c){var b=[]; -for(var h in c){var g=c[h]; -if((g!=null)&&(typeof g!="function")){var d; -if(typeof g=="object"&&g.constructor==Array){var e=[]; -var i; -for(var a=0,f=g.length; -a0)){if(!b){b=0 -}if(a[b].childNodes.length>1){return a.childNodes[1].nodeValue -}else{if(a[b].childNodes.length==1){return a[b].firstChild.nodeValue -}}}else{return"" -}}; -OpenLayers.Util.getXmlNodeValue=function(a){var b=null; -OpenLayers.Util.Try(function(){b=a.text; -if(!b){b=a.textContent -}if(!b){b=a.firstChild.nodeValue -}},function(){b=a.textContent -}); -return b -}; -OpenLayers.Util.mouseLeft=function(a,c){var b=(a.relatedTarget)?a.relatedTarget:a.toElement; -while(b!=c&&b!=null){b=b.parentNode -}return(b!=c) -}; -OpenLayers.Util.DEFAULT_PRECISION=14; -OpenLayers.Util.toFloat=function(b,a){if(a==null){a=OpenLayers.Util.DEFAULT_PRECISION -}var b; -if(a==0){b=parseFloat(b) -}else{b=parseFloat(parseFloat(b).toPrecision(a)) -}return b -}; -OpenLayers.Util.rad=function(a){return a*Math.PI/180 -}; -OpenLayers.Util.distVincenty=function(g,c){var K=6378137,J=6356752.3142,F=1/298.257223563; -var m=OpenLayers.Util.rad(c.lon-g.lon); -var I=Math.atan((1-F)*Math.tan(OpenLayers.Util.rad(g.lat))); -var H=Math.atan((1-F)*Math.tan(OpenLayers.Util.rad(c.lat))); -var l=Math.sin(I),i=Math.cos(I); -var k=Math.sin(H),h=Math.cos(H); -var q=m,n=2*Math.PI; -var p=20; -while(Math.abs(q-n)>1e-12&&--p>0){var y=Math.sin(q),e=Math.cos(q); -var M=Math.sqrt((h*y)*(h*y)+(i*k-l*h*e)*(i*k-l*h*e)); -if(M==0){return 0 -}var D=l*k+i*h*e; -var x=Math.atan2(M,D); -var j=Math.asin(i*h*y/M); -var E=Math.cos(j)*Math.cos(j); -var o=D-2*l*k/E; -var u=F/16*E*(4+F*(4-3*E)); -n=q; -q=m+(1-u)*F*Math.sin(j)*(x+u*M*(o+u*D*(-1+2*o*o))) -}if(p==0){return NaN -}var t=E*(K*K-J*J)/(J*J); -var w=1+t/16384*(4096+t*(-768+t*(320-175*t))); -var v=t/1024*(256+t*(-128+t*(74-47*t))); -var z=v*M*(o+v/4*(D*(-1+2*o*o)-v/6*o*(-3+4*M*M)*(-3+4*o*o))); -var r=J*w*(x-z); -var G=r.toFixed(3)/1000; -return G -}; -OpenLayers.Util.getParameters=function(b){b=b||window.location.href; -var a=""; -if(OpenLayers.String.contains(b,"?")){var c=b.indexOf("?")+1; -var e=OpenLayers.String.contains(b,"#")?b.indexOf("#"):b.length; -a=b.substring(c,e) -}var l={}; -var d=a.split(/[&;]/); -for(var g=0,h=d.length; -g1)?(1/b):b; -return a -}; -OpenLayers.Util.getResolutionFromScale=function(d,a){var b; -if(d){if(a==null){a="degrees" -}var c=OpenLayers.Util.normalizeScale(d); -b=1/(c*OpenLayers.INCHES_PER_UNIT[a]*OpenLayers.DOTS_PER_INCH) -}return b -}; -OpenLayers.Util.getScaleFromResolution=function(b,a){if(a==null){a="degrees" -}var c=b*OpenLayers.INCHES_PER_UNIT[a]*OpenLayers.DOTS_PER_INCH; -return c -}; -OpenLayers.Util.safeStopPropagation=function(a){OpenLayers.Event.stop(a,true) -}; -OpenLayers.Util.pagePosition=function(f){var a=0,d=0; -var b=f; -var g=f; -while(b){if(b==document.body){if(OpenLayers.Element.getStyle(g,"position")=="absolute"){break -}}a+=b.offsetTop||0; -d+=b.offsetLeft||0; -g=b; -try{b=b.offsetParent -}catch(c){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{elemId:b.id})); -break -}}b=f; -while(b){a-=b.scrollTop||0; -d-=b.scrollLeft||0; -b=b.parentNode -}return[d,a] -}; -OpenLayers.Util.isEquivalentUrl=function(f,e,c){c=c||{}; -OpenLayers.Util.applyDefaults(c,{ignoreCase:true,ignorePort80:true,ignoreHash:true}); -var b=OpenLayers.Util.createUrlObject(f,c); -var a=OpenLayers.Util.createUrlObject(e,c); -for(var d in b){if(d!=="args"){if(b[d]!=a[d]){return false -}}}for(var d in b.args){if(b.args[d]!=a.args[d]){return false -}delete a.args[d] -}for(var d in a.args){return false -}return true -}; -OpenLayers.Util.createUrlObject=function(c,k){k=k||{}; -if(!(/^\w+:\/\//).test(c)){var g=window.location; -var e=g.port?":"+g.port:""; -var h=g.protocol+"//"+g.host.split(":").shift()+e; -if(c.indexOf("/")===0){c=h+c -}else{var f=g.pathname.split("/"); -f.pop(); -c=h+f.join("/")+"/"+c -}}if(k.ignoreCase){c=c.toLowerCase() -}var i=document.createElement("a"); -i.href=c; -var d={}; -d.host=i.host.split(":").shift(); -d.protocol=i.protocol; -if(k.ignorePort80){d.port=(i.port=="80"||i.port=="0")?"":i.port -}else{d.port=(i.port==""||i.port=="0")?"80":i.port -}d.hash=(k.ignoreHash||i.hash==="#")?"":i.hash; -var b=i.search; -if(!b){var j=c.indexOf("?"); -b=(j!=-1)?c.substr(j):"" -}d.args=OpenLayers.Util.getParameters(b); -d.pathname=(i.pathname.charAt(0)=="/")?i.pathname:"/"+i.pathname; -return d -}; -OpenLayers.Util.removeTail=function(b){var c=null; -var a=b.indexOf("?"); -var d=b.indexOf("#"); -if(a==-1){c=(d!=-1)?b.substr(0,d):b -}else{c=(d!=-1)?b.substr(0,Math.min(a,d)):b.substr(0,a) -}return c -}; -OpenLayers.Util.getBrowserName=function(){var b=""; -var a=navigator.userAgent.toLowerCase(); -if(a.indexOf("opera")!=-1){b="opera" -}else{if(a.indexOf("msie")!=-1){b="msie" -}else{if(a.indexOf("safari")!=-1){b="safari" -}else{if(a.indexOf("mozilla")!=-1){if(a.indexOf("firefox")!=-1){b="firefox" -}else{b="mozilla" -}}}}}return b -}; -OpenLayers.Util.getRenderedDimensions=function(b,o,p){var k,e; -var a=document.createElement("div"); -a.style.visibility="hidden"; -var n=(p&&p.containerElement)?p.containerElement:document.body; -if(o){if(o.w){k=o.w; -a.style.width=k+"px" -}else{if(o.h){e=o.h; -a.style.height=e+"px" -}}}if(p&&p.displayClass){a.className=p.displayClass -}var f=document.createElement("div"); -f.innerHTML=b; -f.style.overflow="visible"; -if(f.childNodes){for(var d=0,c=f.childNodes.length; -d=0){if(a<10){a="0"+a -}f+=a+"'"; -if(e.indexOf("dms")>=0){if(g<10){g="0"+g -}f+=g+'"' -}}if(b=="lon"){f+=h<0?OpenLayers.i18n("W"):OpenLayers.i18n("E") -}else{f+=h<0?OpenLayers.i18n("S"):OpenLayers.i18n("N") -}return f -};OpenLayers.String={startsWith:function(b,a){return(b.indexOf(a)==0) -},contains:function(b,a){return(b.indexOf(a)!=-1) -},trim:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"") -},camelize:function(f){var d=f.split("-"); -var b=d[0]; -for(var c=1,a=d.length; -c0){b=parseFloat(a.toPrecision(c)) -}return b -},format:function(c,a,g,i){a=(typeof a!="undefined")?a:0; -g=(typeof g!="undefined")?g:OpenLayers.Number.thousandsSeparator; -i=(typeof i!="undefined")?i:OpenLayers.Number.decimalSeparator; -if(a!=null){c=parseFloat(c.toFixed(a)) -}var b=c.toString().split("."); -if(b.length==1&&a==null){a=0 -}var d=b[0]; -if(g){var e=/(-?[0-9]+)([0-9]{3})/; -while(e.test(d)){d=d.replace(e,"$1"+g+"$2") -}}var f; -if(a==0){f=d -}else{var h=b.length>1?b[1]:"0"; -if(a!=null){h=h+new Array(a-h.length+1).join("0") -}f=d+i+h -}return f -}}; -if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Number.limitSigDigs"})); -return OpenLayers.Number.limitSigDigs(this,a) -} -}OpenLayers.Function={bind:function(c,b){var a=Array.prototype.slice.apply(arguments,[2]); -return function(){var d=a.concat(Array.prototype.slice.apply(arguments,[0])); -return c.apply(b,d) -} -},bindAsEventListener:function(b,a){return function(c){return b.call(a,c||window.event) -} -},False:function(){return false -},True:function(){return true -}}; -if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bind"})); -Array.prototype.unshift.apply(arguments,[this]); -return OpenLayers.Function.bind.apply(null,arguments) -} -}if(!Function.prototype.bindAsEventListener){Function.prototype.bindAsEventListener=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bindAsEventListener"})); -return OpenLayers.Function.bindAsEventListener(this,a) -} -}OpenLayers.Array={filter:function(g,f,b){var d=[]; -if(Array.prototype.filter){d=g.filter(f,b) -}else{var a=g.length; -if(typeof f!="function"){throw new TypeError() -}for(var c=0; -c1){b=arguments[e].prototype.initialize; -arguments[e].prototype.initialize=function(){}; -c=new arguments[e]; -if(b===undefined){delete arguments[e].prototype.initialize -}else{arguments[e].prototype.initialize=b -}}f=arguments[e].prototype -}else{f=arguments[e] -}OpenLayers.Util.extend(c,f) -}d.prototype=c; -return d -}; -OpenLayers.Class.isPrototype=function(){}; -OpenLayers.Class.create=function(){return function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments) -}} -}; -OpenLayers.Class.inherit=function(){var d=arguments[0]; -var e=new d(OpenLayers.Class.isPrototype); -for(var c=1,a=arguments.length; -cthis.right)){this.right=b.right -}if((this.top==null)||(b.top>this.top)){this.top=b.top -}}}},containsLonLat:function(b,a){return this.contains(b.lon,b.lat,a) -},containsPixel:function(b,a){return this.contains(b.x,b.y,a) -},contains:function(b,d,a){if(a==null){a=true -}if(b==null||d==null){return false -}b=OpenLayers.Util.toFloat(b); -d=OpenLayers.Util.toFloat(d); -var c=false; -if(a){c=((b>=this.left)&&(b<=this.right)&&(d>=this.bottom)&&(d<=this.top)) -}else{c=((b>this.left)&&(bthis.bottom)&&(d=this.bottom)&&(e.bottom<=this.top))||((this.bottom>=e.bottom)&&(this.bottom<=e.top))); -var f=(((e.top>=this.bottom)&&(e.top<=this.top))||((this.top>e.bottom)&&(this.top=this.left)&&(e.left<=this.right))||((this.left>=e.left)&&(this.left<=e.right))); -var a=(((e.right>=this.left)&&(e.right<=this.right))||((this.right>=e.left)&&(this.right<=e.right))); -d=((g||f)&&(c||a)) -}return d -},containsBounds:function(g,b,a){if(b==null){b=false -}if(a==null){a=true -}var c=this.contains(g.left,g.bottom,a); -var d=this.contains(g.right,g.bottom,a); -var f=this.contains(g.left,g.top,a); -var e=this.contains(g.right,g.top,a); -return(b)?(c||d||f||e):(c&&d&&f&&e) -},determineQuadrant:function(c){var b=""; -var a=this.getCenterLonLat(); -b+=(c.lat=a.right&&e.right>a.right){e=e.add(-a.getWidth(),0) -}}return e -},CLASS_NAME:"OpenLayers.Bounds"}); -OpenLayers.Bounds.fromString=function(b){var a=b.split(","); -return OpenLayers.Bounds.fromArray(a) -}; -OpenLayers.Bounds.fromArray=function(a){return new OpenLayers.Bounds(parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3])) -}; -OpenLayers.Bounds.fromSize=function(a){return new OpenLayers.Bounds(0,a.h,a.w,0) -}; -OpenLayers.Bounds.oppositeQuadrant=function(a){var b=""; -b+=(a.charAt(0)=="t")?"b":"t"; -b+=(a.charAt(1)=="l")?"r":"l"; -return b -};OpenLayers.Rico=new Object(); -OpenLayers.Rico.Corner={round:function(d,b){d=OpenLayers.Util.getElement(d); -this._setOptions(b); -var a=this.options.color; -if(this.options.color=="fromElement"){a=this._background(d) -}var c=this.options.bgColor; -if(this.options.bgColor=="fromParent"){c=this._background(d.offsetParent) -}this._roundCornersImpl(d,a,c) -},changeColor:function(c,b){c.style.backgroundColor=b; -var a=c.parentNode.getElementsByTagName("span"); -for(var d=0; -d"+d.innerHTML+"
      " -},_roundTopCorners:function(c,a,e){var d=this._createCorner(e); -for(var b=0; -b=0; -b--){d.appendChild(this._createCornerSlice(a,e,b,"bottom")) -}c.style.paddingBottom=0; -c.appendChild(d) -},_createCorner:function(b){var a=document.createElement("div"); -a.style.backgroundColor=(this._isTransparent()?"transparent":b); -return a -},_createCornerSlice:function(c,d,g,a){var e=document.createElement("span"); -var b=e.style; -b.backgroundColor=c; -b.display="block"; -b.height="1px"; -b.overflow="hidden"; -b.fontSize="1px"; -var f=this._borderColor(c,d); -if(this.options.border&&g==0){b.borderTopStyle="solid"; -b.borderTopWidth="1px"; -b.borderLeftWidth="0px"; -b.borderRightWidth="0px"; -b.borderBottomWidth="0px"; -b.height="0px"; -b.borderColor=f -}else{if(f){b.borderColor=f; -b.borderStyle="solid"; -b.borderWidth="0px 1px" -}}if(!this.options.compact&&(g==(this.options.numSlices-1))){b.height="2px" -}this._setMargin(e,g,a); -this._setBorder(e,g,a); -return e -},_setOptions:function(a){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false}; -OpenLayers.Util.extend(this.options,a||{}); -this.options.numSlices=this.options.compact?2:4; -if(this._isTransparent()){this.options.blend=false -}},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")){return"" -}if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0){return"" -}if(this.options.corners.indexOf("tl")>=0){return"left" -}else{if(this.options.corners.indexOf("tr")>=0){return"right" -}}return"" -},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")){return"" -}if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0){return"" -}if(this.options.corners.indexOf("bl")>=0){return"left" -}else{if(this.options.corners.indexOf("br")>=0){return"right" -}}return"" -},_borderColor:function(a,b){if(a=="transparent"){return b -}else{if(this.options.border){return this.options.border -}else{if(this.options.blend){return this._blend(b,a) -}else{return"" -}}}},_setMargin:function(d,e,b){var c=this._marginSize(e); -var a=b=="top"?this._whichSideTop():this._whichSideBottom(); -if(a=="left"){d.style.marginLeft=c+"px"; -d.style.marginRight="0px" -}else{if(a=="right"){d.style.marginRight=c+"px"; -d.style.marginLeft="0px" -}else{d.style.marginLeft=c+"px"; -d.style.marginRight=c+"px" -}}},_setBorder:function(d,e,b){var c=this._borderSize(e); -var a=b=="top"?this._whichSideTop():this._whichSideBottom(); -if(a=="left"){d.style.borderLeftWidth=c+"px"; -d.style.borderRightWidth="0px" -}else{if(a=="right"){d.style.borderRightWidth=c+"px"; -d.style.borderLeftWidth="0px" -}else{d.style.borderLeftWidth=c+"px"; -d.style.borderRightWidth=c+"px" -}}if(this.options.border!=false){d.style.borderLeftWidth=c+"px"; -d.style.borderRightWidth=c+"px" -}},_marginSize:function(e){if(this._isTransparent()){return 0 -}var d=[5,3,2,1]; -var a=[3,2,1,0]; -var c=[2,1]; -var b=[1,0]; -if(this.options.compact&&this.options.blend){return b[e] -}else{if(this.options.compact){return c[e] -}else{if(this.options.blend){return a[e] -}else{return d[e] -}}}},_borderSize:function(e){var d=[5,3,2,1]; -var b=[2,1,1,1]; -var a=[1,0]; -var c=[0,2,0,0]; -if(this.options.compact&&(this.options.blend||this._isTransparent())){return 1 -}else{if(this.options.compact){return a[e] -}else{if(this.options.blend){return b[e] -}else{if(this.options.border){return c[e] -}else{if(this._isTransparent()){return d[e] -}}}}}return 0 -},_hasString:function(b){for(var a=1; -a=0){return true -}}return false -},_blend:function(c,a){var b=OpenLayers.Rico.Color.createFromHex(c); -b.blend(OpenLayers.Rico.Color.createFromHex(a)); -return b -},_background:function(a){try{return OpenLayers.Rico.Color.createColorFromBackground(a).asHex() -}catch(b){return"#ffffff" -}},_isTransparent:function(){return this.options.color=="transparent" -},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr") -},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br") -},_hasSingleTextChild:function(a){return a.childNodes.length==1&&a.childNodes[0].nodeType==3 -}};OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(a){alert(a) -},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"}; -(function(){var b=document.getElementsByTagName("script"); -for(var c=0,a=b.length; -c=0; -b--){var c=e[b]; -var a=new Array(c.element,c.name,c.observer,c.useCapture); -var d=OpenLayers.Event.stopObserving.apply(this,a) -}}},stopObserving:function(h,a,g,b){b=b||false; -var f=OpenLayers.Util.getElement(h); -var d=f._eventCacheID; -if(a=="keypress"){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||f.detachEvent){a="keydown" -}}var k=false; -var c=OpenLayers.Event.observers[d]; -if(c){var e=0; -while(!k&&e"+this.contentDiv.innerHTML+"
      "; -var h=(this.map)?this.map.layerContainerDiv:document.body; -var i=OpenLayers.Util.getRenderedDimensions(e,null,{displayClass:this.displayClass,containerElement:h}); -var g=this.getSafeContentSize(i); -var f=null; -if(g.equals(i)){f=i -}else{var b=new OpenLayers.Size(); -b.w=(g.w(e.w-this.map.paddingForPopups.right)){c.x=e.w-this.map.paddingForPopups.right-this.size.w -}}if(d.y(e.h-this.map.paddingForPopups.bottom)){c.y=e.h-this.map.paddingForPopups.bottom-this.size.h -}}var b=d.x-c.x; -var a=d.y-c.y; -this.map.pan(b,a) -},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true); -this.events.on({mousedown:this.onmousedown,mousemove:this.onmousemove,mouseup:this.onmouseup,click:this.onclick,mouseout:this.onmouseout,dblclick:this.ondblclick,scope:this}) -},onmousedown:function(a){this.mousedown=true; -OpenLayers.Event.stop(a,true) -},onmousemove:function(a){if(this.mousedown){OpenLayers.Event.stop(a,true) -}},onmouseup:function(a){if(this.mousedown){this.mousedown=false; -OpenLayers.Event.stop(a,true) -}},onclick:function(a){OpenLayers.Event.stop(a,true) -},onmouseout:function(a){this.mousedown=false -},ondblclick:function(a){OpenLayers.Event.stop(a,true) -},CLASS_NAME:"OpenLayers.Popup"}); -OpenLayers.Popup.WIDTH=200; -OpenLayers.Popup.HEIGHT=200; -OpenLayers.Popup.COLOR="white"; -OpenLayers.Popup.OPACITY=1; -OpenLayers.Popup.BORDER="0px";OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(h,d,g,c,b,f,e){var a=[h,d,g,c,f,e]; -OpenLayers.Popup.prototype.initialize.apply(this,a); -this.anchor=(b!=null)?b:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)} -},destroy:function(){this.anchor=null; -this.relativePosition=null; -OpenLayers.Popup.prototype.destroy.apply(this,arguments) -},show:function(){this.updatePosition(); -OpenLayers.Popup.prototype.show.apply(this,arguments) -},moveTo:function(c){var b=this.relativePosition; -this.relativePosition=this.calculateRelativePosition(c); -var d=this.calculateNewPx(c); -var a=new Array(d); -OpenLayers.Popup.prototype.moveTo.apply(this,a); -if(this.relativePosition!=b){this.updateRelativePosition() -}},setSize:function(b){OpenLayers.Popup.prototype.setSize.apply(this,arguments); -if((this.lonlat)&&(this.map)){var a=this.map.getLayerPxFromLonLat(this.lonlat); -this.moveTo(a) -}},calculateRelativePosition:function(b){var d=this.map.getLonLatFromLayerPx(b); -var c=this.map.getExtent(); -var a=c.determineQuadrant(d); -return OpenLayers.Bounds.oppositeQuadrant(a) -},updateRelativePosition:function(){},calculateNewPx:function(b){var e=b.offset(this.anchor.offset); -var a=this.size||this.contentSize; -var d=(this.relativePosition.charAt(0)=="t"); -e.y+=(d)?-a.h:this.anchor.size.h; -var c=(this.relativePosition.charAt(1)=="l"); -e.x+=(c)?-a.w:this.anchor.size.w; -return e -},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(g,c,f,b,a,e,d){this.padding=new OpenLayers.Bounds(0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE); -OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments) -},draw:function(a){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments); -this.setContentHTML(); -this.setBackgroundColor(); -this.setOpacity(); -return this.div -},updateRelativePosition:function(){this.setRicoCorners() -},setSize:function(a){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments); -this.setRicoCorners() -},setBackgroundColor:function(a){if(a!=undefined){this.backgroundColor=a -}if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent"; -OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor) -}}},setOpacity:function(a){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,a); -if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity) -}}},setBorder:function(a){this.border=0 -},setRicoCorners:function(){var a=this.getCornersToRound(this.relativePosition); -var b={corners:a,color:this.backgroundColor,bgColor:"transparent",blend:false}; -if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,b); -this.rounded=true -}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,b); -this.setBackgroundColor(); -this.setOpacity() -}},getCornersToRound:function(){var a=["tl","tr","bl","br"]; -var b=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition); -OpenLayers.Util.removeItem(a,b); -return a.join(" ") -},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"}); -OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(a,c,b){this.layer=a; -this.lonlat=c; -this.data=(b!=null)?b:{}; -this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_") -},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup) -}}if(this.layer!=null&&this.marker!=null){this.layer.removeMarker(this.marker) -}this.layer=null; -this.id=null; -this.lonlat=null; -this.data=null; -if(this.marker!=null){this.destroyMarker(this.marker); -this.marker=null -}if(this.popup!=null){this.destroyPopup(this.popup); -this.popup=null -}},onScreen:function(){var b=false; -if((this.layer!=null)&&(this.layer.map!=null)){var a=this.layer.map.getExtent(); -b=a.containsLonLat(this.lonlat) -}return b -},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon) -}return this.marker -},destroyMarker:function(){this.marker.destroy() -},createPopup:function(b){if(this.lonlat!=null){var c=this.id+"_popup"; -var a=(this.marker)?this.marker.icon:null; -if(!this.popup){this.popup=new this.popupClass(c,this.lonlat,this.data.popupSize,this.data.popupContentHTML,a,b) -}if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow -}this.popup.feature=this -}return this.popup -},destroyPopup:function(){if(this.popup){this.popup.feature=null; -this.popup.destroy(); -this.popup=null -}},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"}; -OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,url:null,renderIntent:"default",initialize:function(c,a,b){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,a]); -this.lonlat=null; -this.geometry=c?c:null; -this.state=null; -this.attributes={}; -if(a){this.attributes=OpenLayers.Util.extend(this.attributes,a) -}this.style=b?b:null -},destroy:function(){if(this.layer){this.layer.removeFeatures(this); -this.layer=null -}this.geometry=null; -OpenLayers.Feature.prototype.destroy.apply(this,arguments) -},clone:function(){return new OpenLayers.Feature.Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style) -},onScreen:function(d){var c=false; -if(this.layer&&this.layer.map){var a=this.layer.map.getExtent(); -if(d){var b=this.geometry.getBounds(); -c=a.intersectsBounds(b) -}else{var e=a.toGeometry(); -c=e.intersects(this.geometry) -}}return c -},getVisibility:function(){return !(this.style&&this.style.display=="none"||!this.layer||this.layer&&this.layer.styleMap&&this.layer.styleMap.createSymbolizer(this,this.renderIntent).display=="none"||this.layer&&!this.layer.getVisibility()) -},createMarker:function(){return null -},destroyMarker:function(){},createPopup:function(){return null -},atPoint:function(b,d,c){var a=false; -if(this.geometry){a=this.geometry.atPoint(b,d,c) -}return a -},destroyPopup:function(){},move:function(a){if(!this.layer||!this.geometry.move){return -}var b; -if(a.CLASS_NAME=="OpenLayers.LonLat"){b=this.layer.getViewPortPxFromLonLat(a) -}else{b=a -}var d=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat()); -var c=this.layer.map.getResolution(); -this.geometry.move(c*(b.x-d.x),c*(d.y-b.y)); -this.layer.drawFeature(this); -return d -},toState:function(a){if(a==OpenLayers.State.UPDATE){switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=a; -break; -case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break -}}else{if(a==OpenLayers.State.INSERT){switch(this.state){case OpenLayers.State.UNKNOWN:break; -default:this.state=a; -break -}}else{if(a==OpenLayers.State.DELETE){switch(this.state){case OpenLayers.State.INSERT:break; -case OpenLayers.State.DELETE:break; -case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state=a; -break -}}else{if(a==OpenLayers.State.UNKNOWN){this.state=a -}}}}},CLASS_NAME:"OpenLayers.Feature.Vector"}); -OpenLayers.Feature.Vector.style={"default":{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},select:{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},temporary:{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},"delete":{display:"none"}};OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{namespaces:null,namespaceAlias:null,defaultPrefix:null,readers:{},writers:{},xmldom:null,initialize:function(a){if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM") -}OpenLayers.Format.prototype.initialize.apply(this,[a]); -this.namespaces=OpenLayers.Util.extend({},this.namespaces); -this.namespaceAlias={}; -for(var b in this.namespaces){this.namespaceAlias[this.namespaces[b]]=b -}},destroy:function(){this.xmldom=null; -OpenLayers.Format.prototype.destroy.apply(this,arguments) -},setNamespace:function(a,b){this.namespaces[a]=b; -this.namespaceAlias[b]=a -},read:function(c){var a=c.indexOf("<"); -if(a>0){c=c.substring(a) -}var b=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var d; -if(window.ActiveXObject&&!this.xmldom){d=new ActiveXObject("Microsoft.XMLDOM") -}else{d=this.xmldom -}d.loadXML(c); -return d -}),this),function(){return new DOMParser().parseFromString(c,"text/xml") -},function(){var d=new XMLHttpRequest(); -d.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(c),false); -if(d.overrideMimeType){d.overrideMimeType("text/xml") -}d.send(null); -return d.responseXML -}); -if(this.keepData){this.data=b -}return b -},write:function(b){var c; -if(this.xmldom){c=b.xml -}else{var a=new XMLSerializer(); -if(b.nodeType==1){var d=document.implementation.createDocument("","",null); -if(d.importNode){b=d.importNode(b,true) -}d.appendChild(b); -c=a.serializeToString(d) -}else{c=a.serializeToString(b) -}}return c -},createElementNS:function(c,a){var b; -if(this.xmldom){if(typeof c=="string"){b=this.xmldom.createNode(1,a,c) -}else{b=this.xmldom.createNode(1,a,"") -}}else{b=document.createElementNS(c,a) -}return b -},createTextNode:function(b){var a; -if(this.xmldom){a=this.xmldom.createTextNode(b) -}else{a=document.createTextNode(b) -}return a -},getElementsByTagNameNS:function(e,d,c){var a=[]; -if(e.getElementsByTagNameNS){a=e.getElementsByTagNameNS(d,c) -}else{var b=e.getElementsByTagName("*"); -var j,f; -for(var g=0,h=b.length; -g0){e=a.substring(0,b); -c=a.substring(b+1) -}else{if(d){e=this.namespaceAlias[d.namespaceURI] -}else{e=this.defaultPrefix -}c=a -}var g=this.writers[e][c].apply(this,[f]); -if(d){d.appendChild(g) -}return g -},getChildEl:function(c,a,b){return c&&this.getThisOrNextEl(c.firstChild,a,b) -},getNextEl:function(c,a,b){return c&&this.getThisOrNextEl(c.nextSibling,a,b) -},getThisOrNextEl:function(d,a,c){outer:for(var b=d; -b; -b=b.nextSibling){switch(b.nodeType){case 1:if((!a||a===(b.localName||b.nodeName.split(":").pop()))&&(!c||c===b.namespaceURI)){break outer -}b=null; -break outer; -case 3:if(/^\s*$/.test(b.nodeValue)){break -}case 4:case 6:case 12:case 10:case 11:b=null; -break outer -}}return b||null -},lookupNamespaceURI:function(e,f){var d=null; -if(e){if(e.lookupNamespaceURI){d=e.lookupNamespaceURI(f) -}else{outer:switch(e.nodeType){case 1:if(e.namespaceURI!==null&&e.prefix===f){d=e.namespaceURI; -break outer -}var b=e.attributes.length; -if(b){var a; -for(var c=0; -c0){h.format=f.formats[0].value; -for(d=0,a=f.formats.length; -d0){for(d=0,a=f.styles.length; -d0){this.read_wmc_OnlineResource(d,a[0]) -}c.url=d.href -},read_wmc_FormatList:function(b,a){this.runChildNodes(b,a) -},read_wmc_Format:function(b,a){var c={value:this.getChildValue(a)}; -if(a.getAttribute("current")=="1"){c.current=true -}b.formats.push(c) -},read_wmc_StyleList:function(b,a){this.runChildNodes(b,a) -},read_wmc_Style:function(c,b){var a={}; -this.runChildNodes(a,b); -if(b.getAttribute("current")=="1"){a.current=true -}c.styles.push(a) -},read_wmc_SLD:function(a,b){this.runChildNodes(a,b) -},read_sld_StyledLayerDescriptor:function(c,b){var a=OpenLayers.Format.XML.prototype.write.apply(this,[b]); -c.body=a -},read_wmc_OnlineResource:function(b,a){b.href=this.getAttributeNS(a,this.namespaces.xlink,"href") -},read_wmc_Name:function(c,b){var a=this.getChildValue(b); -if(a){c.name=a -}},read_wmc_Title:function(b,a){var c=this.getChildValue(a); -if(c){b.title=c -}},read_wmc_MetadataURL:function(c,b){var d={}; -var a=b.getElementsByTagName("OnlineResource"); -if(a.length>0){this.read_wmc_OnlineResource(d,a[0]) -}c.metadataURL=d.href -},read_wmc_Abstract:function(c,b){var a=this.getChildValue(b); -if(a){c["abstract"]=a -}},read_wmc_LegendURL:function(c,d){var b={width:d.getAttribute("width"),height:d.getAttribute("height")}; -var a=d.getElementsByTagName("OnlineResource"); -if(a.length>0){this.read_wmc_OnlineResource(b,a[0]) -}c.legend=b -},write:function(c,b){var a=this.createElementDefaultNS("ViewContext"); -this.setAttributes(a,{version:this.VERSION,id:(b&&typeof b.id=="string")?b.id:OpenLayers.Util.createUniqueID("OpenLayers_Context_")}); -this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation); -a.appendChild(this.write_wmc_General(c)); -a.appendChild(this.write_wmc_LayerList(c)); -return OpenLayers.Format.XML.prototype.write.apply(this,[a]) -},createElementDefaultNS:function(c,b,a){var d=this.createElementNS(this.namespaces[this.defaultPrefix],c); -if(b){d.appendChild(this.createTextNode(b)) -}if(a){this.setAttributes(d,a) -}return d -},setAttributes:function(b,d){var c; -for(var a in d){c=d[a].toString(); -if(c.match(/[A-Z]/)){this.setAttributeNS(b,null,a,c) -}else{b.setAttribute(a,c) -}}},write_wmc_General:function(a){var c=this.createElementDefaultNS("General"); -if(a.size){c.appendChild(this.createElementDefaultNS("Window",null,{width:a.size.w,height:a.size.h})) -}var b=a.bounds; -c.appendChild(this.createElementDefaultNS("BoundingBox",null,{minx:b.left.toPrecision(18),miny:b.bottom.toPrecision(18),maxx:b.right.toPrecision(18),maxy:b.top.toPrecision(18),SRS:a.projection})); -c.appendChild(this.createElementDefaultNS("Title",a.title)); -c.appendChild(this.write_ol_MapExtension(a)); -return c -},write_ol_MapExtension:function(b){var d=this.createElementDefaultNS("Extension"); -var c=b.maxExtent; -if(c){var a=this.createElementNS(this.namespaces.ol,"ol:maxExtent"); -this.setAttributes(a,{minx:c.left.toPrecision(18),miny:c.bottom.toPrecision(18),maxx:c.right.toPrecision(18),maxy:c.top.toPrecision(18)}); -d.appendChild(a) -}return d -},write_wmc_LayerList:function(c){var d=this.createElementDefaultNS("LayerList"); -for(var b=0,a=c.layersContext.length; -b0){c.maxScale=a -}},read_sld_MaxScaleDenominator:function(b,a){b.minScale=parseFloat(this.getChildValue(a)) -},write_wmc_Layer:function(b){var c=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[b]); -if(b.maxScale){var d=this.createElementNS(this.namespaces.sld,"sld:MinScaleDenominator"); -d.appendChild(this.createTextNode(b.maxScale.toPrecision(16))); -c.appendChild(d) -}if(b.minScale){var a=this.createElementNS(this.namespaces.sld,"sld:MaxScaleDenominator"); -a.appendChild(this.createTextNode(b.minScale.toPrecision(16))); -c.appendChild(a) -}c.appendChild(this.write_wmc_FormatList(b)); -c.appendChild(this.write_wmc_StyleList(b)); -c.appendChild(this.write_wmc_LayerExtension(b)); -return c -},CLASS_NAME:"OpenLayers.Format.WMC.v1_1_0"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(a){this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/}; -OpenLayers.Format.prototype.initialize.apply(this,[a]) -},read:function(f){var e,d,h; -var g=this.regExes.typeStr.exec(f); -if(g){d=g[1].toLowerCase(); -h=g[2]; -if(this.parse[d]){e=this.parse[d].apply(this,[h]) -}if(this.internalProjection&&this.externalProjection){if(e&&e.CLASS_NAME=="OpenLayers.Feature.Vector"){e.geometry.transform(this.externalProjection,this.internalProjection) -}else{if(e&&d!="geometrycollection"&&typeof e=="object"){for(var c=0,a=e.length; -c0){c.push(",") -}j=f[e].geometry; -h=j.CLASS_NAME.split(".")[2].toLowerCase(); -if(!this.extract[h]){return null -}if(this.internalProjection&&this.externalProjection){j=j.clone(); -j.transform(this.internalProjection,this.externalProjection) -}d=this.extract[h].apply(this,[j]); -c.push(h.toUpperCase()+"("+d+")") -}if(b){c.push(")") -}return c.join("") -},extract:{point:function(a){return a.x+" "+a.y -},multipoint:function(c){var d=[]; -for(var b=0,a=c.components.length; -b0&&e.indexOf(i)>-1){a.push(b) -}else{g=this.getSiblingNodesByTagCriteria(b,i); -if(g.length>0){(a.length==0)?a=g:a.push(g) -}}}}return a -},parseAttributes:function(d){var e={}; -if(d.nodeType==1){var c=d.childNodes; -n=c.length; -for(var f=0; -f=0&&E<=1&&C>=0&&C<=1){if(!s){f=true -}else{var h=a.x1+(E*o); -var g=a.y1+(E*w); -f=new OpenLayers.Geometry.Point(h,g) -}}}if(z){var r; -if(f){if(s){var n=[a,H]; -var A,h,g; -outer:for(var v=0; -v<2; -++v){A=n[v]; -for(var u=1; -u<3; -++u){h=A["x"+u]; -g=A["y"+u]; -r=Math.sqrt(Math.pow(h-f.x,2)+Math.pow(g-f.y,2)); -if(r=1){g=a; -e=f -}else{g=b+h*m; -e=i+h*l -}}return{distance:Math.sqrt(Math.pow(g-c,2)+Math.pow(e-j,2)),x:g,y:e} -};OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,allowSelection:false,displayClass:"",title:"",autoActivate:false,active:null,handler:null,eventListeners:null,events:null,EVENT_TYPES:["activate","deactivate"],initialize:function(a){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,""); -OpenLayers.Util.extend(this,a); -this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES); -if(this.eventListeners instanceof Object){this.events.on(this.eventListeners) -}if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_") -}},destroy:function(){if(this.events){if(this.eventListeners){this.events.un(this.eventListeners) -}this.events.destroy(); -this.events=null -}this.eventListeners=null; -if(this.handler){this.handler.destroy(); -this.handler=null -}if(this.handlers){for(var a in this.handlers){if(this.handlers.hasOwnProperty(a)&&typeof this.handlers[a].destroy=="function"){this.handlers[a].destroy() -}}this.handlers=null -}if(this.map){this.map.removeControl(this); -this.map=null -}},setMap:function(a){this.map=a; -if(this.handler){this.handler.setMap(a) -}},draw:function(a){if(this.div==null){this.div=OpenLayers.Util.createDiv(this.id); -this.div.className=this.displayClass; -if(!this.allowSelection){this.div.className+=" olControlNoSelect"; -this.div.setAttribute("unselectable","on",0); -this.div.onselectstart=OpenLayers.Function.False -}if(this.title!=""){this.div.title=this.title -}}if(a!=null){this.position=a.clone() -}this.moveTo(this.position); -return this.div -},moveTo:function(a){if((a!=null)&&(this.div!=null)){this.div.style.left=a.x+"px"; -this.div.style.top=a.y+"px" -}},activate:function(){if(this.active){return false -}if(this.handler){this.handler.activate() -}this.active=true; -if(this.map){OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active") -}this.events.triggerEvent("activate"); -return true -},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate() -}this.active=false; -if(this.map){OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active") -}this.events.triggerEvent("deactivate"); -return true -}return false -},CLASS_NAME:"OpenLayers.Control"}); -OpenLayers.Control.TYPE_BUTTON=1; -OpenLayers.Control.TYPE_TOGGLE=2; -OpenLayers.Control.TYPE_TOOL=3;OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,slideRatio:null,buttons:null,position:null,initialize:function(a){this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y); -OpenLayers.Control.prototype.initialize.apply(this,arguments) -},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments); -this.removeButtons(); -this.buttons=null; -this.position=null -},draw:function(b){OpenLayers.Control.prototype.draw.apply(this,arguments); -b=this.position; -this.buttons=[]; -var c=new OpenLayers.Size(18,18); -var a=new OpenLayers.Pixel(b.x+c.w/2,b.y); -this._addButton("panup","north-mini.png",a,c); -b.y=a.y+c.h; -this._addButton("panleft","west-mini.png",b,c); -this._addButton("panright","east-mini.png",b.add(c.w,0),c); -this._addButton("pandown","south-mini.png",a.add(0,c.h*2),c); -this._addButton("zoomin","zoom-plus-mini.png",a.add(0,c.h*3+5),c); -this._addButton("zoomworld","zoom-world-mini.png",a.add(0,c.h*4+5),c); -this._addButton("zoomout","zoom-minus-mini.png",a.add(0,c.h*5+5),c); -return this.div -},_addButton:function(a,d,i,g){var f=OpenLayers.Util.getImagesLocation()+d; -var b=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+a,i,g,f,"absolute"); -this.div.appendChild(b); -OpenLayers.Event.observe(b,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,b)); -OpenLayers.Event.observe(b,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,b)); -OpenLayers.Event.observe(b,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,b)); -b.action=a; -b.map=this.map; -if(!this.slideRatio){var c=this.slideFactor; -var e=function(){return c -} -}else{var h=this.slideRatio; -var e=function(j){return this.map.getSize()[j]*h -} -}b.getSlideFactor=e; -this.buttons.push(b); -return b -},_removeButton:function(a){OpenLayers.Event.stopObservingElement(a); -a.map=null; -a.getSlideFactor=null; -this.div.removeChild(a); -OpenLayers.Util.removeItem(this.buttons,a) -},removeButtons:function(){for(var a=this.buttons.length-1; -a>=0; ---a){this._removeButton(this.buttons[a]) -}},doubleClick:function(a){OpenLayers.Event.stop(a); -return false -},buttonDown:function(a){if(!OpenLayers.Event.isLeftClick(a)){return -}switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor("h")); -break; -case"pandown":this.map.pan(0,this.getSlideFactor("h")); -break; -case"panleft":this.map.pan(-this.getSlideFactor("w"),0); -break; -case"panright":this.map.pan(this.getSlideFactor("w"),0); -break; -case"zoomin":this.map.zoomIn(); -break; -case"zoomout":this.map.zoomOut(); -break; -case"zoomworld":this.map.zoomToMaxExtent(); -break -}OpenLayers.Event.stop(a) -},CLASS_NAME:"OpenLayers.Control.PanZoom"}); -OpenLayers.Control.PanZoom.X=4; -OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoombarDiv:null,divEvents:null,zoomWorldIcon:false,forceFixedZoomLevel:false,mouseDragStart:null,zoomStart:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments) -},destroy:function(){this._removeZoomBar(); -this.map.events.un({changebaselayer:this.redraw,scope:this}); -OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments); -delete this.mouseDragStart; -delete this.zoomStart -},setMap:function(a){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments); -this.map.events.register("changebaselayer",this,this.redraw) -},redraw:function(){if(this.div!=null){this.removeButtons(); -this._removeZoomBar() -}this.draw() -},draw:function(b){OpenLayers.Control.prototype.draw.apply(this,arguments); -b=this.position.clone(); -this.buttons=[]; -var d=new OpenLayers.Size(18,18); -var a=new OpenLayers.Pixel(b.x+d.w/2,b.y); -var c=d.w; -if(this.zoomWorldIcon){a=new OpenLayers.Pixel(b.x+d.w,b.y) -}this._addButton("panup","north-mini.png",a,d); -b.y=a.y+d.h; -this._addButton("panleft","west-mini.png",b,d); -if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",b.add(d.w,0),d); -c*=2 -}this._addButton("panright","east-mini.png",b.add(c,0),d); -this._addButton("pandown","south-mini.png",a.add(0,d.h*2),d); -this._addButton("zoomin","zoom-plus-mini.png",a.add(0,d.h*3+5),d); -a=this._addZoomBar(a.add(0,d.h*4+5)); -this._addButton("zoomout","zoom-minus-mini.png",a,d); -return this.div -},_addZoomBar:function(a){var e=OpenLayers.Util.getImagesLocation(); -var g=this.id+"_"+this.map.id; -var b=this.map.getNumZoomLevels()-1-this.map.getZoom(); -var c=OpenLayers.Util.createAlphaImageDiv(g,a.add(-1,b*this.zoomStopHeight),new OpenLayers.Size(20,9),e+"slider.png","absolute"); -this.slider=c; -this.sliderEvents=new OpenLayers.Events(this,c,null,true,{includeXY:true}); -this.sliderEvents.on({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick}); -var d=new OpenLayers.Size(); -d.h=this.zoomStopHeight*this.map.getNumZoomLevels(); -d.w=this.zoomStopWidth; -var f=null; -if(OpenLayers.Util.alphaHack()){var g=this.id+"_"+this.map.id; -f=OpenLayers.Util.createAlphaImageDiv(g,a,new OpenLayers.Size(d.w,this.zoomStopHeight),e+"zoombar.png","absolute",null,"crop"); -f.style.height=d.h+"px" -}else{f=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,a,d,e+"zoombar.png") -}this.zoombarDiv=f; -this.divEvents=new OpenLayers.Events(this,f,null,true,{includeXY:true}); -this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick}); -this.div.appendChild(f); -this.startTop=parseInt(f.style.top); -this.div.appendChild(c); -this.map.events.register("zoomend",this,this.moveZoomBar); -a=a.add(0,this.zoomStopHeight*this.map.getNumZoomLevels()); -return a -},_removeZoomBar:function(){this.sliderEvents.un({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick}); -this.sliderEvents.destroy(); -this.divEvents.un({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick}); -this.divEvents.destroy(); -this.div.removeChild(this.zoombarDiv); -this.zoombarDiv=null; -this.div.removeChild(this.slider); -this.slider=null; -this.map.events.unregister("zoomend",this,this.moveZoomBar) -},passEventToSlider:function(a){this.sliderEvents.handleBrowserEvent(a) -},divClick:function(a){if(!OpenLayers.Event.isLeftClick(a)){return -}var e=a.xy.y; -var d=OpenLayers.Util.pagePosition(a.object)[1]; -var c=(e-d)/this.zoomStopHeight; -if(this.forceFixedZoomLevel||!this.map.fractionalZoom){c=Math.floor(c) -}var b=(this.map.getNumZoomLevels()-1)-c; -b=Math.min(Math.max(b,0),this.map.getNumZoomLevels()-1); -this.map.zoomTo(b); -OpenLayers.Event.stop(a) -},zoomBarDown:function(a){if(!OpenLayers.Event.isLeftClick(a)){return -}this.map.events.on({mousemove:this.passEventToSlider,mouseup:this.passEventToSlider,scope:this}); -this.mouseDragStart=a.xy.clone(); -this.zoomStart=a.xy.clone(); -this.div.style.cursor="move"; -this.zoombarDiv.offsets=null; -OpenLayers.Event.stop(a) -},zoomBarDrag:function(b){if(this.mouseDragStart!=null){var a=this.mouseDragStart.y-b.xy.y; -var d=OpenLayers.Util.pagePosition(this.zoombarDiv); -if((b.clientY-d[1])>0&&(b.clientY-d[1])this.duration){if(this.callbacks&&this.callbacks.done){this.callbacks.done.call(this,this.finish); -this.playing=false -}window.clearInterval(this.interval); -this.interval=null -}},CLASS_NAME:"OpenLayers.Tween"}); -OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"}; -OpenLayers.Easing.Linear={easeIn:function(e,a,g,f){return g*e/f+a -},easeOut:function(e,a,g,f){return g*e/f+a -},easeInOut:function(e,a,g,f){return g*e/f+a -},CLASS_NAME:"OpenLayers.Easing.Linear"}; -OpenLayers.Easing.Expo={easeIn:function(e,a,g,f){return(e==0)?a:g*Math.pow(2,10*(e/f-1))+a -},easeOut:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a -},easeInOut:function(e,a,g,f){if(e==0){return a -}if(e==f){return a+g -}if((e/=f/2)<1){return g/2*Math.pow(2,10*(e-1))+a -}return g/2*(-Math.pow(2,-10*--e)+2)+a -},CLASS_NAME:"OpenLayers.Easing.Expo"}; -OpenLayers.Easing.Quad={easeIn:function(e,a,g,f){return g*(e/=f)*e+a -},easeOut:function(e,a,g,f){return -g*(e/=f)*(e-2)+a -},easeInOut:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a -}return -g/2*((--e)*(e-2)-1)+a -},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1000},EVENT_TYPES:["preaddlayer","addlayer","removelayer","changelayer","movestart","move","moveend","zoomend","popupopen","popupclose","addmarker","removemarker","clearmarkers","mouseover","mouseout","mousemove","dragstart","drag","dragend","changebaselayer"],id:null,fractionalZoom:false,events:null,allOverlays:false,div:null,dragging:false,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,resolution:null,zoom:0,panRatio:1.5,viewRequestID:0,tileSize:null,projection:"EPSG:4326",units:"degrees",resolutions:null,maxResolution:1.40625,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,displayProjection:null,fallThrough:true,panTween:null,eventListeners:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,paddingForPopups:null,initialize:function(h,d){if(arguments.length===1&&typeof h==="object"){d=h; -h=d&&d.div -}this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT); -this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90); -this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15); -this.theme=OpenLayers._getScriptLocation()+"theme/default/style.css"; -OpenLayers.Util.extend(this,d); -this.layers=[]; -this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_"); -this.div=OpenLayers.Util.getElement(h); -if(!this.div){this.div=document.createElement("div"); -this.div.style.height="1px"; -this.div.style.width="1px" -}OpenLayers.Element.addClass(this.div,"olMap"); -var g=this.id+"_OpenLayers_ViewPort"; -this.viewPortDiv=OpenLayers.Util.createDiv(g,null,null,null,"relative",null,"hidden"); -this.viewPortDiv.style.width="100%"; -this.viewPortDiv.style.height="100%"; -this.viewPortDiv.className="olMapViewport"; -this.div.appendChild(this.viewPortDiv); -g=this.id+"_OpenLayers_Container"; -this.layerContainerDiv=OpenLayers.Util.createDiv(g); -this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE.Popup-1; -this.viewPortDiv.appendChild(this.layerContainerDiv); -this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES,this.fallThrough,{includeXY:true}); -this.updateSize(); -if(this.eventListeners instanceof Object){this.events.on(this.eventListeners) -}this.events.register("movestart",this,this.updateSize); -if(OpenLayers.String.contains(navigator.appName,"Microsoft")){this.events.register("resize",this,this.updateSize) -}else{this.updateSizeDestroy=OpenLayers.Function.bind(this.updateSize,this); -OpenLayers.Event.observe(window,"resize",this.updateSizeDestroy) -}if(this.theme){var f=true; -var c=document.getElementsByTagName("link"); -for(var e=0,a=c.length; -e=0; ---a){this.controls[a].destroy() -}this.controls=null -}if(this.layers!=null){for(var a=this.layers.length-1; -a>=0; ---a){this.layers[a].destroy(false) -}this.layers=null -}if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv) -}this.viewPortDiv=null; -if(this.eventListeners){this.events.un(this.eventListeners); -this.eventListeners=null -}this.events.destroy(); -this.events=null -},setOptions:function(a){OpenLayers.Util.extend(this,a) -},getTileSize:function(){return this.tileSize -},getBy:function(e,c,a){var d=(typeof a.test=="function"); -var b=OpenLayers.Array.filter(this[e],function(f){return f[c]==a||(d&&a.test(f[c])) -}); -return b -},getLayersBy:function(b,a){return this.getBy("layers",b,a) -},getLayersByName:function(a){return this.getLayersBy("name",a) -},getLayersByClass:function(a){return this.getLayersBy("CLASS_NAME",a) -},getControlsBy:function(b,a){return this.getBy("controls",b,a) -},getControlsByClass:function(a){return this.getControlsBy("CLASS_NAME",a) -},getLayer:function(e){var b=null; -for(var d=0,a=this.layers.length; -dthis.layers.length){b=this.layers.length -}}if(e!=b){this.layers.splice(e,1); -this.layers.splice(b,0,d); -for(var c=0,a=this.layers.length; -c=0; ---b){this.removePopup(this.popups[b]) -}}a.map=this; -this.popups.push(a); -var c=a.draw(); -if(c){c.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length; -this.layerContainerDiv.appendChild(c) -}},removePopup:function(a){OpenLayers.Util.removeItem(this.popups,a); -if(a.div){try{this.layerContainerDiv.removeChild(a.div) -}catch(b){}}a.map=null -},getSize:function(){var a=null; -if(this.size!=null){a=this.size.clone() -}return a -},updateSize:function(){var c=this.getCurrentSize(); -if(c&&!isNaN(c.h)&&!isNaN(c.w)){this.events.clearMouseCache(); -var f=this.getSize(); -if(f==null){this.size=f=c -}if(!c.equals(f)){this.size=c; -for(var d=0,b=this.layers.length; -dthis.restrictedExtent.getWidth()){g=new OpenLayers.LonLat(p.lon,g.lat) -}else{if(o.leftthis.restrictedExtent.right){g=g.add(this.restrictedExtent.right-o.right,0) -}}}if(o.getHeight()>this.restrictedExtent.getHeight()){g=new OpenLayers.LonLat(g.lon,p.lat) -}else{if(o.bottomthis.restrictedExtent.top){g=g.add(0,this.restrictedExtent.top-o.top) -}}}}}var b=c||((this.isValidZoomLevel(n))&&(n!=this.getZoom())); -var e=(this.isValidLonLat(g))&&(!g.equals(this.center)); -if(b||e||!m){if(!this.dragging&&!h){this.events.triggerEvent("movestart") -}if(e){if((!b)&&(this.center)){this.centerLayerContainer(g) -}this.center=g.clone() -}if((b)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone(); -this.layerContainerDiv.style.left="0px"; -this.layerContainerDiv.style.top="0px" -}if(b){this.zoom=n; -this.resolution=this.getResolutionForZoom(n); -this.viewRequestID++ -}var a=this.getExtent(); -if(this.baseLayer.visibility){this.baseLayer.moveTo(a,b,m); -if(m){this.baseLayer.events.triggerEvent("move") -}else{this.baseLayer.events.triggerEvent("moveend",{zoomChanged:b}) -}}a=this.baseLayer.getExtent(); -for(var f=0,k=this.layers.length; -f=0)&&(a0){a=this.layers[0].getResolution() -}}return a -},getUnits:function(){var a=null; -if(this.baseLayer!=null){a=this.baseLayer.units -}return a -},getScale:function(){var c=null; -if(this.baseLayer!=null){var b=this.getResolution(); -var a=this.baseLayer.units; -c=OpenLayers.Util.getScaleFromResolution(b,a) -}return c -},getZoomForExtent:function(c,b){var a=null; -if(this.baseLayer!=null){a=this.baseLayer.getZoomForExtent(c,b) -}return a -},getResolutionForZoom:function(b){var a=null; -if(this.baseLayer){a=this.baseLayer.getResolutionForZoom(b) -}return a -},getZoomForResolution:function(a,c){var b=null; -if(this.baseLayer!=null){b=this.baseLayer.getZoomForResolution(a,c) -}return b -},zoomTo:function(a){if(this.isValidZoomLevel(a)){this.setCenter(null,a) -}},zoomIn:function(){this.zoomTo(this.getZoom()+1) -},zoomOut:function(){this.zoomTo(this.getZoom()-1) -},zoomToExtent:function(d,c){var b=d.getCenterLonLat(); -if(this.baseLayer.wrapDateLine){var a=this.getMaxExtent(); -d=d.clone(); -while(d.right=this.minResolution)&&(a<=this.maxResolution)) -}}return b -},setIsBaseLayer:function(a){if(a!=this.isBaseLayer){this.isBaseLayer=a; -if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this}) -}}},initResolutions:function(){var n=new Array("projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel"); -var b=["projection","units"]; -var e=false; -var d={}; -for(var f=0,j=n.length; -f1){a=Math.pow((d.maxResolution/d.minResolution),(1/(d.numZoomLevels-1))) -}for(var f=0; -f=e){d=j; -k=f -}if(j<=e){b=j; -c=f; -break -}}var h=d-b; -if(h>0){n=k+((d-e)/h) -}else{n=k -}}else{var l; -var m=Number.POSITIVE_INFINITY; -for(var f=0,g=this.resolutions.length; -fm){break -}m=l -}else{if(this.resolutions[f]b.lon){if(d.lon<0){d.lon=-180-(d.lon+180) -}else{b.lon=180+b.lon+180 -}}var e=new OpenLayers.Bounds(d.lon,b.lat,b.lon,d.lat); -return e -},showTile:function(){if(this.shouldDraw){this.show() -}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,lastRatio:1,isFirstDraw:true,backBufferTile:null,initialize:function(d,a,e,b,c){OpenLayers.Tile.prototype.initialize.apply(this,arguments); -this.url=b; -this.frame=document.createElement("div"); -this.frame.style.overflow="hidden"; -this.frame.style.position="absolute"; -this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack() -},destroy:function(){if(this.imgDiv!=null){if(this.layerAlphaHack){OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0]) -}OpenLayers.Event.stopObservingElement(this.imgDiv); -if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv); -this.imgDiv.map=null -}this.imgDiv.urls=null; -this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif" -}this.imgDiv=null; -if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame) -}this.frame=null; -if(this.backBufferTile){this.backBufferTile.destroy(); -this.backBufferTile=null -}this.layer.events.unregister("loadend",this,this.resetBackBuffer); -OpenLayers.Tile.prototype.destroy.apply(this,arguments) -},clone:function(a){if(a==null){a=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size) -}a=OpenLayers.Tile.prototype.clone.apply(this,[a]); -a.imgDiv=null; -return a -},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position) -}var a=OpenLayers.Tile.prototype.draw.apply(this,arguments); -if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(a){if(!this.backBufferTile){this.backBufferTile=this.clone(); -this.backBufferTile.hide(); -this.backBufferTile.isBackBuffer=true; -this.events.register("loadend",this,this.resetBackBuffer); -this.layer.events.register("loadend",this,this.resetBackBuffer) -}this.startTransition() -}else{if(this.backBufferTile){this.backBufferTile.clear() -}}}else{if(a&&this.isFirstDraw){this.events.register("loadend",this,this.showTile); -this.isFirstDraw=false -}}if(!a){return false -}if(this.isLoading){this.events.triggerEvent("reload") -}else{this.isLoading=true; -this.events.triggerEvent("loadstart") -}return this.renderTile() -},resetBackBuffer:function(){this.showTile(); -if(this.backBufferTile&&(this.isFirstDraw||!this.layer.numLoadingTiles)){this.isFirstDraw=false; -var a=this.layer.maxExtent; -var b=(a&&this.bounds.intersectsBounds(a,false)); -if(b){this.backBufferTile.position=this.position; -this.backBufferTile.bounds=this.bounds; -this.backBufferTile.size=this.size; -this.backBufferTile.imageSize=this.layer.getImageSize(this.bounds)||this.size; -this.backBufferTile.imageOffset=this.layer.imageOffset; -this.backBufferTile.resolution=this.layer.getResolution(); -this.backBufferTile.renderTile() -}this.backBufferTile.hide() -}},renderTile:function(){if(this.imgDiv==null){this.initImgDiv() -}this.imgDiv.viewRequestID=this.layer.map.viewRequestID; -if(this.layer.async){this.layer.getURLasync(this.bounds,this,"url",this.positionImage) -}else{if(this.layer.url instanceof Array){this.imgDiv.urls=this.layer.url.slice() -}this.url=this.layer.getURL(this.bounds); -this.positionImage() -}return true -},positionImage:function(){if(this.layer==null){return -}OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size); -var a=this.layer.getImageSize(this.bounds); -if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,a,this.url) -}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,a); -this.imgDiv.src=this.url -}},clear:function(){if(this.imgDiv){this.hide(); -if(OpenLayers.Tile.Image.useBlankTile){this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif" -}}},initImgDiv:function(){var d=this.layer.imageOffset; -var b=this.layer.getImageSize(this.bounds); -if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,d,b,null,"relative",null,null,null,true) -}else{this.imgDiv=OpenLayers.Util.createImage(null,d,b,null,"relative",null,null,true) -}this.imgDiv.className="olTileImage"; -this.frame.style.zIndex=this.isBackBuffer?0:1; -this.frame.appendChild(this.imgDiv); -this.layer.div.appendChild(this.frame); -if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity) -}this.imgDiv.map=this.layer.map; -var c=function(){if(this.isLoading){this.isLoading=false; -this.events.triggerEvent("loadend") -}}; -if(this.layerAlphaHack){OpenLayers.Event.observe(this.imgDiv.childNodes[0],"load",OpenLayers.Function.bind(c,this)) -}else{OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(c,this)) -}var a=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){c.call(this) -}}; -OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(a,this)) -},checkImgURL:function(){if(this.layer){var a=this.layerAlphaHack?this.imgDiv.firstChild.src:this.imgDiv.src; -if(!OpenLayers.Util.isEquivalentUrl(a,this.url)){this.hide() -}}},startTransition:function(){if(!this.backBufferTile||!this.backBufferTile.imgDiv){return -}var d=1; -if(this.backBufferTile.resolution){d=this.backBufferTile.resolution/this.layer.getResolution() -}if(d!=this.lastRatio){if(this.layer.transitionEffect=="resize"){var c=new OpenLayers.LonLat(this.backBufferTile.bounds.left,this.backBufferTile.bounds.top); -var b=new OpenLayers.Size(this.backBufferTile.size.w*d,this.backBufferTile.size.h*d); -var a=this.layer.map.getLayerPxFromLonLat(c); -OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,a,b); -var e=this.backBufferTile.imageSize; -e=new OpenLayers.Size(e.w*d,e.h*d); -var f=this.backBufferTile.imageOffset; -if(f){f=new OpenLayers.Pixel(f.x*d,f.y*d) -}OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,f,e); -this.backBufferTile.show() -}}else{if(this.layer.singleTile){this.backBufferTile.show() -}else{this.backBufferTile.hide() -}}this.lastRatio=d -},show:function(){this.frame.style.display=""; -if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.frame.scrollLeft=this.frame.scrollLeft -}}},hide:function(){this.frame.style.display="none" -},CLASS_NAME:"OpenLayers.Tile.Image"}); -OpenLayers.Tile.Image.useBlankTile=(OpenLayers.Util.getBrowserName()=="safari"||OpenLayers.Util.getBrowserName()=="opera");OpenLayers.Layer.Image=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:true,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(c,b,e,d,a){this.url=b; -this.extent=e; -this.maxExtent=e; -this.size=d; -OpenLayers.Layer.prototype.initialize.apply(this,[c,a]); -this.aspectRatio=(this.extent.getHeight()/this.size.h)/(this.extent.getWidth()/this.size.w) -},destroy:function(){if(this.tile){this.removeTileMonitoringHooks(this.tile); -this.tile.destroy(); -this.tile=null -}OpenLayers.Layer.prototype.destroy.apply(this,arguments) -},clone:function(a){if(a==null){a=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.getOptions()) -}a=OpenLayers.Layer.prototype.clone.apply(this,[a]); -return a -},setMap:function(a){if(this.options.maxResolution==null){this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w -}OpenLayers.Layer.prototype.setMap.apply(this,arguments) -},moveTo:function(e,a,f){OpenLayers.Layer.prototype.moveTo.apply(this,arguments); -var b=(this.tile==null); -if(a||b){this.setTileSize(); -var d=new OpenLayers.LonLat(this.extent.left,this.extent.top); -var c=this.map.getLayerPxFromLonLat(d); -if(b){this.tile=new OpenLayers.Tile.Image(this,c,this.extent,null,this.tileSize); -this.addTileMonitoringHooks(this.tile) -}else{this.tile.size=this.tileSize.clone(); -this.tile.position=c.clone() -}this.tile.draw() -}},setTileSize:function(){var b=this.extent.getWidth()/this.map.getResolution(); -var a=this.extent.getHeight()/this.map.getResolution(); -this.tileSize=new OpenLayers.Size(b,a) -},addTileMonitoringHooks:function(a){a.onLoadStart=function(){this.events.triggerEvent("loadstart") -}; -a.events.register("loadstart",this,a.onLoadStart); -a.onLoadEnd=function(){this.events.triggerEvent("loadend") -}; -a.events.register("loadend",this,a.onLoadEnd); -a.events.register("unload",this,a.onLoadEnd) -},removeTileMonitoringHooks:function(a){a.unload(); -a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:this}) -},setUrl:function(a){this.url=a; -this.tile.draw() -},getURL:function(a){return this.url -},CLASS_NAME:"OpenLayers.Layer.Image"});OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(a){OpenLayers.Geometry.prototype.initialize.apply(this,arguments); -this.components=[]; -if(a!=null){this.addComponents(a) -}},destroy:function(){this.components.length=0; -this.components=null -},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()"); -for(var i=0,len=this.components.length; -i0){this.setBounds(this.components[0].getBounds()); -for(var b=1,a=this.components.length; -b-1)){if(a!=null&&(a=0; ---a){this.removeComponent(b[a]) -}},removeComponent:function(a){OpenLayers.Util.removeItem(this.components,a); -this.clearBounds() -},getLength:function(){var c=0; -for(var b=0,a=this.components.length; -b1)){for(var b=1,a=this.components.length; -b1)){var h,g; -for(var d=1,a=e.components.length; -d2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments) -}},intersects:function(m){var c=false; -var l=m.CLASS_NAME; -if(l=="OpenLayers.Geometry.LineString"||l=="OpenLayers.Geometry.LinearRing"||l=="OpenLayers.Geometry.Point"){var p=this.getSortedSegments(); -var n; -if(l=="OpenLayers.Geometry.Point"){n=[{x1:m.x,y1:m.y,x2:m.x,y2:m.y}] -}else{n=m.getSortedSegments() -}var s,g,e,a,r,q,d,b; -outer:for(var h=0,k=p.length; -he){break -}if(q.x2Math.max(a,r)){continue -}if(Math.max(d,b)0){var p=r.x10){a.unshift(r,1); -Array.prototype.splice.apply(c,a); -r+=a.length-2 -}if(d){for(var q=0,u=h.points.length; -q0&&s.length>0){s.push(f.clone()); -m.push(new OpenLayers.Geometry.LineString(s)) -}}else{n=x.splitWith(this,b) -}if(c&&c.length>1){e=true -}else{c=[] -}if(m&&m.length>1){l=true -}else{m=[] -}if(e||l){if(d){n=[m,c] -}else{n=c -}}return n -},splitWith:function(b,a){return b.split(this,a) -},getVertices:function(a){var b; -if(a===true){b=[this.components[0],this.components[this.components.length-1]] -}else{if(a===false){b=this.components.slice(1,this.components.length-1) -}else{b=this.components.slice() -}}return b -},distanceTo:function(h,g){var k=!(g&&g.edge===false); -var B=k&&g&&g.details; -var q,e={}; -var t=Number.POSITIVE_INFINITY; -if(h instanceof OpenLayers.Geometry.Point){var r=this.getSortedSegments(); -var p=h.x; -var o=h.y; -var z; -for(var v=0,w=r.length; -vp&&((o>z.y1&&oz.y2))){break -}}}if(B){e={distance:e.distance,x0:e.x,y0:e.y,x1:p,y1:o} -}else{e=e.distance -}}else{if(h instanceof OpenLayers.Geometry.LineString){var d=this.getSortedSegments(); -var c=h.getSortedSegments(); -var b,a,n,A,f; -var m=c.length; -var l={point:true}; -outer:for(var v=0,w=d.length; -v4){this.components.pop(); -OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments); -var b=this.components[0]; -OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[b]) -}},move:function(b,d){for(var c=0,a=this.components.length; -c2)){var h=0; -var g=0; -for(var e=0; -e2)){var f=0; -for(var e=0,d=this.components.length; -e2){var h,g; -for(var e=0; -e=q&&k<=o)||q>=o&&(k<=q&&k>=o)){h=-1; -break -}}continue -}e=s(r(j,q,d,o,b),l); -if(e==k){if(d=d&&j<=b)||d>b&&(j<=d&&j>=b)){h=-1; -break -}}if(e<=k){continue -}if(q!=o&&(eMath.max(q,o))){continue -}if(d=d&&jb&&(j=b)){++h -}}var p=(h==-1)?1:!!(h&1); -return p -},intersects:function(d){var b=false; -if(d.CLASS_NAME=="OpenLayers.Geometry.Point"){b=this.containsPoint(d) -}else{if(d.CLASS_NAME=="OpenLayers.Geometry.LineString"){b=d.intersects(this) -}else{if(d.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){b=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[d]) -}else{for(var c=0,a=d.components.length; -c0)){c+=Math.abs(this.components[0].getArea()); -for(var b=1,a=this.components.length; -b0)){d+=Math.abs(this.components[0].getGeodesicArea(b)); -for(var c=1,a=this.components.length; -c0){c=this.components[0].containsPoint(a); -if(c!==1){if(c&&e>1){var d; -for(var b=1; -b1){m=true -}else{e=[] -}if(p&&p.length>1){b=true -}else{p=[] -}if(m||b){if(r){g=[e,p] -}else{g=p -}}return g -},splitWith:function(n,s){var g=null; -var r=s&&s.mutual; -var o,c,q,m,a,e,p; -if(n instanceof OpenLayers.Geometry.LineString){p=[]; -e=[n]; -for(var f=0,h=this.components.length; -f1){m=true -}else{e=[] -}if(p&&p.length>1){a=true -}else{p=[] -}if(m||a){if(r){g=[e,p] -}else{g=p -}}return g -},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments) -},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Format.GML=OpenLayers.Class(OpenLayers.Format.XML,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featurePrefix:"feature",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:true,xy:true,initialize:function(a){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)}; -OpenLayers.Format.XML.prototype.initialize.apply(this,[a]) -},read:function(d){if(typeof d=="string"){d=OpenLayers.Format.XML.prototype.read.apply(this,[d]) -}var e=this.getElementsByTagNameNS(d.documentElement,this.gmlns,this.featureName); -var c=[]; -for(var b=0; -b0){b=this.parseGeometry[k.toLowerCase()]; -if(b){l=b.apply(this,[g[0]]); -if(this.internalProjection&&this.externalProjection){l.transform(this.externalProjection,this.internalProjection) -}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:k})) -}break -}}var h; -if(this.extractAttributes){h=this.parseAttributes(d) -}var m=new OpenLayers.Feature.Vector(l,h); -m.gml={featureType:d.firstChild.nodeName.split(":")[1],featureNS:d.firstChild.namespaceURI,featureNSPrefix:d.firstChild.prefix}; -var c=this.getElementsByTagNameNS(d,this.gmlns,"boundedBy"); -if(c.length===1){b=this.parseGeometry.box; -if(b){m.bounds=b.apply(this,[c[0]]) -}}var a=d.firstChild; -var f; -while(a){if(a.nodeType==1){f=a.getAttribute("fid")||a.getAttribute("id"); -if(f){break -}}a=a.nextSibling -}m.fid=f; -return m -},parseGeometry:{point:function(d){var b,a; -var e=[]; -var b=this.getElementsByTagNameNS(d,this.gmlns,"pos"); -if(b.length>0){a=b[0].firstChild.nodeValue; -a=a.replace(this.regExes.trimSpace,""); -e=a.split(this.regExes.splitSpace) -}if(e.length==0){b=this.getElementsByTagNameNS(d,this.gmlns,"coordinates"); -if(b.length>0){a=b[0].firstChild.nodeValue; -a=a.replace(this.regExes.removeSpace,""); -e=a.split(",") -}}if(e.length==0){b=this.getElementsByTagNameNS(d,this.gmlns,"coord"); -if(b.length>0){var f=this.getElementsByTagNameNS(b[0],this.gmlns,"X"); -var c=this.getElementsByTagNameNS(b[0],this.gmlns,"Y"); -if(f.length>0&&c.length>0){e=[f[0].firstChild.nodeValue,c[0].firstChild.nodeValue] -}}}if(e.length==2){e[2]=null -}if(this.xy){return new OpenLayers.Geometry.Point(e[0],e[1],e[2]) -}else{return new OpenLayers.Geometry.Point(e[1],e[0],e[2]) -}},multipoint:function(e){var b=this.getElementsByTagNameNS(e,this.gmlns,"Point"); -var d=[]; -if(b.length>0){var a; -for(var c=0; -c0){b=this.getChildValue(d[0]); -b=b.replace(this.regExes.trimSpace,""); -n=b.split(this.regExes.splitSpace); -var h=parseInt(d[0].getAttribute("dimension")); -var f,m,l,k; -for(var g=0; -g0){b=this.getChildValue(d[0]); -b=b.replace(this.regExes.trimSpace,""); -b=b.replace(this.regExes.trimComma,","); -var a=b.split(this.regExes.splitSpace); -for(var g=0; -g0){var a; -for(var c=0; -c0){var a; -for(var c=0; -c0){var c; -for(var b=0; -b0){var h=[]; -if(j.length>0){a=j[0].firstChild.nodeValue; -a=a.replace(this.regExes.trimSpace,""); -h=a.split(this.regExes.splitSpace) -}if(h.length==2){h[2]=null -}if(this.xy){var d=new OpenLayers.Geometry.Point(h[0],h[1],h[2]) -}else{var d=new OpenLayers.Geometry.Point(h[1],h[0],h[2]) -}}var g=this.getElementsByTagNameNS(b,this.gmlns,"upperCorner"); -if(g.length>0){var h=[]; -if(g.length>0){a=g[0].firstChild.nodeValue; -a=a.replace(this.regExes.trimSpace,""); -h=a.split(this.regExes.splitSpace) -}if(h.length==2){h[2]=null -}if(this.xy){var i=new OpenLayers.Geometry.Point(h[0],h[1],h[2]) -}else{var i=new OpenLayers.Geometry.Point(h[1],h[0],h[2]) -}}if(d&&i){e.push(new OpenLayers.Geometry.Point(d.x,d.y)); -e.push(new OpenLayers.Geometry.Point(i.x,d.y)); -e.push(new OpenLayers.Geometry.Point(i.x,i.y)); -e.push(new OpenLayers.Geometry.Point(d.x,i.y)); -e.push(new OpenLayers.Geometry.Point(d.x,d.y)); -var c=new OpenLayers.Geometry.LinearRing(e); -f=new OpenLayers.Geometry.Polygon([c]) -}return f -},box:function(e){var c=this.getElementsByTagNameNS(e,this.gmlns,"coordinates"); -var b; -var f,a=null,d=null; -if(c.length>0){b=c[0].firstChild.nodeValue; -f=b.split(" "); -if(f.length==2){a=f[0].split(","); -d=f[1].split(",") -}}if(a!==null&&d!==null){return new OpenLayers.Bounds(parseFloat(a[0]),parseFloat(a[1]),parseFloat(d[0]),parseFloat(d[1])) -}}},parseAttributes:function(e){var f={}; -var a=e.firstChild; -var d,g,c,k,j,b,h; -while(a){if(a.nodeType==1){d=a.childNodes; -for(g=0; -g0){c.bounds=a.components[0] -}},Point:function(b,a){var c={points:[]}; -this.readChildNodes(b,c); -if(!a.components){a.components=[] -}a.components.push(c.points[0]) -},coordinates:function(e,g){var h=this.getChildValue(e).replace(this.regExes.trimSpace,""); -h=h.replace(this.regExes.trimComma,","); -var a=h.split(this.regExes.splitSpace); -var f; -var d=a.length; -var c=new Array(d); -for(var b=0; -b0){a.components=[new OpenLayers.Geometry.MultiLineString(c.components)] -}},curveMember:function(a,b){this.readChildNodes(a,b) -},MultiSurface:function(b,a){var c={components:[]}; -this.readChildNodes(b,c); -if(c.components.length>0){a.components=[new OpenLayers.Geometry.MultiPolygon(c.components)] -}},surfaceMember:function(a,b){this.readChildNodes(a,b) -},surfaceMembers:function(a,b){this.readChildNodes(a,b) -},pointMembers:function(a,b){this.readChildNodes(a,b) -},lineStringMembers:function(a,b){this.readChildNodes(a,b) -},polygonMembers:function(a,b){this.readChildNodes(a,b) -},geometryMembers:function(a,b){this.readChildNodes(a,b) -},Envelope:function(d,b){var e={points:new Array(2)}; -this.readChildNodes(d,e); -if(!b.components){b.components=[] -}var c=e.points[0]; -var a=e.points[1]; -b.components.push(new OpenLayers.Bounds(c.x,c.y,a.x,a.y)) -},lowerCorner:function(b,a){var c={}; -this.readers.gml.pos.apply(this,[b,c]); -a.points[0]=c.points[0] -},upperCorner:function(b,a){var c={}; -this.readers.gml.pos.apply(this,[b,c]); -a.points[1]=c.points[0] -}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(c){var b; -if(c instanceof Array){b="featureMembers" -}else{b="featureMember" -}var a=this.writeNode("gml:"+b,c); -this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation); -return OpenLayers.Format.XML.prototype.write.apply(this,[a]) -},writers:{gml:OpenLayers.Util.applyDefaults({featureMembers:function(c){var d=this.createElementNSPlus("gml:featureMembers"); -for(var b=0,a=c.length; -b0){f=true; -for(var d=0,e=c.length; -d0&&f==false){a.display="none" -}return a -},applySymbolizer:function(f,d,b){var a=b.geometry?this.getSymbolizerPrefix(b.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0]; -var c=f.symbolizer[a]||f.symbolizer; -if(this.defaultsPerSymbolizer===true){var e=this.defaultStyle; -OpenLayers.Util.applyDefaults(c,{pointRadius:e.pointRadius}); -if(c.stroke===true||c.graphic===true){OpenLayers.Util.applyDefaults(c,{strokeWidth:e.strokeWidth,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeDashstyle:e.strokeDashstyle,strokeLinecap:e.strokeLinecap}) -}if(c.fill===true||c.graphic===true){OpenLayers.Util.applyDefaults(c,{fillColor:e.fillColor,fillOpacity:e.fillOpacity}) -}if(c.graphic===true){OpenLayers.Util.applyDefaults(c,{pointRadius:this.defaultStyle.pointRadius,externalGraphic:this.defaultStyle.externalGraphic,graphicName:this.defaultStyle.graphicName,graphicOpacity:this.defaultStyle.graphicOpacity,graphicWidth:this.defaultStyle.graphicWidth,graphicHeight:this.defaultStyle.graphicHeight,graphicXOffset:this.defaultStyle.graphicXOffset,graphicYOffset:this.defaultStyle.graphicYOffset}) -}}return this.createLiterals(OpenLayers.Util.extend(d,c),b) -},createLiterals:function(d,c){var b=OpenLayers.Util.extend({},c.attributes||c.data); -OpenLayers.Util.extend(b,this.context); -for(var a in this.propertyStyles){d[a]=OpenLayers.Style.createLiteral(d[a],b,c,a) -}return d -},findPropertyStyles:function(){var d={}; -var f=this.defaultStyle; -this.addPropertyStyles(d,f); -var h=this.rules; -var e,g; -for(var c=0,a=h.length; -cthis.value; -break; -case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:a=c[this.property]<=this.value; -break; -case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:a=c[this.property]>=this.value; -break; -case OpenLayers.Filter.Comparison.BETWEEN:a=(c[this.property]>=this.lowerBoundary)&&(c[this.property]<=this.upperBoundary); -break; -case OpenLayers.Filter.Comparison.LIKE:var d=new RegExp(this.value,"gi"); -a=d.test(c[this.property]); -break -}return a -},value2regex:function(d,b,a){if(d=="."){var c="'.' is an unsupported wildCard character for OpenLayers.Filter.Comparison"; -OpenLayers.Console.error(c); -return null -}d=d?d:"*"; -b=b?b:"."; -a=a?a:"!"; -this.value=this.value.replace(new RegExp("\\"+a+"(.|$)","g"),"\\$1"); -this.value=this.value.replace(new RegExp("\\"+b,"g"),"."); -this.value=this.value.replace(new RegExp("\\"+d,"g"),".*"); -this.value=this.value.replace(new RegExp("\\\\.\\*","g"),"\\"+d); -this.value=this.value.replace(new RegExp("\\\\\\.","g"),"\\"+b); -return this.value -},regex2value:function(){var a=this.value; -a=a.replace(/!/g,"!!"); -a=a.replace(/(\\)?\\\./g,function(c,b){return b?c:"!." -}); -a=a.replace(/(\\)?\\\*/g,function(c,b){return b?c:"!*" -}); -a=a.replace(/\\\\/g,"\\"); -a=a.replace(/\.\*/g,"*"); -return a -},clone:function(){return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison(),this) -},CLASS_NAME:"OpenLayers.Filter.Comparison"}); -OpenLayers.Filter.Comparison.EQUAL_TO="=="; -OpenLayers.Filter.Comparison.NOT_EQUAL_TO="!="; -OpenLayers.Filter.Comparison.LESS_THAN="<"; -OpenLayers.Filter.Comparison.GREATER_THAN=">"; -OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO="<="; -OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO=">="; -OpenLayers.Filter.Comparison.BETWEEN=".."; -OpenLayers.Filter.Comparison.LIKE="~";OpenLayers.Format.Filter=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]) -},write:function(c,b){var a=(b&&b.version)||this.version||this.defaultVersion; -if(!this.parser||this.parser.VERSION!=a){var d=OpenLayers.Format.Filter["v"+a.replace(/\./g,"_")]; -if(!d){throw"Can't find a Filter parser for version "+a -}this.parser=new d(this.options) -}return this.parser.write(c) -},read:function(c){if(typeof c=="string"){c=OpenLayers.Format.XML.prototype.read.apply(this,[c]) -}var a=this.version; -if(!a){a=this.defaultVersion -}if(!this.parser||this.parser.VERSION!=a){var d=OpenLayers.Format.Filter["v"+a.replace(/\./g,"_")]; -if(!d){throw"Can't find a Filter parser for version "+a -}this.parser=new d(this.options) -}var b=this.parser.read(c); -return b -},CLASS_NAME:"OpenLayers.Format.Filter"});OpenLayers.Protocol=OpenLayers.Class({format:null,options:null,autoDestroy:true,defaultFilter:null,initialize:function(a){a=a||{}; -OpenLayers.Util.extend(this,a); -this.options=a -},mergeWithDefaultFilter:function(a){if(a){if(this.defaultFilter){a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.defaultFilter,a]}) -}}else{a=this.defaultFilter -}return a -},destroy:function(){this.options=null; -this.format=null -},read:function(a){a=a||{}; -a.filter=this.mergeWithDefaultFilter(a.filter) -},create:function(){},update:function(){},"delete":function(){},commit:function(){},abort:function(a){},createCallback:function(c,a,b){return OpenLayers.Function.bind(function(){c.apply(this,[a,b]) -},this) -},CLASS_NAME:"OpenLayers.Protocol"}); -OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:true,features:null,reqFeatures:null,priv:null,initialize:function(a){OpenLayers.Util.extend(this,a) -},success:function(){return this.code>0 -},CLASS_NAME:"OpenLayers.Protocol.Response"}); -OpenLayers.Protocol.Response.SUCCESS=1; -OpenLayers.Protocol.Response.FAILURE=0;OpenLayers.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:false,wildcarded:false,initialize:function(a){a=a||{}; -this.params={}; -this.headers={}; -OpenLayers.Protocol.prototype.initialize.apply(this,arguments) -},destroy:function(){this.params=null; -this.headers=null; -OpenLayers.Protocol.prototype.destroy.apply(this) -},read:function(a){OpenLayers.Protocol.prototype.read.apply(this,arguments); -a=OpenLayers.Util.applyDefaults(a,this.options); -a.params=OpenLayers.Util.applyDefaults(a.params,this.options.params); -if(a.filter){a.params=this.filterToParams(a.filter,a.params) -}var b=(a.readWithPOST!==undefined)?a.readWithPOST:this.readWithPOST; -var c=new OpenLayers.Protocol.Response({requestType:"read"}); -if(b){c.priv=OpenLayers.Request.POST({url:a.url,callback:this.createCallback(this.handleRead,c,a),data:OpenLayers.Util.getParameterString(a.params),headers:{"Content-Type":"application/x-www-form-urlencoded"}}) -}else{c.priv=OpenLayers.Request.GET({url:a.url,callback:this.createCallback(this.handleRead,c,a),params:a.params,headers:a.headers}) -}return c -},handleRead:function(b,a){this.handleResponse(b,a) -},filterToParams:function(d,g){g=g||{}; -var c=d.CLASS_NAME; -var e=c.substring(c.lastIndexOf(".")+1); -switch(e){case"Spatial":switch(d.type){case OpenLayers.Filter.Spatial.BBOX:g.bbox=d.value.toArray(); -break; -case OpenLayers.Filter.Spatial.DWITHIN:g.tolerance=d.distance; -case OpenLayers.Filter.Spatial.WITHIN:g.lon=d.value.x; -g.lat=d.value.y; -break; -default:OpenLayers.Console.warn("Unknown spatial filter type "+d.type) -}break; -case"Comparison":var h=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR[d.type]; -if(h!==undefined){var f=d.value; -if(d.type==OpenLayers.Filter.Comparison.LIKE){f=this.regex2value(f); -if(this.wildcarded){f="%"+f+"%" -}}g[d.property+"__"+h]=f; -g.queryable=g.queryable||[]; -g.queryable.push(d.property) -}else{OpenLayers.Console.warn("Unknown comparison filter type "+d.type) -}break; -case"Logical":if(d.type===OpenLayers.Filter.Logical.AND){for(var b=0,a=d.filters.length; -b=200&&b.status<300){if(c.requestType!="delete"){c.features=this.parseFeatures(b) -}c.code=OpenLayers.Protocol.Response.SUCCESS -}else{c.code=OpenLayers.Protocol.Response.FAILURE -}a.callback.call(a.scope,c) -}},parseFeatures:function(a){var b=a.responseXML; -if(!b||!b.documentElement){b=a.responseText -}if(!b||b.length<=0){return null -}return this.format.read(b) -},commit:function(b,q){q=OpenLayers.Util.applyDefaults(q,this.options); -var d=[],m=0; -var k={}; -k[OpenLayers.State.INSERT]=[]; -k[OpenLayers.State.UPDATE]=[]; -k[OpenLayers.State.DELETE]=[]; -var p,l,c=[]; -for(var e=0,j=b.length; -e0?1:0)+k[OpenLayers.State.UPDATE].length+k[OpenLayers.State.DELETE].length; -var o=true; -var a=new OpenLayers.Protocol.Response({reqFeatures:c}); -function h(s){var r=s.features?s.features.length:0; -var u=new Array(r); -for(var t=0; -t=g){if(q.callback){a.code=o?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE; -q.callback.apply(q.scope,[a]) -}}}var f=k[OpenLayers.State.INSERT]; -if(f.length>0){d.push(this.create(f,OpenLayers.Util.applyDefaults({callback:h,scope:this},q.create))) -}f=k[OpenLayers.State.UPDATE]; -for(var e=f.length-1; -e>=0; ---e){d.push(this.update(f[e],OpenLayers.Util.applyDefaults({callback:n,scope:this},q.update))) -}f=k[OpenLayers.State.DELETE]; -for(var e=f.length-1; -e>=0; ---e){d.push(this["delete"](f[e],OpenLayers.Util.applyDefaults({callback:n,scope:this},q["delete"]))) -}return d -},abort:function(a){if(a){a.priv.abort() -}},callUserCallback:function(c,a){var b=a[c.requestType]; -if(b&&b.callback){b.callback.call(b.scope,c) -}},CLASS_NAME:"OpenLayers.Protocol.HTTP"}); -(function(){var a=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR={}; -a[OpenLayers.Filter.Comparison.EQUAL_TO]="eq"; -a[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]="ne"; -a[OpenLayers.Filter.Comparison.LESS_THAN]="lt"; -a[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]="lte"; -a[OpenLayers.Filter.Comparison.GREATER_THAN]="gt"; -a[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO]="gte"; -a[OpenLayers.Filter.Comparison.LIKE]="ilike" -})();OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,initialize:function(a,b){this.container=OpenLayers.Util.getElement(a) -},destroy:function(){this.container=null; -this.extent=null; -this.size=null; -this.resolution=null; -this.map=null -},supported:function(){return false -},setExtent:function(a,b){this.extent=a.clone(); -if(b){this.resolution=null -}},setSize:function(a){this.size=a.clone(); -this.resolution=null -},getResolution:function(){this.resolution=this.resolution||this.map.getResolution(); -return this.resolution -},drawFeature:function(c,d){if(d==null){d=c.style -}if(c.geometry){var e=c.geometry.getBounds(); -if(e){if(!e.intersectsBounds(this.extent)){d={display:"none"} -}var f=this.drawGeometry(c.geometry,d,c.id); -if(d.display!="none"&&d.label&&f!==false){var a=c.geometry.getCentroid(); -if(d.labelXOffset||d.labelYOffset){xOffset=isNaN(d.labelXOffset)?0:d.labelXOffset; -yOffset=isNaN(d.labelYOffset)?0:d.labelYOffset; -var b=this.getResolution(); -a.move(xOffset*b,yOffset*b) -}this.drawText(c.id,d,a) -}else{this.removeText(c.id) -}return f -}}},drawGeometry:function(c,a,b){},drawText:function(c,b,a){},removeText:function(a){},clear:function(){},getFeatureIdFromEvent:function(a){},eraseFeatures:function(c){if(!(c instanceof Array)){c=[c] -}for(var b=0,a=c.length; -b1){a=parseInt((d+e)/2); -var b=this.compare(this,c,OpenLayers.Util.getElement(this.order[a])); -if(b>0){d=a -}else{e=a -}}this.order.splice(e,0,f); -this.indices[f]=this.getZIndex(c); -return this.getNextElement(e) -},remove:function(b){var d=b.id; -var a=OpenLayers.Util.indexOf(this.order,d); -if(a>=0){this.order.splice(a,1); -delete this.indices[d]; -if(this.order.length>0){var c=this.order[this.order.length-1]; -this.maxZIndex=this.indices[c] -}else{this.maxZIndex=0 -}}},clear:function(){this.order=[]; -this.indices={}; -this.maxZIndex=0 -},exists:function(a){return(this.indices[a.id]!=null) -},getZIndex:function(a){return a._style.graphicZIndex -},determineZIndex:function(a){var b=a._style.graphicZIndex; -if(b==null){b=this.maxZIndex; -a._style.graphicZIndex=b -}else{if(b>this.maxZIndex){this.maxZIndex=b -}}},getNextElement:function(b){var a=b+1; -if(a0){this.vectorRoot.removeChild(this.vectorRoot.firstChild) -}}if(this.textRoot){while(this.textRoot.childNodes.length>0){this.textRoot.removeChild(this.textRoot.firstChild) -}}if(this.indexer){this.indexer.clear() -}},getNodeType:function(b,a){},drawGeometry:function(g,d,f){var c=g.CLASS_NAME; -var h=true; -if((c=="OpenLayers.Geometry.Collection")||(c=="OpenLayers.Geometry.MultiPoint")||(c=="OpenLayers.Geometry.MultiLineString")||(c=="OpenLayers.Geometry.MultiPolygon")){for(var b=0,a=g.components.length; -b-1 -},handle:function(a){if(this.feature&&!this.feature.layer){this.feature=null -}var c=a.type; -var f=false; -var e=!!(this.feature); -var d=(c=="click"||c=="dblclick"); -this.feature=this.layer.getFeatureFromEvent(a); -if(this.feature&&!this.feature.layer){this.feature=null -}if(this.lastFeature&&!this.lastFeature.layer){this.lastFeature=null -}if(this.feature){var b=(this.feature!=this.lastFeature); -if(this.geometryTypeMatches(this.feature)){if(e&&b){if(this.lastFeature){this.triggerCallback(c,"out",[this.lastFeature]) -}this.triggerCallback(c,"in",[this.feature]) -}else{if(!e||d){this.triggerCallback(c,"in",[this.feature]) -}}this.lastFeature=this.feature; -f=true -}else{if(this.lastFeature&&(e&&b||d)){this.triggerCallback(c,"out",[this.lastFeature]) -}this.feature=null -}}else{if(this.lastFeature&&(e||d)){this.triggerCallback(c,"out",[this.lastFeature]) -}}return f -},triggerCallback:function(d,e,b){var c=this.EVENTMAP[d][e]; -if(c){if(d=="click"&&this.up&&this.down){var a=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+Math.pow(this.up.y-this.down.y,2)); -if(a<=this.clickTolerance){this.callback(c,b) -}}else{this.callback(c,b) -}}},activate:function(){var a=false; -if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop(); -this.map.events.on({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this}); -a=true -}return a -},deactivate:function(){var a=false; -if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.moveLayerBack(); -this.feature=null; -this.lastFeature=null; -this.down=null; -this.up=null; -this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this}); -a=true -}return a -},handleMapEvents:function(a){if(!a.property||a.property=="order"){this.moveLayerToTop() -}},moveLayerToTop:function(){var a=Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+1; -this.layer.setZIndex(a) -},moveLayerBack:function(){var a=this.layer.getZIndex()-1; -if(a>=this.map.Z_INDEX_BASE.Feature){this.layer.setZIndex(a) -}else{this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer)) -}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(c,a){this.styles={"default":new OpenLayers.Style(OpenLayers.Feature.Vector.style["default"]),select:new OpenLayers.Style(OpenLayers.Feature.Vector.style.select),temporary:new OpenLayers.Style(OpenLayers.Feature.Vector.style.temporary),"delete":new OpenLayers.Style(OpenLayers.Feature.Vector.style["delete"])}; -if(c instanceof OpenLayers.Style){this.styles["default"]=c; -this.styles.select=c; -this.styles.temporary=c; -this.styles["delete"]=c -}else{if(typeof c=="object"){for(var b in c){if(c[b] instanceof OpenLayers.Style){this.styles[b]=c[b] -}else{if(typeof c[b]=="object"){this.styles[b]=new OpenLayers.Style(c[b]) -}else{this.styles["default"]=new OpenLayers.Style(c); -this.styles.select=new OpenLayers.Style(c); -this.styles.temporary=new OpenLayers.Style(c); -this.styles["delete"]=new OpenLayers.Style(c); -break -}}}}}OpenLayers.Util.extend(this,a) -},destroy:function(){for(var a in this.styles){this.styles[a].destroy() -}this.styles=null -},createSymbolizer:function(b,c){if(!b){b=new OpenLayers.Feature.Vector() -}if(!this.styles[c]){c="default" -}b.renderIntent=c; -var a={}; -if(this.extendDefault&&c!="default"){a=this.styles["default"].createSymbolizer(b) -}return OpenLayers.Util.extend(a,this.styles[c].createSymbolizer(b)) -},addUniqueValueRules:function(b,d,f,a){var e=[]; -for(var c in f){e.push(new OpenLayers.Rule({symbolizer:f[c],context:a,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:d,value:c})})) -}this.styles[b].addRules(e) -},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,isVector:true,features:null,filter:null,selectedFeatures:null,unrenderedFeatures:null,reportError:true,style:null,styleMap:null,strategies:null,protocol:null,renderers:["SVG","VML","Canvas"],renderer:null,rendererOptions:null,geometryType:null,drawn:false,initialize:function(c,b){this.EVENT_TYPES=OpenLayers.Layer.Vector.prototype.EVENT_TYPES.concat(OpenLayers.Layer.prototype.EVENT_TYPES); -OpenLayers.Layer.prototype.initialize.apply(this,arguments); -if(!this.renderer||!this.renderer.supported()){this.assignRenderer() -}if(!this.renderer||!this.renderer.supported()){this.renderer=null; -this.displayError() -}if(!this.styleMap){this.styleMap=new OpenLayers.StyleMap() -}this.features=[]; -this.selectedFeatures=[]; -this.unrenderedFeatures={}; -if(this.strategies){for(var d=0,a=this.strategies.length; -d=0; -c--){if(c!=0&&e[c-1].geometry){this.renderer.locked=true -}else{this.renderer.locked=false -}var b=e[c]; -delete this.unrenderedFeatures[b.id]; -if(d){this.events.triggerEvent("beforefeatureremoved",{feature:b}) -}this.features=OpenLayers.Util.removeItem(this.features,b); -b.layer=null; -if(b.geometry){this.renderer.eraseFeatures(b) -}if(OpenLayers.Util.indexOf(this.selectedFeatures,b)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,b) -}if(d){this.events.triggerEvent("featureremoved",{feature:b}) -}}if(d){this.events.triggerEvent("featuresremoved",{features:e}) -}},destroyFeatures:function(d,a){var c=(d==undefined); -if(c){d=this.features -}if(d){this.removeFeatures(d,a); -for(var b=d.length-1; -b>=0; -b--){d[b].destroy() -}}},drawFeature:function(a,b){if(!this.drawn){return -}if(typeof b!="object"){if(!b&&a.state===OpenLayers.State.DELETE){b="delete" -}var c=b||a.renderIntent; -b=a.style||this.style; -if(!b){b=this.styleMap.createSymbolizer(a,c) -}}if(!this.renderer.drawFeature(a,b)){this.unrenderedFeatures[a.id]=a -}else{delete this.unrenderedFeatures[a.id] -}},eraseFeatures:function(a){this.renderer.eraseFeatures(a) -},getFeatureFromEvent:function(a){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError")); -return null -}var b=this.renderer.getFeatureIdFromEvent(a); -return this.getFeatureById(b) -},getFeatureById:function(d){var c=null; -for(var b=0,a=this.features.length; -b0)){b=new OpenLayers.Bounds(); -var e=null; -for(var c=0,a=d.length; -c0){this.removeMarker(this.markers[0]) -}}},drawMarker:function(a){var b=this.map.getLayerPxFromLonLat(a.lonlat); -if(b==null){a.display(false) -}else{if(!a.isDrawn()){var c=a.draw(b); -this.div.appendChild(c) -}else{if(a.icon){a.icon.moveTo(b) -}}}},getDataExtent:function(){var b=null; -if(this.markers&&(this.markers.length>0)){var b=new OpenLayers.Bounds(); -for(var d=0,a=this.markers.length; -d=0; ---c){d=e.selectedFeatures[c]; -if(!b||b.except!=d){this.unselect(d) -}}}},clickFeature:function(a){if(!this.hover){var b=(OpenLayers.Util.indexOf(a.layer.selectedFeatures,a)>-1); -if(b){if(this.toggleSelect()){this.unselect(a) -}else{if(!this.multipleSelect()){this.unselectAll({except:a}) -}}}else{if(!this.multipleSelect()){this.unselectAll({except:a}) -}this.select(a) -}}},multipleSelect:function(){return this.multiple||(this.handlers.feature.evt&&this.handlers.feature.evt[this.multipleKey]) -},toggleSelect:function(){return this.toggle||(this.handlers.feature.evt&&this.handlers.feature.evt[this.toggleKey]) -},clickoutFeature:function(a){if(!this.hover&&this.clickout){this.unselectAll() -}},overFeature:function(b){var a=b.layer; -if(this.hover){if(this.highlightOnly){this.highlight(b) -}else{if(OpenLayers.Util.indexOf(a.selectedFeatures,b)==-1){this.select(b) -}}}},outFeature:function(a){if(this.hover){if(this.highlightOnly){if(a._lastHighlighter==this.id){if(a._prevHighlighter&&a._prevHighlighter!=this.id){delete a._lastHighlighter; -var b=this.map.getControl(a._prevHighlighter); -if(b){b.highlight(a) -}}else{this.unhighlight(a) -}}}else{this.unselect(a) -}}},highlight:function(c){var b=c.layer; -var a=this.events.triggerEvent("beforefeaturehighlighted",{feature:c}); -if(a!==false){c._prevHighlighter=c._lastHighlighter; -c._lastHighlighter=this.id; -var d=this.selectStyle||this.renderIntent; -b.drawFeature(c,d); -this.events.triggerEvent("featurehighlighted",{feature:c}) -}},unhighlight:function(b){var a=b.layer; -b._lastHighlighter=b._prevHighlighter; -delete b._prevHighlighter; -a.drawFeature(b,b.style||b.layer.style||"default"); -this.events.triggerEvent("featureunhighlighted",{feature:b}) -},select:function(c){var a=this.onBeforeSelect.call(this.scope,c); -var b=c.layer; -if(a!==false){a=b.events.triggerEvent("beforefeatureselected",{feature:c}); -if(a!==false){b.selectedFeatures.push(c); -this.highlight(c); -if(!this.handlers.feature.lastFeature){this.handlers.feature.lastFeature=b.selectedFeatures[0] -}b.events.triggerEvent("featureselected",{feature:c}); -this.onSelect.call(this.scope,c) -}}},unselect:function(b){var a=b.layer; -this.unhighlight(b); -OpenLayers.Util.removeItem(a.selectedFeatures,b); -a.events.triggerEvent("featureunselected",{feature:b}); -this.onUnselect.call(this.scope,b) -},selectBox:function(e){if(e instanceof OpenLayers.Bounds){var h=this.map.getLonLatFromPixel(new OpenLayers.Pixel(e.left,e.bottom)); -var k=this.map.getLonLatFromPixel(new OpenLayers.Pixel(e.right,e.top)); -var a=new OpenLayers.Bounds(h.lon,h.lat,k.lon,k.lat); -if(!this.multipleSelect()){this.unselectAll() -}var j=this.multiple; -this.multiple=true; -var d=this.layers||[this.layer]; -var f; -for(var b=0; -b-1){if(a.toGeometry().intersects(m.geometry)){if(OpenLayers.Util.indexOf(f.selectedFeatures,m)==-1){this.select(m) -}}}}}this.multiple=j -}},setMap:function(a){this.handlers.feature.setMap(a); -if(this.box){this.handlers.box.setMap(a) -}OpenLayers.Control.prototype.setMap.apply(this,arguments) -},setLayer:function(b){var a=this.active; -this.unselectAll(); -this.deactivate(); -if(this.layers){this.layer.destroy(); -this.layers=null -}this.initLayer(b); -this.handlers.feature.layer=this.layer; -if(a){this.activate() -}},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Control.NavigationHistory=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOGGLE,previous:null,previousOptions:null,next:null,nextOptions:null,limit:50,autoActivate:true,clearOnDeactivate:false,registry:null,nextStack:null,previousStack:null,listeners:null,restoring:false,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]); -this.registry=OpenLayers.Util.extend({moveend:this.getState},this.registry); -var b={trigger:OpenLayers.Function.bind(this.previousTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Previous"}; -OpenLayers.Util.extend(b,this.previousOptions); -this.previous=new OpenLayers.Control.Button(b); -var c={trigger:OpenLayers.Function.bind(this.nextTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Next"}; -OpenLayers.Util.extend(c,this.nextOptions); -this.next=new OpenLayers.Control.Button(c); -this.clear() -},onPreviousChange:function(b,a){if(b&&!this.previous.active){this.previous.activate() -}else{if(!b&&this.previous.active){this.previous.deactivate() -}}},onNextChange:function(b,a){if(b&&!this.next.active){this.next.activate() -}else{if(!b&&this.next.active){this.next.deactivate() -}}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this); -this.previous.destroy(); -this.next.destroy(); -this.deactivate(); -for(var a in this){this[a]=null -}},setMap:function(a){this.map=a; -this.next.setMap(a); -this.previous.setMap(a) -},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments); -this.next.draw(); -this.previous.draw() -},previousTrigger:function(){var b=this.previousStack.shift(); -var a=this.previousStack.shift(); -if(a!=undefined){this.nextStack.unshift(b); -this.previousStack.unshift(a); -this.restoring=true; -this.restore(a); -this.restoring=false; -this.onNextChange(this.nextStack[0],this.nextStack.length); -this.onPreviousChange(this.previousStack[1],this.previousStack.length-1) -}else{this.previousStack.unshift(b) -}return a -},nextTrigger:function(){var a=this.nextStack.shift(); -if(a!=undefined){this.previousStack.unshift(a); -this.restoring=true; -this.restore(a); -this.restoring=false; -this.onNextChange(this.nextStack[0],this.nextStack.length); -this.onPreviousChange(this.previousStack[1],this.previousStack.length-1) -}return a -},clear:function(){this.previousStack=[]; -this.previous.deactivate(); -this.nextStack=[]; -this.next.deactivate() -},getState:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution()} -},restore:function(b){var a=this.map.getZoomForResolution(b.resolution); -this.map.setCenter(b.center,a) -},setListeners:function(){this.listeners={}; -for(var a in this.registry){this.listeners[a]=OpenLayers.Function.bind(function(){if(!this.restoring){var b=this.registry[a].apply(this,arguments); -this.previousStack.unshift(b); -if(this.previousStack.length>1){this.onPreviousChange(this.previousStack[1],this.previousStack.length-1) -}if(this.previousStack.length>(this.limit+1)){this.previousStack.pop() -}if(this.nextStack.length>0){this.nextStack=[]; -this.onNextChange(null,0) -}}return true -},this) -}},activate:function(){var a=false; -if(this.map){if(OpenLayers.Control.prototype.activate.apply(this)){if(this.listeners==null){this.setListeners() -}for(var b in this.listeners){this.map.events.register(b,this,this.listeners[b]) -}a=true; -if(this.previousStack.length==0){this.initStack() -}}}return a -},initStack:function(){if(this.map.getCenter()){this.listeners.moveend() -}},deactivate:function(){var b=false; -if(this.map){if(OpenLayers.Control.prototype.deactivate.apply(this)){for(var a in this.listeners){this.map.events.unregister(a,this,this.listeners[a]) -}if(this.clearOnDeactivate){this.clear() -}b=true -}}return b -},CLASS_NAME:"OpenLayers.Control.NavigationHistory"});OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments) -},destroy:function(){this.map.events.un({removelayer:this.updateAttribution,addlayer:this.updateAttribution,changelayer:this.updateAttribution,changebaselayer:this.updateAttribution,scope:this}); -OpenLayers.Control.prototype.destroy.apply(this,arguments) -},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments); -this.map.events.on({changebaselayer:this.updateAttribution,changelayer:this.updateAttribution,addlayer:this.updateAttribution,removelayer:this.updateAttribution,scope:this}); -this.updateAttribution(); -return this.div -},updateAttribution:function(){var d=[]; -if(this.map&&this.map.layers){for(var c=0,a=this.map.layers.length; -c0){var g=(a.indexOf("?")>-1)?"&":"?"; -a+=g+c -}}if(b.proxy&&(a.indexOf("http")==0)){if(typeof b.proxy=="function"){a=b.proxy(a) -}else{a=b.proxy+encodeURIComponent(a) -}}d.open(b.method,a,b.async,b.user,b.password); -for(var f in b.headers){d.setRequestHeader(f,b.headers[f]) -}var i=this.events; -var h=this; -d.onreadystatechange=function(){if(d.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var j=i.triggerEvent("complete",{request:d,config:b,requestUrl:a}); -if(j!==false){h.runCallbacks({request:d,config:b,requestUrl:a}) -}}}; -if(b.async===false){d.send(b.data) -}else{window.setTimeout(function(){d.send(b.data) -},0) -}return d -},runCallbacks:function(d){var e=d.request; -var c=d.config; -var a=(c.scope)?OpenLayers.Function.bind(c.callback,c.scope):c.callback; -var f; -if(c.success){f=(c.scope)?OpenLayers.Function.bind(c.success,c.scope):c.success -}var b; -if(c.failure){b=(c.scope)?OpenLayers.Function.bind(c.failure,c.scope):c.failure -}a(e); -if(!e.status||(e.status>=200&&e.status<300)){this.events.triggerEvent("success",d); -if(f){f(e) -}}if(e.status&&(e.status<200||e.status>=300)){this.events.triggerEvent("failure",d); -if(b){b(e) -}}},GET:function(a){a=OpenLayers.Util.extend(a,{method:"GET"}); -return OpenLayers.Request.issue(a) -},POST:function(a){a=OpenLayers.Util.extend(a,{method:"POST"}); -a.headers=a.headers?a.headers:{}; -if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(a.headers))){a.headers["Content-Type"]="application/xml" -}return OpenLayers.Request.issue(a) -},PUT:function(a){a=OpenLayers.Util.extend(a,{method:"PUT"}); -a.headers=a.headers?a.headers:{}; -if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(a.headers))){a.headers["Content-Type"]="application/xml" -}return OpenLayers.Request.issue(a) -},DELETE:function(a){a=OpenLayers.Util.extend(a,{method:"DELETE"}); -return OpenLayers.Request.issue(a) -},HEAD:function(a){a=OpenLayers.Util.extend(a,{method:"HEAD"}); -return OpenLayers.Request.issue(a) -},OPTIONS:function(a){a=OpenLayers.Util.extend(a,{method:"OPTIONS"}); -return OpenLayers.Request.issue(a) -}};(function(){var d=window.XMLHttpRequest; -var h=!!window.controllers,e=window.document.all&&!window.opera; -function c(){this._object=d?new d:new window.ActiveXObject("Microsoft.XMLHTTP") -}if(h&&d.wrapped){c.wrapped=d.wrapped -}c.UNSENT=0; -c.OPENED=1; -c.HEADERS_RECEIVED=2; -c.LOADING=3; -c.DONE=4; -c.prototype.readyState=c.UNSENT; -c.prototype.responseText=""; -c.prototype.responseXML=null; -c.prototype.status=0; -c.prototype.statusText=""; -c.prototype.onreadystatechange=null; -c.onreadystatechange=null; -c.onopen=null; -c.onsend=null; -c.onabort=null; -c.prototype.open=function(l,o,k,p,j){this._async=k; -var n=this,m=this.readyState; -if(e){var i=function(){if(n._object.readyState!=c.DONE){a(n) -}}; -if(k){window.attachEvent("onunload",i) -}}this._object.onreadystatechange=function(){if(h&&!k){return -}n.readyState=n._object.readyState; -g(n); -if(n._aborted){n.readyState=c.UNSENT; -return -}if(n.readyState==c.DONE){a(n); -if(e&&k){window.detachEvent("onunload",i) -}}if(m!=n.readyState){f(n) -}m=n.readyState -}; -if(c.onopen){c.onopen.apply(this,arguments) -}this._object.open(l,o,k,p,j); -if(!k&&h){this.readyState=c.OPENED; -f(this) -}}; -c.prototype.send=function(i){if(c.onsend){c.onsend.apply(this,arguments) -}if(i&&i.nodeType){i=window.XMLSerializer?new window.XMLSerializer().serializeToString(i):i.xml; -if(!this._headers["Content-Type"]){this._object.setRequestHeader("Content-Type","application/xml") -}}this._object.send(i); -if(h&&!this._async){this.readyState=c.OPENED; -g(this); -while(this.readyStatec.UNSENT){this._aborted=true -}this._object.abort(); -a(this) -}; -c.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders() -}; -c.prototype.getResponseHeader=function(i){return this._object.getResponseHeader(i) -}; -c.prototype.setRequestHeader=function(i,j){if(!this._headers){this._headers={} -}this._headers[i]=j; -return this._object.setRequestHeader(i,j) -}; -c.prototype.toString=function(){return"[object XMLHttpRequest]" -}; -c.toString=function(){return"[XMLHttpRequest]" -}; -function f(i){if(i.onreadystatechange){i.onreadystatechange.apply(i) -}if(c.onreadystatechange){c.onreadystatechange.apply(i) -}}function b(j){var i=j.responseXML; -if(e&&i&&!i.documentElement&&j.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){i=new ActiveXObject("Microsoft.XMLDOM"); -i.loadXML(j.responseText) -}if(i){if((e&&i.parseError!=0)||(i.documentElement&&i.documentElement.tagName=="parsererror")){return null -}}return i -}function g(i){try{i.responseText=i._object.responseText -}catch(j){}try{i.responseXML=b(i._object) -}catch(j){}try{i.status=i._object.status -}catch(j){}try{i.statusText=i._object.statusText -}catch(j){}}function a(i){i._object.onreadystatechange=new window.Function; -delete i._headers -}if(!window.Function.prototype.apply){window.Function.prototype.apply=function(i,j){if(!j){j=[] -}i.__func=this; -i.__func(j[0],j[1],j[2],j[3],j[4]); -delete i.__func -} -}OpenLayers.Request.XMLHttpRequest=c -})();OpenLayers.ProxyHost=""; -OpenLayers.nullHandler=function(a){OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest",{statusText:a.statusText})) -}; -OpenLayers.loadURL=function(d,g,b,e,c){if(typeof g=="string"){g=OpenLayers.Util.getParameters(g) -}var f=(e)?e:OpenLayers.nullHandler; -var a=(c)?c:OpenLayers.nullHandler; -return OpenLayers.Request.GET({url:d,params:g,success:f,failure:a,scope:b}) -}; -OpenLayers.parseXMLString=function(c){var a=c.indexOf("<"); -if(a>0){c=c.substring(a) -}var b=OpenLayers.Util.Try(function(){var d=new ActiveXObject("Microsoft.XMLDOM"); -d.loadXML(c); -return d -},function(){return new DOMParser().parseFromString(c,"text/xml") -},function(){var d=new XMLHttpRequest(); -d.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(c),false); -if(d.overrideMimeType){d.overrideMimeType("text/xml") -}d.send(null); -return d.responseXML -}); -return b -}; -OpenLayers.Ajax={emptyFunction:function(){},getTransport:function(){return OpenLayers.Util.Try(function(){return new XMLHttpRequest() -},function(){return new ActiveXObject("Msxml2.XMLHTTP") -},function(){return new ActiveXObject("Microsoft.XMLHTTP") -})||false -},activeRequestCount:0}; -OpenLayers.Ajax.Responders={responders:[],register:function(b){for(var a=0; -a-1)?"&":"?")+d -}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){d+="&_=" -}}}try{var a=new OpenLayers.Ajax.Response(this); -if(this.options.onCreate){this.options.onCreate(a) -}OpenLayers.Ajax.Responders.dispatch("onCreate",this,a); -this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous); -if(this.options.asynchronous){window.setTimeout(OpenLayers.Function.bind(this.respondToReadyState,this,1),10) -}this.transport.onreadystatechange=OpenLayers.Function.bind(this.onStateChange,this); -this.setRequestHeaders(); -this.body=this.method=="post"?(this.options.postBody||d):null; -this.transport.send(this.body); -if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange() -}}catch(c){this.dispatchException(c) -}},onStateChange:function(){var a=this.transport.readyState; -if(a>1&&!((a==4)&&this._complete)){this.respondToReadyState(this.transport.readyState) -}},setRequestHeaders:function(){var e={"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*",OpenLayers:true}; -if(this.method=="post"){e["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:""); -if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){e.Connection="close" -}}if(typeof this.options.requestHeaders=="object"){var c=this.options.requestHeaders; -if(typeof c.push=="function"){for(var b=0,d=c.length; -b=200&&a<300) -},getStatus:function(){try{return this.transport.status||0 -}catch(a){return 0 -}},respondToReadyState:function(a){var c=OpenLayers.Ajax.Request.Events[a]; -var b=new OpenLayers.Ajax.Response(this); -if(c=="Complete"){try{this._complete=true; -(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||OpenLayers.Ajax.emptyFunction)(b) -}catch(d){this.dispatchException(d) -}var f=b.getHeader("Content-type") -}try{(this.options["on"+c]||OpenLayers.Ajax.emptyFunction)(b); -OpenLayers.Ajax.Responders.dispatch("on"+c,this,b) -}catch(d){this.dispatchException(d) -}if(c=="Complete"){this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction -}},getHeader:function(a){try{return this.transport.getResponseHeader(a) -}catch(b){return null -}},dispatchException:function(c){var d=this.options.onException; -if(d){d(this,c); -OpenLayers.Ajax.Responders.dispatch("onException",this,c) -}else{var e=false; -var a=OpenLayers.Ajax.Responders.responders; -for(var b=0; -b2&&!(!!(window.attachEvent&&!window.opera)))||a==4){this.status=this.getStatus(); -this.statusText=this.getStatusText(); -this.responseText=d.responseText==null?"":String(d.responseText) -}if(a==4){var b=d.responseXML; -this.responseXML=b===undefined?null:b -}},getStatus:OpenLayers.Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||"" -}catch(a){return"" -}},getHeader:OpenLayers.Ajax.Request.prototype.getHeader,getResponseHeader:function(a){return this.transport.getResponseHeader(a) -}}); -OpenLayers.Ajax.getElementsByTagNameNS=function(b,a,c,e){var d=null; -if(b.getElementsByTagNameNS){d=b.getElementsByTagNameNS(a,e) -}else{d=b.getElementsByTagName(c+":"+e) -}return d -}; -OpenLayers.Ajax.serializeXMLToString=function(a){var b=new XMLSerializer(); -var c=b.serializeToString(a); -return c -};OpenLayers.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(b,a){this.lon=OpenLayers.Util.toFloat(b); -this.lat=OpenLayers.Util.toFloat(a) -},toString:function(){return("lon="+this.lon+",lat="+this.lat) -},toShortString:function(){return(this.lon+", "+this.lat) -},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat) -},add:function(c,a){if((c==null)||(a==null)){var b=OpenLayers.i18n("lonlatAddError"); -OpenLayers.Console.error(b); -return null -}return new OpenLayers.LonLat(this.lon+c,this.lat+a) -},equals:function(b){var a=false; -if(b!=null){a=((this.lon==b.lon&&this.lat==b.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(b.lon)&&isNaN(b.lat))) -}return a -},transform:function(c,b){var a=OpenLayers.Projection.transform({x:this.lon,y:this.lat},c,b); -this.lon=a.x; -this.lat=a.y; -return this -},wrapDateLine:function(a){var b=this.clone(); -if(a){while(b.lona.right){b.lon-=a.getWidth() -}}return b -},CLASS_NAME:"OpenLayers.LonLat"}); -OpenLayers.LonLat.fromString=function(b){var a=b.split(","); -return new OpenLayers.LonLat(parseFloat(a[0]),parseFloat(a[1])) -};OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(a,b){this.w=parseFloat(a); -this.h=parseFloat(b) -},toString:function(){return("w="+this.w+",h="+this.h) -},clone:function(){return new OpenLayers.Size(this.w,this.h) -},equals:function(b){var a=false; -if(b!=null){a=((this.w==b.w&&this.h==b.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(b.w)&&isNaN(b.h))) -}return a -},CLASS_NAME:"OpenLayers.Size"});OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(a,b){this.x=parseFloat(a); -this.y=parseFloat(b) -},toString:function(){return("x="+this.x+",y="+this.y) -},clone:function(){return new OpenLayers.Pixel(this.x,this.y) -},equals:function(a){var b=false; -if(a!=null){b=((this.x==a.x&&this.y==a.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y))) -}return b -},add:function(a,c){if((a==null)||(c==null)){var b=OpenLayers.i18n("pixelAddError"); -OpenLayers.Console.error(b); -return null -}return new OpenLayers.Pixel(this.x+a,this.y+c) -},offset:function(a){var b=this.clone(); -if(a){b=this.add(a.x,a.y) -}return b -},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){if(!OpenLayers.Lang.code){OpenLayers.Lang.setCode() -}return OpenLayers.Lang.code -},setCode:function(b){var d; -if(!b){b=(OpenLayers.Util.getBrowserName()=="msie")?navigator.userLanguage:navigator.language -}var c=b.split("-"); -c[0]=c[0].toLowerCase(); -if(typeof OpenLayers.Lang[c[0]]=="object"){d=c[0] -}if(c[1]){var a=c[0]+"-"+c[1].toUpperCase(); -if(typeof OpenLayers.Lang[a]=="object"){d=a -}}if(!d){OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+c.join("-")+" dictionary, falling back to default language"); -d=OpenLayers.Lang.defaultCode -}OpenLayers.Lang.code=d -},translate:function(b,a){var d=OpenLayers.Lang[OpenLayers.Lang.getCode()]; -var c=d[b]; -if(!c){c=b -}if(a){c=OpenLayers.String.format(c,a) -}return c -}}; -OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Lang.en={unhandledRequest:"Unhandled request return ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Base Layer",sameProjection:"The overview map only works when it is in the same projection as the main map",readNotImplemented:"Read not implemented.",writeNotImplemented:"Write not implemented.",noFID:"Can't update a feature for which there is no FID.",errorLoadingGML:"Error in loading GML file ${url}",browserNotSupported:"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",componentShouldBe:"addFeatures : component should be an ${geomType}",getFeatureError:"getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.",minZoomLevelError:"The minZoomLevel property is only intended for use with the FixedZoomLevels-descendent layers. That this wfs layer checks for minZoomLevel is a relic of thepast. We cannot, however, remove it without possibly breaking OL based applications that may depend on it. Therefore we are deprecating it -- the minZoomLevel check below will be removed at 3.0. Please instead use min/max resolution setting as described here: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS Transaction: SUCCESS ${response}",commitFailed:"WFS Transaction: FAILED ${response}",googleWarning:"The Google Layer was unable to load correctly.

      To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.

      Most likely, this is because the Google Maps library script was either not included, or does not contain the correct API key for your site.

      Developers: For help getting this working correctly,
      click here",getLayerWarning:"The ${layerType} Layer was unable to load correctly.

      To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.

      Most likely, this is because the ${layerLib} library script was not correctly included.

      Developers: For help getting this working correctly, click here",scale:"Scale = 1 : ${scaleDenom}",W:"W",E:"E",N:"N",S:"S",layerAlreadyAdded:"You tried to add the layer: ${layerName} to the map, but it has already been added",reprojectDeprecated:"You are using the 'reproject' option on the ${layerName} layer. This option is deprecated: its use was designed to support displaying data over commercial basemaps, but that functionality should now be achieved by using Spherical Mercator support. More information is available from http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"This method has been deprecated and will be removed in 3.0. Please use ${newMethod} instead.",boundsAddError:"You must pass both x and y values to the add function.",lonlatAddError:"You must pass both lon and lat values to the add function.",pixelAddError:"You must pass both x and y values to the add function.",unsupportedGeometryType:"Unsupported geometry type: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",end:"",filterEvaluateNotImplemented:"evaluate is not implemented for this filter type."};OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:true,dragging:false,last:null,start:null,oldOnselectstart:null,interval:0,timeoutId:null,documentDrag:false,documentEvents:null,initialize:function(c,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments) -},down:function(a){},move:function(a){},up:function(a){},out:function(a){},mousedown:function(b){var a=true; -this.dragging=false; -if(this.checkModifiers(b)&&OpenLayers.Event.isLeftClick(b)){this.started=true; -this.start=b.xy; -this.last=b.xy; -OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown"); -this.down(b); -this.callback("down",[b.xy]); -OpenLayers.Event.stop(b); -if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:OpenLayers.Function.True; -document.onselectstart=OpenLayers.Function.False -}a=!this.stopDown -}else{this.started=false; -this.start=null; -this.last=null -}return a -},mousemove:function(a){if(this.started&&!this.timeoutId&&(a.xy.x!=this.last.x||a.xy.y!=this.last.y)){if(this.documentDrag===true&&this.documentEvents){if(a.element===document){this.adjustXY(a); -this.setEvent(a) -}else{this.destroyDocumentEvents() -}}if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval) -}this.dragging=true; -this.move(a); -this.callback("move",[a.xy]); -if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart; -document.onselectstart=OpenLayers.Function.False -}this.last=this.evt.xy -}return true -},removeTimeout:function(){this.timeoutId=null -},mouseup:function(b){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(b); -this.destroyDocumentEvents() -}var a=(this.start!=this.last); -this.started=false; -this.dragging=false; -OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown"); -this.up(b); -this.callback("up",[b.xy]); -if(a){this.callback("done",[b.xy]) -}document.onselectstart=this.oldOnselectstart -}return true -},mouseout:function(b){if(this.started&&OpenLayers.Util.mouseLeft(b,this.map.div)){if(this.documentDrag===true){this.documentEvents=new OpenLayers.Events(this,document,null,null,{includeXY:true}); -this.documentEvents.on({mousemove:this.mousemove,mouseup:this.mouseup}); -OpenLayers.Element.addClass(document.body,"olDragDown") -}else{var a=(this.start!=this.last); -this.started=false; -this.dragging=false; -OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown"); -this.out(b); -this.callback("out",[]); -if(a){this.callback("done",[b.xy]) -}if(document.onselectstart){document.onselectstart=this.oldOnselectstart -}}}return true -},click:function(a){return(this.start==this.last) -},activate:function(){var a=false; -if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false; -a=true -}return a -},deactivate:function(){var a=false; -if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false; -this.dragging=false; -this.start=null; -this.last=null; -a=true; -OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown") -}return a -},adjustXY:function(a){var b=OpenLayers.Util.pagePosition(this.map.div); -a.xy.x-=b[0]; -a.xy.y-=b[1] -},destroyDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown"); -this.documentEvents.destroy(); -this.documentEvents=null -},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",boxCharacteristics:null,initialize:function(c,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments); -var b={down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox}; -this.dragHandler=new OpenLayers.Handler.Drag(this,b,{keyMask:this.keyMask}) -},setMap:function(a){OpenLayers.Handler.prototype.setMap.apply(this,arguments); -if(this.dragHandler){this.dragHandler.setMap(a) -}},startBox:function(a){this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.dragHandler.start); -this.zoomBox.className=this.boxDivClassName; -this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1; -this.map.viewPortDiv.appendChild(this.zoomBox); -OpenLayers.Element.addClass(this.map.viewPortDiv,"olDrawBox") -},moveBox:function(f){var d=this.dragHandler.start.x; -var b=this.dragHandler.start.y; -var c=Math.abs(d-f.x); -var a=Math.abs(b-f.y); -this.zoomBox.style.width=Math.max(1,c)+"px"; -this.zoomBox.style.height=Math.max(1,a)+"px"; -this.zoomBox.style.left=f.xd){this.zoomBox.style.width=Math.max(1,c-e.xOffset)+"px" -}if(f.y>b){this.zoomBox.style.height=Math.max(1,a-e.yOffset)+"px" -}}},endBox:function(b){var a; -if(Math.abs(this.dragHandler.start.x-b.x)>5||Math.abs(this.dragHandler.start.y-b.y)>5){var g=this.dragHandler.start; -var f=Math.min(g.y,b.y); -var c=Math.max(g.y,b.y); -var e=Math.min(g.x,b.x); -var d=Math.max(g.x,b.x); -a=new OpenLayers.Bounds(e,c,d,f) -}else{a=this.dragHandler.start.clone() -}this.removeBox(); -this.callback("done",[a]) -},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox); -this.zoomBox=null; -this.boxCharacteristics=null; -OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDrawBox") -},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate(); -return true -}else{return false -}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragHandler.deactivate(); -return true -}else{return false -}},getBoxCharacteristics:function(){if(!this.boxCharacteristics){var a=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"))+1; -var c=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"))+1; -var b=OpenLayers.Util.getBrowserName()=="msie"?document.compatMode!="BackCompat":true; -this.boxCharacteristics={xOffset:a,yOffset:c,newBoxModel:b} -}return this.boxCharacteristics -},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:false,alwaysZoom:false,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask}) -},zoomBox:function(h){if(h instanceof OpenLayers.Bounds){var b; -if(!this.out){var i=this.map.getLonLatFromPixel(new OpenLayers.Pixel(h.left,h.bottom)); -var m=this.map.getLonLatFromPixel(new OpenLayers.Pixel(h.right,h.top)); -b=new OpenLayers.Bounds(i.lon,i.lat,m.lon,m.lat) -}else{var g=Math.abs(h.right-h.left); -var j=Math.abs(h.top-h.bottom); -var e=Math.min((this.map.size.h/j),(this.map.size.w/g)); -var n=this.map.getExtent(); -var a=this.map.getLonLatFromPixel(h.getCenterPixel()); -var c=a.lon-(n.getWidth()/2)*e; -var f=a.lon+(n.getWidth()/2)*e; -var l=a.lat-(n.getHeight()/2)*e; -var d=a.lat+(n.getHeight()/2)*e; -b=new OpenLayers.Bounds(c,l,f,d) -}var k=this.map.getZoom(); -this.map.zoomToExtent(b); -if(k==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(k+(this.out?-1:1)) -}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(h),this.map.getZoom()+1) -}else{this.map.setCenter(this.map.getLonLatFromPixel(h),this.map.getZoom()-1) -}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:25,documentDrag:false,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone},{interval:this.interval,documentDrag:this.documentDrag}) -},panMap:function(a){this.panned=true; -this.map.pan(this.handler.last.x-a.x,this.handler.last.y-a.y,{dragging:this.handler.dragging,animate:false}) -},panMapDone:function(a){if(this.panned){this.panMap(a); -this.panned=false -}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,"double":false,pixelTolerance:0,stopSingle:false,stopDouble:false,timerId:null,down:null,rightclickTimerId:null,initialize:function(c,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments); -if(this.pixelTolerance!=null){this.mousedown=function(d){this.down=d.xy; -return true -} -}},mousedown:null,mouseup:function(b){var a=true; -if(this.checkModifiers(b)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(b)){a=this.rightclick(b) -}return a -},rightclick:function(b){if(this.passesTolerance(b)){if(this.rightclickTimerId!=null){this.clearTimer(); -this.callback("dblrightclick",[b]); -return !this.stopDouble -}else{var a=this["double"]?OpenLayers.Util.extend({},b):this.callback("rightclick",[b]); -var c=OpenLayers.Function.bind(this.delayedRightCall,this,a); -this.rightclickTimerId=window.setTimeout(c,this.delay) -}}return !this.stopSingle -},delayedRightCall:function(a){this.rightclickTimerId=null; -if(a){this.callback("rightclick",[a]) -}return !this.stopSingle -},dblclick:function(a){if(this.passesTolerance(a)){if(this["double"]){this.callback("dblclick",[a]) -}this.clearTimer() -}return !this.stopDouble -},click:function(b){if(this.passesTolerance(b)){if(this.timerId!=null){this.clearTimer() -}else{var a=this.single?OpenLayers.Util.extend({},b):null; -this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,a),this.delay) -}}return !this.stopSingle -},passesTolerance:function(b){var c=true; -if(this.pixelTolerance!=null&&this.down){var a=Math.sqrt(Math.pow(this.down.x-b.xy.x,2)+Math.pow(this.down.y-b.xy.y,2)); -if(a>this.pixelTolerance){c=false -}}return c -},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId); -this.timerId=null -}if(this.rightclickTimerId!=null){window.clearTimeout(this.rightclickTimerId); -this.rightclickTimerId=null -}},delayedCall:function(a){this.timerId=null; -if(a){this.callback("click",[a]) -}},deactivate:function(){var a=false; -if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer(); -this.down=null; -a=true -}return a -},CLASS_NAME:"OpenLayers.Handler.Click"});OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,documentDrag:false,zoomBox:null,zoomBoxEnabled:true,zoomWheelEnabled:true,mouseWheelOptions:null,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,autoActivate:true,initialize:function(a){this.handlers={}; -OpenLayers.Control.prototype.initialize.apply(this,arguments) -},destroy:function(){this.deactivate(); -if(this.dragPan){this.dragPan.destroy() -}this.dragPan=null; -if(this.zoomBox){this.zoomBox.destroy() -}this.zoomBox=null; -OpenLayers.Control.prototype.destroy.apply(this,arguments) -},activate:function(){this.dragPan.activate(); -if(this.zoomWheelEnabled){this.handlers.wheel.activate() -}this.handlers.click.activate(); -if(this.zoomBoxEnabled){this.zoomBox.activate() -}return OpenLayers.Control.prototype.activate.apply(this,arguments) -},deactivate:function(){this.zoomBox.deactivate(); -this.dragPan.deactivate(); -this.handlers.click.deactivate(); -this.handlers.wheel.deactivate(); -return OpenLayers.Control.prototype.deactivate.apply(this,arguments) -},draw:function(){if(this.handleRightClicks){this.map.viewPortDiv.oncontextmenu=OpenLayers.Function.False -}var a={dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick}; -var b={"double":true,stopDouble:true}; -this.handlers.click=new OpenLayers.Handler.Click(this,a,b); -this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map,documentDrag:this.documentDrag},this.dragPanOptions)); -this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask}); -this.dragPan.draw(); -this.zoomBox.draw(); -this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown},this.mouseWheelOptions) -},defaultDblClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy); -this.map.setCenter(a,this.map.zoom+1) -},defaultDblRightClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy); -this.map.setCenter(a,this.map.zoom-1) -},wheelChange:function(i,c){var h=this.map.getZoom(); -var f=this.map.getZoom()+Math.round(c); -f=Math.max(f,0); -f=Math.min(f,this.map.getNumZoomLevels()); -if(f===h){return -}var j=this.map.getSize(); -var e=j.w/2-i.xy.x; -var d=i.xy.y-j.h/2; -var g=this.map.baseLayer.getResolutionForZoom(f); -var a=this.map.getLonLatFromPixel(i.xy); -var b=new OpenLayers.LonLat(a.lon+e*g,a.lat+d*g); -this.map.setCenter(b,f) -},wheelUp:function(a,b){this.wheelChange(a,b||1) -},wheelDown:function(a,b){this.wheelChange(a,b||-1) -},disableZoomBox:function(){this.zoomBoxEnabled=false; -this.zoomBox.deactivate() -},enableZoomBox:function(){this.zoomBoxEnabled=true; -if(this.active){this.zoomBox.activate() -}},disableZoomWheel:function(){this.zoomWheelEnabled=false; -this.handlers.wheel.deactivate() -},enableZoomWheel:function(){this.zoomWheelEnabled=true; -if(this.active){this.handlers.wheel.activate() -}},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(d,c,e,b){var a=arguments; -a=[d,b]; -OpenLayers.Layer.prototype.initialize.apply(this,a); -this.url=c; -this.params=OpenLayers.Util.extend({},e) -},destroy:function(){this.url=null; -this.params=null; -OpenLayers.Layer.prototype.destroy.apply(this,arguments) -},clone:function(a){if(a==null){a=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions()) -}a=OpenLayers.Layer.prototype.clone.apply(this,[a]); -return a -},setUrl:function(a){this.url=a -},mergeNewParams:function(b){this.params=OpenLayers.Util.extend(this.params,b); -var a=this.redraw(); -if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"params"}) -}return a -},redraw:function(a){if(a){return this.mergeNewParams({_olSalt:Math.random()}) -}else{return OpenLayers.Layer.prototype.redraw.apply(this,[]) -}},selectUrl:function(e,d){var c=1; -for(var b=0,a=e.length; -b=i.bottom-j*this.buffer)||t=0)&&(c=0)){f=this.grid[j][c] -}if((f!=null)&&(!f.queued)){b.unshift(f); -f.queued=true; -l=0; -g=j; -a=c -}else{k=(k+1)%4; -l++ -}}for(var d=0,e=b.length; -d-this.tileSize.w*(b-1)){this.shiftColumn(true) -}else{if(d.x<-this.tileSize.w*b){this.shiftColumn(false) -}else{if(d.y>-this.tileSize.h*(b-1)){this.shiftRow(true) -}else{if(d.y<-this.tileSize.h*b){this.shiftRow(false) -}else{break -}}}}}},shiftRow:function(n){var c=(n)?0:(this.grid.length-1); -var b=this.grid; -var f=b[c]; -var e=this.map.getResolution(); -var h=(n)?-this.tileSize.h:this.tileSize.h; -var g=e*-h; -var m=(n)?b.pop():b.shift(); -for(var j=0,l=f.length; -je){var f=this.grid.pop(); -for(var b=0,a=f.length; -bc){for(var b=0,a=this.grid.length; -b=1.3&&OpenLayers.Util.indexOf(this.yx,this.map.getProjectionObject().getCode())!==-1) -},getURL:function(c){c=this.adjustBounds(c); -var d=this.getImageSize(); -var e={}; -var b=this.reverseAxisOrder(); -e.BBOX=this.encodeBBOX?c.toBBOX(null,b):c.toArray(b); -e.WIDTH=d.w; -e.HEIGHT=d.h; -var a=this.getFullRequestString(e); -return a -},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize) -},mergeNewParams:function(c){var b=OpenLayers.Util.upperCaseObject(c); -var a=[b]; -return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,a) -},getFullRequestString:function(d,b){var a=this.map.getProjection(); -var c=(a=="none")?null:a; -if(parseFloat(this.params.VERSION)>=1.3){this.params.CRS=c -}else{this.params.SRS=c -}return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments) -},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15000,translationParameters:null,symbolMetrics:null,isGecko:null,supportUse:null,initialize:function(a){if(!this.supported()){return -}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments); -this.translationParameters={x:0,y:0}; -this.supportUse=(navigator.userAgent.toLowerCase().indexOf("applewebkit/5")==-1); -this.isGecko=(navigator.userAgent.toLowerCase().indexOf("gecko/")!=-1); -this.symbolMetrics={} -},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments) -},supported:function(){var a="http://www.w3.org/TR/SVG11/feature#"; -return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(a+"SVG","1.1")||document.implementation.hasFeature(a+"BasicStructure","1.1"))) -},inValidRange:function(a,e,b){var d=a+(b?0:this.translationParameters.x); -var c=e+(b?0:this.translationParameters.y); -return(d>=-this.MAX_PIXEL&&d<=this.MAX_PIXEL&&c>=-this.MAX_PIXEL&&c<=this.MAX_PIXEL) -},setExtent:function(b,d){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments); -var a=this.getResolution(); -var f=-b.left/a; -var e=b.top/a; -if(d){this.left=f; -this.top=e; -var c="0 0 "+this.size.w+" "+this.size.h; -this.rendererRoot.setAttributeNS(null,"viewBox",c); -this.translate(0,0); -return true -}else{var g=this.translate(f-this.left,e-this.top); -if(!g){this.setExtent(b,true) -}return g -}},translate:function(a,c){if(!this.inValidRange(a,c,true)){return false -}else{var b=""; -if(a||c){b="translate("+a+","+c+")" -}this.root.setAttributeNS(null,"transform",b); -this.translationParameters={x:a,y:c}; -return true -}},setSize:function(a){OpenLayers.Renderer.prototype.setSize.apply(this,arguments); -this.rendererRoot.setAttributeNS(null,"width",this.size.w); -this.rendererRoot.setAttributeNS(null,"height",this.size.h) -},getNodeType:function(c,b){var a=null; -switch(c.CLASS_NAME){case"OpenLayers.Geometry.Point":if(b.externalGraphic){a="image" -}else{if(this.isComplexSymbol(b.graphicName)){a=this.supportUse===false?"svg":"use" -}else{a="circle" -}}break; -case"OpenLayers.Geometry.Rectangle":a="rect"; -break; -case"OpenLayers.Geometry.LineString":a="polyline"; -break; -case"OpenLayers.Geometry.LinearRing":a="polygon"; -break; -case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":a="path"; -break; -default:break -}return a -},setStyle:function(o,s,b){s=s||o._style; -b=b||o._options; -var j=parseFloat(o.getAttributeNS(null,"r")); -var i=1; -var d; -if(o._geometryClass=="OpenLayers.Geometry.Point"&&j){o.style.visibility=""; -if(s.graphic===false){o.style.visibility="hidden" -}else{if(s.externalGraphic){d=this.getPosition(o); -if(s.graphicTitle){o.setAttributeNS(null,"title",s.graphicTitle) -}if(s.graphicWidth&&s.graphicHeight){o.setAttributeNS(null,"preserveAspectRatio","none") -}var n=s.graphicWidth||s.graphicHeight; -var l=s.graphicHeight||s.graphicWidth; -n=n?n:s.pointRadius*2; -l=l?l:s.pointRadius*2; -var t=(s.graphicXOffset!=undefined)?s.graphicXOffset:-(0.5*n); -var f=(s.graphicYOffset!=undefined)?s.graphicYOffset:-(0.5*l); -var a=s.graphicOpacity||s.fillOpacity; -o.setAttributeNS(null,"x",(d.x+t).toFixed()); -o.setAttributeNS(null,"y",(d.y+f).toFixed()); -o.setAttributeNS(null,"width",n); -o.setAttributeNS(null,"height",l); -o.setAttributeNS(this.xlinkns,"href",s.externalGraphic); -o.setAttributeNS(null,"style","opacity: "+a) -}else{if(this.isComplexSymbol(s.graphicName)){var c=s.pointRadius*3; -var k=c*2; -var m=this.importSymbol(s.graphicName); -d=this.getPosition(o); -i=this.symbolMetrics[m][0]*3/k; -var g=o.parentNode; -var h=o.nextSibling; -if(g){g.removeChild(o) -}if(this.supportUse===false){var e=document.getElementById(m); -o.firstChild&&o.removeChild(o.firstChild); -o.appendChild(e.firstChild.cloneNode(true)); -o.setAttributeNS(null,"viewBox",e.getAttributeNS(null,"viewBox")) -}else{o.setAttributeNS(this.xlinkns,"href","#"+m) -}o.setAttributeNS(null,"width",k); -o.setAttributeNS(null,"height",k); -o.setAttributeNS(null,"x",d.x-c); -o.setAttributeNS(null,"y",d.y-c); -if(h){g.insertBefore(o,h) -}else{if(g){g.appendChild(o) -}}}else{o.setAttributeNS(null,"r",s.pointRadius) -}}}var q=s.rotation; -if((q!==undefined||o._rotation!==undefined)&&d){o._rotation=q; -q|=0; -if(o.nodeName!=="svg"){o.setAttributeNS(null,"transform","rotate("+q+" "+d.x+" "+d.y+")") -}else{var p=this.symbolMetrics[m]; -o.firstChild.setAttributeNS(null,"transform","rotate("+s.rotation+" "+p[1]+" "+p[2]+")") -}}}if(b.isFilled){o.setAttributeNS(null,"fill",s.fillColor); -o.setAttributeNS(null,"fill-opacity",s.fillOpacity) -}else{o.setAttributeNS(null,"fill","none") -}if(b.isStroked){o.setAttributeNS(null,"stroke",s.strokeColor); -o.setAttributeNS(null,"stroke-opacity",s.strokeOpacity); -o.setAttributeNS(null,"stroke-width",s.strokeWidth*i); -o.setAttributeNS(null,"stroke-linecap",s.strokeLinecap); -o.setAttributeNS(null,"stroke-linejoin","round"); -o.setAttributeNS(null,"stroke-dasharray",this.dashStyle(s,i)) -}else{o.setAttributeNS(null,"stroke","none") -}if(s.pointerEvents){o.setAttributeNS(null,"pointer-events",s.pointerEvents) -}if(s.cursor!=null){o.setAttributeNS(null,"cursor",s.cursor) -}return o -},dashStyle:function(c,b){var a=c.strokeWidth*b; -var d=c.strokeDashstyle; -switch(d){case"solid":return"none"; -case"dot":return[1,4*a].join(); -case"dash":return[4*a,4*a].join(); -case"dashdot":return[4*a,4*a,1,4*a].join(); -case"longdash":return[8*a,4*a].join(); -case"longdashdot":return[8*a,4*a,1,4*a].join(); -default:return OpenLayers.String.trim(d).replace(/\s+/g,",") -}},createNode:function(a,c){var b=document.createElementNS(this.xmlns,a); -if(c){b.setAttributeNS(null,"id",c) -}return b -},nodeTypeCompare:function(b,a){return(a==b.nodeName) -},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg") -},createRoot:function(a){return this.nodeFactory(this.container.id+a,"g") -},createDefs:function(){var a=this.nodeFactory(this.container.id+"_defs","defs"); -this.rendererRoot.appendChild(a); -return a -},drawPoint:function(a,b){return this.drawCircle(a,b,1) -},drawCircle:function(d,e,b){var c=this.getResolution(); -var a=(e.x/c+this.left); -var f=(this.top-e.y/c); -if(this.inValidRange(a,f)){d.setAttributeNS(null,"cx",a); -d.setAttributeNS(null,"cy",f); -d.setAttributeNS(null,"r",b); -return d -}else{return false -}},drawLineString:function(b,c){var a=this.getComponentsString(c.components); -if(a.path){b.setAttributeNS(null,"points",a.path); -return(a.complete?b:null) -}else{return false -}},drawLinearRing:function(b,c){var a=this.getComponentsString(c.components); -if(a.path){b.setAttributeNS(null,"points",a.path); -return(a.complete?b:null) -}else{return false -}},drawPolygon:function(b,h){var g=""; -var i=true; -var a=true; -var c,k; -for(var e=0,f=h.components.length; -e0){if(this.getShortString(e[c-1])){l.push(this.clipLine(e[c],e[c-1])) -}}if(cb){g=(i-j)/(c-d); -c=c<0?-b:b; -i=j+(c-d)*g -}if(i<-a||i>a){g=(c-d)/(i-j); -i=i<0?-a:a; -c=d+(i-j)*g -}return c+","+i -},getShortString:function(b){var c=this.getResolution(); -var a=(b.x/c+this.left); -var d=(this.top-b.y/c); -if(this.inValidRange(a,d)){return a+","+d -}else{return false -}},getPosition:function(a){return({x:parseFloat(a.getAttributeNS(null,"cx")),y:parseFloat(a.getAttributeNS(null,"cy"))}) -},importSymbol:function(e){if(!this.defs){this.defs=this.createDefs() -}var b=this.container.id+"-"+e; -if(document.getElementById(b)!=null){return b -}var d=OpenLayers.Renderer.symbol[e]; -if(!d){throw new Error(e+" is not a valid symbol name"); -return -}var g=this.nodeFactory(b,"symbol"); -var c=this.nodeFactory(null,"polygon"); -g.appendChild(c); -var m=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0); -var k=""; -var j,h; -for(var f=0; -f5){e=5 -}else{if(c>2){e=2 -}else{e=1 -}}return e*a -},update:function(){var j=this.map.getResolution(); -if(!j){return -}var o=this.map.getUnits(); -var e=OpenLayers.INCHES_PER_UNIT; -var l=this.maxWidth*j*e[o]; -var n=1; -if(this.geodesic===true){var b=this.getGeodesicLength(this.maxWidth); -var f=l/e.km; -n=b/f; -l*=n -}var a; -var d; -if(l>100000){a=this.topOutUnits; -d=this.bottomOutUnits -}else{a=this.topInUnits; -d=this.bottomInUnits -}var h=l/e[a]; -var k=l/e[d]; -var i=this.getBarLen(h); -var g=this.getBarLen(k); -h=i/e[o]*e[a]; -k=g/e[o]*e[d]; -var c=h/j/n; -var m=k/j/n; -if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(m)+"px"; -this.eBottom.innerHTML=g+" "+d -}if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(c)+"px"; -this.eTop.innerHTML=i+" "+a -}},getGeodesicLength:function(g){var f=this.map; -var c=f.getPixelFromLonLat(f.getCenter()); -var a=f.getLonLatFromPixel(c.add(0,-g/2)); -var e=f.getLonLatFromPixel(c.add(0,g/2)); -var d=f.getProjectionObject(); -var b=new OpenLayers.Projection("EPSG:4326"); -if(!d.equals(b)){a.transform(d,b); -e.transform(d,b) -}return OpenLayers.Util.distVincenty(a,e) -},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Format.GML.v2=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",initialize:function(a){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[a]) -},readers:{gml:OpenLayers.Util.applyDefaults({outerBoundaryIs:function(b,a){var c={}; -this.readChildNodes(b,c); -a.outer=c.components[0] -},innerBoundaryIs:function(b,a){var c={}; -this.readChildNodes(b,c); -a.inner.push(c.components[0]) -},Box:function(d,b){var e={}; -this.readChildNodes(d,e); -if(!b.components){b.components=[] -}var c=e.points[0]; -var a=e.points[1]; -b.components.push(new OpenLayers.Bounds(c.x,c.y,a.x,a.y)) -}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(c){var b; -if(c instanceof Array){b="wfs:FeatureCollection" -}else{b="gml:featureMember" -}var a=this.writeNode(b,c); -this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation); -return OpenLayers.Format.XML.prototype.write.apply(this,[a]) -},writers:{gml:OpenLayers.Util.applyDefaults({Point:function(b){var a=this.createElementNSPlus("gml:Point"); -this.writeNode("coordinates",[b],a); -return a -},coordinates:function(d){var c=d.length; -var e=new Array(c); -var a; -for(var b=0; -b0){d.push(",") -}d.push(this.writeNewline(),this.writeIndent(),c) -}}this.level-=1; -d.push(this.writeNewline(),this.writeIndent(),"]"); -return d.join("") -},string:function(b){var a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"}; -if(/["\\\x00-\x1f]/.test(b)){return'"'+b.replace(/([\x00-\x1f\\"])/g,function(e,d){var f=a[d]; -if(f){return f -}f=d.charCodeAt(); -return"\\u00"+Math.floor(f/16).toString(16)+(f%16).toString(16) -})+'"' -}return'"'+b+'"' -},number:function(a){return isFinite(a)?String(a):"null" -},"boolean":function(a){return String(a) -},date:function(a){function b(c){return(c<10)?"0"+c:c -}return'"'+a.getFullYear()+"-"+b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+'"' -}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Format.Filter.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"ogc",schemaLocation:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]) -},read:function(a){var b={}; -this.readers.ogc.Filter.apply(this,[a,b]); -return b.filter -},readers:{ogc:{Filter:function(b,a){var c={fids:[],filters:[]}; -this.readChildNodes(b,c); -if(c.fids.length>0){a.filter=new OpenLayers.Filter.FeatureId({fids:c.fids}) -}else{if(c.filters.length>0){a.filter=c.filters[0] -}}},FeatureId:function(a,b){var c=a.getAttribute("fid"); -if(c){b.fids.push(c) -}},And:function(b,c){var a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND}); -this.readChildNodes(b,a); -c.filters.push(a) -},Or:function(b,c){var a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR}); -this.readChildNodes(b,a); -c.filters.push(a) -},Not:function(b,c){var a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.NOT}); -this.readChildNodes(b,a); -c.filters.push(a) -},PropertyIsLessThan:function(b,c){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN}); -this.readChildNodes(b,a); -c.filters.push(a) -},PropertyIsGreaterThan:function(b,c){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN}); -this.readChildNodes(b,a); -c.filters.push(a) -},PropertyIsLessThanOrEqualTo:function(b,c){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO}); -this.readChildNodes(b,a); -c.filters.push(a) -},PropertyIsGreaterThanOrEqualTo:function(b,c){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO}); -this.readChildNodes(b,a); -c.filters.push(a) -},PropertyIsBetween:function(b,c){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN}); -this.readChildNodes(b,a); -c.filters.push(a) -},Literal:function(a,b){b.value=OpenLayers.String.numericIf(this.getChildValue(a)) -},PropertyName:function(b,a){a.property=this.getChildValue(b) -},LowerBoundary:function(b,a){a.lowerBoundary=OpenLayers.String.numericIf(this.readOgcExpression(b)) -},UpperBoundary:function(b,a){a.upperBoundary=OpenLayers.String.numericIf(this.readOgcExpression(b)) -},Intersects:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.INTERSECTS) -},Within:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.WITHIN) -},Contains:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.CONTAINS) -},DWithin:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.DWITHIN) -},Distance:function(a,b){b.distance=parseInt(this.getChildValue(a)); -b.distanceUnits=a.getAttribute("units") -}}},readSpatial:function(c,d,b){var a=new OpenLayers.Filter.Spatial({type:b}); -this.readChildNodes(c,a); -a.value=a.components[0]; -delete a.components; -d.filters.push(a) -},readOgcExpression:function(a){var c={}; -this.readChildNodes(a,c); -var b=c.value; -if(!b){b=this.getChildValue(a) -}return b -},write:function(a){return this.writers.ogc.Filter.apply(this,[a]) -},writers:{ogc:{Filter:function(c){var d=this.createElementNSPlus("ogc:Filter"); -var b=c.CLASS_NAME.split(".").pop(); -if(b=="FeatureId"){for(var a=0; -a":"PropertyIsGreaterThan","<=":"PropertyIsLessThanOrEqualTo",">=":"PropertyIsGreaterThanOrEqualTo","..":"PropertyIsBetween","~":"PropertyIsLike",BBOX:"BBOX",DWITHIN:"DWITHIN",WITHIN:"WITHIN",CONTAINS:"CONTAINS",INTERSECTS:"INTERSECTS"},CLASS_NAME:"OpenLayers.Format.Filter.v1"});OpenLayers.Format.Filter.v1_0_0=OpenLayers.Class(OpenLayers.Format.GML.v2,OpenLayers.Format.Filter.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.0.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v2.prototype.initialize.apply(this,[a]) -},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(b,c){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO}); -this.readChildNodes(b,a); -c.filters.push(a) -},PropertyIsNotEqualTo:function(b,c){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO}); -this.readChildNodes(b,a); -c.filters.push(a) -},PropertyIsLike:function(d,e){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE}); -this.readChildNodes(d,c); -var f=d.getAttribute("wildCard"); -var b=d.getAttribute("singleChar"); -var a=d.getAttribute("escape"); -c.value2regex(f,b,a); -e.filters.push(c) -}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v2.prototype.readers.gml,feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo"); -this.writeNode("PropertyName",a,b); -this.writeNode("Literal",a.value,b); -return b -},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo"); -this.writeNode("PropertyName",a,b); -this.writeNode("Literal",a.value,b); -return b -},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escape:"!"}}); -this.writeNode("PropertyName",a,b); -this.writeNode("Literal",a.regex2value(),b); -return b -},BBOX:function(a){var c=this.createElementNSPlus("ogc:BBOX"); -this.writeNode("PropertyName",a,c); -var b=this.writeNode("gml:Box",a.value,c); -if(a.projection){b.setAttribute("srsName",a.projection) -}return c -}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature},writeSpatial:function(b,a){var c=this.createElementNSPlus("ogc:"+a); -this.writeNode("PropertyName",b,c); -var d; -if(b.value instanceof OpenLayers.Geometry){d=this.writeNode("feature:_geometry",b.value).firstChild -}else{d=this.writeNode("gml:Box",b.value) -}if(b.projection){d.setAttribute("srsName",b.projection) -}c.appendChild(d); -return c -},CLASS_NAME:"OpenLayers.Format.Filter.v1_0_0"});OpenLayers.Format.Filter.v1_1_0=OpenLayers.Class(OpenLayers.Format.GML.v3,OpenLayers.Format.Filter.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.1.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v3.prototype.initialize.apply(this,[a]) -},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(b,d){var c=b.getAttribute("matchCase"); -var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,matchCase:!(c==="false"||c==="0")}); -this.readChildNodes(b,a); -d.filters.push(a) -},PropertyIsNotEqualTo:function(b,d){var c=b.getAttribute("matchCase"); -var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO,matchCase:!(c==="false"||c==="0")}); -this.readChildNodes(b,a); -d.filters.push(a) -},PropertyIsLike:function(d,e){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE}); -this.readChildNodes(d,c); -var f=d.getAttribute("wildCard"); -var b=d.getAttribute("singleChar"); -var a=d.getAttribute("escapeChar"); -c.value2regex(f,b,a); -e.filters.push(c) -}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo",{attributes:{matchCase:a.matchCase}}); -this.writeNode("PropertyName",a,b); -this.writeNode("Literal",a.value,b); -return b -},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo",{attributes:{matchCase:a.matchCase}}); -this.writeNode("PropertyName",a,b); -this.writeNode("Literal",a.value,b); -return b -},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escapeChar:"!"}}); -this.writeNode("PropertyName",a,b); -this.writeNode("Literal",a.regex2value(),b); -return b -},BBOX:function(a){var c=this.createElementNSPlus("ogc:BBOX"); -this.writeNode("PropertyName",a,c); -var b=this.writeNode("gml:Envelope",a.value); -if(a.projection){b.setAttribute("srsName",a.projection) -}c.appendChild(b); -return c -}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature},writeSpatial:function(b,a){var c=this.createElementNSPlus("ogc:"+a); -this.writeNode("PropertyName",b,c); -var d; -if(b.value instanceof OpenLayers.Geometry){d=this.writeNode("feature:_geometry",b.value).firstChild -}else{d=this.writeNode("gml:Envelope",b.value) -}if(b.projection){d.setAttribute("srsName",b.projection) -}c.appendChild(d); -return c -},CLASS_NAME:"OpenLayers.Format.Filter.v1_1_0"});OpenLayers.Format.CSWGetRecords.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",ows:"http://www.opengis.net/ows"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",requestId:null,resultType:null,outputFormat:null,outputSchema:null,startPosition:null,maxRecords:null,DistributedSearch:null,ResponseHandler:null,Query:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]) -},read:function(a){if(typeof a=="string"){a=OpenLayers.Format.XML.prototype.read.apply(this,[a]) -}if(a&&a.nodeType==9){a=a.documentElement -}var b={}; -this.readNode(a,b); -return b -},readers:{csw:{GetRecordsResponse:function(b,c){c.records=[]; -this.readChildNodes(b,c); -var a=this.getAttributeNS(b,"","version"); -if(a!=""){c.version=a -}},RequestId:function(a,b){b.RequestId=this.getChildValue(a) -},SearchStatus:function(a,c){c.SearchStatus={}; -var b=this.getAttributeNS(a,"","timestamp"); -if(b!=""){c.SearchStatus.timestamp=b -}},SearchResults:function(d,e){this.readChildNodes(d,e); -var b=d.attributes; -var f={}; -for(var c=0,a=b.length; -c0){for(var c=0,a=d.length; -c0){for(var c=0,a=d.length; -c0){g.prefix=d[0] -}}},Attribution:function(a,b){b.attribution={}; -this.readChildNodes(a,b.attribution) -},LogoURL:function(a,b){b.logo={width:a.getAttribute("width"),height:a.getAttribute("height")}; -this.readChildNodes(a,b.logo) -},Style:function(b,c){var a={}; -c.styles.push(a); -this.readChildNodes(b,a) -},LegendURL:function(b,c){var a={width:b.getAttribute("width"),height:b.getAttribute("height")}; -c.legend=a; -this.readChildNodes(b,a) -},MetadataURL:function(a,b){var c={type:a.getAttribute("type")}; -b.metadataURLs.push(c); -this.readChildNodes(a,c) -},DataURL:function(a,b){b.dataURL={}; -this.readChildNodes(a,b.dataURL) -},FeatureListURL:function(a,b){b.featureListURL={}; -this.readChildNodes(a,b.featureListURL) -},AuthorityURL:function(b,d){var a=b.getAttribute("name"); -var c={}; -this.readChildNodes(b,c); -d.authorityURLs[a]=c.href -},Identifier:function(a,c){var b=a.getAttribute("authority"); -c.identifiers[b]=this.getChildValue(a) -},KeywordList:function(a,b){this.readChildNodes(a,b) -},SRS:function(a,b){b.srs[this.getChildValue(a)]=true -}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1"});OpenLayers.Format.WMSCapabilities.v1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMT_MS_Capabilities:function(a,b){this.readChildNodes(a,b) -},Keyword:function(a,b){if(b.keywords){b.keywords.push(this.getChildValue(a)) -}},DescribeLayer:function(a,b){b.describelayer={formats:[]}; -this.readChildNodes(a,b.describelayer) -},GetLegendGraphic:function(a,b){b.getlegendgraphic={formats:[]}; -this.readChildNodes(a,b.getlegendgraphic) -},GetStyles:function(a,b){b.getstyles={formats:[]}; -this.readChildNodes(a,b.getstyles) -},PutStyles:function(a,b){b.putstyles={formats:[]}; -this.readChildNodes(a,b.putstyles) -},UserDefinedSymbolization:function(a,b){var c={supportSLD:parseInt(a.getAttribute("SupportSLD"))==1,userLayer:parseInt(a.getAttribute("UserLayer"))==1,userStyle:parseInt(a.getAttribute("UserStyle"))==1,remoteWFS:parseInt(a.getAttribute("RemoteWFS"))==1}; -b.userSymbols=c -},LatLonBoundingBox:function(a,b){b.llbbox=[parseFloat(a.getAttribute("minx")),parseFloat(a.getAttribute("miny")),parseFloat(a.getAttribute("maxx")),parseFloat(a.getAttribute("maxy"))] -},BoundingBox:function(a,b){var c=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this,[a,b]); -c.srs=a.getAttribute("SRS"); -b.bbox[c.srs]=c -},ScaleHint:function(e,f){var d=e.getAttribute("min"); -var a=e.getAttribute("max"); -var c=Math.pow(2,0.5); -var b=OpenLayers.INCHES_PER_UNIT.m; -f.maxScale=parseFloat(((d/c)*b*OpenLayers.DOTS_PER_INCH).toPrecision(13)); -f.minScale=parseFloat(((a/c)*b*OpenLayers.DOTS_PER_INCH).toPrecision(13)) -},Dimension:function(b,d){var a=b.getAttribute("name").toLowerCase(); -var c={name:a,units:b.getAttribute("units"),unitsymbol:b.getAttribute("unitSymbol")}; -d.dimensions[c.name]=c -},Extent:function(d,e){var b=d.getAttribute("name").toLowerCase(); -if(b in e.dimensions){var c=e.dimensions[b]; -c.nearestVal=d.getAttribute("nearestValue")==="1"; -c.multipleVal=d.getAttribute("multipleValues")==="1"; -c.current=d.getAttribute("current")==="1"; -c["default"]=d.getAttribute("default")||""; -var a=this.getChildValue(d); -c.values=a.split(",") -}}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1"});OpenLayers.Format.WMSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.0",initialize:function(a){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[a]) -},readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(e,f){var d=this.getChildValue(e); -var b=d.split(/ +/); -for(var c=0,a=b.length; -c=9500&&a<=950000){a=Math.round(a/1000)+"K" -}else{if(a>=950000){a=Math.round(a/1000000)+"M" -}else{a=Math.round(a) -}}this.element.innerHTML=OpenLayers.i18n("scale",{scaleDenom:a}) -},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,EVENT_TYPES:["featureadded"],multi:false,featureAdded:function(){},handlerOptions:null,initialize:function(b,c,a){this.EVENT_TYPES=OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES); -OpenLayers.Control.prototype.initialize.apply(this,[a]); -this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(f,e){this.layer.events.triggerEvent("sketchmodified",{vertex:f,feature:e}) -},create:function(f,e){this.layer.events.triggerEvent("sketchstarted",{vertex:f,feature:e}) -}},this.callbacks); -this.layer=b; -this.handlerOptions=this.handlerOptions||{}; -if(!("multi" in this.handlerOptions)){this.handlerOptions.multi=this.multi -}var d=this.layer.styleMap&&this.layer.styleMap.styles.temporary; -if(d){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":d})}) -}this.handler=new c(this,this.callbacks,this.handlerOptions) -},drawFeature:function(c){var a=new OpenLayers.Feature.Vector(c); -var b=this.layer.events.triggerEvent("sketchcomplete",{feature:a}); -if(b!==false){a.state=OpenLayers.State.INSERT; -this.layer.addFeatures([a]); -this.featureAdded(a); -this.events.triggerEvent("featureadded",{feature:a}) -}},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Rule=OpenLayers.Class({id:null,name:"default",title:null,description:null,context:null,filter:null,elseFilter:false,symbolizer:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(a){this.symbolizer={}; -OpenLayers.Util.extend(this,a); -this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_") -},destroy:function(){for(var a in this.symbolizer){this.symbolizer[a]=null -}this.symbolizer=null -},evaluate:function(c){var b=this.getContext(c); -var a=true; -if(this.minScaleDenominator||this.maxScaleDenominator){var d=c.layer.map.getScale() -}if(this.minScaleDenominator){a=d>=OpenLayers.Style.createLiteral(this.minScaleDenominator,b) -}if(a&&this.maxScaleDenominator){a=d0){this.map.setCenter(this.map.getLonLatFromPixel(a.xy),this.map.getZoom()-1) -}},zoomBoxEnd:function(b){if(this.mouseDragStart!=null){if(Math.abs(this.mouseDragStart.x-b.xy.x)>5||Math.abs(this.mouseDragStart.y-b.xy.y)>5){var h=this.map.getLonLatFromViewPortPx(this.mouseDragStart); -var a=this.map.getLonLatFromViewPortPx(b.xy); -var g=Math.max(h.lat,a.lat); -var c=Math.min(h.lat,a.lat); -var f=Math.min(h.lon,a.lon); -var d=Math.max(h.lon,a.lon); -var e=new OpenLayers.Bounds(f,c,d,g); -this.map.zoomToExtent(e) -}else{var a=this.map.getLonLatFromViewPortPx(b.xy); -this.map.setCenter(new OpenLayers.LonLat((a.lon),(a.lat)),this.map.getZoom()+1) -}this.removeZoomBox() -}},removeZoomBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox); -this.zoomBox=null -},onWheelEvent:function(c){var b=false; -var a=OpenLayers.Event.element(c); -while(a!=null){if(this.map&&a==this.map.div){b=true; -break -}a=a.parentNode -}if(b){var d=0; -if(!c){c=window.event -}if(c.wheelDelta){d=c.wheelDelta/120; -if(window.opera&&window.opera.version()<9.2){d=-d -}}else{if(c.detail){d=-c.detail/3 -}}if(d){c.xy=this.mousePosition; -if(d<0){this.defaultWheelDown(c) -}else{this.defaultWheelUp(c) -}}OpenLayers.Event.stop(c) -}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{element:null,prefix:"",separator:", ",suffix:"",numDigits:5,granularity:10,emptyString:null,lastXy:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments) -},destroy:function(){if(this.map){this.map.events.unregister("mousemove",this,this.redraw) -}OpenLayers.Control.prototype.destroy.apply(this,arguments) -},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments); -if(!this.element){this.div.left=""; -this.div.top=""; -this.element=this.div -}this.redraw(); -return this.div -},redraw:function(a){var c; -if(a==null){this.reset(); -return -}else{if(this.lastXy==null||Math.abs(a.xy.x-this.lastXy.x)>this.granularity||Math.abs(a.xy.y-this.lastXy.y)>this.granularity){this.lastXy=a.xy; -return -}c=this.map.getLonLatFromPixel(a.xy); -if(!c){return -}if(this.displayProjection){c.transform(this.map.getProjectionObject(),this.displayProjection) -}this.lastXy=a.xy -}var b=this.formatOutput(c); -if(b!=this.element.innerHTML){this.element.innerHTML=b -}},reset:function(a){if(this.emptyString!=null){this.element.innerHTML=this.emptyString -}},formatOutput:function(b){var c=parseInt(this.numDigits); -var a=this.prefix+b.lon.toFixed(c)+this.separator+b.lat.toFixed(c)+this.suffix; -return a -},setMap:function(){OpenLayers.Control.prototype.setMap.apply(this,arguments); -this.map.events.register("mousemove",this,this.redraw); -this.map.events.register("mouseout",this,this.reset) -},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:"shiftKey",persist:false,irregular:false,angle:null,fixedRadius:false,feature:null,layer:null,origin:null,initialize:function(c,b,a){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style["default"],{}); -OpenLayers.Handler.prototype.initialize.apply(this,[c,b,a]); -this.options=(a)?a:new Object() -},setOptions:function(a){OpenLayers.Util.extend(this.options,a); -OpenLayers.Util.extend(this,a) -},activate:function(){var a=false; -if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var b={displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True}; -this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,b); -this.map.addLayer(this.layer); -a=true -}return a -},deactivate:function(){var a=false; -if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments)){if(this.dragging){this.cancel() -}if(this.layer.map!=null){this.layer.destroy(false); -if(this.feature){this.feature.destroy() -}}this.layer=null; -this.feature=null; -a=true -}return a -},down:function(a){this.fixedRadius=!!(this.radius); -var b=this.map.getLonLatFromPixel(a.xy); -this.origin=new OpenLayers.Geometry.Point(b.lon,b.lat); -if(!this.fixedRadius||this.irregular){this.radius=this.map.getResolution() -}if(this.persist){this.clear() -}this.feature=new OpenLayers.Feature.Vector(); -this.createGeometry(); -this.callback("create",[this.origin,this.feature]); -this.layer.addFeatures([this.feature],{silent:true}); -this.layer.drawFeature(this.feature,this.style) -},move:function(c){var f=this.map.getLonLatFromPixel(c.xy); -var a=new OpenLayers.Geometry.Point(f.lon,f.lat); -if(this.irregular){var g=Math.sqrt(2)*Math.abs(a.y-this.origin.y)/2; -this.radius=Math.max(this.map.getResolution()/2,g) -}else{if(this.fixedRadius){this.origin=a -}else{this.calculateAngle(a,c); -this.radius=Math.max(this.map.getResolution()/2,a.distanceTo(this.origin)) -}}this.modifyGeometry(); -if(this.irregular){var d=a.x-this.origin.x; -var b=a.y-this.origin.y; -var e; -if(b==0){e=d/(this.radius*Math.sqrt(2)) -}else{e=d/b -}this.feature.geometry.resize(1,this.origin,e); -this.feature.geometry.move(d/2,b/2) -}this.layer.drawFeature(this.feature,this.style) -},up:function(a){this.finalize(); -if(this.start==this.last){this.callback("done",[a.xy]) -}},out:function(a){this.finalize() -},createGeometry:function(){this.angle=Math.PI*((1/this.sides)-(1/2)); -if(this.snapAngle){this.angle+=this.snapAngle*(Math.PI/180) -}this.feature.geometry=OpenLayers.Geometry.Polygon.createRegularPolygon(this.origin,this.radius,this.sides,this.snapAngle) -},modifyGeometry:function(){var f,c,b,a; -var d=this.feature.geometry.components[0]; -if(d.components.length!=(this.sides+1)){this.createGeometry(); -d=this.feature.geometry.components[0] -}for(var e=0; -e=2*b[1]){return"longdash" -}return(b[0]==1||b[1]==1)?"dot":"dash" -}else{if(b.length==4){return(1*b[0]>=2*b[1])?"longdashdot":"dashdot" -}}return"solid" -}},createNode:function(a,c){var b=document.createElement(a); -if(c){b.id=c -}b.unselectable="on"; -b.onselectstart=OpenLayers.Function.False; -return b -},nodeTypeCompare:function(c,b){var d=b; -var a=d.indexOf(":"); -if(a!=-1){d=d.substr(a+1) -}var e=c.nodeName; -a=e.indexOf(":"); -if(a!=-1){e=e.substr(a+1) -}return(d==e) -},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div") -},createRoot:function(a){return this.nodeFactory(this.container.id+a,"olv:group") -},drawPoint:function(a,b){return this.drawCircle(a,b,1) -},drawCircle:function(d,e,a){if(!isNaN(e.x)&&!isNaN(e.y)){var b=this.getResolution(); -d.style.left=(((e.x/b-this.offset.x)|0)-a)+"px"; -d.style.top=(((e.y/b-this.offset.y)|0)-a)+"px"; -var c=a*2; -d.style.width=c+"px"; -d.style.height=c+"px"; -return d -}return false -},drawLineString:function(a,b){return this.drawLine(a,b,false) -},drawLinearRing:function(a,b){return this.drawLine(a,b,true) -},drawLine:function(b,k,g){this.setNodeDimension(b,k); -var c=this.getResolution(); -var a=k.components.length; -var e=new Array(a); -var h,l,j; -for(var f=0; -f0){k.bottom=k.bottom-j; -k.top=k.top+j -}else{k.left=k.left+j; -k.right=k.right-j -}a={path:l,size:k.getWidth(),left:k.left,bottom:k.bottom}; -this.symbolCache[b]=a; -return a -},CLASS_NAME:"OpenLayers.Renderer.VML"}); -OpenLayers.Renderer.VML.LABEL_SHIFT={l:0,c:0.5,r:1,t:0,m:0.5,b:1};OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments) -},setMap:function(e){OpenLayers.Control.prototype.setMap.apply(this,arguments); -for(var c=0,a=this.map.controls.length; -c-1)&&(p+a.length==r)){s=t.slice(0,r-a.length); -break -}}}return s -}; -if(!j){var l=new Array("GeoExt/data/AttributeReader.js","GeoExt/data/AttributeStore.js","GeoExt/data/FeatureRecord.js","GeoExt/data/FeatureReader.js","GeoExt/data/FeatureStore.js","GeoExt/data/LayerRecord.js","GeoExt/data/LayerReader.js","GeoExt/data/LayerStore.js","GeoExt/data/ScaleStore.js","GeoExt/data/WMSCapabilitiesReader.js","GeoExt/data/WMSCapabilitiesStore.js","GeoExt/data/WFSCapabilitiesReader.js","GeoExt/data/WFSCapabilitiesStore.js","GeoExt/data/WMSDescribeLayerReader.js","GeoExt/data/WMSDescribeLayerStore.js","GeoExt/data/WMCReader.js","GeoExt/widgets/Action.js","GeoExt/data/ProtocolProxy.js","GeoExt/widgets/FeatureRenderer.js","GeoExt/widgets/MapPanel.js","GeoExt/widgets/Popup.js","GeoExt/widgets/form.js","GeoExt/widgets/form/SearchAction.js","GeoExt/widgets/form/BasicForm.js","GeoExt/widgets/form/FormPanel.js","GeoExt/widgets/tips/SliderTip.js","GeoExt/widgets/tips/LayerOpacitySliderTip.js","GeoExt/widgets/tips/ZoomSliderTip.js","GeoExt/widgets/tree/LayerNode.js","GeoExt/widgets/tree/TreeNodeUIEventMixin.js","GeoExt/plugins/TreeNodeComponent.js","GeoExt/plugins/TreeNodeRadioButton.js","GeoExt/widgets/tree/LayerLoader.js","GeoExt/widgets/tree/LayerContainer.js","GeoExt/widgets/tree/BaseLayerContainer.js","GeoExt/widgets/tree/OverlayLayerContainer.js","GeoExt/widgets/tree/LayerParamNode.js","GeoExt/widgets/tree/LayerParamLoader.js","GeoExt/widgets/tree/WMSCapabilitiesLoader.js","GeoExt/widgets/LayerOpacitySlider.js","GeoExt/widgets/LayerLegend.js","GeoExt/widgets/LegendImage.js","GeoExt/widgets/UrlLegend.js","GeoExt/widgets/WMSLegend.js","GeoExt/widgets/VectorLegend.js","GeoExt/widgets/LegendPanel.js","GeoExt/widgets/ZoomSlider.js","GeoExt/widgets/grid/FeatureSelectionModel.js","GeoExt/data/PrintPage.js","GeoExt/data/PrintProvider.js","GeoExt/plugins/PrintPageField.js","GeoExt/plugins/PrintProviderField.js","GeoExt/plugins/PrintExtent.js","GeoExt/plugins/AttributeForm.js","GeoExt/widgets/PrintMapPanel.js","GeoExt/state/PermalinkProvider.js"); -var c=navigator.userAgent; -var e=(c.match("MSIE")||c.match("Safari")); -if(e){var b=new Array(l.length) -}var m=k()+"lib/"; -for(var d=0,g=l.length; -d<\/script>" -}else{var n=document.createElement("script"); -n.src=m+l[d]; -var f=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body; -f.appendChild(n) -}}if(e){document.write(b.join("")) -}}})();Ext.namespace("GeoExt.data"); -GeoExt.data.AttributeReader=function(a,b){a=a||{}; -if(!a.format){a.format=new OpenLayers.Format.WFSDescribeFeatureType() -}GeoExt.data.AttributeReader.superclass.constructor.call(this,a,b||a.fields); -if(a.feature){this.recordType.prototype.fields.add(new Ext.data.Field("value")) -}}; -Ext.extend(GeoExt.data.AttributeReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML; -if(!b||!b.documentElement){b=a.responseText -}return this.readRecords(b) -},readRecords:function(h){var e; -if(h instanceof Array){e=h -}else{e=this.meta.format.read(h).featureTypes[0].properties -}var r=this.meta.feature; -var c=this.recordType; -var l=c.prototype.fields; -var f=l.length; -var n,q,a,k,o,p,b=[]; -for(var g=0,m=e.length; -g-1) -}else{if(b instanceof RegExp){d=(b.test(c)) -}}}}return d -}});Ext.namespace("GeoExt.data"); -GeoExt.data.AttributeStoreMixin=function(){return{constructor:function(a){a=a||{}; -arguments.callee.superclass.constructor.call(this,Ext.apply(a,{proxy:a.proxy||(!a.data?new Ext.data.HttpProxy({url:a.url,disableCaching:false,method:"GET"}):undefined),reader:new GeoExt.data.AttributeReader(a,a.fields||["name","type","restriction"])})); -if(this.feature){this.bind() -}},bind:function(){this.on({update:this.onUpdate,load:this.onLoad,add:this.onAdd,scope:this}); -var a=[]; -this.each(function(b){a.push(b) -}); -this.updateFeature(a) -},onUpdate:function(c,a,b){this.updateFeature([a]) -},onLoad:function(b,a,c){if(!c||c.add!==true){this.updateFeature(a) -}},onAdd:function(b,a,c){this.updateFeature(a) -},updateFeature:function(d){var k=this.feature,g=k.layer; -var e,h,f,c,j,a,b; -for(e=0,h=d.length; -e=0; -c--){this.layer.addFeatures([a[c].getFeature()]) -}}if(f&GeoExt.data.FeatureStore.LAYER_TO_STORE){this.loadData(e,true) -}d.events.on({featuresadded:this.onFeaturesAdded,featuresremoved:this.onFeaturesRemoved,featuremodified:this.onFeatureModified,scope:this}); -this.on({load:this.onLoad,clear:this.onClear,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,scope:this}) -},unbind:function(){if(this.layer){this.layer.events.un({featuresadded:this.onFeaturesAdded,featuresremoved:this.onFeaturesRemoved,featuremodified:this.onFeatureModified,scope:this}); -this.un("load",this.onLoad,this); -this.un("clear",this.onClear,this); -this.un("add",this.onAdd,this); -this.un("remove",this.onRemove,this); -this.un("update",this.onUpdate,this); -this.layer=null -}},getRecordFromFeature:function(c){var a=null; -if(c.state!==OpenLayers.State.INSERT){a=this.getById(c.id) -}else{var b=this.findBy(function(d){return d.getFeature()===c -}); -if(b>-1){a=this.getAt(b) -}}return a -},onFeaturesAdded:function(b){if(!this._adding){var f=b.features,e=f; -if(this.featureFilter){e=[]; -var d,a,c; -for(var d=0,a=f.length; -d=0; -c--){d=e[c]; -a=this.getRecordFromFeature(d); -if(a!==undefined){this._removing=true; -this.remove(a); -delete this._removing -}}}},onFeatureModified:function(h){if(!this._updating){var j=h.feature; -var c=this.getRecordFromFeature(j); -if(c!==undefined){c.beginEdit(); -var a=j.attributes; -if(a){var d=this.recordType.prototype.fields; -for(var b=0,e=d.length; -b0){this._adding=true; -this.layer.addFeatures(d); -delete this._adding -}},onLoad:function(b,a,c){if(!c||c.add!==true){this._removing=true; -this.layer.removeFeatures(this.layer.features); -delete this._removing; -this.addFeaturesToLayer(a) -}},onClear:function(a){this._removing=true; -this.layer.removeFeatures(this.layer.features); -delete this._removing -},onAdd:function(b,a,c){if(!this._adding){this.addFeaturesToLayer(a) -}},onRemove:function(b,a,c){if(!this._removing){var d=a.getFeature(); -if(this.layer.getFeatureById(d.id)!=null){this._removing=true; -this.layer.removeFeatures([a.getFeature()]); -delete this._removing -}}},onUpdate:function(e,b,d){if(!this._updating){var g=new GeoExt.data.FeatureRecord().fields; -var f=b.getFeature(); -if(b.fields){var a=this.layer.events.triggerEvent("beforefeaturemodified",{feature:f}); -if(a!==false){var c=f.attributes; -b.fields.each(function(i){var h=i.mapping||i.name; -if(!g.containsKey(h)){c[h]=b.get(i.name) -}}); -this._updating=true; -this.layer.events.triggerEvent("featuremodified",{feature:f}); -delete this._updating; -if(this.layer.getFeatureById(f.id)!=null){this.layer.drawFeature(f) -}}}}}} -}; -GeoExt.data.FeatureStore=Ext.extend(Ext.data.Store,new GeoExt.data.FeatureStoreMixin); -GeoExt.data.FeatureStore.LAYER_TO_STORE=1; -GeoExt.data.FeatureStore.STORE_TO_LAYER=2;Ext.namespace("GeoExt.data"); -GeoExt.data.LayerRecord=Ext.data.Record.create([{name:"layer"},{name:"title",type:"string",mapping:"name"}]); -GeoExt.data.LayerRecord.prototype.getLayer=function(){return this.get("layer") -}; -GeoExt.data.LayerRecord.prototype.setLayer=function(a){if(a!==this.data.layer){this.dirty=true; -if(!this.modified){this.modified={} -}if(this.modified.layer===undefined){this.modified.layer=this.data.layer -}this.data.layer=a; -if(!this.editing){this.afterEdit() -}}}; -GeoExt.data.LayerRecord.prototype.clone=function(b){var a=this.getLayer()&&this.getLayer().clone(); -return new this.constructor(Ext.applyIf({layer:a},this.data),b||a.id) -}; -GeoExt.data.LayerRecord.create=function(e){var c=Ext.extend(GeoExt.data.LayerRecord,{}); -var d=c.prototype; -d.fields=new Ext.util.MixedCollection(false,function(f){return f.name -}); -GeoExt.data.LayerRecord.prototype.fields.each(function(g){d.fields.add(g) -}); -if(e){for(var b=0,a=e.length; -b-1){var a=this.getAt(c); -if(b.property==="order"){if(!this._adding&&!this._removing){var d=this.map.getLayerIndex(e); -if(d!==c){this._removing=true; -this.remove(a); -delete this._removing; -this._adding=true; -this.insert(d,[a]); -delete this._adding -}}}else{if(b.property==="name"){a.set("title",e.name) -}else{this.fireEvent("update",this,a,Ext.data.Record.EDIT) -}}}},onAddLayer:function(a){if(!this._adding){var b=a.layer; -this._adding=true; -this.loadData([b],true); -delete this._adding -}},onRemoveLayer:function(a){if(this.map.unloadDestroy){if(!this._removing){var b=a.layer; -this._removing=true; -this.remove(this.getById(b.id)); -delete this._removing -}}else{this.unbind() -}},onLoad:function(c,b,e){if(!Ext.isArray(b)){b=[b] -}if(e&&!e.add){this._removing=true; -for(var f=this.map.layers.length-1; -f>=0; -f--){this.map.removeLayer(this.map.layers[f]) -}delete this._removing; -var a=b.length; -if(a>0){var g=new Array(a); -for(var d=0; -d=0; -b--){this.map.removeLayer(this.map.layers[b]) -}delete this._removing -},onAdd:function(b,a,c){if(!this._adding){this._adding=true; -var e; -for(var d=a.length-1; -d>=0; ---d){e=a[d].getLayer(); -this.map.addLayer(e); -if(c!==this.map.layers.length-1){this.map.setLayerIndex(e,c) -}}delete this._adding -}},onRemove:function(b,a,c){if(!this._removing){var d=a.getLayer(); -if(this.map.getLayer(d.id)!=null){this._removing=true; -this.removeMapLayer(a); -delete this._removing -}}},onUpdate:function(c,a,b){if(b===Ext.data.Record.EDIT){if(a.modified&&a.modified.title){var d=a.getLayer(); -var e=a.get("title"); -if(e!==d.name){d.setName(e) -}}}},removeMapLayer:function(a){this.map.removeLayer(a.getLayer()) -},onReplace:function(c,a,b){this.removeMapLayer(a) -},getByLayer:function(b){var a=this.findBy(function(c){return c.getLayer()===b -}); -if(a>-1){return this.getAt(a) -}},destroy:function(){this.unbind(); -GeoExt.data.LayerStore.superclass.destroy.call(this) -}} -}; -GeoExt.data.LayerStore=Ext.extend(Ext.data.Store,new GeoExt.data.LayerStoreMixin); -GeoExt.data.LayerStore.MAP_TO_STORE=1; -GeoExt.data.LayerStore.STORE_TO_MAP=2;Ext.namespace("GeoExt.data"); -GeoExt.data.ScaleStore=Ext.extend(Ext.data.Store,{map:null,constructor:function(a){var b=(a.map instanceof GeoExt.MapPanel?a.map.map:a.map); -delete a.map; -a=Ext.applyIf(a,{reader:new Ext.data.JsonReader({},["level","resolution","scale"])}); -GeoExt.data.ScaleStore.superclass.constructor.call(this,a); -if(b){this.bind(b) -}},bind:function(b,a){this.map=(b instanceof GeoExt.MapPanel?b.map:b); -this.map.events.register("changebaselayer",this,this.populateFromMap); -if(this.map.baseLayer){this.populateFromMap() -}else{this.map.events.register("addlayer",this,this.populateOnAdd) -}},unbind:function(){if(this.map){this.map.events.unregister("addlayer",this,this.populateOnAdd); -this.map.events.unregister("changebaselayer",this,this.populateFromMap); -delete this.map -}},populateOnAdd:function(a){if(a.layer.isBaseLayer){this.populateFromMap(); -this.map.events.unregister("addlayer",this,this.populateOnAdd) -}},populateFromMap:function(){var c=[]; -var a=this.map.baseLayer.resolutions; -var b=this.map.baseLayer.units; -for(var e=a.length-1; -e>=0; -e--){var d=a[e]; -c.push({level:e,resolution:d,scale:OpenLayers.Util.getScaleFromResolution(d,b)}) -}this.loadData(c) -},destroy:function(){this.unbind(); -GeoExt.data.ScaleStore.superclass.destroy.apply(this,arguments) -}});Ext.namespace("GeoExt.data"); -GeoExt.data.WMSCapabilitiesReader=function(a,b){a=a||{}; -if(!a.format){a.format=new OpenLayers.Format.WMSCapabilities() -}if(typeof b!=="function"){b=GeoExt.data.LayerRecord.create(b||a.fields||[{name:"name",type:"string"},{name:"title",type:"string"},{name:"abstract",type:"string"},{name:"queryable",type:"boolean"},{name:"opaque",type:"boolean"},{name:"noSubsets",type:"boolean"},{name:"cascaded",type:"int"},{name:"fixedWidth",type:"int"},{name:"fixedHeight",type:"int"},{name:"minScale",type:"float"},{name:"maxScale",type:"float"},{name:"prefix",type:"string"},{name:"formats"},{name:"styles"},{name:"srs"},{name:"dimensions"},{name:"bbox"},{name:"llbbox"},{name:"attribution"},{name:"keywords"},{name:"identifiers"},{name:"authorityURLs"},{name:"metadataURLs"}]) -}GeoExt.data.WMSCapabilitiesReader.superclass.constructor.call(this,a,b) -}; -Ext.extend(GeoExt.data.WMSCapabilitiesReader,Ext.data.DataReader,{attributionCls:"gx-attribution",read:function(a){var b=a.responseXML; -if(!b||!b.documentElement){b=a.responseText -}return this.readRecords(b) -},serviceExceptionFormat:function(a){if(OpenLayers.Util.indexOf(a,"application/vnd.ogc.se_inimage")>-1){return"application/vnd.ogc.se_inimage" -}if(OpenLayers.Util.indexOf(a,"application/vnd.ogc.se_xml")>-1){return"application/vnd.ogc.se_xml" -}return a[0] -},imageFormat:function(b){var a=b.formats; -if(b.opaque&&OpenLayers.Util.indexOf(a,"image/jpeg")>-1){return"image/jpeg" -}if(OpenLayers.Util.indexOf(a,"image/png")>-1){return"image/png" -}if(OpenLayers.Util.indexOf(a,"image/png; mode=24bit")>-1){return"image/png; mode=24bit" -}if(OpenLayers.Util.indexOf(a,"image/gif")>-1){return"image/gif" -}return a[0] -},imageTransparent:function(a){return a.opaque==undefined||!a.opaque -},readRecords:function(u){if(typeof u==="string"||u.nodeType){u=this.meta.format.read(u) -}var e=u.version; -var c=u.capability||{}; -var f=c.request&&c.request.getmap&&c.request.getmap.href; -var h=c.layers; -var g=c.exception?c.exception.formats:[]; -var p=this.serviceExceptionFormat(g); -var o=[]; -if(f&&h){var l=this.recordType.prototype.fields; -var t,b,d,s,a,k; -for(var n=0,r=h.length; -n") -}if(a.title){b.push(""+a.title+"") -}if(a.href){for(var c=0; -c"+b[c]+"" -}}return b.join(" ") -}});Ext.namespace("GeoExt.data"); -GeoExt.data.WMSCapabilitiesStore=function(a){a=a||{}; -GeoExt.data.WMSCapabilitiesStore.superclass.constructor.call(this,Ext.apply(a,{proxy:a.proxy||(!a.data?new Ext.data.HttpProxy({url:a.url,disableCaching:false,method:"GET"}):undefined),reader:new GeoExt.data.WMSCapabilitiesReader(a,a.fields)})) -}; -Ext.extend(GeoExt.data.WMSCapabilitiesStore,Ext.data.Store);Ext.namespace("GeoExt.data"); -GeoExt.data.WMSDescribeLayerReader=function(a,b){a=a||{}; -if(!a.format){a.format=new OpenLayers.Format.WMSDescribeLayer() -}if(!(typeof b==="function")){b=Ext.data.Record.create(b||a.fields||[{name:"owsType",type:"string"},{name:"owsURL",type:"string"},{name:"typeName",type:"string"}]) -}GeoExt.data.WMSDescribeLayerReader.superclass.constructor.call(this,a,b) -}; -Ext.extend(GeoExt.data.WMSDescribeLayerReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML; -if(!b||!b.documentElement){b=a.responseText -}return this.readRecords(b) -},readRecords:function(e){if(typeof e==="string"||e.nodeType){e=this.meta.format.read(e) -}var b=[],d; -for(var c=0,a=e.length; -c0?this.map:null}) -}if(typeof this.center=="string"){this.center=OpenLayers.LonLat.fromString(this.center) -}else{if(this.center instanceof Array){this.center=new OpenLayers.LonLat(this.center[0],this.center[1]) -}}if(typeof this.extent=="string"){this.extent=OpenLayers.Bounds.fromString(this.extent) -}else{if(this.extent instanceof Array){this.extent=OpenLayers.Bounds.fromArray(this.extent) -}}GeoExt.MapPanel.superclass.initComponent.call(this); -this.addEvents("aftermapmove","afterlayervisibilitychange","afterlayeropacitychange"); -this.map.events.on({moveend:this.onMoveend,changelayer:this.onLayerchange,scope:this}) -},onMoveend:function(){this.fireEvent("aftermapmove") -},onLayerchange:function(a){if(a.property){if(a.property==="visibility"){this.fireEvent("afterlayervisibilitychange") -}else{if(a.property==="opacity"){this.fireEvent("afterlayeropacitychange") -}}}},applyState:function(g){this.center=new OpenLayers.LonLat(g.x,g.y); -this.zoom=g.zoom; -var f,c,e,b,a,d; -var h=this.map.layers; -for(f=0,c=h.length; -f0){if(this.center||this.zoom!=null){a.setCenter(this.center,this.zoom) -}else{if(this.extent){a.zoomToExtent(this.extent) -}else{a.zoomToMaxExtent() -}}}},afterRender:function(){GeoExt.MapPanel.superclass.afterRender.apply(this,arguments); -if(!this.ownerCt){this.renderMap() -}else{this.ownerCt.on("move",this.updateMapSize,this); -this.ownerCt.on({afterlayout:{fn:this.renderMap,scope:this,single:true}}) -}},onResize:function(){GeoExt.MapPanel.superclass.onResize.apply(this,arguments); -this.updateMapSize() -},onBeforeAdd:function(a){if(typeof a.addToMapPanel==="function"){a.addToMapPanel(this) -}GeoExt.MapPanel.superclass.onBeforeAdd.apply(this,arguments) -},remove:function(b,a){if(typeof b.removeFromMapPanel==="function"){b.removeFromMapPanel(this) -}GeoExt.MapPanel.superclass.remove.apply(this,arguments) -},beforeDestroy:function(){if(this.ownerCt){this.ownerCt.un("move",this.updateMapSize,this) -}if(this.map&&this.map.events){this.map.events.un({moveend:this.onMoveend,changelayer:this.onLayerchange,scope:this}) -}if(!this.initialConfig.map||!(this.initialConfig.map instanceof OpenLayers.Map)){if(this.map&&this.map.destroy){this.map.destroy() -}}delete this.map; -GeoExt.MapPanel.superclass.beforeDestroy.apply(this,arguments) -}}); -GeoExt.MapPanel.guess=function(){return Ext.ComponentMgr.all.find(function(a){return a instanceof GeoExt.MapPanel -}) -}; -Ext.reg("gx_mappanel",GeoExt.MapPanel);Ext.namespace("GeoExt"); -GeoExt.LegendImage=Ext.extend(Ext.BoxComponent,{url:null,defaultImgSrc:null,imgCls:null,initComponent:function(){GeoExt.LegendImage.superclass.initComponent.call(this); -if(this.defaultImgSrc===null){this.defaultImgSrc=Ext.BLANK_IMAGE_URL -}this.autoEl={tag:"img","class":(this.imgCls?this.imgCls:""),src:this.defaultImgSrc} -},setUrl:function(a){this.url=a; -var b=this.getEl(); -if(b){b.un("error",this.onImageLoadError,this); -b.on("error",this.onImageLoadError,this,{single:true}); -b.dom.src=a -}},onRender:function(b,a){GeoExt.LegendImage.superclass.onRender.call(this,b,a); -if(this.url){this.setUrl(this.url) -}},onDestroy:function(){var a=this.getEl(); -if(a){a.un("error",this.onImageLoadError,this) -}GeoExt.LegendImage.superclass.onDestroy.apply(this,arguments) -},onImageLoadError:function(){this.getEl().dom.src=this.defaultImgSrc -}}); -Ext.reg("gx_legendimage",GeoExt.LegendImage);Ext.namespace("GeoExt"); -GeoExt.LegendPanel=Ext.extend(Ext.Panel,{dynamic:true,layerStore:null,preferredTypes:null,filter:function(a){return true -},initComponent:function(){GeoExt.LegendPanel.superclass.initComponent.call(this) -},onRender:function(){GeoExt.LegendPanel.superclass.onRender.apply(this,arguments); -if(!this.layerStore){this.layerStore=GeoExt.MapPanel.guess().layers -}this.layerStore.each(function(a){this.addLegend(a) -},this); -if(this.dynamic){this.layerStore.on({add:this.onStoreAdd,remove:this.onStoreRemove,clear:this.onStoreClear,scope:this}) -}},recordIndexToPanelIndex:function(h){var j=this.layerStore; -var g=j.getCount(); -var c=-1; -var a=this.items?this.items.length:0; -var d,e; -for(var b=g-1; -b>=0; ---b){d=j.getAt(b); -e=d.getLayer(); -var f=GeoExt.LayerLegend.getTypes(d); -if(e.displayInLayerSwitcher&&f.length>0&&(j.getAt(b).get("hideInLegend")!==true)){++c; -if(h===b||c>a-1){break -}}}return c -},getIdForLayer:function(a){return this.id+"-"+a.id -},onStoreAdd:function(c,b,d){var f=this.recordIndexToPanelIndex(d+b.length-1); -for(var e=0,a=b.length; -e0){this.insert(b,{xtype:c[0],id:this.getIdForLayer(d),layerRecord:a,hidden:!((!d.map&&d.visibility)||(d.getVisibility()&&d.calculateInRange()))}) -}}},onDestroy:function(){if(this.layerStore){this.layerStore.un("add",this.onStoreAdd,this); -this.layerStore.un("remove",this.onStoreRemove,this); -this.layerStore.un("clear",this.onStoreClear,this) -}GeoExt.LegendPanel.superclass.onDestroy.apply(this,arguments) -}}); -Ext.reg("gx_legendpanel",GeoExt.LegendPanel);Ext.namespace("GeoExt"); -GeoExt.LayerLegend=Ext.extend(Ext.Container,{layerRecord:null,showTitle:true,legendTitle:null,labelCls:null,layerStore:null,initComponent:function(){GeoExt.LayerLegend.superclass.initComponent.call(this); -this.autoEl={}; -this.add({xtype:"label",text:this.getLayerTitle(this.layerRecord),cls:"x-form-item x-form-item-label"+(this.labelCls?" "+this.labelCls:"")}); -if(this.layerRecord&&this.layerRecord.store){this.layerStore=this.layerRecord.store; -this.layerStore.on("update",this.onStoreUpdate,this) -}},onStoreUpdate:function(c,a,b){if(a===this.layerRecord&&this.items.getCount()>0){var d=a.getLayer(); -this.setVisible(d.getVisibility()&&d.calculateInRange()&&d.displayInLayerSwitcher&&!a.get("hideInLegend")); -this.update() -}},update:function(){var a=this.getLayerTitle(this.layerRecord); -if(this.items.get(0).text!==a){this.items.get(0).setText(a) -}},getLayerTitle:function(a){var b=this.legendTitle||""; -if(this.showTitle&&!b){if(a&&!a.get("hideTitle")){b=a.get("title")||a.get("name")||a.getLayer().name||"" -}}return b -},beforeDestroy:function(){this.layerStore&&this.layerStore.un("update",this.onStoreUpdate,this); -GeoExt.LayerLegend.superclass.beforeDestroy.apply(this,arguments) -}}); -GeoExt.LayerLegend.getTypes=function(b,a){var d=(a||[]).concat(); -var c=[]; -for(var e in GeoExt.LayerLegend.types){if(GeoExt.LayerLegend.types[e].supports(b)){d.indexOf(e)==-1&&c.push(e) -}else{d.remove(e) -}}return d.concat(c) -}; -GeoExt.LayerLegend.supports=function(a){}; -GeoExt.LayerLegend.types={};Ext.namespace("GeoExt"); -GeoExt.WMSLegend=Ext.extend(GeoExt.LayerLegend,{defaultStyleIsFirst:true,useScaleParameter:true,baseParams:null,initComponent:function(){GeoExt.WMSLegend.superclass.initComponent.call(this); -var a=this.layerRecord.getLayer(); -this._noMap=!a.map; -a.events.register("moveend",this,this.onLayerMoveend); -this.update() -},onLayerMoveend:function(a){if((a.zoomChanged===true&&this.useScaleParameter===true)||this._noMap){delete this._noMap; -this.update() -}},getLegendUrl:function(g,h){var e=this.layerRecord; -var a; -var k=e&&e.get("styles"); -var f=e.getLayer(); -h=h||[f.params.LAYERS].join(",").split(","); -var j=f.params.STYLES&&[f.params.STYLES].join(",").split(","); -var i=h.indexOf(g); -var b=j&&j[i]; -if(k&&k.length>0){if(b){Ext.each(k,function(l){a=(l.name==b&&l.legend)&&l.legend.href; -return !a -}) -}else{if(this.defaultStyleIsFirst===true&&!j&&!f.params.SLD&&!f.params.SLD_BODY){a=k[0].legend&&k[0].legend.href -}}}if(!a){a=f.getFullRequestString({REQUEST:"GetLegendGraphic",WIDTH:null,HEIGHT:null,EXCEPTIONS:"application/vnd.ogc.se_xml",LAYER:g,LAYERS:null,STYLE:(b!=="")?b:null,STYLES:null,SRS:null,FORMAT:null}) -}if(this.useScaleParameter===true&&a.toLowerCase().indexOf("request=getlegendgraphic")!=-1){var c=f.map.getScale(); -a=Ext.urlAppend(a,"SCALE="+c) -}var d=this.baseParams||{}; -Ext.applyIf(d,{FORMAT:"image/gif"}); -if(a.indexOf("?")>0){a=Ext.urlEncode(d,a) -}return a -},update:function(){var d=this.layerRecord.getLayer(); -if(!(d&&d.map)){return -}GeoExt.WMSLegend.superclass.update.apply(this,arguments); -var h,b,c,a; -h=[d.params.LAYERS].join(",").split(","); -var e=[]; -var g=this.items.get(0); -this.items.each(function(i){c=h.indexOf(i.itemId); -if(c<0&&i!=g){e.push(i) -}else{if(i!==g){b=h[c]; -var j=this.getLegendUrl(b,h); -if(!OpenLayers.Util.isEquivalentUrl(j,i.url)){i.setUrl(j) -}}}},this); -for(c=0,a=e.length; -c=0; ---d){if(this.loader.filter(b.getAt(d))===true){++f; -if(c===d||f>a-1){break -}}}return f -},destroy:function(){delete this.layerStore; -GeoExt.tree.LayerContainer.superclass.destroy.apply(this,arguments) -}}); -Ext.tree.TreePanel.nodeTypes.gx_layercontainer=GeoExt.tree.LayerContainer;Ext.namespace("GeoExt.tree"); -GeoExt.tree.BaseLayerContainer=Ext.extend(GeoExt.tree.LayerContainer,{constructor:function(a){a=Ext.applyIf(a||{},{text:"Base Layer",loader:{}}); -a.loader=Ext.applyIf(a.loader,{baseAttrs:Ext.applyIf(a.loader.baseAttrs||{},{iconCls:"gx-tree-baselayer-icon",checkedGroup:"baselayer"}),filter:function(b){var c=b.getLayer(); -return c.displayInLayerSwitcher===true&&c.isBaseLayer===true -}}); -GeoExt.tree.BaseLayerContainer.superclass.constructor.call(this,a) -}}); -Ext.tree.TreePanel.nodeTypes.gx_baselayercontainer=GeoExt.tree.BaseLayerContainer;Ext.namespace("GeoExt.tree"); -GeoExt.tree.LayerLoader=function(a){Ext.apply(this,a); -this.addEvents("beforeload","load"); -GeoExt.tree.LayerLoader.superclass.constructor.call(this) -}; -Ext.extend(GeoExt.tree.LayerLoader,Ext.util.Observable,{store:null,filter:function(a){return a.getLayer().displayInLayerSwitcher==true -},baseAttrs:null,uiProviders:null,load:function(a,b){if(this.fireEvent("beforeload",this,a)){this.removeStoreHandlers(); -while(a.firstChild){a.removeChild(a.firstChild) -}if(!this.uiProviders){this.uiProviders=a.getOwnerTree().getLoader().uiProviders -}if(!this.store){this.store=GeoExt.MapPanel.guess().layers -}this.store.each(function(c){this.addLayerNode(a,c) -},this); -this.addStoreHandlers(a); -if(typeof b=="function"){b() -}this.fireEvent("load",this,a) -}},onStoreAdd:function(b,a,c,e){if(!this._reordering){var f=e.recordIndexToNodeIndex(c+a.length-1); -for(var d=0; -d1){var g=(f===0)?f+1:f-1; -a=this.store.findBy(function(k){return i.childNodes[g].layer===k.getLayer() -}); -f===0&&a++ -}else{if(h.parentNode===i.parentNode){var c=i; -do{c=c.previousSibling -}while(c&&!(c instanceof GeoExt.tree.LayerContainer&&c.lastChild)); -if(c){a=this.store.findBy(function(k){return c.lastChild.layer===k.getLayer() -}) -}else{var d=i; -do{d=d.nextSibling -}while(d&&!(d instanceof GeoExt.tree.LayerContainer&&d.firstChild)); -if(d){a=this.store.findBy(function(k){return d.firstChild.layer===k.getLayer() -}) -}a++ -}}}if(a!==undefined){this.store.insert(a,[e]); -window.setTimeout(function(){i.reload(); -h.reload() -}) -}else{this.store.insert(oldRecordIndex,[e]) -}delete i.loader._reordering -}delete this._reordering -},addStoreHandlers:function(b){if(!this._storeHandlers){this._storeHandlers={add:this.onStoreAdd.createDelegate(this,[b],true),remove:this.onStoreRemove.createDelegate(this,[b],true)}; -for(var a in this._storeHandlers){this.store.on(a,this._storeHandlers[a],this) -}}},removeStoreHandlers:function(){if(this._storeHandlers){for(var a in this._storeHandlers){this.store.un(a,this._storeHandlers[a],this) -}delete this._storeHandlers -}},createNode:function(attr){if(this.baseAttrs){Ext.apply(attr,this.baseAttrs) -}if(typeof attr.uiProvider=="string"){attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider) -}attr.nodeType=attr.nodeType||"gx_layer"; -return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr) -},destroy:function(){this.removeStoreHandlers() -}});Ext.namespace("GeoExt.tree"); -GeoExt.tree.LayerNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{constructor:function(a){GeoExt.tree.LayerNodeUI.superclass.constructor.apply(this,arguments) -},render:function(d){var c=this.node.attributes; -if(c.checked===undefined){c.checked=this.node.layer.getVisibility() -}GeoExt.tree.LayerNodeUI.superclass.render.apply(this,arguments); -var b=this.checkbox; -if(c.checkedGroup){var e=Ext.DomHelper.insertAfter(b,[''].join("")); -e.defaultChecked=b.defaultChecked; -Ext.get(b).remove(); -this.checkbox=e -}this.enforceOneVisible() -},onClick:function(a){if(a.getTarget(".x-tree-node-cb",1)){this.toggleCheck(this.isChecked()) -}else{GeoExt.tree.LayerNodeUI.superclass.onClick.apply(this,arguments) -}},toggleCheck:function(a){a=(a===undefined?!this.isChecked():a); -GeoExt.tree.LayerNodeUI.superclass.toggleCheck.call(this,a); -this.enforceOneVisible() -},enforceOneVisible:function(){var b=this.node.attributes; -var e=b.checkedGroup; -if(e&&e!=="gx_baselayer"){var d=this.node.layer; -var a=this.node.getOwnerTree().getChecked(); -var c=0; -Ext.each(a,function(g){var f=g.layer; -if(!g.hidden&&g.attributes.checkedGroup===e){c++; -if(f!=d&&b.checked){f.setVisibility(false) -}}}); -if(c===0&&b.checked==false){d.setVisibility(true) -}}},appendDDGhost:function(c){var b=this.elNode.cloneNode(true); -var a=Ext.DomQuery.select("input[type='radio']",b); -Ext.each(a,function(d){d.name=d.name+"_clone" -}); -c.appendChild(b) -}}); -GeoExt.tree.LayerNode=Ext.extend(Ext.tree.AsyncTreeNode,{layer:null,layerStore:null,constructor:function(a){a.leaf=a.leaf||!(a.children||a.loader); -if(!a.iconCls&&!a.children){a.iconCls="gx-tree-layer-icon" -}if(a.loader&&!(a.loader instanceof Ext.tree.TreeLoader)){a.loader=new GeoExt.tree.LayerParamLoader(a.loader) -}this.defaultUI=this.defaultUI||GeoExt.tree.LayerNodeUI; -Ext.apply(this,{layer:a.layer,layerStore:a.layerStore}); -if(a.text){this.fixedText=true -}GeoExt.tree.LayerNode.superclass.constructor.apply(this,arguments) -},render:function(a){var c=this.layer instanceof OpenLayers.Layer&&this.layer; -if(!c){if(!this.layerStore||this.layerStore=="auto"){this.layerStore=GeoExt.MapPanel.guess().layers -}var b=this.layerStore.findBy(function(e){return e.get("title")==this.layer -},this); -if(b!=-1){c=this.layerStore.getAt(b).getLayer() -}}if(!this.rendered||!c){var d=this.getUI(); -if(c){this.layer=c; -if(c.isBaseLayer){this.draggable=false; -Ext.applyIf(this.attributes,{checkedGroup:"gx_baselayer"}) -}if(!this.text){this.text=c.name -}d.show(); -this.addVisibilityEventHandlers() -}else{d.hide() -}if(this.layerStore instanceof GeoExt.data.LayerStore){this.addStoreEventHandlers(c) -}}GeoExt.tree.LayerNode.superclass.render.apply(this,arguments) -},addVisibilityEventHandlers:function(){this.layer.events.on({visibilitychanged:this.onLayerVisibilityChanged,scope:this}); -this.on({checkchange:this.onCheckChange,scope:this}) -},onLayerVisibilityChanged:function(){if(!this._visibilityChanging){this.getUI().toggleCheck(this.layer.getVisibility()) -}},onCheckChange:function(c,b){if(b!=this.layer.getVisibility()){this._visibilityChanging=true; -var a=this.layer; -if(b&&a.isBaseLayer&&a.map){a.map.setBaseLayer(a) -}else{a.setVisibility(b) -}delete this._visibilityChanging -}},addStoreEventHandlers:function(){this.layerStore.on({add:this.onStoreAdd,remove:this.onStoreRemove,update:this.onStoreUpdate,scope:this}) -},onStoreAdd:function(c,b,d){var a; -for(var e=0; -e=0 -}else{this.onCheckChange(this,this.attributes.checked) -}this.layer.events.on({visibilitychanged:this.onLayerVisibilityChanged,scope:this}); -this.on({checkchange:this.onCheckChange,scope:this}) -}},getLayer:function(){if(!this.layer){var c=this.attributes.layer; -if(typeof c=="string"){var a=this.attributes.layerStore||GeoExt.MapPanel.guess().layers; -var b=a.findBy(function(d){return d.get("title")==c -}); -c=b!=-1?a.getAt(b).getLayer():null -}this.layer=c -}return this.layer -},getItemsFromLayer:function(){var a=this.layer.params[this.param]; -return a instanceof Array?a:(a?a.split(this.delimiter):[]) -},createParams:function(a){var b={}; -b[this.param]=this.layer.params[this.param] instanceof Array?a:a.join(this.delimiter); -return b -},onLayerVisibilityChanged:function(){if(this.getItemsFromLayer().length===0){this.layer.mergeNewParams(this.createParams(this.allItems)) -}var a=this.layer.getVisibility(); -if(a&&this.getItemsFromLayer().indexOf(this.item)!==-1){this.getUI().toggleCheck(true) -}if(!a){this.layer.mergeNewParams(this.createParams([])); -this.getUI().toggleCheck(false) -}},onCheckChange:function(e,d){var c=this.layer; -var b=[]; -var a=this.getItemsFromLayer(); -if(d===true&&c.getVisibility()===false&&a.length===this.allItems.length){a=[] -}Ext.each(this.allItems,function(g){if((g!==this.item&&a.indexOf(g)!==-1)||(d===true&&g===this.item)){b.push(g) -}},this); -var f=(b.length>0); -f&&c.mergeNewParams(this.createParams(b)); -if(f!==c.getVisibility()){c.setVisibility(f) -}(!f)&&c.mergeNewParams(this.createParams([])) -},destroy:function(){var a=this.layer; -if(a instanceof OpenLayers.Layer){a.events.un({visibilitychanged:this.onLayerVisibilityChanged,scope:this}) -}delete this.layer; -this.un("checkchange",this.onCheckChange,this); -GeoExt.tree.LayerParamNode.superclass.destroy.apply(this,arguments) -}}); -Ext.tree.TreePanel.nodeTypes.gx_layerparam=GeoExt.tree.LayerParamNode;Ext.namespace("GeoExt.tree"); -GeoExt.tree.OverlayLayerContainer=Ext.extend(GeoExt.tree.LayerContainer,{constructor:function(a){a=Ext.applyIf(a||{},{text:"Overlays"}); -a.loader=Ext.applyIf(a.loader||{},{filter:function(b){var c=b.getLayer(); -return c.displayInLayerSwitcher===true&&c.isBaseLayer===false -}}); -GeoExt.tree.OverlayLayerContainer.superclass.constructor.call(this,a) -}}); -Ext.tree.TreePanel.nodeTypes.gx_overlaylayercontainer=GeoExt.tree.OverlayLayerContainer;Ext.namespace("GeoExt.tree"); -GeoExt.tree.TreeNodeUIEventMixin=function(){return{constructor:function(a){a.addEvents("rendernode","rawclicknode"); -this.superclass=arguments.callee.superclass; -this.superclass.constructor.apply(this,arguments) -},render:function(a){if(!this.rendered){this.superclass.render.apply(this,arguments); -this.fireEvent("rendernode",this.node) -}},onClick:function(a){if(this.fireEvent("rawclicknode",this.node,a)!==false){this.superclass.onClick.apply(this,arguments) -}}} -};Ext.namespace("GeoExt.plugins"); -GeoExt.plugins.TreeNodeRadioButton=Ext.extend(Ext.util.Observable,{constructor:function(a){Ext.apply(this.initialConfig,Ext.apply({},a)); -Ext.apply(this,a); -this.addEvents("radiochange"); -GeoExt.plugins.TreeNodeRadioButton.superclass.constructor.apply(this,arguments) -},init:function(a){a.on({rendernode:this.onRenderNode,rawclicknode:this.onRawClickNode,beforedestroy:this.onBeforeDestroy,scope:this}) -},onRenderNode:function(c){var b=c.attributes; -if(b.radioGroup&&!b.radio){b.radio=Ext.DomHelper.insertBefore(c.ui.anchor,[''].join("")) -}},onRawClickNode:function(b,c){var a=c.getTarget(".gx-tree-radio",1); -if(a){a.defaultChecked=a.checked; -this.fireEvent("radiochange",b); -return false -}},onBeforeDestroy:function(a){a.un("rendernode",this.onRenderNode,this); -a.un("rawclicknode",this.onRenderNode,this); -a.un("beforedestroy",this.onBeforeDestroy,this) -}}); -Ext.preg("gx_treenoderadiobutton",GeoExt.plugins.TreeNodeRadioButton);Ext.namespace("GeoExt"); -GeoExt.SliderTip=Ext.extend(Ext.slider.Tip,{hover:true,minWidth:10,offsets:[0,-10],dragging:false,init:function(a){GeoExt.SliderTip.superclass.init.apply(this,arguments); -if(this.hover){a.on("render",this.registerThumbListeners,this) -}this.slider=a -},registerThumbListeners:function(){var a,d; -for(var b=0,c=this.slider.thumbs.length; -b{opacity}%",compiledTemplate:null,init:function(a){this.compiledTemplate=new Ext.Template(this.template); -GeoExt.LayerOpacitySliderTip.superclass.init.call(this,a) -},getText:function(a){var b={opacity:a.value}; -return this.compiledTemplate.apply(b) -}});Ext.namespace("GeoExt.tree"); -GeoExt.tree.LayerOpacitySliderPlugin=Ext.extend(Ext.util.Observable,{constructor:function(a){Ext.apply(this.initialConfig,Ext.apply({},a)); -Ext.apply(this,a); -this.addEvents("opacityslide"); -GeoExt.tree.LayerOpacitySliderPlugin.superclass.constructor.apply(this,arguments) -},init:function(a){a.on({rendernode:this.onRenderNode,scope:this}) -},onRenderNode:function(g){var b=g.attributes; -var d=g.layer; -if(b.slider){this.indentMarkup=g.parentNode?g.parentNode.ui.getChildIndent():""; -var c=g.id+"-tree-slider-"; -c=Ext.id(null,c); -buf=["
      ","","","
      ",'',this.indentMarkup,"","",'',this.indentMarkup,"","","","
      "]; -Ext.DomHelper.insertAfter(g.ui.anchor,buf.join("")); -var e=100; -var f=new Ext.Slider({minValue:0,maxValue:100,value:e,width:100,aggressive:true,layer:d,plugins:new GeoExt.LayerOpacitySliderTip()}); -Ext.override(Ext.Slider,{getRatio:function(){var a=this.innerEl.getComputedWidth(); -var h=this.maxValue-this.minValue; -return h==0?a:(a/h) -}}); -f.on("change",function(h,i,a){this.layer.setOpacity(i/100) -}); -f.render(c) -}}}); -Ext.preg&&Ext.preg("gx_layeropacitysliderplugin",GeoExt.tree.LayerOpacitySliderPlugin);OpenLayers.Control.LoadingPanel=OpenLayers.Class(OpenLayers.Control,{counter:0,maximized:false,visible:true,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]) -},setVisible:function(a){this.visible=a; -if(a){OpenLayers.Element.show(this.div) -}else{OpenLayers.Element.hide(this.div) -}},getVisible:function(){return this.visible -},hide:function(){this.setVisible(false) -},show:function(){this.setVisible(true) -},toggle:function(){this.setVisible(!this.getVisible()) -},addLayer:function(a){if(a.layer){a.layer.events.register("loadstart",this,this.increaseCounter); -a.layer.events.register("loadend",this,this.decreaseCounter) -}},setMap:function(c){OpenLayers.Control.prototype.setMap.apply(this,arguments); -this.map.events.register("preaddlayer",this,this.addLayer); -for(var b=0; -b0){if(!this.maximized&&this.visible){this.maximizeControl() -}}},decreaseCounter:function(){if(this.counter>0){this.counter-- -}if(this.counter==0){if(this.maximized&&this.visible){this.minimizeControl() -}}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments); -return this.div -},minimizeControl:function(a){this.div.style.display="none"; -this.div.style.width="0px"; -this.div.style.height="0px"; -this.maximized=false; -if(a!=null){OpenLayers.Event.stop(a) -}},maximizeControl:function(a){var d=this.map.getSize(); -var b=d.w; -var c=d.h; -this.div.style.width=b+"px"; -this.div.style.height=c+"px"; -this.div.style.display="block"; -this.maximized=true; -if(a!=null){OpenLayers.Event.stop(a) -}},destroy:function(){if(this.map){this.map.events.unregister("preaddlayer",this,this.addLayer); -if(this.map.layers){for(var b=0; -b=0; ---d){var e=document.styleSheets[d]; -if(!e.disabled){var j; -try{if(typeof(e.cssRules)=="undefined"){if(typeof(e.rules)=="undefined"){continue -}else{j=e.rules -}}else{j=e.cssRules -}}catch(b){continue -}for(var c=0; -c(k-d+1); ---a){f=Math.max(b-a,0); -h=l*Math.pow(10,a); -if((h*Math.floor(g/h))>=i){if(i%h==0){m=i/h -}else{m=Math.floor(i/h)+1 -}c=m+(2*b); -e=(a<0)?(Math.abs(a)+1):a; -if((c0){b.loadData(j) -}var l=j.summary; -if(l.count>0&&e){e.loadData(l) -}if(a){a.updateStatus(j.from+"-"+j.to+" result(s) / "+l.count) -}}if(h){h(i,g) -}},failure:function(i){if(d){d(i) -}}}) -},doQueryFromForm:function(i,h,g,d,a,f,c,b){var e=GeoNetwork.util.SearchTools.buildQueryFromForm(Ext.getCmp(i),g,GeoNetwork.util.SearchTools.sortBy); -GeoNetwork.util.SearchTools.doQuery(e,h,g,d,a,f,c,b) -},buildQueryFromForm:function(d,b,e){var a=GeoNetwork.util.SearchTools.getFormValues(d); -var c=[]; -GeoNetwork.util.SearchTools.addFiltersFromPropertyMap(a,c,b); -return GeoNetwork.util.SearchTools.buildQueryGET(c,b,e) -},populateFormFromParams:function(a,b){a.cascade(function(d){var e=d.getId(); -if(d.getName){var c=d.getName(); -if(c.indexOf("_")!=-1){c=c.substring(2); -if(b[c]){d.setValue(b[c]) -}}else{if(b[c]){d.setValue(b[c]) -}}}}) -},addFiltersFromPropertyMap:function(i,a,e){var d=".8"; -var b=i.E_similarity; -if(b!=null){d=i.E_similarity; -GeoNetwork.util.SearchTools.addFilter(a,"E_similarity",d) -}var c=i.E_hitsperpage; -if(c==undefined||c==""){c=GeoNetwork.util.SearchTools.hitsPerPage -}var g=parseInt(e)+parseInt(c)-1; -GeoNetwork.util.SearchTools.addFilter(a,"E_from",e); -GeoNetwork.util.SearchTools.addFilter(a,"E_to",g); -for(var h in i){var f=i[h]; -if(f!=""&&h!="E_similarity"){GeoNetwork.util.SearchTools.addFilter(a,h,f) -}}},addFilter:function(d,c,e){var g=c.match("^(\\[?)([^_]+)_(.*)$"); -if(g){if(g[1]=="["){var f=[]; -var a=e.split(","); -for(var b=0; -b1?f:d,g[2],g[3],a[b]) -}}else{GeoNetwork.util.SearchTools.addFilterImpl(d,g[2],g[3],e) -}}},addFilterImpl:function(c,b,a,d){if(b.charAt(0)=="E"){c.push(a+"="+escape(d)+"") -}else{if(b=="B"){c.push(a+"="+(d?"on":"off")+"") -}else{alert("Cannot parse "+b) -}}},sortByMappings:{relevance:{name:"relevance",order:""},rating:{name:"changeDate",order:""},popularity:{name:"popularity",order:""},date:{name:"date",order:""},title:{name:"title",order:"reverse"}},buildQueryGET:function(b,a,d){var c="fast="+GeoNetwork.util.SearchTools.fast+"&"; -if(d){}if(b){c+=b.join("&") -}return c -},getFormValues:function(b){var a=b.getForm().getValues()||{}; -b.cascade(function(d){if(d.disabled!=true&&d.rendered){if(d.isXType("boxselect")){if(d.getValue&&d.getValue()){a[d.getName()]=d.getValue() -}}else{if(d.isXType("combo")){if(d.getValue&&d.getValue()){a[d.getName()]=d.getValue() -}}else{if(d.isXType("fieldset")){if(d.checkbox){a[d.checkboxName]=!d.collapsed -}}else{if(d.isXType("radiogroup")){var c=d.items.get(0); -a[c.getName()]=c.getGroupValue() -}else{if(d.isXType("checkbox")){a[d.getName()]=d.getValue() -}else{if(d.isXType("datefield")){if(d.getValue()!=""){a[d.getName()]=d.getValue().format("Y-m-d")+(d.postfix?d.postfix:"") -}}else{if(d.getName){if(d.getValue&&d.getValue()!=""){a[d.getName()]=d.getValue() -}}}}}}}}}return true -}); -return a -}};Ext.namespace("GeoNetwork.util"); -GeoNetwork.util.SearchFormTools={getSimpleFormFields:function(c,e,b,d){var a=[]; -if(c){a.push(GeoNetwork.util.SearchFormTools.getFullTextFieldWithOpenSearchSuggestion(c.opensearchSuggest,null)) -}else{a.push(GeoNetwork.util.SearchFormTools.getFullTextField()) -}if(d){a.push(GeoNetwork.util.SearchFormTools.getTypesField()) -}if(e){a.push(GeoNetwork.util.SearchFormTools.getSimpleMap(e,b)) -}a.push(GeoNetwork.util.SearchFormTools.getOptions()); -return a -},getAdvancedFormFields:function(b,j,z){var t=[]; -var u,h; -if(b){u=GeoNetwork.util.SearchFormTools.getFullTextFieldWithOpenSearchSuggestion(b.opensearchSuggest,null); -h=GeoNetwork.util.SearchFormTools.getFieldWithOpenSearchSuggestion("keyword","E_themekey","Keyword",b.opensearchSuggest,null) -}else{u=GeoNetwork.util.SearchFormTools.getFullTextField(); -h=GeoNetwork.util.SearchFormTools.getKeywordsField() -}var m=GeoNetwork.util.SearchFormTools.getAdvancedTextFields(); -var c=GeoNetwork.util.SearchFormTools.getTitleField(); -var p=GeoNetwork.util.SearchFormTools.getAbstractField(); -var n=GeoNetwork.util.SearchFormTools.getTypesField(); -var s={xtype:"fieldset",title:"Map types",autoHeight:true,autoWidth:true,collapsible:true,collapsed:true,defaultType:"checkbox",items:GeoNetwork.util.SearchFormTools.getMapTypesField()}; -var g={xtype:"fieldset",title:"Search accuracy",autoHeight:true,autoWidth:true,layout:"column",collapsible:true,collapsed:true,items:[GeoNetwork.util.SearchFormTools.getSimilarityField()]}; -var a=new Ext.form.TextField({name:"E_geometry",id:"geometry",fieldLabel:"WKT geometry",hideLabel:false}); -var k=[]; -for(var v=0; -v'}) -},getGroupField:function(a){var b=GeoNetwork.data.GroupStore(a); -b.load(); -return new Ext.form.ComboBox({name:"E_group",mode:"local",triggerAction:"all",fieldLabel:"Group",store:b,valueField:"id",displayField:"name"}) -},getMetadataTypeField:function(){return new Ext.form.ComboBox({name:"E_template",mode:"local",triggerAction:"all",fieldLabel:"Kind",store:new Ext.data.ArrayStore({id:0,fields:["id","name"],data:[["n","Metadata"],["y","Template"]]}),valueField:"id",displayField:"name"}) -},getCategoryField:function(b,c){var a=GeoNetwork.data.CategoryStore(b); -a.load(); -if(c==undefined){c="en" -}return new Ext.form.ComboBox({name:"E_category",mode:"local",fieldLabel:"Category",triggerAction:"all",store:a,valueField:"name",displayField:"name",tpl:'
      {[values.label.'+c+"]}
      "}) -},getAdvancedTextFields:function(){return{xtype:"fieldset",title:"Advanced text search options",autoHeight:true,autoWidth:true,collapsible:true,collapsed:true,defaultType:"textfield",items:[{name:"E_or",fieldLabel:"Either of the words",hideLabel:false},{name:"E_phrase",fieldLabel:"Exact phrase",hideLabel:false},{name:"E_all",fieldLabel:"All of the words",hideLabel:false},{name:"E_without",fieldLabel:"Without the words",hideLabel:false}]} -},getSimilarityField:function(){return{xtype:"radiogroup",items:[{xtype:"label",text:"Precise"},{name:"E_similarity",inputValue:1},{name:"E_similarity",inputValue:0.8,checked:true},{name:"E_similarity",inputValue:0.6},{name:"E_similarity",inputValue:0.4},{name:"E_similarity",inputValue:0.2},{xtype:"label",text:"Imprecise"}]} -},getRelationField:function(){return new Ext.form.ComboBox({name:"E_relation",mode:"local",width:150,triggerAction:"all",fieldLabel:"Relation type",store:new Ext.data.ArrayStore({id:0,fields:["relation"],data:[[""],["intersection"],["overlaps"],["encloses"],["fullyOutsideOf"],["crosses"],["touches"],["within"]]}),valueField:"relation",displayField:"relation"}) -},getNearYouButton:function(a){return new Ext.Button({text:"Near you",iconCls:"md-mn mn-user-location",iconAlign:"right",listeners:{click:function(){if(navigator.geolocation){navigator.geolocation.getCurrentPosition(function(b){Ext.getCmp(a).setValue("POINT("+b.coords.latitude+" "+b.coords.longitude+")") -}) -}}}}) -},registerDateVtype:function(){if(Ext.form.VTypes.daterange){return -}Ext.apply(Ext.form.VTypes,{daterange:function(d,c){var b=c.parseDate(d); -if(!b){return false -}if(c.startDateField&&(!this.dateRangeMax||(b.getTime()!=this.dateRangeMax.getTime()))){var e=Ext.getCmp(c.startDateField); -e.setMaxValue(b); -e.validate(); -this.dateRangeMax=b -}else{if(c.endDateField&&(!this.dateRangeMin||(b.getTime()!=this.dateRangeMin.getTime()))){var a=Ext.getCmp(c.endDateField); -a.setMinValue(b); -a.validate(); -this.dateRangeMin=b -}}return true -}}) -},getMetadataDateField:function(){GeoNetwork.util.SearchFormTools.registerDateVtype(); -return[{xtype:"label",text:"From"},{fieldLabel:"From",name:"E_dateFrom",id:"dateFrom",vtype:"daterange",endDateField:"dateTo",format:"d/m/Y"},{xtype:"label",text:"To"},{fieldLabel:"To",name:"E_dateTo",id:"dateTo",vtype:"daterange",startDateField:"dateFrom",format:"d/m/Y"}] -},getTemporalExtentField:function(){GeoNetwork.util.SearchFormTools.registerDateVtype(); -return[{xtype:"label",text:"From"},{fieldLabel:"From",name:"E_extFrom",id:"extFrom",vtype:"daterange",endDateField:"extTo",format:"d/m/Y"},{xtype:"label",text:"To"},{fieldLabel:"To",name:"E_extTo",id:"extTo",vtype:"daterange",startDateField:"extFrom",format:"d/m/Y"}] -},getMapTypesField:function(){return[{hideLabel:true,boxLabel:"Digital",name:"B_digital"},{hideLabel:true,boxLabel:"Hard copy",name:"B_paper"},{hideLabel:true,boxLabel:"Download",name:"B_download"},{hideLabel:true,boxLabel:"Interactive",name:"B_dynamic"}] -},getTypesField:function(){return new Ext.form.ComboBox({name:"E_type",mode:"local",autoSelect:false,triggerAction:"all",fieldLabel:"Resource type",store:new Ext.data.ArrayStore({id:0,fields:["id","name"],data:[["dataset","Datasets"],["service","Service"]]}),valueField:"id",displayField:"name"}) -}};Ext.namespace("GeoNetwork.util"); -GeoNetwork.util.CSWSearchTools={cswMethod:"POST",resultsMode:"results_with_summary",sortBy:"",maxRecords:"50",doCSWQueryFromForm:function(h,g,d,e,b,i){var a=g.services.csw; -var f=GeoNetwork.util.CSWSearchTools.buildCSWQueryFromForm(GeoNetwork.util.CSWSearchTools.cswMethod,Ext.getCmp(h),d,GeoNetwork.util.CSWSearchTools.sortBy,i); -if(GeoNetwork.util.CSWSearchTools.cswMethod=="POST"){var c=GeoNetwork.util.CSWSearchTools.buildCSWQueryFromForm("GET",Ext.getCmp(h),d,GeoNetwork.util.CSWSearchTools.sortBy,i); -OpenLayers.Request.POST({url:a,data:f,success:function(j){var l=new OpenLayers.Format.CSWGetRecords.v2_0_2(); -g.currentRecords=l.read(j.responseText); -var k=g.currentRecords.records; -if(k!=undefined){g.metadataStore.loadData(g.currentRecords) -}if(e){e(j,c) -}},failure:b}) -}else{OpenLayers.Request.GET({url:a,params:f,success:function(j){e(j,f) -},failure:b}) -}},buildCSWQueryFromForm:function(h,e,b,g,f){var a=GeoNetwork.util.CSWSearchTools.getFormValues(e); -var d=[]; -GeoNetwork.util.CSWSearchTools.addFiltersFromPropertyMap(a,d); -f(a,d); -if(d.length==0){d.push(new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE,property:"anyText",value:".*"})) -}var c=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:d}); -if(h=="POST"){return GeoNetwork.util.CSWSearchTools.buildCSWQueryPOST(c,b,g) -}else{return GeoNetwork.util.CSWSearchTools.buildCSWQueryGET(c,b,g) -}},addFiltersFromPropertyMap:function(b,e){var a=".8"; -var c=b.E_similarity; -if(c!=null){a=b.E_similarity; -GeoNetwork.util.CSWSearchTools.addFilter(e,"E_similarity",a,a) -}for(var d in b){var f=b[d]; -if(f!=""&&d!="E_similarity"){GeoNetwork.util.CSWSearchTools.addFilter(e,d,f,a) -}}},addFilter:function(e,d,f,a){var h=d.match("^(\\[?)([^_]+)_(.*)$"); -if(h){if(h[1]=="["){var g=[]; -var b=f.split(","); -for(var c=0; -c1?g:e,h[2],h[3],b[c],a) -}if(b.length>1){e.push(new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR,filters:g})) -}}else{GeoNetwork.util.CSWSearchTools.addFilterImpl(e,h[2],h[3],f,a) -}}},addFilterImpl:function(e,d,b,f,a){if(d=="S"){e.push(new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE,property:b,value:f+".*"})) -}else{if(d=="C"){e.push(new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE,property:b,value:".*"+f+".*"})) -}else{if(d.charAt(0)=="E"){if(d.length>1){e.push(new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:"similarity",value:d.substring(1)})) -}e.push(new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:b,value:f})); -if(d.length>1){e.push(new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:"similarity",value:a})) -}}else{if(d==">="){e.push(new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,property:b,value:f})) -}else{if(d=="<="){e.push(new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,property:b,value:f})) -}else{if(d=="T"){var h=f.split(" "); -for(var c=0; -c\n \n full\n'; -if(f){var e=GeoNetwork.util.CSWSearchTools.sortByMappings[f]; -a+=' \n \n '+e.name+"\n "+e.order+"\n \n \n" -}if(d){var c=new OpenLayers.Format.XML().write(new OpenLayers.Format.Filter().write(d)); -c=c.replace(/^<\?xml[^?]*\?>/,""); -a+=' \n'; -a+=c; -a+=" \n" -}a+=" \n"; -return a -},buildCSWQueryGET:function(d,b,f){var a={request:"GetRecords",service:"CSW",version:"2.0.2",resultType:this.resultsMode,namespace:"csw:http://www.opengis.net/cat/csw/2.0.2",typeNames:"csw:Record",constraintLanguage:"FILTER",constraint_language_version:"1.1.0",elementSetName:"full",startPosition:b,maxRecords:this.maxRecords}; -if(f){var e=GeoNetwork.util.CSWSearchTools.sortByMappings[f]; -a.sortBy=e.name+":"+e.order -}if(d){var c=new OpenLayers.Format.XML().write(new OpenLayers.Format.Filter().write(d)); -c=c.replace(/^<\?xml[^?]*\?>/,""); -a.constraint=c -}return a -},getFormValues:function(b){var a=b.getForm().getValues()||{}; -b.cascade(function(d){if(d.disabled!=true){if(d.isXType("boxselect")){if(d.getValue&&d.getValue()){a[d.getName()]=d.getValue() -}}else{if(d.isXType("combo")){if(d.getValue&&d.getValue()){a[d.getName()]=d.getValue() -}}else{if(d.isXType("fieldset")){if(d.checkbox){a[d.checkboxName]=!d.collapsed -}}else{if(d.isXType("radiogroup")){var c=d.items.get(0); -a[c.getName()]=c.getGroupValue() -}else{if(d.isXType("checkbox")){a[d.getName()]=d.getValue() -}else{if(d.isXType("datefield")){if(d.getValue()!=""){a[d.getName()]=d.getValue().format("Y-m-d")+(d.postfix?d.postfix:"") -}}else{if(d.getName){if(d.getValue&&d.getValue()!=""){a[d.getName()]=d.getValue() -}}}}}}}}}return true -}); -return a -}};Ext.namespace("GeoNetwork.data"); -GeoNetwork.data.UserStore=function(a){return new Ext.data.XmlStore({autoDestroy:true,proxy:new Ext.data.HttpProxy({method:"GET",url:a,disableCaching:false}),record:"user",idPath:"id",fields:[{name:"id"},{name:"username"},{name:"surname"},{name:"name"},{name:"profile"},{name:"address"},{name:"email"},{name:"city"},{name:"state"},{name:"zip"},{name:"country"},{name:"organisation"},{name:"kind"}]}) -};Ext.namespace("GeoNetwork.data"); -GeoNetwork.data.GroupStore=function(a){var b=function(e,d){var k={}; -var f=d.getElementsByTagName("label"); -if(f.length==1){var h=f[0].childNodes; -var j; -for(var g=0,c=h.length; -g",this.nearYou); -return new Ext.Toolbar({items:b}) -},defaultConfig:{id:"geometryMap",width:270,height:270,border:false,activated:false},initComponent:function(a){Ext.apply(this,a); -Ext.applyIf(this,this.defaultConfig); -this.tbar=this.createToolbar(); -this.geometryField=Ext.getCmp(this.geometryFieldId); -GeoNetwork.form.GeometryMapField.superclass.initComponent.call(this); -if(this.activated){this.on("aftermapmove",this.setField,this) -}},setField:function(){if(this.geometryField!=undefined){var b=this.map.getExtent().toArray(); -var a="POLYGON(("+b[0]+" "+b[1]+","+b[0]+" "+b[3]+","+b[2]+" "+b[3]+","+b[2]+" "+b[1]+","+b[0]+" "+b[1]+"))"; -this.geometryField.setValue(a) -}}}); -Ext.reg("gn_geometrymapfield",GeoNetwork.form.GeometryMapField);Ext.namespace("GeoNetwork.form"); -GeoNetwork.form.OpenSearchSuggestionTextField=Ext.extend(Ext.form.ComboBox,{url:undefined,field:"any",fieldLabel:"Full text search",name:"E_any",displayField:"value",tpl:undefined,minChars:2,mode:"remote",loadingText:"...",store:undefined,queryParam:"q",itemSelector:"div.search-item",initComponent:function(){this.id="E_"+this.field; -GeoNetwork.form.OpenSearchSuggestionTextField.superclass.initComponent.call(this); -if(this.tpl==undefined){var a='

      {[values.value.replace(Ext.getDom(\''+this.id+"').value, '' + Ext.getDom('"+this.id+"').value + '')]}

      "; -this.tpl=new Ext.XTemplate(a) -}this.store=new GeoNetwork.data.OpenSearchSuggestionStore({url:this.url,rootId:1,baseParams:{field:this.field}}) -}}); -Ext.reg("gn_opensearchsuggestiontextfield",GeoNetwork.form.OpenSearchSuggestionTextField);Ext.namespace("GeoNetwork"); -GeoNetwork.LoginForm=Ext.extend(Ext.FormPanel,{url:"",id:"loginForm",width:250,border:false,layout:"hbox",catalogue:undefined,defaults:{},defaultType:"textfield",username:new Ext.form.TextField({name:"username",id:"username",width:70,hideLabel:true,allowBlank:false,emptyText:"username"}),password:new Ext.form.TextField({name:"password",id:"password",width:70,hideLabel:true,allowBlank:false,emptyText:"password",inputType:"password"}),userInfo:new Ext.form.Label({id:"userInfoLabel",maxWidth:40,text:""}),loginBt:new Ext.Button({width:50,text:"Login",iconCls:"md-mn mn-login",listeners:{click:function(){this.catalogue.login(Ext.getCmp("username").getValue(),Ext.getCmp("password").getValue()) -},scope:this}}),adminBt:new Ext.Button({width:70,text:"Administration",listeners:{click:function(){catalogue.admin() -},scope:this}}),logoutBt:new Ext.Button({width:50,text:"Logout",iconCls:"md-mn mn-logout",listeners:{click:function(){catalogue.logout() -},scope:this}}),catalogue:undefined,initComponent:function(){this.items=[this.username,this.password,this.loginBt,this.adminBt,this.logoutBt]; -GeoNetwork.LoginForm.superclass.initComponent.call(this); -var a=this.catalogue.isLoggedIn(); -this.login(this.catalogue,a); -this.catalogue.on("afterLogin",this.login,this); -this.catalogue.on("afterLogout",this.login,this) -},login:function(a,c){var b=c?true:false; -this.username.setVisible(!b); -this.password.setVisible(!b); -this.userInfo.setText(""); -this.userInfo.setVisible(b); -this.loginBt.setVisible(!b); -this.logoutBt.setVisible(b); -if(this.catalogue.adminAppUrl!=""){this.adminBt.setVisible(b) -}this.doLayout() -}}); -Ext.reg("gn_loginform",GeoNetwork.LoginForm);Ext.namespace("GeoNetwork"); -GeoNetwork.Templates=Ext.extend(Ext.XTemplate,{compiled:false,disableFormats:false,catalogue:null,sortOrder:0,abstractMaxSize:50,xmlTplMarkup:['','',"","{site_name}",'',"{site_ogctype}","",'',"{site_url}","",'',"{site_icon}","",'',"","{site_account_use}","{site_account_username}","{site_account_password}","","","","",'',"{options_every}","",'',"{options_onerunonly}","",'',"{options_lang}","",'',"{options_topic}","",'',"{options_createthumbnails}","",'',"{options_uselayer}","",'',"{options_uselayermd}","",'',"{options_datasetcategory}","","","","","","",'','','',"","","",'',"",""],initComponent:function(){GeoNetwork.Templates.superclass.initComponent.call(this) -},getHarvesterTemplate:function(){return new Ext.XTemplate(this.xmlTplMarkup) -}}); -GeoNetwork.Templates.TITLE='

      checked="true" class="selector" onclick="javascript:catalogue.metadataSelect((this.checked?\'add\':\'remove\'), [\'{uuid}\']);"/>{title}

      '; -GeoNetwork.Templates.RATING_TPL='
      checked="true" value="1"/>checked="true" value="2"/>checked="true" value="3"/>checked="true" value="4"/>checked="true" value="5"/>
      '; -GeoNetwork.Templates.SIMPLE=new Ext.XTemplate("
        ",'','
      • ','
        ','',GeoNetwork.Templates.TITLE,"
        ",GeoNetwork.Templates.RATING_TPL,'','{value}{[xindex==xcount?"":", "]}',"","
      • ","
        ","
      "); -GeoNetwork.Templates.THUMBNAIL=new Ext.XTemplate("
        ",'','
      • ','
        ','',GeoNetwork.Templates.TITLE,'','thumbnail',"",'',"",' ',"","","
        ","
      • ","
        ","
      "); -GeoNetwork.Templates.FULL=new Ext.XTemplate("
        ",'','
      • ','','',"",'","
        ",GeoNetwork.Templates.TITLE,"{[values.abstract.substring(0, 250)]} ...
        ",'','{value}{[xindex==xcount?"":", "]}',"
        ",'","
        ',GeoNetwork.Templates.RATING_TPL,'','
        thumbnail
        ',"
        ","",'
        ',"
        ","",'
        {ownername}
        ',"
        ","
        ","
      • ","
        ","
      ");Ext.namespace("GeoNetwork"); -GeoNetwork.MetadataResultsView=Ext.extend(Ext.DataView,{catalogue:undefined,templates:null,overClass:"md-over",itemSelector:"li.md",emptyText:"",autoWidth:true,maps:[],mdSelectionUuids:[],layer_style:OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style["default"]),layer_style_hover:OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style["default"]),layer_style_selected:OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style["default"]),features:[],hover_feature:[],contextMenu:undefined,contextMenuNodeId:undefined,ratingWidget:undefined,editAction:undefined,deleteAction:undefined,zoomToAction:undefined,otherActions:undefined,adminMenuSeparator:undefined,duplicateAction:undefined,createChildAction:undefined,adminAction:undefined,categoryAction:undefined,viewAction:undefined,viewXMLAction:undefined,plugins:[],listeners:{dblclick:{fn:function(c,a,f,g){if(this.maps){var b=this.getStore().getAt(a); -var d=b.get("uuid"); -this.zoomTo(d) -}}},mouseenter:{fn:function(b,m,c,k){if(this.maps){var h=this.getStore().getAt(m); -var a=h.get("uuid"); -for(var f=0; -f0){this.features=[]; -a.destroyFeatures() -}}}},resultsLoaded:function(a,b,c){this.drawMetadataBbox(a,b,c); -this.initRatingWidget(); -this.initSelector() -},drawMetadataBbox:function(b,c,d){Ext.each(c,function(g){var l=g.get("bbox"); -if(l){var o=[]; -for(var h=0; -h0){for(var e=0; -e0){var d=[]; -d=new Array(a); -var f,e; -for(var b=0; -b"]); -var b=this.getSortByCombo(); -a.push("Sort by ",b,"|"); -a.push(this.createTemplateMenu()); -a.push(this.createOtherActionMenu()); -GeoNetwork.MetadataResultsToolbar.superclass.initComponent.call(this); -this.add(a); -this.catalogue.on("selectionchange",this.updateSelectionInfo,this); -this.catalogue.on("afterLogin",this.updatePrivileges,this); -this.catalogue.on("afterLogout",this.updatePrivileges,this) -},getSortByCombo:function(){var a=this; -this.sortByCombo=new Ext.form.ComboBox({mode:"local",id:"sortByToolBar",triggerAction:"all",value:"relevance",store:GeoNetwork.util.SearchFormTools.getSortByStore(),valueField:"id",displayField:"name",listeners:{select:function(c,d,b){if(this.sortByCmp!=undefined){this.sortByCmp.setValue(c.getValue()); -if(c.getValue()=="title"){Ext.getCmp("sortOrder").setValue("reverse") -}else{Ext.getCmp("sortOrder").setValue("") -}}if(this.searchBtCmp!=undefined){this.searchBtCmp.fireEvent("click") -}},scope:a}}); -return this.sortByCombo -},createTemplateMenu:function(){var d=this.metadataResultsView.getTemplates(); -var c=[]; -for(var a in d){var b=new Ext.Button({text:"",enableToggle:true,toggleGroup:"tpl",id:a,iconCls:"mn-view-"+a.toLowerCase(),toggleHandler:function(e,f){if(f){this.applyTemplate(e.getId()) -}this.initRatingWidget() -},scope:this.metadataResultsView,pressed:(a=="FULL"?true:false)}); -c.push(b) -}return[c,"|"] -},createOtherActionMenu:function(){var b=new Ext.menu.Menu(); -var c=new Ext.Action({text:"Export (CSV)",handler:function(){this.catalogue.csvExport() -},scope:this}); -var a=new Ext.Action({text:"Export (ZIP)",iconCls:"md-mn-zip",handler:function(){this.catalogue.mefExport() -},scope:this}); -b.add(a,c,{text:"Print selection",iconCls:"md-mn-pdf",handler:function(){this.catalogue.pdfExport() -},scope:this}); -this.deleteAction=new Ext.menu.Item({text:"Delete",id:"deleteAction",handler:function(){this.catalogue.massiveOp("Delete") -},scope:this,hidden:true}); -this.ownerAction=new Ext.menu.Item({text:"New owner",id:"ownerAction",handler:function(){this.catalogue.massiveOp("NewOwner") -},scope:this,hidden:true}); -this.updateCategoriesAction=new Ext.menu.Item({text:"Update categories",id:"updateCategoriesAction",handler:function(){this.catalogue.massiveOp("Categories") -},scope:this,hidden:true}); -this.updatePrivilegesAction=new Ext.menu.Item({text:"Update privileges",id:"updatePrivilegesAction",handler:function(){this.catalogue.massiveOp("Privileges") -},scope:this,hidden:true}); -b.addItem(this.deleteAction); -b.addItem(this.ownerAction); -b.addItem(this.updateCategoriesAction); -b.addItem(this.updatePrivilegesAction); -this.actionOnSelectionMenu=new Ext.Button({text:"Other actions",menu:b}); -return this.actionOnSelectionMenu -},createSelectionToolBar:function(){var b=new Ext.Action({text:"all in page",handler:function(){this.metadataResultsView.selectAllInPage() -},scope:this}); -var a=new Ext.Action({text:"all",handler:function(){this.catalogue.metadataSelectAll(); -this.metadataResultsView.selectAll() -},scope:this}); -var c=new Ext.Action({text:"none",handler:function(){this.catalogue.metadataSelectNone(); -this.metadataResultsView.selectNone() -},scope:this}); -var d={id:"md-selection-info",xtype:"tbtext",text:"None selected"}; -this.catalogue.on("selectionchange",this.updateSelectionInfo,this); -return[d,"|",{xtype:"tbtext",text:"Select: "},b,{xtype:"tbtext",text:", "},a,{xtype:"tbtext",text:", "},c] -},updateSelectionInfo:function(b,a){if(this.mdSelectionInfoCmp==undefined){this.mdSelectionInfoCmp=Ext.getCmp(this.mdSelectionInfo) -}if(a==0){this.actionOnSelectionMenu.disable() -}else{this.actionOnSelectionMenu.enable() -}this.mdSelectionInfoCmp.setText(a+" selected") -},updatePrivileges:function(b,a){if(a&&a.role=="admin"){this.deleteAction.show(); -this.ownerAction.show(); -this.updateCategoriesAction.show(); -this.updatePrivilegesAction.show() -}else{this.deleteAction.hide(); -this.ownerAction.hide(); -this.updateCategoriesAction.hide(); -this.updatePrivilegesAction.hide() -}},onDestroy:function(){if(this.mdSelectionInfoCmp){}GeoNetwork.MetadataResultsToolbar.superclass.onDestroy.apply(this,arguments) -}}); -Ext.reg("gn_metadataresultstoolbar",GeoNetwork.MetadataResultsToolbar);Ext.namespace("GeoNetwork"); -GeoNetwork.TagCloudView=Ext.extend(Ext.DataView,{catalogue:undefined,multiSelect:true,root:"keywords.keyword",qurey:undefined,searchField:"themekey",onSuccess:null,onFailure:null,overClass:"tag-cloud-hover",itemSelector:"li.tag-cloud",emptyText:"",autoWidth:true,listeners:{selectionchange:{fn:function(b,a){}},dblclick:{fn:function(b,a,c,d){}}},initComponent:function(){GeoNetwork.TagCloudView.superclass.initComponent.call(this); -this.tpl=new Ext.XTemplate(""); -this.store=this.catalogue.summaryStore; -if(this.query!=undefined){this.catalogue.kvpSearch(this.query,null,null,null,true) -}}}); -Ext.reg("gn_tagcloudview",GeoNetwork.TagCloudView);Ext.namespace("GeoNetwork.admin"); -GeoNetwork.admin.HarvesterPanel=Ext.extend(Ext.Panel,{border:false,frame:false,layout:"border",height:800,catalogue:undefined,harvesterStore:undefined,harvesterTplMarkup:["Information: {site_name}
      ","Last run: {info_lastrun}
      ",'',"Total: {info_result_total}
      ","Added: {info_result_added}
      ","Removed: {info_result_removed}
      ","Schema unknwon: {info_result_unknowSchema}
      ","
      "],harvesterTpl:undefined,xmlTpl:undefined,harvesterGrid:undefined,currentHarvester:undefined,initComponent:function(){GeoNetwork.admin.HarvesterPanel.superclass.initComponent.call(this); -panel=this; -this.createGrid(); -this.harvesterTpl=new Ext.XTemplate(this.harvesterTplMarkup); -this.xmlTpl=new GeoNetwork.Templates().getHarvesterTemplate(); -this.harvesterGrid.getSelectionModel().on("rowselect",function(f,e,d){var c=Ext.getCmp("harvesterDetailPanel"); -this.harvesterTpl.overwrite(c.body,d.data) -},this); -var b={id:"harvesterDetailPanel",region:"east",split:true,minWidth:200,width:200,collapsible:true,hideCollapseTool:true,collapseMode:"mini",bodyStyle:{background:"#ffffff",padding:"7px"},html:"Please select a harvester to see additional details."}; -this.add(b); -var a={id:"harvesterEditorPanel",region:"south",title:"Harvester configuration",split:true,autoScroll:true,minHeigth:400,items:[new Ext.FormPanel({border:false,frame:false,maxHeight:600,id:"harvesterEditorForm",items:[this.getHarvesterTypeField(),this.getSiteFields("geonetwork"),this.getOptionsFields("geonetwork")],buttons:[{text:"Save",listeners:{click:function(){var d=Ext.getCmp("harvesterEditorForm").getForm(); -if(d.isValid()){d.updateRecord(this.currentHarvester); -var c=this.xmlTpl.apply(this.currentHarvester.data); -this.addHarvester(this.catalogue.services.harvestingAdd,c) -}},scope:panel}}]})]}; -this.add(a) -},harvesterType:[["geonetwork","GeoNetwork"],["geonetwork20","GeoNetwork 2.0"],["webdav","webdav"],["csw","csw"],["ogcwxs","OGC WxS"],["thredds","thredds"],["z3950","z3950"],["oaipmh","oaipmh"],["metadatafragments","metadatafragments"],["arcsde","arcsde"],["filesystem","filesystem"]],switchMode:function(a){this.switchElement("site_servlet",false); -this.switchElement("site_port",false); -this.switchElement("site_host",false); -this.switchElement("site_url",false); -if(a=="geonetwork"||a=="geonetwork20"){this.switchElement("site_servlet",true); -this.switchElement("site_port",true); -this.switchElement("site_host",true) -}else{this.switchElement("site_url",true) -}if(a=="ogcwxs"){}},switchElement:function(b,a){var g=Ext.getCmp(b); -var c=Ext.getCmp("harvesterEditorForm"); -var d=c.getForm().findField(b); -if(a){d.container.up("div.x-form-item").show(); -g.enable() -}else{d.container.up("div.x-form-item").hide(); -g.disable() -}c.doLayout(false,true) -},getHarvesterTypeField:function(){return new Ext.form.ComboBox({id:"type",name:"type",mode:"local",triggerAction:"all",fieldLabel:"Harvester type",store:new Ext.data.ArrayStore({id:0,fields:["id","name"],data:this.harvesterType}),valueField:"id",displayField:"name",listeners:{change:function(c,b,a){this.switchMode(b) -},scope:this}}) -},ogcwxsType:[["WMS1.0.0","WMS 1.0.0"],["WMS1.1.1","WMS 1.1.1"],["WFS1.0.0","WFS 1.0.0"],["WFS1.1.0","WFS 1.1.0"],["WCS1.0.0","WCS 1.0.0"],["WPS0.4.0","WPS 0.4.0"],["WPS1.0.0","WPS 1.0.0"]],getSiteFields:function(h){var g=[]; -var b=new Ext.form.TextField({id:"id",name:"id",mode:"local",hidden:true}); -var b=new Ext.form.TextField({name:"site_name",mode:"local",fieldLabel:"Name"}); -g.push(b); -var c=new Ext.form.TextField({id:"site_url",name:"site_url",mode:"local",fieldLabel:"URL"}); -var h=new Ext.form.ComboBox({id:"site_ogctype",name:"site_ogctype",mode:"local",fieldLabel:"Type of service",store:new Ext.data.ArrayStore({id:0,fields:["id","name"],data:this.ogcwxsType}),valueField:"id",displayField:"name"}); -g.push(c,h); -var i=new Ext.form.TextField({id:"site_servlet",name:"site_servlet",mode:"local",fieldLabel:"Servlet"}); -var j=new Ext.form.TextField({id:"site_host",name:"site_host",mode:"local",fieldLabel:"Host"}); -var d=new Ext.form.TextField({id:"site_port",name:"site_port",mode:"local",fieldLabel:"Port"}); -g.push(j,d,i); -var e=new Ext.form.Checkbox({id:"site_account_use",name:"site_account_use",mode:"local",fieldLabel:"Use account"}); -var f=new Ext.form.TextField({id:"site_account_username",name:"site_account_username",mode:"local",fieldLabel:"Username"}); -var a=new Ext.form.TextField({id:"site_account_password",name:"site_account_password",mode:"local",fieldLabel:"Password"}); -g.push(e,f,a); -return{xtype:"fieldset",title:"Harvester main information",collapsible:true,items:g} -},getOptionsFields:function(){var b=[]; -var f=new Ext.form.Checkbox({id:"options_createthumbnails",name:"options_createthumbnails",mode:"local",fieldLabel:"Create thumbnail for WMS layers"}); -var e=new Ext.form.Checkbox({id:"options_uselayer",name:"options_uselayer",mode:"local",fieldLabel:"Create metadata for layer elements using GetCapabilities information"}); -var f=new Ext.form.Checkbox({id:"options_uselayermd",name:"options_uselayermd",mode:"local",fieldLabel:"Create metadata for layer elements using MetadataURL attributes (if existing, if not use GetCapabilities)"}); -var d=new Ext.form.TextField({id:"options_lang",name:"options_lang",mode:"local",defaultValue:"eng",fieldLabel:"Language"}); -var c=new Ext.form.TextField({id:"options_topic",name:"options_topic",mode:"local",defaultValue:"",fieldLabel:"Topic category"}); -b.push(f,e,f,d,c); -var a=new Ext.form.Checkbox({id:"options_onerunonly",name:"options_onerunonly",mode:"local",fieldLabel:"One run only"}); -var g=new Ext.form.TextField({id:"options_every",name:"options_every",mode:"local",defaultValue:"90",fieldLabel:"Every"}); -b.push(a,g); -return{xtype:"fieldset",title:"Harvester options",collapsible:true,items:b} -},getPrivilegesFields:function(){return -},getCategoriesFields:function(){return -},createEditor:function(){var a=Ext.data.Record.create([{name:"id",mapping:"node/@id"},{name:"occupation"}]) -},createGrid:function(){var a=new Ext.grid.CheckboxSelectionModel({singleSelect:true,header:"",listeners:{selectionchange:function(){Ext.getCmp("harvestEditBt").setDisabled(this.getSelections().length<1); -Ext.getCmp("harvestRemoveBt").setDisabled(this.getSelections().length<1); -Ext.getCmp("harvestActivateBt").setDisabled(this.getSelections().length<1); -Ext.getCmp("harvestDesactivateBt").setDisabled(this.getSelections().length<1); -Ext.getCmp("harvestRunBt").setDisabled(this.getSelections().length<1) -}}}); -this.harvesterGrid=new Ext.grid.GridPanel({store:this.harvesterStore,split:true,id:"harvesterGrid",region:"center",sm:a,columns:[a,{id:"id",header:"id",width:60,sortable:true,dataIndex:"id",hidden:true},{header:"Name",width:125,sortable:true,dataIndex:"site_name"},{header:"Type",width:75,sortable:true,dataIndex:"type"},{header:"Status",width:80,sortable:true,dataIndex:"site_status"},{header:"Running",width:80,sortable:true,dataIndex:"info_running"},{header:"Every",width:80,sortable:true,dataIndex:"options_every"},{header:"Last run",width:160,sortable:true,dataIndex:"info_lastrun"}],stripeRows:true,maxHeight:250,height:250,stateful:true,stateId:"grid",listeners:{rowclick:function(b,g,f){var c=this.harvesterGrid.getStore().getAt(g); -this.currentHarvester=c; -console.log(c); -var d=Ext.getCmp("harvesterEditorForm").getForm(); -d.loadRecord(c) -},scope:this},buttons:[{text:"Add",listeners:{click:function(){}}},{text:"Activate",id:"harvestActivateBt",disabled:true,listeners:{click:function(){var b=Ext.getCmp("harvesterGrid").getSelectionModel().getSelected(); -var c={id:b.data.id}; -this.doAction(this.catalogue.services.harvestingStart,c,this.refreshHarvester,null,null,"Failed to activate the harvester") -},scope:this}},{text:"Desactivate",id:"harvestDesactivateBt",disabled:true,listeners:{click:function(){var b=Ext.getCmp("harvesterGrid").getSelectionModel().getSelected(); -var c={id:b.data.id}; -this.doAction(this.catalogue.services.harvestingStop,c,this.refreshHarvester,null,null,"Failed to desactivate the harvester") -},scope:this}},{id:"harvestEditBt",text:"Edit",disabled:true,listeners:{click:function(){},scope:this}},{text:"Run",id:"harvestRunBt",disabled:true,listeners:{click:function(){var b=Ext.getCmp("harvesterGrid").getSelectionModel().getSelected(); -var c={id:b.data.id}; -this.doAction(this.catalogue.services.harvestingRun,c,this.refreshHarvester,null,null,"Failed to start the harvester") -},scope:this}},{id:"harvestRemoveBt",text:"Remove",icon:"../images/default/cross.png",disabled:true,listeners:{click:function(){var b=Ext.getCmp("harvesterGrid").getSelectionModel().getSelected(); -Ext.Msg.confirm("Delete ?","Are you sure to delete selected harvester and all its records?",this.removeHarvester,b.data.id) -},scope:this}},{text:"Refresh",id:"harvestRefreshBt",listeners:{click:function(){this.harvesterGrid.getStore().reload() -},scope:this}}]}); -this.add(this.harvesterGrid) -},addHarvester:function(b,a){var c={url:b,data:a}; -OpenLayers.Util.applyDefaults(c,{success:function(d){Ext.Msg.alert("ok",d.responseText) -},failure:function(d){Ext.Msg.alert("Failed",d.responseText) -}}); -OpenLayers.Request.POST(c) -},doAction:function(a,e,d,b,f,c){OpenLayers.Request.GET({url:a,params:e,success:function(g){if(f!=null){Ext.Msg.alert(f,g.responseText) -}if(d){d(g) -}},failure:function(g){if(c!=null){Ext.Msg.alert(c,g.responseText) -}if(d){d(g) -}}}) -},removeHarvester:function(a){if(a=="yes"){var b={id:this}; -this.doAction(this.catalogue.services.harvestingRemove,b,this.refreshHarvester,null,null,"Failed to delete the harvester") -}},refreshHarvester:function(){Ext.getCmp("harvestRefreshBt").fireEvent("click") -}}); -Ext.reg("gn_admin_harvesterpanel",GeoNetwork.admin.HarvesterPanel);Ext.namespace("GeoNetwork"); -GeoNetwork.OGCServiceQuickRegister=Ext.extend(Ext.menu.Menu,{catalogue:undefined,harvesterStore:undefined,textInfo:"Enter a GetCapabilities URL to register a new service.",textExample:"eg. http://services.sandre.eaufrance.fr/geo/ouvrage?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities",textValidButton:"Check & Add",urlFieldWidth:250,urlField:undefined,initComponent:function(){var b=this; -var a=[]; -a.push({text:this.textInfo,canActivate:false}); -this.urlField={xtype:"textfield",width:this.urlFieldWidth,margins:"0 0 0 30",id:"OGCServiceQuickRegisterUrl",value:"",iconCls:"no-icon"}; -a.push(this.urlField); -a.push({text:this.textExample,canActivate:false}); -a.push({xtype:"buttongroup",autoWidth:true,border:false,frame:false,columns:2,iconCls:"no-icon",defaults:{xtype:"button",iconAlign:"right"},items:[{text:this.textValidButton,iconCls:"md-mn md-mn-badd",handler:this.getCapabilities}]}); -Ext.apply(this,{defaultType:"menuitem",items:a}); -GeoNetwork.OGCServiceQuickRegister.superclass.initComponent.call(this) -},getCapabilities:function(){var a=Ext.getCmp("OGCServiceQuickRegisterUrl").getValue(); -var b=this.ownerCt.ownerCt; -OpenLayers.Request.GET({url:a,success:function(c){if(c.responseText.indexOf("Some unexpected")!=-1){Ext.Msg.alert("Failed to check service url.",c.responseText); -return -}var d=c.responseXML; -if(d==null){Ext.Msg.alert("GetCapabilities failed","Null response returned - check proxy or service configuration."); -return -}var f=new OpenLayers.Format.WMSCapabilities(); -var e=f.read(d); -b.addHarvester(e.service.title,a,e.version) -},failure:function(c){Ext.Msg.alert("Failed to check service url.",c.responseText) -}}) -},addHarvester:function(f,d,a){var e=new Ext.data.Record({id:"",type:"ogcwxs",site_name:f,site_url:d.replace(/&/g,"&"),site_ogctype:"WMS"+a,site_icon:"default.gif",site_account_use:"false",options_every:"90",options_topic:"",options_onerunonly:"true",options_lang:"en",options_createthumbnails:"true",options_uselayer:"true",options_uselayermd:"false"}); -var b=new GeoNetwork.Templates().getHarvesterTemplate(); -var c=b.apply(e.data); -this.saveHarvester(c) -},saveHarvester:function(a){var c=this; -var b={url:this.catalogue.services.harvestingAdd,data:a}; -OpenLayers.Util.applyDefaults(b,{success:function(d){var e=d.responseXML; -var f=e.firstChild.getAttribute("id"); -c.runHarvester(this.catalogue.services.harvestingRun,f) -},failure:function(d){Ext.Msg.alert("Failed",d.responseText) -}}); -OpenLayers.Request.POST(b) -},runHarvester:function(a,c){var b=this; -OpenLayers.Request.GET({url:a+"?id="+c,success:function(d){if(d.responseText.indexOf("nexpected")!=-1){Ext.Msg.alert("Activation or start failed.",d.responseText); -return -}Ext.Msg.alert("Successfull registration","Wait a few minutes before having all layers and services registered in the catalogue."); -if(b.harvesterStore){b.harvesterStore.reload() -}},failure:function(d){Ext.Msg.alert("Registration failed",d.responseText) -}}) -}}); -Ext.reg("gn_ogcservicequickregister",GeoNetwork.OGCServiceQuickRegister);var translations={}; -function translate(a){return translations[a]||a -}function checkAllInputsIn(d,b){var c=Ext.getDom(d).getElementsByTagName("input"); -for(var a=0; -a1){continue -}var A; -A=Ext.id(H); -var z=n(); -k[t]=z; -if(l){var I=[],E; -if(g=="bbox"){E=new OpenLayers.Control.DrawFeature(f,OpenLayers.Handler.RegularPolygon,{handlerOptions:{irregular:true,sides:4},featureAdded:function(M){var O=M.geometry.getBounds(); -var N=O.clone().transform(x,v); -var L=this.watchedBbox.split(","); -Ext.get("_"+L[0]).dom.value=O.left; -Ext.get("_"+L[1]).dom.value=O.bottom; -Ext.get("_"+L[2]).dom.value=O.right; -Ext.get("_"+L[3]).dom.value=O.top; -h(this.watchedBbox,this.eltRef) -}.bind({watchedBbox:r,eltRef:t})}); -I.push(new GeoExt.Action({map:z,control:E,text:"draw rectangle",pressed:false,allowDepress:true,toggleGroup:"tool",iconCls:"drawRectangle"})) -}if(g=="polygon"){E=new OpenLayers.Control.DrawFeature(f,OpenLayers.Handler.Polygon,{featureAdded:function(L){document.getElementById("_X"+this).value=u(L,p) -}.bind(s)}); -I.push(new GeoExt.Action({map:z,control:E,text:"Draw polygon",pressed:false,allowDepress:true,toggleGroup:"tool",iconCls:"drawPolygon"})); -E=new OpenLayers.Control.DrawFeature(f,OpenLayers.Handler.RegularPolygon,{handlerOptions:{irregular:true,sides:60},featureAdded:function(L){document.getElementById("_X"+this).value=u(L,p) -}.bind(s)}); -I.push(new GeoExt.Action({map:z,control:E,text:"Draw circle",pressed:false,allowDepress:true,toggleGroup:"tool",iconCls:"drawCircle"})) -}I.push({text:"Clear",iconCls:"clearPolygon",handler:function(){this.vectorLayer.destroyFeatures(); -var M=document.getElementById("_X"+this.targetPolygon); -if(M!=null){M.value="" -}if(this.targetBbox!=""){var L=this.targetBbox.split(","); -Ext.get(L[0]).dom.value=""; -Ext.get(L[1]).dom.value=""; -Ext.get(L[2]).dom.value=""; -Ext.get(L[3]).dom.value=""; -Ext.get("_"+L[0]).dom.value=""; -Ext.get("_"+L[1]).dom.value=""; -Ext.get("_"+L[2]).dom.value=""; -Ext.get("_"+L[3]).dom.value=""; -$(L[0]).onkeyup(); -$(L[1]).onkeyup(); -$(L[2]).onkeyup(); -$(L[3]).onkeyup() -}},scope:{vectorLayer:f,targetPolygon:s,targetBbox:r,eltRef:t}}) -}var D=new GeoExt.MapPanel({renderTo:A,height:300,width:400,map:z,tbar:(l?I:null)}); -if(C.length>0){j(C[0].innerHTML,{format:"WKT",zoomToFeatures:true,from:v,to:x}) -}if(r!=""){h(r,t); -q(f,r,t,z) -}}}} -}; -GeoNetwork.map.ExtentMap.prev_geometry=OpenLayers.Format.GML.Base.prototype.writers.feature._geometry; -OpenLayers.Format.GML.Base.prototype.writers.feature._geometry=function(c){if(c.CLASS_NAME=="GeoNetwork.map.ExtentMap.MultiPolygonReference"){var b=this.createElementNS(this.namespaces.gml,"gml:MultiPolygon"); -var a=this.createElementNS(this.namespaces.gml,"gml:MultiPolygon"); -a.setAttribute("gml:id",c.id); -b.appendChild(a); -return b -}else{return GeoNetwork.map.ExtentMap.prev_geometry.apply(this,arguments) -}};Ext.namespace("GeoNetwork","GeoNetwork.OGCUtil"); -GeoNetwork.OGCUtil.ensureProperUrlEnd=function(a){if(a.indexOf("?")==-1){a+="?" -}else{var b=a.substring(a.length-1); -if(b!="&"&&b!="?"){a+="&" -}}return a -}; -GeoNetwork.OGCUtil.reprojectMap=function(b,c,f){if(b.projection!=c.projCode){b.baseLayer.options.scales=b.scales; -var k=b.getProjectionObject(); -b.projection=c.projCode; -if(c.getUnits()===null){b.units="degrees" -}else{b.units=c.getUnits() -}var e=null; -if(b.getControlsByClass("GeoNetwork.Control.CursorPos").length>0){e=b.getControlsByClass("GeoNetwork.Control.CursorPos")[0] -}if(b.units=="m"&&e!==null){e.numdigits=0 -}else{if(b.units=="degrees"&&e!==null){e.numdigits=4 -}}b.maxExtent=b.maxExtent.transform(k,c); -b.baseLayer.extent=b.maxExtent; -var a=b.getExtent().transform(k,c); -for(var g=0; -g-1)?"&":"?"; -i+=l+m; -var j=Ext.Ajax.request({url:i,method:"GET",success:b,failure:c,timeout:10000}) -}} -}; -GeoNetwork.CatalogueInterface=new GeoNetwork.CatalogueInterface();Ext.namespace("GeoNetwork","GeoNetwork.WMC"); -GeoNetwork.WMC=function(){return{loadWmc:function(f,a){try{var e=f.layers; -for(var b=e.length-1; -b>0; -b--){if(!e[b].isBaseLayer){f.removeLayer(e[b]) -}}Ext.getCmp("toctree").getSelectionModel().clearSelections(); -var d=new OpenLayers.Format.WMC({layerOptions:{buffer:0}}); -f=d.read(a,{map:f}) -}catch(c){Ext.MessageBox.alert(OpenLayers.i18n("selectWMCFile.errorLoadingWMC")) -}},mergeWmc:function(d,a){try{var c=new OpenLayers.Format.WMC({layerOptions:{buffer:0}}); -d=c.read(a,{map:d}) -}catch(b){Ext.MessageBox.alert(OpenLayers.i18n("selectWMCFile.errorLoadingWMC")) -}},saveContext:function(b){var a=new OpenLayers.Format.WMC(); -OpenLayers.Request.POST({url:"../../wmc/create.wmc",data:a.write(b),success:this.onSaveContextSuccess,failure:this.onSaveContextFailure}) -},onSaveContextSuccess:function(a){var b=a.responseText; -var c=Ext.decode(b); -if(c.success){window.location=c.url -}else{this.onSaveContextFailure() -}},onSaveContextFailure:function(a,b){Ext.MessageBox.show({icon:Ext.MessageBox.ERROR,title:OpenLayers.i18n("saveWMCFile.windowTitle"),msg:OpenLayers.i18n("saveWMCFile.errorSaveWMC"),buttons:Ext.MessageBox.OK}) -}} -}; -GeoNetwork.WMCManager=new GeoNetwork.WMC();if(!window.GeoNetwork){window.GeoNetwork={} -}if(!GeoNetwork.Control){GeoNetwork.Control={} -}GeoNetwork.Control.ExtentBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,minxelement:null,minyelement:null,maxxelement:null,maxyelement:null,EVENT_TYPES:["finishBox"],initialize:function(a){this.EVENT_TYPES=GeoNetwork.Control.ExtentBox.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES); -OpenLayers.Control.prototype.initialize.apply(this,arguments); -this.handler=new OpenLayers.Handler.RegularPolygon(this,{create:this.startBox,done:this.endBox},{irregular:true}) -},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments) -},startBox:function(){this.getOrCreateLayer(); -this.vectorLayer.destroyFeatures() -},endBox:function(){var d=this.handler.feature.geometry.getBounds(); -var f=new OpenLayers.Feature.Vector(d.toGeometry(),null,this.vectorLayerStyle); -this.vectorLayer.addFeatures([f]); -this.vectorLayer.refresh(); -var e=this.map.getProjectionObject(); -var b=new OpenLayers.Projection("WGS84"); -var c=new OpenLayers.LonLat(d.left,d.bottom).transform(e,b); -var a=new OpenLayers.LonLat(d.right,d.top).transform(e,b); -if(this.minxelement){this.minxelement.dom.value=c.lon.toFixed(4) -}if(this.maxxelement){this.maxxelement.dom.value=a.lon.toFixed(4) -}if(this.minyelement){this.minyelement.dom.value=c.lat.toFixed(4) -}if(this.maxyelement){this.maxyelement.dom.value=a.lat.toFixed(4) -}this.events.triggerEvent("finishBox",null) -},updateMap:function(){if((!this.minxelement)||(!this.maxxelement)||(!this.minxelement)||(!this.maxxelement)){return -}this.getOrCreateLayer(); -var i=this.map.getProjectionObject(); -var c=new OpenLayers.Projection("WGS84"); -var h=new OpenLayers.LonLat(this.map.getExtent().left,this.map.getExtent().bottom).transform(i,c); -var e=new OpenLayers.LonLat(this.map.getExtent().right,this.map.getExtent().top).transform(i,c); -var d=parseFloat(this.minxelement.dom.value); -if(isNaN(d)){this.minxelement.dom.value=h.lon -}d=parseFloat(this.maxxelement.dom.value); -if(isNaN(d)){this.maxxelement.dom.value=e.lon -}d=parseFloat(this.minyelement.dom.value); -if(isNaN(d)){this.minyelement.dom.value=h.lat -}d=parseFloat(this.maxyelement.dom.value); -if(isNaN(d)){this.maxyelement.dom.value=e.lat -}this.minxelement.dom.value=parseFloat(this.minxelement.dom.value).toFixed(4); -this.maxxelement.dom.value=parseFloat(this.maxxelement.dom.value).toFixed(4); -this.minyelement.dom.value=parseFloat(this.minyelement.dom.value).toFixed(4); -this.maxyelement.dom.value=parseFloat(this.maxyelement.dom.value).toFixed(4); -this.vectorLayer.destroyFeatures(); -var a=new OpenLayers.LonLat(this.minxelement.dom.value,this.minyelement.dom.value).transform(c,i); -var f=new OpenLayers.LonLat(this.maxxelement.dom.value,this.maxyelement.dom.value).transform(c,i); -var b=new OpenLayers.Bounds(); -b.extend(a); -b.extend(f); -var g=new OpenLayers.Feature.Vector(b.toGeometry(),null,this.vectorLayerStyle); -this.vectorLayer.addFeatures([g]); -this.vectorLayer.refresh() -},getOrCreateLayer:function(){if(!this.vectorLayer){this.vectorLayer=this.vectorLayer||new OpenLayers.Layer.Vector("ExtentBox",{style:this.vectorLayerStyle}); -this.map.addLayer(this.vectorLayer) -}return this.vectorLayer -},clear:function(){if(this.vectorLayer){this.vectorLayer.destroyFeatures() -}},zoomTo:function(){var e=this.map.getProjectionObject(); -var b=new OpenLayers.Projection("WGS84"); -var d=new OpenLayers.LonLat(this.minxelement.dom.value,this.minyelement.dom.value).transform(b,e); -var a=new OpenLayers.LonLat(this.maxxelement.dom.value,this.maxyelement.dom.value).transform(b,e); -var c=new OpenLayers.Bounds(); -c.extend(d); -c.extend(a); -this.map.zoomToExtent(c) -},CLASS_NAME:"GeoNetwork.Control.ExtentBox"});if(!window.GeoNetwork){window.GeoNetwork={} -}if(!GeoNetwork.Control){GeoNetwork.Control={} -}GeoNetwork.Control.ZoomWheel=OpenLayers.Class(OpenLayers.Control,{wheelChange:OpenLayers.Control.Navigation.prototype.wheelChange,draw:function(){this.handler=new OpenLayers.Handler.MouseWheel(this,{up:OpenLayers.Control.Navigation.prototype.wheelUp,down:OpenLayers.Control.Navigation.prototype.wheelDown}); -this.activate() -},CLASS_NAME:"GeoNetwork.Control.ZoomWheel"});if(!window.GeoNetwork){window.GeoNetwork={} -}if(!GeoNetwork.Control){GeoNetwork.Control={} -}GeoNetwork.Control.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{showMarker:true,markerIcon:OpenLayers.Marker.defaultIcon(),EVENT_TYPES:["featureinfostart","featureinfoend"],callbacks:null,markerLayer:null,location:null,feature:null,counter:null,format:new OpenLayers.Format.WMSGetFeatureInfo(),initialize:function(a){this.EVENT_TYPES=GeoNetwork.Control.WMSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES); -OpenLayers.Control.prototype.initialize.apply(this,[a]); -this.handler=new OpenLayers.Handler.Click(this,OpenLayers.Util.extend({click:this.click},this.callbacks)) -},destroy:function(){if(this.markerLayer){this.markerLayer.destroy(); -this.markerLayer=null; -if(this.feature){this.feature.destroy() -}}OpenLayers.Control.prototype.destroy.apply(this,arguments) -},performRequest:function(b,c,a){var d={REQUEST:"GetFeatureInfo",EXCEPTIONS:"application/vnd.ogc.se_xml",BBOX:this.map.getExtent().toBBOX(),X:a.xy.x,Y:a.xy.y,INFO_FORMAT:"application/vnd.ogc.gml",QUERY_LAYERS:c,LAYERS:c,WIDTH:this.map.size.w,HEIGHT:this.map.size.h,VERSION:"1.1.1",SERVICE:"WMS",SRS:this.map.getProjection()}; -b=GeoNetwork.OGCUtil.ensureProperUrlEnd(b)+OpenLayers.Util.getParameterString(d); -OpenLayers.Request.GET({url:b,success:this.returnResponse,scope:this}) -},click:function(b){this.events.triggerEvent("featureinfostart"); -var e; -this.counter=0; -this.start(); -this.location=this.map.getLonLatFromPixel(b.xy); -for(var d=0,a=this.map.layers.length; -d0){this.processOnlineResource(c,a[0]) -}},processCapability:function(a,c){var b={layers:[]}; -this.runChildNodes(b,c); -a.capability=b -},processService:function(b,c){var a={}; -this.runChildNodes(a,c); -b.service=a -},processLayer:function(b,e,f){var h={styles:[],dimensions:{}}; -h.queryable=(e.getAttribute("queryable")=="1"); -if(f){if(!f.childLayers){f.childLayers=[] -}f.childLayers.push(h); -h.styles=h.styles.concat(f.styles) -}var c=e.childNodes; -var a,j,d; -for(var g=0; -g0){this.processOnlineResource(b,a[0]) -}c.legend=b -},processMetadataURL:function(b,c){var d={}; -var a=c.getElementsByTagName("OnlineResource"); -if(a.length>0){this.processOnlineResource(d,a[0]) -}b.metadataURL=d.href -},calculateScale:function(a){return Math.round((OpenLayers.DOTS_PER_INCH*39.3701*a)/Math.sqrt(2)) -},processScaleHint:function(a,b){a.minScale=this.calculateScale(b.getAttribute("max")); -if(a.minScale===0){a.minScale=null -}a.maxScale=this.calculateScale(b.getAttribute("min")) -},processOnlineResource:function(b,a){b.href=this.getAttributeNS(a,"http://www.w3.org/1999/xlink","href") -},processAccessConstraints:function(b,a){b.accessContraints=a.textContent -},processBoundingBox:function(h,f){if(h.llbbox){return -}var g=((f.getAttribute("minx"))&&(f.getAttribute("miny"))&&(f.getAttribute("maxx"))&&(f.getAttribute("maxy"))); -if(g){var d=f.getAttribute("SRS"); -var e=new OpenLayers.Projection(d); -var c=new OpenLayers.Projection("WGS84"); -var a=new OpenLayers.LonLat(parseFloat(f.getAttribute("minx")),parseFloat(f.getAttribute("miny"))).transform(e,c); -var b=new OpenLayers.LonLat(parseFloat(f.getAttribute("maxx")),parseFloat(f.getAttribute("maxy"))).transform(e,c); -h.llbbox=[parseFloat(a.lon),parseFloat(a.lat),parseFloat(b.lon),parseFloat(b.lat)] -}},CLASS_NAME:"GeoNetwork.Format.WMSCapabilities_1_1_1"});Ext.namespace("GeoNetwork","GeoNetwork.lang"); -GeoNetwork.lang.en={featureInfoTooltipTitle:"Feature info",featureInfoTooltipText:"Click in the map to get feature info from all visible layers.",zoomToMaxExtentTooltipTitle:"Full extent",zoomToMaxExtentTooltipText:"Use this button to go to the full extent of the map.",zoominTooltipTitle:"Zoom in",zoominTooltipText:"Draw a box in the map to zoom in. You can also click in the map and map will zoom in by a factor of 2.",zoomoutTooltipTitle:"Zoom out",zoomoutTooltipText:"Click in the map or draw a box to zoom out.",dragTooltipTitle:"Pan map",dragTooltipText:"Press the left mouse button to drag the map.",previousTooltipTitle:"Previous map extent",previosTooltipText:"Click this button to go back to the previous map extent",nextTooltipTitle:"Next map extent",nextTooltipText:"Click this button to go to the next map extent",featureInfoTitle:"Feature info",layerManagerTabTitle:"Layer management",legendTabTitle:"Legend",scaleTitle:"Scale",xTitle:"X",yTitle:"Y",projectionTitle:"Projection",FeatureInfoNotQueryable:"There is no queryable map layer",WMSBrowserTab1:"Select",WMSBrowserTab3:"External",WMSBrowserPreviewTitle:"Preview layer",WMSBrowserAddButton:"Add",WMSBrowserDuplicateMsg:"Layer is already in the map",WMSBrowserPreviewWaitMsg:"Retrieving preview image",WMSBrowserConnectButton:"Connect",WMSBrowserConnectError:"There was an error connecting to the Web Map Service, please check the URL.",infoTitle:"Information","mf.print.mapTitle":"Title","mf.print.comment":"Comment","mf.print.dpi":"Resolution","mf.print.scale":"Scale","mf.print.rotation":"Angle","mf.print.resetPos":"Reset","mf.print.print":"Print","mf.print.generatingPDF":"Generating PDF","mf.print.unableToPrint":"It was not possible to print, try later","mf.error":"Error",selectExtentTooltipTitle:"Select extent",selectExtentTooltipText:"Select extent for catalog searches",printTooltipTitle:"Print",printTooltipText:"Print the current map",savewmcTooltipTitle:"Save web map context",savewmcTooltipText:"Saves web map context for current map","saveWMCFile.windowTitle":"Save Web Map Context","saveWMCFile.errorSaveWMC":"Could not save Web Map Context",loadwmcTooltipTitle:"Load web map context",loadwmcTooltipText:"Loads web map context in current map","selectWMCFile.windowTitle":"Load Web Map Context",selectWMCFile:"Select Web Map Context file","selectWMCFile.waitLoadingWMC":"Loading Web Map Context","selectWMCFile.loadButtonText":"Load","selectWMCFile.mergeButtonText":"Merge","selectWMCFile.errorLoadingWMC":"Could not load Web Map Context",opacityButtonText:"Opacity",opacityWindowTitle:"Opacity",metadataButtonText:"Metadata",removeButtonText:"Remove",addWMSButtonText:"Add WMS",addWMSWindowTitle:"Add layer from a WMS service","layerInfoPanel.windowTitle":"Layer metadata","layerInfoPanel.titleField":"Title","layerInfoPanel.descriptionField":"Description","layerInfoPanel.queryableField":"Queryable",layerList:"Layer list",baseLayerList:"Base layers","metadataResults.buttonText":"Metadata results","metadataResults.tooltipTitle":"Metadata results","metadataResults.tooltipText":"Go to metadata results page","metadataResults.alertTitle":"Metadata results","metadataResults.alertText":"No metadata results to show","featureInfoWindow.windowTitle":"Feature info","mf.information":"Print","mf.print.pdfReady":"PDF ready","loadLayer.loadingMessage":"Loading layer","loadLayer.error.title":"Load layer","loadLayer.error.message":"The layer could not be loaded","disclaimer.windowTitle":"Disclaimer","disclaimer.loading":"Loading...","disclaimer.buttonClose":"Close",gazetteerAddressField1Label:"Postcode",gazetteerAddressField2Label:"Street",gazetteerAddressField3Label:"Place",gazetteerAddressField4Label:"'Gemeente'",gazetteerAddressField5Label:"House number",searchOptionButton:"Search",GazetteerWindowTitle:"Search for address",searchResults:"Search results",errorTitle:"Error",SearchOptionLoadFailureMsg:"No results available. \n The service may be unavailable. \n",gazetteerTooltipTitle:"Search based on an address",gazetteerTooltipText:"Search for a location, based on postcode, street name, 'gemeente' or place.",SearchOptionNoResults:"No results found",zoomlayerTooltipTitle:"Zoom to layer",zoomlayerTooltipText:"Use this button to go to the full extent of the selected layer.","zoomlayer.selectLayerTitle":"Zoom to layer","zoomlayer.selectLayerText":"No layer selected",layerStylesWindowTitle:"Layer styles",layerStylesPreviewTitle:"Preview legend",selectStyleButton:"Select style",WMSTimeWindowTitle:"WMS Time",WMSTimePositionTitle:"Pick a time position",WMSTimeMovieTitle:"Play animation",wmsTimeUpdateButtonText:"Apply",WMSTimeAnimationCheckbox:"Play a movie loop spanning the last ${steps} time positions"}; -OpenLayers.Util.extend(OpenLayers.Lang.en,GeoNetwork.lang.en);Ext.namespace("GeoNetwork","GeoNetwork.tree"); -GeoNetwork.tree.WMSListGenerator=function(a){Ext.apply(this,a); -if(this.node&&this.wmsStore){this.createWMSList() -}}; -GeoNetwork.tree.WMSListGenerator.prototype={node:null,wmsStore:null,click:null,scope:null,createWMSList:function(){this.wmsStore.each(this.appendRecord,this) -},appendRecord:function(a){var b=new Ext.tree.TreeNode({url:a.get("url"),text:a.get("title"),cls:"folder",leaf:false}); -b.appendChild(new Ext.tree.TreeNode({text:"",dummy:true})); -b.addListener("beforeexpand",this.addNodesFromWMS,this); -this.node.appendChild(b) -},replaceNode:function(a){this.currentNode.parentNode.replaceChild(a,this.currentNode); -a.ui.afterLoad(); -a.expand() -},addNodesFromWMS:function(b){if(b.firstChild&&b.firstChild.attributes.dummy){b.removeChild(b.firstChild); -b.ui.beforeLoad(); -this.scope.currentNode=b; -var a=new GeoNetwork.tree.WMSTreeGenerator({click:this.click,callback:this.replaceNode,scope:this.scope}); -a.loadWMS(b.attributes.url) -}}};Ext.namespace("GeoNetwork","GeoNetwork.tree"); -GeoNetwork.tree.WMSTreeGenerator=function(a){Ext.apply(this,a) -}; -GeoNetwork.tree.WMSTreeGenerator.prototype={layerParams:{format:"image/png",transparent:"TRUE"},layerOptions:{ratio:1,singleTile:true,isBaseLayer:false},click:null,callback:null,scope:null,loadWMS:function(a){var e={service:"WMS",request:"GetCapabilities",version:"1.1.1"}; -var d=OpenLayers.Util.getParameterString(e); -var c=(a.indexOf("?")>-1)?"&":"?"; -a+=c+d; -var b=OpenLayers.Request.GET({url:a,failure:this.processFailure,success:this.processSuccess,disableCaching:false,scope:this}) -},processSuccess:function(b){if(!this.parser){this.parser=new GeoNetwork.Format.WMSCapabilities() -}var f=this.parser.read(b.responseXML||b.responseText); -var e; -if(f.capability){for(var d=0,a=f.capability.layers.length; -d0){var d=c.styles[0]; -if(d.legend&&d.legend.href){f.legendURL=d.legend.href -}}}var e=new Ext.tree.TreeNode({wmsLayer:f,text:c.title}); -e.addListener("click",this.click,this.scope); -if(a){a.appendChild(e) -}return e -},processLayer:function(b,a,c){Ext.each(b.childLayers,function(e){var d=this.addLayer(e,a,c); -if(e.childLayers){this.processLayer(e,a,d) -}},this) -}};Ext.namespace("GeoNetwork","GeoNetwork.wms"); -GeoNetwork.wms.BrowserPanel=function(a){Ext.apply(this,a); -GeoNetwork.wms.BrowserPanel.superclass.constructor.call(this) -}; -GeoNetwork.wms.BrowserPanel.ADDWMS=0; -GeoNetwork.wms.BrowserPanel.WMSLIST=1; -Ext.extend(GeoNetwork.wms.BrowserPanel,Ext.Panel,{previewPanel:null,treePanel:null,map:null,previewCenterPoint:null,mode:GeoNetwork.wms.BrowserPanel.WMSLIST,wmsStore:null,urlField:null,searchResultsGrid:null,searchField:null,parseBt:null,typeRadio:null,defaultConfig:{border:false,frame:false,layout:"border"},initComponent:function(d){Ext.apply(this,d); -Ext.applyIf(this,this.defaultConfig); -GeoNetwork.wms.BrowserPanel.superclass.initComponent.call(this); -this.previewPanel=new GeoNetwork.wms.PreviewPanel({map:this.map,previewCenterPoint:this.previewCenterPoint}); -var c; -this.treePanel=new Ext.tree.TreePanel({rootVisible:false,autoScroll:true,autoHeight:true}); -c=new Ext.tree.TreeNode({text:"",draggable:false,cls:"folder"}); -this.treePanel.setRootNode(c); -var b=[]; -if(this.mode==GeoNetwork.wms.BrowserPanel.ADDWMS){this.createForm(); -b.push(this.form) -}b.push(this.treePanel); -var a={autoScroll:true,region:"center",items:b,split:true,width:300,minWidth:300,border:false}; -var e={region:"east",border:false,items:[this.previewPanel],split:true,plain:true,cls:"popup-variant1",width:250,maxSize:250,minSize:250}; -this.add(a); -this.add(e); -if(this.mode==GeoNetwork.wms.BrowserPanel.WMSLIST){this.treeGen=new GeoNetwork.tree.WMSListGenerator({click:this.nodeClick,scope:this,node:this.treePanel.getRootNode(),wmsStore:this.wmsStore}) -}else{if(this.mode==GeoNetwork.wms.BrowserPanel.ADDWMS){new GeoNetwork.tree.WMSListGenerator({click:this.nodeClick,scope:this,node:this.treePanel.getRootNode(),wmsStore:this.wmsStore}); -this.treeGen=new GeoNetwork.tree.WMSTreeGenerator({click:this.nodeClick,callback:this.showTree,scope:this}) -}}this.addButton({text:OpenLayers.i18n("WMSBrowserAddButton"),iconCls:"addLayerIcon",width:150},this.addLayerToMap,this); -this.doLayout() -},createForm:function(){this.form=new Ext.form.FormPanel({labelWidth:15,id:"serviceSearchForm"}); -this.typeRadio=new Ext.form.RadioGroup({items:[{name:"addWmsType",fieldLabel:"Search WMS",labelSeparator:"",inputValue:0,checked:true},{name:"addWmsType",labelSeparator:"",fieldLabel:" or add by URL",inputValue:1}],listeners:{change:function(e,g){var f=(g.getGroupValue()=="0"); -this.urlField.setVisible(!f); -this.searchField.setVisible(f); -this.searchResultsGrid.setVisible(f) -},scope:this}}); -this.form.add(this.typeRadio); -this.urlField=new Ext.form.TextField({name:"wmsurl",hideLabel:true,hidden:true,emptyText:"WMS server URL ...",width:250,autoHeight:true}); -this.form.add(this.urlField); -var d=GeoNetwork.data.MetadataResultsStore(); -var a=GeoNetwork.data.MetadataSummaryStore(); -this.searchField=new GeoNetwork.form.SearchField({name:"E_any",hideLabel:true,width:250,minWidth:250,store:d,triggerAction:function(e){e.search("serviceSearchForm",null,null,1,true,d,a) -},scope:catalogue}); -var c=new Ext.grid.CheckboxSelectionModel({singleSelect:this.singleSelect,header:"",}); -this.searchResultsGrid=new Ext.grid.GridPanel({layout:"fit",height:80,border:false,store:d,columns:[c,{id:"title",header:"Title",dataIndex:"title"}],sm:c,autoExpandColumn:"title",listeners:{rowclick:function(f,i,h){var g=f.getStore().getAt(i).data; -this.setValue(g.links[0].href) -},scope:this.urlField}}); -var b=new Ext.form.TextField({inputType:"hidden",name:"E_serviceType",value:"OGC:WMS"}); -this.form.add(this.searchField,b,this.searchResultsGrid); -this.parseBt=new Ext.Button({id:"parse",text:OpenLayers.i18n("WMSBrowserConnectButton"),iconCls:"connectIcon",width:150}); -this.form.addButton(this.parseBt,this.getWMSCaps,this) -},showTree:function(c,b){if(!c){Ext.MessageBox.alert(OpenLayers.i18n("errorTitle"),OpenLayers.i18n("WMSBrowserConnectError")); -this.body.dom.style.cursor="default" -}var d=b.service.accessContraints; -if((d)&&(d.toLowerCase()!="none")&&(d!="-")){var e=new GeoNetwork.DisclaimerWindow({disclaimer:d}); -e.show(); -e=null -}var a=this.treePanel.getRootNode(); -if(c){this.treePanel.getRootNode().appendChild(c) -}this.treePanel.show(); -this.body.dom.style.cursor="default" -},getWMSCaps:function(b){var a=this.urlField.getValue(); -a=a.replace(/^\s+|\s+$/g,""); -if(a!=""){this.body.dom.style.cursor="wait"; -this.treeGen.loadWMS(a) -}},setURL:function(a){var a=this.urlField.setValue(a); -this.typeRadio.setValue(1); -this.getWMSCaps(this.parseBt) -},nodeClick:function(a){this.previewPanel.showPreview(a.attributes.wmsLayer) -},addLayerToMap:function(){if(this.previewPanel.currentLayer){var a=GeoNetwork.OGCUtil.layerExistsInMap(this.previewPanel.currentLayer,this.map); -if(!a){this.previewPanel.currentLayer.events.on({loadstart:function(){this.isLoading=true -}}); -this.previewPanel.currentLayer.events.on({loadend:function(){this.isLoading=false -}}); -this.map.addLayers([this.previewPanel.currentLayer]) -}else{Ext.MessageBox.alert(OpenLayers.i18n("infoTitle"),OpenLayers.i18n("WMSBrowserDuplicateMsg")) -}}}}); -Ext.reg("gn_wmsbrowserpanel",GeoNetwork.wms.BrowserPanel);Ext.namespace("GeoNetwork","GeoNetwork.wms"); -GeoNetwork.wms.LayerInfoPanel=function(a){Ext.apply(this,a); -GeoNetwork.wms.LayerInfoPanel.superclass.constructor.call(this) -}; -Ext.extend(GeoNetwork.wms.LayerInfoPanel,Ext.Panel,{previewPanel:null,map:null,previewCenterPoint:null,onlineresource:null,layer:null,initComponent:function(){GeoNetwork.wms.LayerInfoPanel.superclass.initComponent.call(this); -this.layout="border"; -this.border=false; -this.previewPanel=new GeoNetwork.wms.PreviewPanel({map:this.map,previewCenterPoint:this.previewCenterPoint}); -this.store=new Ext.data.SimpleStore({reader:new Ext.data.ArrayReader({},[{name:"title",type:"string"},{name:"field",type:"string"}]),fields:["title","field"]}); -this.gridPanel=new Ext.grid.GridPanel({title:"",store:this.store,autoScroll:true,hideHeaders:false,columns:[]}); -this.layerInfo=new GeoNetwork.wms.WMSLayerInfo({callback:this._showLayerInfo,scope:this}); -var a={region:"center",layout:"fit",items:[this.gridPanel],split:true,width:300,minWidth:300}; -var b={region:"east",items:[this.previewPanel],split:true,plain:true,cls:"popup-variant1",width:250,maxSize:250,minSize:250}; -this.add(a); -this.add(b); -this.doLayout() -},showLayerInfo:function(){this.previewPanel.showPreview(this.layer); -this.layerInfo.loadWMS(this.onlineresource,this.layer) -},_showLayerInfo:function(a){if(!a){Ext.MessageBox.alert(OpenLayers.i18n("errorTitle"),OpenLayers.i18n("WMSBrowserConnectError")); -this.body.dom.style.cursor="default" -}else{var b=[[OpenLayers.i18n("layerInfoPanel.titleField"),a.title||a.name],[OpenLayers.i18n("layerInfoPanel.descriptionField"),a.description],[OpenLayers.i18n("layerInfoPanel.queryableField"),a.queryable]]; -this.gridPanel.reconfigure(this.store,new Ext.grid.ColumnModel([{header:"Field",dataIndex:"title",sortable:true},{id:"value",header:"Value",dataIndex:"field",sortable:true}])); -this.gridPanel.autoExpandColumn="value"; -this.gridPanel.getStore().loadData(b) -}this.body.dom.style.cursor="default" -}}); -Ext.reg("gn_infolayerpanel",GeoNetwork.wms.LayerInfoPanel);Ext.namespace("GeoNetwork","GeoNetwork.wms"); -GeoNetwork.wms.LayerStylesPanel=function(a){Ext.apply(this,a); -GeoNetwork.wms.LayerStylesPanel.superclass.constructor.call(this) -}; -Ext.extend(GeoNetwork.wms.LayerStylesPanel,Ext.Panel,{previewPanel:null,map:null,layer:null,selectedStyle:null,initComponent:function(){GeoNetwork.wms.LayerStylesPanel.superclass.initComponent.call(this); -this.layout="border"; -this.border=false; -this.previewPanel=new GeoNetwork.wms.PreviewPanel({map:this.map,title:OpenLayers.i18n("layerStylesPreviewTitle")}); -this.store=new Ext.data.SimpleStore({reader:new Ext.data.ArrayReader({},[{name:"name",type:"string"},{name:"title",type:"string"},{name:"legendUrl",type:"string"}]),fields:["name","title","legendUrl"]}); -this.gridPanel=new Ext.grid.GridPanel({title:"",border:false,autoScroll:true,store:this.store,hideHeaders:false,columns:[{header:"Style",width:120,dataIndex:"name",sortable:false},{id:"description",header:"Description",width:180,dataIndex:"title",sortable:false}],autoExpandColumn:"description"}); -this.gridPanel.on("rowclick",this._selectStyle,this); -var a={region:"center",layout:"fit",items:[this.gridPanel],split:true,width:300,minWidth:300}; -var b={region:"east",items:[this.previewPanel],split:true,plain:true,cls:"popup-variant1",width:250,maxSize:250,minSize:250}; -this.add(a); -this.add(b); -this.doLayout() -},showLayerStyles:function(c){var e=[]; -for(var b=0; -b0){var c; -if(f.maxScale>0){c=(f.maxScale+f.minScale)/2 -}else{c=0.9*f.minScale -}var g=OpenLayers.Util.getResolutionFromScale(c,this.map.units); -var e=Math.round(g*this.width); -var d=Math.round(g*this.height); -var i=a.lon; -var h=a.lat; -if(e!==0&&d!==0){j=[i-0.5*e,h-0.5*d,i+0.5*e,h+0.5*d] -}}return j.join(",") -},showPreview:function(b){if(!b){return -}this.showMask(); -var c=b.map; -if(c===null){b.map=this.map -}var a=b.getFullRequestString({BBOX:this.calculateBBOX(b),WIDTH:this.width,HEIGHT:this.height}); -if(c===null){b.map=c -}this.currentLayer=b; -this.image.getEl().dom.src=a -},showPreviewLegend:function(a){this.remove(this.image); -this.image=null; -this.image=new Ext.BoxComponent({autoEl:{tag:"img","class":this.imgCls,src:a}}); -this.add(this.image); -this.doLayout() -}}); -Ext.reg("gn_wmspreview",GeoNetwork.wms.PreviewPanel);Ext.namespace("GeoNetwork","GeoNetwork.wms"); -GeoNetwork.wms.WMSLayerInfo=function(a){Ext.apply(this,a) -}; -GeoNetwork.wms.WMSLayerInfo.prototype={layerParams:{format:"image/png",transparent:"TRUE"},layerOptions:{ratio:1,singleTile:true,isBaseLayer:false},callback:null,scope:null,layer:null,loadWMS:function(b,a){this.layer=a; -var f={service:"WMS",request:"GetCapabilities",version:"1.1.1"}; -var e=OpenLayers.Util.getParameterString(f); -var d=(b.indexOf("?")>-1)?"&":"?"; -b+=d+e; -var c=OpenLayers.Request.GET({url:b,failure:this.processFailure,success:this.processSuccess,timeout:10000,scope:this}) -},processSuccess:function(a){if(!this.parser){this.parser=new GeoNetwork.Format.WMSCapabilities() -}var c=this.parser.read(a.responseXML||a.responseText); -var b; -if(c.capability){b=this.processLayers(c,c.capability.layers) -}Ext.callback(this.callback,this.scope,[b,this.layer]) -},processFailure:function(a){Ext.callback(this.callback,this.scope,[null,this.layer]) -},createWMSLayer:function(b,a){return new OpenLayers.Layer.WMS(b.title,a,OpenLayers.Util.extend({layers:b.name},this.layerParams),OpenLayers.Util.extend({minScale:b.minScale,queryable:b.queryable,maxScale:b.maxScale,description:b.abstrack,metadataURL:b.metadataURL,llbbox:b.llbbox},this.layerOptions)) -},processLayers:function(g,j){var d=null; -for(var f=0,a=j.length; -f'+d.attributes[a]+"" -}}b+=""; -var c=new Ext.XTemplate(b); -c.overwrite(this.infoPanel.body,d) -},click:function(e){if(e.attributes.features.length===0){var d=''; -d+='"; -d+="
      '+OpenLayers.i18n("FeatureInfoNoInfo")+"
      "; -Ext.DomHelper.overwrite(this.infoPanel.body,d) -}for(var c=0,a=e.attributes.features.length; -c0){var e=this.layer.dimensions.time.values[0].split("/"); -c=e[1]; -f=this.getInterval(e[2]); -var h=Date.parseDate(c,"c"); -h=h-(1000*60*f*this.numberOfSteps); -h=new Date(h); -b=this.formatTimeAsUTC(h)+"/"+c -}this.layer.mergeNewParams({TIME:b,FORMAT:"image/gif"}) -}else{this.updateValue() -}},formatTimeAsUTC:function(a){var b=a.dateFormat("c"); -var c=""+a.getUTCHours(); -if(c.length<2){c="0"+c -}b=b.replace(b.substring(b.indexOf("T"),b.indexOf("T")+3),"T"+c); -b=b.replace(b.substring(b.indexOf("+"),b.indexOf("+")+6),"Z"); -return b -},updateValue:function(){this.layer.mergeNewParams({TIME:this.formatTimeAsUTC(this.getForm().findField("current").getValue()),FORMAT:this.originalFormat}) -},createDateTimeField:function(){var d,a,c; -if(this.layer.dimensions.time.values&&this.layer.dimensions.time.values.length>0){var b=this.layer.dimensions.time.values[0].split("/"); -d=b[0]; -a=b[1]; -c=this.getInterval(b[2]) -}return new Ext.ux.form.DateTime({hiddenFormat:"c",dateFormat:null,hideLabel:true,name:"current",dateConfig:{minValue:Date.parseDate(d,"c"),maxValue:Date.parseDate(a,"c")},timeConfig:{increment:c},value:(this.layer.params.TIME)?this.layer.params.TIME:this.layer.dimensions.time["default"],width:340}) -}}); -Ext.reg("gn_timeselector",GeoNetwork.TimeSelector);Ext.namespace("GeoNetwork"); -GeoNetwork.BaseWindow=function(a){Ext.apply(this,a); -GeoNetwork.BaseWindow.superclass.constructor.call(this) -}; -Ext.extend(GeoNetwork.BaseWindow,Ext.Window,{map:null,initComponent:function(){GeoNetwork.BaseWindow.superclass.initComponent.call(this); -this.constrainHeader=true; -this.collapsible=true; -this.layout="fit"; -this.plain=true; -this.stateful=false -}});Ext.namespace("GeoNetwork"); -GeoNetwork.SingletonWindowManager=function(){var a=new Object(); -var b=new Array(); -return{registerWindow:function(f,d,c){var e=new d(c); -a[f]={windowz:e,classz:d,configz:c} -},getWindow:function(c){if(a[c]){return a[c].windowz -}else{return null -}},showWindow:function(e){if(a[e]){if(Ext.isEmpty(Ext.getCmp(e))){var c=a[e]; -var d=new c.classz(c.configz); -a[e]={windowz:d,classz:c.classz,configz:c.configz} -}a[e].windowz.show(); -return true -}else{return false -}},hideAllWindows:function(){for(key in a){if(a[key].windowz.isVisible()){a[key].windowz.setVisible(false); -b[b.length]=key -}}},restoreHiddenWindows:function(){for(var d=0,c=b.length; -d - - - - Make a chart of your catalogue search - - - - - - - - - - - - - - - - - - - - - - - - -

      Make a chart of your catalogue search

      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/charts-ext3-and-4.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/charts-ext3-and-4.js deleted file mode 100644 index 30ec6719844..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/charts-ext3-and-4.js +++ /dev/null @@ -1,116 +0,0 @@ -Ext4.require('Ext4.chart.*'); -Ext4.require('Ext4.layout.container.Fit'); - - -var catalogue, urlParameters, store, data = {}; - -var buildChart = function(title, data) { - var chartConfig = { - type : { - legend : { - position : 'right' - } - }, - denominator: { - legend : { - position : 'right' - } - }, - inspireTheme : { - } - }; - - var store = Ext4.create('Ext4.data.Store', { - fields: ['name', 'count'] - }); - - data.each(function(record) { - store.add({ - name : record.get('name'), - count : record.get('count') - }); - }); - var donut = false; - var chart = Ext4.create('Ext.chart.Chart', { - xtype : 'chart', - animate : true, - renderTo : 'chart' + title, - width : 500, - height : 500, - store : store, - legend : chartConfig[title] && chartConfig[title].legend || false, -// legend: { -// position : 'right' -// }, - insetPadding : 25, - //theme : 'Base:gradients', - series : [ { - type : 'pie', - field : 'count', - showInLegend : true, - donut : donut, - tips : { - trackMouse : true, - width : 140, - height : 80, - renderer : function(storeItem, item) { - // calculate percentage. - var total = 0; - store.each(function(rec) { - total += parseInt(rec.get('count')); - }); - this.setTitle(storeItem.get('name') + '
      ' - + storeItem.get('count') + ' records (' - + Math.round(storeItem.get('count') / total * 100) - + '%)'); - } - }, - highlight : { - segment : { - margin : 20 - } - }, - label : { - field : 'name', - display : 'rotate', - contrast : true, - font : '10px Arial' - } - } ] - }); -} - -var facetLoaded = function(response) { - store = GeoNetwork.util.SearchTools.parseFacets(response); - - var facets = store.collect("facet"); - - Ext.each(facets, function(value) { - if (!urlParameters.chart || urlParameters.chart.indexOf(value)!=-1) { - data[value] = store.query("facet", value); - Ext.getDom('content').innerHTML = Ext.getDom('content').innerHTML - + "

      " + value + "

      " - + "
      " + "
      "; - } - }); - // When building in chart on the above loop, the animate and tips works only - // for the latest chart built. - Ext.each(facets, function(value) { - if (!urlParameters.chart || urlParameters.chart.indexOf(value)!=-1) { - buildChart(value, data[value]); - } - }); -} - - -Ext.onReady(function() { - urlParameters = GeoNetwork.Util.getParameters(location.href); - - catalogue = new GeoNetwork.Catalogue(); - - metadataStore = GeoNetwork.data.MetadataResultsFastStore(); - - this.catalogue.search({ - E_summaryOnly : 'true' - }, facetLoaded, null, 1, true, metadataStore, null); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/example.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/example.js deleted file mode 100644 index dcfe3595f87..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/example.js +++ /dev/null @@ -1,11 +0,0 @@ -GeoNetwork.URL = 'geonetwork'; -GeoNetwork.map.PROJECTION = "EPSG:4326"; -GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-180,-90,180,90); -GeoNetwork.map.BACKGROUND_LAYERS = [ - new OpenLayers.Layer.WMS("Background layer", "/geoserver/wms", {layers: 'gn:world,gn:gboundaries', format: 'image/jpeg'}, {isBaseLayer: true}) - ]; -GeoNetwork.map.MAP_OPTIONS = { - projection: GeoNetwork.map.PROJECTION, - maxExtent: GeoNetwork.map.EXTENT, - restrictedExtent: GeoNetwork.map.EXTENT -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/i18n.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/i18n.html deleted file mode 100644 index 97ae04c383f..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/i18n.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - i18n - - - - - - - - - - - - - -
      -
      - Language selector:  -
      -
      -
      -
      -
      -
      -

      -
      -
      -
      -
      - - diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/i18n.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/i18n.js deleted file mode 100644 index 12a01b5d822..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/i18n.js +++ /dev/null @@ -1,132 +0,0 @@ -var GeoNetworkApp = function(){ - // get the selected language code parameter from url (if exists) - var params = Ext.urlDecode(window.location.search.substring(1)); - Ext.form.Field.prototype.msgTarget = 'side'; - - return { - init: function(){ - // Language chooser combobox - var store = new Ext.data.ArrayStore({ - fields: ['code', 'language', 'charset'], - data: [['en', 'English', ''], ['fr', 'Français', '']] - }); - var app = this; - var combo = new Ext.form.ComboBox({ - renderTo: 'languages', - store: store, - displayField: 'language', - typeAhead: true, - mode: 'local', - triggerAction: 'all', - emptyText: 'Select a language...', - selectOnFocus: true, - listeners: { - select: function(cb, record, idx){ - //console.log(record.get("code")); - this.loadi18n(record.get("code"), this); - }, - scope: app - } - }); - - if (params.lang) { - this.loadi18n(params.lang); - } else { - this.setup(); - } - }, - loadi18n: function(lang, app){ - var url = String.format("../../ext/src/locale/ext-lang-{0}.js", lang); - - Ext.Ajax.request({ - url: url, - success: function(response, opts){ - eval(response.responseText); - var url = String.format("../lib/GeoNetwork/lang/{0}.js", lang); - - Ext.Ajax.request({ - url: url, - success: function(response,opts) {this.onSuccess(response,opts,lang)}, - failure: this.onFailure, - scope: app - }); - - }, - failure: this.onFailure, - scope: app - }); - }, - onSuccess: function(response, opts, lang){ - console.log('loaded'); - eval(response.responseText); - OpenLayers.Lang.setCode(lang) - - console.log('loaded'); - var viewers = Ext.DomQuery.select('.i18n'); - console.log(viewers); - Ext.get("searchForm").remove(); - this.setup(); - }, - onFailure: function(){ - Ext.Msg.alert('Failure', 'Failed to load locale file.'); - this.setup(); - }, - setup: function(){ - Ext.getDom('TITLE').innerHTML = OpenLayers.i18n('title'); - - - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - var fullTextField = new Ext.form.TextField({ - name: 'E_any', - fieldLabel: 'Full text' - }); - - var searchForm = new Ext.FormPanel({ - url: '', - id: 'searchForm', - border: false, - renderTo: 'search-form', - width: 400, - defaultType: 'textfield', - items: [fullTextField], - buttons: [{ - text: 'Search', - id: 'searchBt', - icon: '../resources/images/default/find.png', - // FIXME : iconCls : 'md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', null, null, catalogue.startRecord, true); - } - } - }] - }); - - var metadataResultsView = new GeoNetwork.MetadataResultsView({ - catalogue: catalogue, - tpl: GeoNetwork.Templates.FULL - }); - - var resultPanel = new Ext.Panel({ - id: 'resultsPanel', - border: false, - renderTo: 'metadata-view', - bodyCssClass: 'md-view', - autoWidth: true, - autoHeight: true, - // height : 200, - autoScroll: true, - layout: 'fit', - items: metadataResultsView, - }); - - } - }; -}(); -Ext.onReady(GeoNetworkApp.init, GeoNetworkApp); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/index.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/index.html deleted file mode 100644 index 51ec06b3080..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -

      Examples

      - -

      Discovery & visualization

      - - -

      Administration interface

      - - -

      Miscellaneous

      - - -
      -

      Other ideas

      -
        -
      • Drag&Drop to the map
      • -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/login.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/login.html deleted file mode 100644 index 399153a82dc..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/login.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - Login form - - - - - - - - - - - -

      Login form

      -
      -
      - - diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/login.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/login.js deleted file mode 100644 index 72743b5ffc3..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/login.js +++ /dev/null @@ -1,24 +0,0 @@ -var catalogue; - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - var loginForm = new GeoNetwork.LoginForm({ - renderTo: 'login-form', - catalogue: catalogue - }); - - this.catalogue.on('afterLogin', connected, this); - this.catalogue.on('afterLogout', disconnected, this); -}); - - -function connected(cat, user){ - Ext.Msg.alert('Login operation successful', user.firstName); -} - -function disconnected(cat, user){ - Ext.Msg.alert('Logout operation successful', user); -} diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/map-results.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/map-results.html deleted file mode 100644 index 93759ce705f..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/map-results.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Interaction on a map with search results - - - - - - - - - - - - - -

      Interaction on a map with search results

      -

      This example show how to link a metadata search results view to a GeoExt mappanel. - A layer is added to the map in order to draw bounding box for each record found - (multiple bounding box will be group in a multipolygon feature if needed). On mouse over - the bounding box is highlighted on the map and When double - click on a record, the map zoom to the extent of the record. -

      -
      - -
      -
      - -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/map-results.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/map-results.js deleted file mode 100644 index 9e929fc2130..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/map-results.js +++ /dev/null @@ -1,90 +0,0 @@ -var searchForm; -var metadataStore; -var catalogue; - -Ext.onReady(function(){ - - catalogue = new GeoNetwork.Catalogue({ - statusBarId: 'info', - servlet: GeoNetwork.URL - }); - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - // Create map panel - var map = new OpenLayers.Map(); - var layer = new OpenLayers.Layer.WMS("Global Imagery", "http://maps.opengeo.org/geowebcache/service/wms", { - layers: "bluemarble" - }); - map.addLayer(layer); - map.addControl(new OpenLayers.Control.LayerSwitcher()); - - mapPanel = new GeoExt.MapPanel({ - title: "MapPanel", - renderTo: "mappanel", - stateId: "mappanel", - height: 400, - width: 600, - map: map, - center: new OpenLayers.LonLat(5, 45), - zoom: 4 - }); - - var panel = new Ext.Panel({ - id: 'images-view', - border: false, - width: 835, - title: 'Search results', - // autoWidth:true, - // autoHeight:true, - height: 600, - collapsible: true, - autoScroll: true, - layout: 'fit', - renderTo: 'metadata-view-full', - items: new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.FULL, - // renderTo: 'metadata-view-full', - catalogue: catalogue, - maps: map - }) - }); - - searchForm = new Ext.FormPanel({ - // labelWidth: 75, - url: '', - border: false, - id: 'searchForm', - renderTo: 'search-form', - bodyStyle: 'padding:5px 5px 0', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: GeoNetwork.util.SearchFormTools.getSimpleFormFields(catalogue.services), - buttons: [{ - text: 'Search', - id: 'searchBt', - icon: '../resources/images/default/find.png', - // FIXME : iconCls : 'md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', null, function(response){ - Ext.Msg.alert('Error: ' + response.status + '-' + response.statusText); - }, null, true); - } - } - }] - }); - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); - - // Focus on full text search field - Ext.getDom('E_any').focus(true); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/multi-map-results.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/multi-map-results.html deleted file mode 100644 index 611737e6408..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/multi-map-results.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Interaction with multiple maps and search results - - - - - - - - - - - - - - -

      Interaction with multiple maps and search results

      -

      This example shows how to link more than one map to a result panel and activate or not the - zoom to extent feature after search.

      -
      - -
      - -
      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/multi-map-results.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/multi-map-results.js deleted file mode 100644 index 4f29e0a4b08..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/multi-map-results.js +++ /dev/null @@ -1,123 +0,0 @@ -var searchForm; -var metadataStore; -var catalogue; - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - statusBarId: 'info', - servlet: GeoNetwork.URL - }); - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - // Create map panel - var map1 = new OpenLayers.Map(); - var map2 = new OpenLayers.Map(); - var map3 = new OpenLayers.Map(); - var layer1 = new OpenLayers.Layer.WMS("Global Imagery", "http://maps.opengeo.org/geowebcache/service/wms", { - layers: "bluemarble" - }); - var layer2 = new OpenLayers.Layer.WMS("World Map", "http://labs.metacarta.com/wms-c/Basic.py?", { - layers: 'basic', - format: 'image/png' - }); - var layer3 = new OpenLayers.Layer.WMS("OSM", ["http://t1.hypercube.telascience.org/tiles?", "http://t2.hypercube.telascience.org/tiles?", "http://t3.hypercube.telascience.org/tiles?", "http://t4.hypercube.telascience.org/tiles?"], { - layers: 'osm-4326', - format: 'image/png' - }); - map1.addLayer(layer1); - map1.addControl(new OpenLayers.Control.LayerSwitcher()); - map2.addLayer(layer2); - map3.addLayer(layer3); - - var mapPanel1 = new GeoExt.MapPanel({ - title: "MapPanel 1", - renderTo: "mappanel1", - height: 300, - width: 300, - map: map1, - center: new OpenLayers.LonLat(5, 45), - zoom: 4 - }); - var mapPanel2 = new GeoExt.MapPanel({ - title: "MapPanel 2", - renderTo: "mappanel2", - height: 300, - width: 300, - map: map2, - center: new OpenLayers.LonLat(5, 45), - zoom: 4 - }); - var mapPanel3 = new GeoExt.MapPanel({ - title: "MapPanel 3", - renderTo: "mappanel3", - height: 300, - width: 300, - map: map3, - center: new OpenLayers.LonLat(5, 45), - zoom: 4 - }); - - var panel = new Ext.Panel({ - id: 'images-view', - border: false, - width: 900, - title: 'Search results', - height: 300, - collapsible: true, - autoScroll: true, - layout: 'fit', - renderTo: 'metadata-view-full', - items: new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.THUMBNAIL, - // renderTo: 'metadata-view-full', - catalogue: catalogue, - maps: [{ - map: map1 - }, { - map: map2, - zoomToExtentOnSearch: true - }, { - map: map3 - }] - }) - }); - - searchForm = new Ext.FormPanel({ - // labelWidth: 75, - url: '', - border: false, - id: 'searchForm', - renderTo: 'search-form', - bodyStyle: 'padding:5px 5px 0', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: GeoNetwork.util.SearchFormTools.getSimpleFormFields(catalogue.services), - buttons: [{ - text: 'Search', - id: 'searchBt', - icon: '../resources/images/default/find.png', - // FIXME : iconCls : 'md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', null, function(response){ - Ext.Msg.alert('Error: ' + response.status + '-' + response.statusText); - }, null, true); - } - } - }] - }); - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); - - // Focus on full text search field - Ext.getDom('E_any').focus(true); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/opensearch-suggestion.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/opensearch-suggestion.html deleted file mode 100644 index f56fa11a198..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/opensearch-suggestion.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - -

      OpenSearch suggestion

      -

      This example shows how to use OpenSearch suggestion protocol for a search field.

      -
      -
      -
      - -
      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/opensearch-suggestion.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/opensearch-suggestion.js deleted file mode 100644 index 0143d2f437a..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/opensearch-suggestion.js +++ /dev/null @@ -1,77 +0,0 @@ -//OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; - -var searchForm; -var metadataStore; -var catalogue; - -Ext.onReady(function() { - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - new GeoNetwork.MetadataResultsView( { - tpl : GeoNetwork.Templates.FULL, - renderTo : 'metadata-view-full', - catalogue : catalogue - }); -console.log(catalogue.services.opensearchSuggest); - var fields = []; - var search = new GeoNetwork.form.OpenSearchSuggestionTextField({ - hideLabel: true, - width: 285, // FIXME - minChars: 2, - loadingText: '...', - hideTrigger: true, - url: catalogue.services.opensearchSuggest - }); - - var title = new GeoNetwork.form.OpenSearchSuggestionTextField({ - hideLabel: false, - minChars: 1, - hideTrigger: false, - url: catalogue.services.opensearchSuggest, - field: 'orgName', - name: 'E_orgName', - fieldLabel: OpenLayers.i18n('org') - }); - - fields.push(search, title); - fields.push(GeoNetwork.util.SearchFormTools.getOptions()); - - searchForm = new Ext.FormPanel( { - border : false, - id : 'searchForm', - renderTo : 'search-form', - width : 350, - defaults : { - width : 230 - }, - defaultType : 'textfield', - items : fields, - buttons : [ { - text : 'Search', - id : 'searchBt', - icon : '../resources/images/default/find.png', - // FIXME : iconCls : 'md-mn-find', - iconAlign : 'right', - listeners : { - click : function() { - catalogue.search('searchForm', null, null, null, true); - } - } - } ] - }); - - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [ { - key : [ 10, 13 ], - fn : function() { - Ext.getCmp('searchBt').fireEvent('click'); - } - } ]); - - // Focus on full text search field - search.focus(true); - }); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/quick-harvester-register.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/quick-harvester-register.html deleted file mode 100644 index 39ec30d0aae..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/quick-harvester-register.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Register a new harvester - - - - - - - - - - - - -

      Simple widget to register an OGC WxS harvester

      -

      - This example show how to register an OGC WMS to the catalogue. For the time being, you need to add xml.havesting.add, - xml.havesting.start and xml.havesting.run to guest user if you want to make that service publicly available. You also - need a quite flexible proxy for GetCapabilities calls. -

      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/quick-harvester-register.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/quick-harvester-register.js deleted file mode 100644 index 20ba8b25965..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/quick-harvester-register.js +++ /dev/null @@ -1,40 +0,0 @@ -OpenLayers.ProxyHostURL = '/geonetwork/proxy?url='; -OpenLayers.ProxyHost = function(url){ - /** - * Do not use proxy for local domain. - * This is required to keep the session activated. - */ - if (url && url.indexOf(window.location.host) != -1) { - return url; - } else { - return OpenLayers.ProxyHostURL + encodeURIComponent(url); - } -}; - -var catalogue; - -Ext.onReady(function(){ - - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - var tb = new Ext.Toolbar({ - width: 155 - }); - tb.render('qr'); - - var menu = new GeoNetwork.OGCServiceQuickRegister({ - catalogue: catalogue - }); - - tb.add({ - text: 'Add an OGC service', - iconCls: 'md-mn md-mn-badd', - scale: 'large', - iconAlign: 'left', - menu: menu - }); - tb.doLayout(); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-by-geometry.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-by-geometry.html deleted file mode 100644 index 3baaca57d19..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-by-geometry.html +++ /dev/null @@ -1,26 +0,0 @@ - - - Search history - - - - - - - - - - - - -

      Search using spatial filter

      -

      Here is an example to create a geometry search field which could be - initialized by different types of interactive components like a button - to set the location based on browser geolocalisation or with a simple - map which define the search extent. Usually the geometry field will be - a hidden field. The relation field is optional as intersection will be - the default value used.

      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-by-geometry.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-by-geometry.js deleted file mode 100644 index df675da89d3..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-by-geometry.js +++ /dev/null @@ -1,48 +0,0 @@ -var catalogue; -var searchForm; -var metadataStore; - -Ext.onReady(function() { - Ext.QuickTips.init(); - - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - new GeoNetwork.MetadataResultsView( { - tpl : GeoNetwork.Templates.SIMPLE, - renderTo : 'metadata-view', - catalogue : catalogue - }); - - - searchForm = new Ext.FormPanel( { - border : false, - id : 'searchForm', - renderTo : 'search-form', - width : 350, - defaults : { - width : 230 - }, - defaultType : 'textfield', - items : [ - GeoNetwork.util.SearchFormTools.getSimpleMap( - GeoNetwork.map.BACKGROUND_LAYERS, - GeoNetwork.map.MAP_OPTIONS, - true) - ], - buttons : [ { - text : 'Search', - id : 'searchBt', - iconCls : 'md-mn md-mn-find', - iconAlign : 'right', - listeners : { - click : function() { - catalogue.search('searchForm', null, null); - } - } - } ] - }); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-combo-multi.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-combo-multi.html deleted file mode 100644 index e6a5b3632bf..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-combo-multi.html +++ /dev/null @@ -1,26 +0,0 @@ - - - Search form - - - - - - - - - - - - - - -

      Search form fields with multi selection combo

      -

      This example shows how to build a search form for a GeoNetwork catalogue with multi selection combo box.

      -
      - -
      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-combo-multi.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-combo-multi.js deleted file mode 100644 index 5525e602ab9..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-combo-multi.js +++ /dev/null @@ -1,76 +0,0 @@ -var searchForm; -var metadataStore; -var catalogue; - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.FULL, - renderTo: 'metadata-view-full', - catalogue: catalogue - }); - - // Load store for the combo - var store = GeoNetwork.data.CategoryStore(catalogue.services.getCategories); - store.load(); - - // Optional template - var imgUrl = '../../../images/default/category/'; - var tpl = (imgUrl ? - '
      {[values.label.' + OpenLayers.Lang.getCode() + ']}
      ': - '
      {[values.label.' + OpenLayers.Lang.getCode() + ']}
      '); - var displaytpl = (imgUrl ? - '{[values.label.' + OpenLayers.Lang.getCode() + ']}': - '{[values.label.' + OpenLayers.Lang.getCode() + ']}'); - - - var multiCb = new Ext.ux.form.SuperBoxSelect ({ - name: 'E_category', - mode: 'local', - fieldLabel: OpenLayers.i18n('category'), - triggerAction: 'all', - store: store, - stackItems: true, - valueField: 'name', - valueDelimiter: ' or ', - displayField: 'name', - tpl: tpl, - displayFieldTpl: displaytpl - }); - searchForm = new Ext.FormPanel({ - border: false, - id: 'searchForm', - renderTo: 'search-form', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: multiCb, - buttons: [{ - text: 'Search', - id: 'searchBt', - iconCls: 'md-mn md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', null, null); - } - } - }] - }); - - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); -}); - diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-csw.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-csw.html deleted file mode 100644 index 4d26c67b19c..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-csw.html +++ /dev/null @@ -1,24 +0,0 @@ - - - CSW search form - - - - - - - - - - - - -

      CSW Search form

      -
      - -
      -

      Full template

      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-csw.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-csw.js deleted file mode 100644 index 66f4ddbc965..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-csw.js +++ /dev/null @@ -1,94 +0,0 @@ -OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; - -var catalogue; -var searchForm; -var metadataStore; - - -function loadResults(response){ - // console.log('extra-processing'); - // console.log(response); -} - -function onFailure(response){ - // console.log(response); - -} - -Ext.onReady(function(){ - - // TODO : test MDWEB http://demo.geomatys.com/mdweb/WS/csw - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - catalogue.metadataStore = GeoNetwork.data.MetadataCSWResultsStore(); - - var cswServerField = new Ext.form.ComboBox({ - id: 'cswServer', - mode: 'local', - fieldLabel: 'CSW Server', - store: new Ext.data.ArrayStore({ - id: 0, - fields: ['url', 'name'], - data: [['', 'Local GeoNetwork'], ['http://demo.geomatys.com/mdweb/WS/csw', 'MDWEB Demo website']] - }), - valueField: 'url', - displayField: 'name' - }); - - var resultsView = new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.SIMPLE, - renderTo: 'metadata-view', - catalogue: catalogue - }); - - var fullTextField = new Ext.form.TextField({ - name: 'E.8_AnyText', - fieldLabel: 'Full text search' - // hideLabel : true - }); - - searchForm = new Ext.FormPanel({ - // labelWidth: 75, - url: '', - id: 'searchForm', - renderTo: 'search-form', - bodyStyle: 'padding:5px 5px 0', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: [cswServerField, fullTextField], - buttons: [{ - text: 'Search', - id: 'searchBt', - icon: '../resources/images/default/find.png', - // FIXME : iconCls : 'md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - var csw = Ext.getCmp('cswServer').getValue(); - - // Quick hack to change CSW server URL - if (csw) { - catalogue.services.csw = csw; - } - - catalogue.cswSearch('searchForm', loadResults, onFailure); - } - } - }] - }); - - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); - - // Focus on full text search field - fullTextField.focus(true); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-inspire.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-inspire.html deleted file mode 100644 index 815c388fde4..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-inspire.html +++ /dev/null @@ -1,26 +0,0 @@ - - - Search form - - - - - - - - - - - - - - -

      INSPIRE Search form fields

      -

      This example shows how to build a search form with INSPIRE criteria for a GeoNetwork catalogue.

      -
      - -
      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-inspire.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-inspire.js deleted file mode 100644 index 8298e9b1424..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form-inspire.js +++ /dev/null @@ -1,54 +0,0 @@ -//OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; - -var searchForm; -var metadataStore; -var catalogue; - - - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.FULL, - renderTo: 'metadata-view-full', - catalogue: catalogue - }); - - - searchForm = new Ext.FormPanel({ - border: false, - id: 'searchForm', - renderTo: 'search-form', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: GeoNetwork.util.INSPIRESearchFormTools.getINSPIREFields(catalogue.services, true), - buttons: [{ - text: 'Search', - id: 'searchBt', - iconCls: 'md-mn md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', null, null); - } - } - }] - }); - - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); -}); - diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form.html deleted file mode 100644 index 69da2381e46..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Search form - - - - - - - - - - - - - -

      Search form fields

      -

      This example shows how to build a search form for a GeoNetwork catalogue.

      -
      - -
      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form.js deleted file mode 100644 index 15bb73fdc15..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-form.js +++ /dev/null @@ -1,59 +0,0 @@ -//OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; - -var searchForm; -var metadataStore; -var catalogue; - - - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.FULL, - renderTo: 'metadata-view-full', - catalogue: catalogue - }); - Ext.QuickTips.init(); - - searchForm = new Ext.FormPanel({ - border: false, - id: 'searchForm', - renderTo: 'search-form', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: GeoNetwork.util.SearchFormTools.getAdvancedFormFields(catalogue.services, GeoNetwork.map.BACKGROUND_LAYERS, GeoNetwork.map.MAP_OPTIONS), - buttons: [{ - text: 'Search', - id: 'searchBt', - iconCls: 'md-mn md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', null, null); - } - } - }] - }); - - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); - - - - // Focus on full text search field - Ext.getDom('E_any').focus(true); -}); - diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-grid-with-paging.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-grid-with-paging.html deleted file mode 100644 index ddce447d441..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-grid-with-paging.html +++ /dev/null @@ -1,21 +0,0 @@ - - - Simple search field and grid - - - - - - - - - - - - - -

      Simple twin-triggered field for search and results in a grid

      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-grid-with-paging.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-grid-with-paging.js deleted file mode 100644 index 2cc6a350fc5..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-grid-with-paging.js +++ /dev/null @@ -1,104 +0,0 @@ -var catalogue; - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL, - statusBarId: 'info', - metadataStore: GeoNetwork.data.MetadataResultsFastStore(), - }); - - - var searchField = new GeoNetwork.form.SearchField({ - name: 'E_any', - width: 350, - store: catalogue.metadataStore, - triggerAction: function(scope){ - scope.search('searchForm', null, null); - }, - scope: catalogue - }); - - var searchForm = new Ext.FormPanel({ - id: 'searchForm', - border: false, - renderTo: 'search-form', - items: [ - searchField, { - xtype: 'hidden', - name: 'E__indexingError', - value: '1' - } - ] - }); - - - var previousAction = new Ext.Action({ - id: 'previousBt', - text: '<<', - handler: function(){ - var from = catalogue.startRecord - 50; - if (from > 0) { - catalogue.startRecord = from; - catalogue.search('searchForm', null, null); - } - }, - scope: this - }); - - var nextAction = new Ext.Action({ - id: 'nextBt', - text: '>>', - handler: function(){ - catalogue.startRecord += 50; - catalogue.search('searchForm', null, null); - }, - scope: this - }); - - var bbar = new Ext.Toolbar({ - items: [previousAction, '|', nextAction, '|', { - xtype: 'tbtext', - text: '', - id: 'info' - }] - }); - - function renderError(value, p, record){ - return String.format( - '{0}
      {1} - {2}
      Edit', - record.data.idxMsg[0], record.data.idxMsg[1], record.data.idxMsg[2], record.data.uuid); - } - - var grid = new Ext.grid.GridPanel({ - layout: 'fit', - height: 280, - border: false, - renderTo: 'metadata-grid', - store: catalogue.metadataStore, - columns: [{ - id: 'title', - header: 'Title', - sortable: true, - dataIndex: 'title' - }, { - id: 'idxMsg', - header: 'idxMsg', - sortable: true, - renderer: renderError - }, { - id: 'uuid', - header: 'Uuid', - dataIndex: 'uuid' - }], - autoExpandColumn: 'idxMsg', - listeners: { - rowclick: function(grid, rowIndex, e){ - var data = grid.getStore().getAt(rowIndex).data; - Ext.Msg.alert('You clicked on:', data.title); - } - }, - bbar: bbar - }); - - searchField.focus(true); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-history.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-history.html deleted file mode 100644 index 21a046ef883..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-history.html +++ /dev/null @@ -1,27 +0,0 @@ - - - Search history - - - - - - - - - - - - -

      Search history

      -
      -
      - - - -
      - - -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-history.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-history.js deleted file mode 100644 index 25f953c9b89..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-history.js +++ /dev/null @@ -1,89 +0,0 @@ -var catalogue; -var searchForm; -var metadataStore; - -Ext.onReady(function(){ - Ext.History.init(); - - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.SIMPLE, - renderTo: 'metadata-view', - catalogue: catalogue - }); - - searchForm = new Ext.FormPanel({ - border: false, - id: 'searchForm', - renderTo: 'search-form', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: GeoNetwork.util.SearchFormTools.getSimpleFormFields(catalogue.services), - buttons: [{ - text: 'Search', - id: 'searchBt', - iconCls: 'md-mn md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', null, null); - - /* TODO : could we create a GeoNetwork SearchHistory - component dependant from the search form */ - var values = GeoNetwork.util.SearchTools.getFormValues(Ext.getCmp('searchForm')); - var token = ''; - for (var key in values) { - token += key + '=' + values[key] + ';'; - }; - console.log('History add :' + token); - Ext.History.add(token); - } - } - }] - }); - - Ext.getDom('E_any').focus(true); - - /* Handle this change event in order to restore the UI to the - appropriate history state*/ - Ext.History.on('change', function(token){ - if (token) { - console.log('change' + token); - var values = token.split(';'); - for (var i = 0; i < values.length; i++) { - var key = values[i]; - if (key != '') { - var kvp = key.split('='); - var field = Ext.getDom(kvp[0]); - if (field != undefined) { - var value = kvp[1]; - field.value = value; - /* TODO : handle radio, checkbox, ... */ - } - } - } - - catalogue.search('searchForm', null, null); - } else { - /* This is the initial default state. Necessary if you navigate starting */ - catalogue.search('searchForm', null, null); - } - }); - - /* Launch search when enter key press */ - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); - -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-templates.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-templates.html deleted file mode 100644 index 63740a81ea9..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-templates.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Templating search results - - - - - - - - - - - - -

      Templating search results

      -
      -
      -

      Simple template

      -
      -
      -
      -

      Thumbnail template

      -
      -
      -
      -

      Full template

      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-templates.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-templates.js deleted file mode 100644 index 7fe435c9aab..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-templates.js +++ /dev/null @@ -1,56 +0,0 @@ -var catalogue; -var searchForm; -var metadataStore; - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - var t = GeoNetwork.Templates.THUMBNAIL; - - new GeoNetwork.MetadataResultsView({ - tpl: t, - renderTo: 'metadata-view-thumbnail', - catalogue: catalogue - }); - - new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.FULL, - renderTo: 'metadata-view-full', - catalogue: catalogue - }); - - new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.SIMPLE, - renderTo: 'metadata-view', - catalogue: catalogue - }); - - searchForm = new Ext.FormPanel({ - border: false, - id: 'searchForm', - renderTo: 'search-form', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: GeoNetwork.util.SearchFormTools.getSimpleFormFields(catalogue.services), - buttons: [{ - text: 'Search', - id: 'searchBt', - icon: '../resources/images/default/find.png', - // FIXME : iconCls : 'md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', null, null); - } - } - }] - }); - - Ext.getDom('E_any').focus(true); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-view.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-view.html deleted file mode 100644 index 00314ee8f17..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-view.html +++ /dev/null @@ -1,17 +0,0 @@ - - - Advanced metadata view with options - - - - - - - - - - - - - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-view.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-view.js deleted file mode 100644 index 974110ba7b4..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-results-view.js +++ /dev/null @@ -1,125 +0,0 @@ -var catalogue; -var searchForm; -var metadataStore; - -Ext.onReady(function(){ - Ext.QuickTips.init(); - - catalogue = new GeoNetwork.Catalogue({ - statusBarId: 'info', - servlet: GeoNetwork.URL - }); - - var fields = []; - - fields.push(GeoNetwork.util.SearchFormTools.getSimpleFormFields(catalogue.services, - GeoNetwork.map.BACKGROUND_LAYERS, GeoNetwork.map.MAP_OPTIONS, true, - false)); - - - searchForm = new Ext.FormPanel({ - id: 'searchForm', - border: false, - items: fields, - buttons: [{ - text: 'Search', - id: 'searchBt', - iconCls: 'md-mn md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm', loadResults, null, catalogue.startRecord); - } - } - }] - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - var metadataResultsView = new GeoNetwork.MetadataResultsView({ - catalogue: catalogue, - tpl: GeoNetwork.Templates.FULL - }); - - var tBar = new GeoNetwork.MetadataResultsToolbar({ - catalogue: catalogue, - metadataResultsView: metadataResultsView - }); - - var previousAction = new Ext.Action({ - text: '<<', - handler: function(){ - // TODO : disable/enable - catalogue.startRecord -= parseInt(Ext.getCmp('E_hitsperpage').getValue()); - Ext.getCmp('searchBt').fireEvent('click'); - }, - scope: this - }); - - var nextAction = new Ext.Action({ - text: '>>', - handler: function(){ - catalogue.startRecord += parseInt(Ext.getCmp('E_hitsperpage').getValue()); - Ext.getCmp('searchBt').fireEvent('click'); - }, - scope: this - }); - - var bBar = new Ext.Toolbar({ - items: [previousAction, '|', nextAction, '|', { - xtype: 'tbtext', - text: '', - id: 'info' - }] - }); - - var resultPanel = new Ext.Panel({ - id: 'resultsPanel', - border: false, - bodyCssClass: 'md-view', - autoWidth: true, - autoScroll: true, - layout: 'fit', - tbar: tBar, - items: metadataResultsView, - // paging bar on the bottom - bbar: bBar - }); - - var viewport = new Ext.Viewport({ - layout: 'border', - items: [{ - region: 'west', - split: true, - width: 340, - margins: '35 0 5 5', - layout: 'fit', - layoutConfig: { - animate: true - }, - items: [searchForm] - }, { - region: 'center', - margins: '35 5 5 0', - layout: 'fit', - autoScroll: true, - items: [resultPanel] - }] - }); - - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); - - // Focus on full text search field - Ext.getDom('E_any').focus(true); - -}); - -function loadResults(response){ - Ext.getCmp('resultsPanel').syncSize(); -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-simple-and-grid.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-simple-and-grid.html deleted file mode 100644 index ddce447d441..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-simple-and-grid.html +++ /dev/null @@ -1,21 +0,0 @@ - - - Simple search field and grid - - - - - - - - - - - - - -

      Simple twin-triggered field for search and results in a grid

      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-simple-and-grid.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-simple-and-grid.js deleted file mode 100644 index 0a5a7a96b29..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/search-simple-and-grid.js +++ /dev/null @@ -1,53 +0,0 @@ -var catalogue; - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - - var searchField = new GeoNetwork.form.SearchField({ - name: 'E_any', - width: 350, - store: catalogue.metadataStore, - triggerAction: function(scope){ - scope.search('searchForm', null, null); - }, - scope: catalogue - }); - - var searchForm = new Ext.FormPanel({ - id: 'searchForm', - border: false, - renderTo: 'search-form', - items: searchField - }); - - - var grid = new Ext.grid.GridPanel({ - layout: 'fit', - height: 280, - border: false, - renderTo: 'metadata-grid', - store: catalogue.metadataStore, - columns: [{ - id: 'title', - header: 'Title', - dataIndex: 'title' - }, { - id: 'uuid', - header: 'Uuid', - dataIndex: 'uuid' - }], - autoExpandColumn: 'title', - listeners: { - rowclick: function(grid, rowIndex, e){ - var data = grid.getStore().getAt(rowIndex).data; - Ext.Msg.alert('You clicked on:', data.title); - } - } - }); - - searchField.focus(true); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/tag-cloud.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/tag-cloud.html deleted file mode 100644 index 8dc1d75b4d2..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/tag-cloud.html +++ /dev/null @@ -1,27 +0,0 @@ - - - Tag cloud view - - - - - - - - - - - - -

      Tag cloud

      -

      This example shows how to build a tag cloud.

      -
      -

      -
      -
      - -
      -
      -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/tag-cloud.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/tag-cloud.js deleted file mode 100644 index b8cdadf6535..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/tag-cloud.js +++ /dev/null @@ -1,69 +0,0 @@ -//OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; - -var searchForm; -var metadataStore; -var catalogue; - -Ext.onReady(function(){ - catalogue = new GeoNetwork.Catalogue({ - servlet: GeoNetwork.URL - }); - catalogue.metadataStore = GeoNetwork.data.MetadataResultsStore(); - catalogue.summaryStore = GeoNetwork.data.MetadataSummaryStore(); - - new GeoNetwork.MetadataResultsView({ - tpl: GeoNetwork.Templates.FULL, - renderTo: 'metadata-view-full', - catalogue: catalogue - }); - - new GeoNetwork.TagCloudView({ - renderTo: 'tag-cloud', - catalogue: catalogue - // TODO : onclick event should run a search ? - }); - - // FIXME : - // new GeoNetwork.widget.TagCloudView( { - // renderTo : 'tag-cloud-org', - // root : 'organizationNames.organizationName', - // searchField : 'any', - // catalogue : catalogue - // }); - - searchForm = new Ext.FormPanel({ - border: false, - id: 'searchForm', - renderTo: 'search-form', - width: 350, - defaults: { - width: 230 - }, - defaultType: 'textfield', - items: GeoNetwork.util.SearchFormTools.getSimpleFormFields(catalogue.services), - buttons: [{ - text: 'Search', - id: 'searchBt', - icon: '../resources/images/default/find.png', - // FIXME : iconCls : 'md-mn-find', - iconAlign: 'right', - listeners: { - click: function(){ - catalogue.search('searchForm'); - } - } - }] - }); - - // Launch search when enter key press - var map = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function(){ - Ext.getCmp('searchBt').fireEvent('click'); - } - }]); - - // Focus on full text search field - Ext.getDom('E_any').focus(true); -}); - diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/wxs-extractor.html b/web-client/src/main/resources/apps/js/GeoNetwork/examples/wxs-extractor.html deleted file mode 100644 index 986d33f0538..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/wxs-extractor.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Data extraction from WFS - - - - - - - - - - - - - - -

      WxS extractor widget

      -

      Simple widget which helps user define an area of interest in order to extract data - from a WFS server. This example could be called with a url and version parameters. - Example: wxs-extractor.html?url=http://localhost:8080/geoserver/wfs

      -
      -
      - - diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/examples/wxs-extractor.js b/web-client/src/main/resources/apps/js/GeoNetwork/examples/wxs-extractor.js deleted file mode 100644 index f79154be084..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/examples/wxs-extractor.js +++ /dev/null @@ -1,35 +0,0 @@ -OpenLayers.ProxyHostURL = '../../../../proxy?url='; - -OpenLayers.ProxyHost = function(url){ - if (url && url.indexOf(window.location.host) != -1) { - return url; - } else { - return OpenLayers.ProxyHostURL + encodeURIComponent(url); - } -}; - -Ext.onReady(function() { - var urlParameters = GeoNetwork.Util.getParameters(location.href); - - var map = new OpenLayers.Map({ - div : "map", - controls : [ new OpenLayers.Control.TouchNavigation({ - dragPanOptions : { - enableKinetic : true - } - }), new OpenLayers.Control.Zoom() ], - layers : [ new OpenLayers.Layer.OSM("OpenStreetMap", null, { - transitionEffect : "resize" - }) ], - center : new OpenLayers.LonLat(0, 0), - zoom : 1 - }); - - new GeoNetwork.WxSExtractor({ - renderTo : 'extractor', - url: urlParameters.url || 'http://services.sandre.eaufrance.fr/geo/ouvrage', - version: urlParameters.version, - layer: 'repom', - map: map - }); -}); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork.js deleted file mode 100644 index 21b781e0dd0..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork.js +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -/* - * The code in this file is based on code taken from OpenLayers. - * - * Copyright (c) 2006-2007 MetaCarta, Inc., published under the Clear BSD - * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the - * full text of the license. - */ - -(function() { - - /** - * Check to see if GeoNetwork.singleFile is true. It is true if the - * GeoNetwork/SingleFile.js is included before this one, as it is - * the case in single file builds. - */ - var singleFile = (typeof GeoNetwork == "object" && GeoNetwork.singleFile); - - /** - * The relative path of this script. - */ - var scriptName = singleFile ? "GeoNetwork.js" : "lib/GeoNetwork.js"; - - /** - * Function returning the path of this script. - */ - var getScriptLocation = function() { - var scriptLocation = ""; - // If we load other scripts right before GeoNetwork using the same - // mechanism to add script resources dynamically (e.g. OpenLayers), - // document.getElementsByTagName will not find the GeoNetwork script tag - // in FF2. Using document.documentElement.getElementsByTagName instead - // works around this issue. - var scripts = document.documentElement.getElementsByTagName('script'); - for(var i=0, len=scripts.length; i -1) && (index + scriptName.length == pathLength)) { - scriptLocation = src.slice(0, pathLength - scriptName.length); - break; - } - } - } - return scriptLocation; - }; - - /** - * If GeoNetwork.singleFile is false then the JavaScript files in the jsfiles - * array are autoloaded. - */ - if(!singleFile) { - var jsfiles = new Array( - "GeoNetwork/Util.js", - "GeoNetwork/Message.js", - "GeoNetwork/lang/ca.js", - "GeoNetwork/lang/en.js", - "GeoNetwork/lang/fr.js", - "GeoNetwork/lang/nl.js", - "GeoNetwork/lang/de.js", - "GeoNetwork/lang/es.js", - "GeoNetwork/lang/pl.js", - "GeoNetwork/Catalogue.js", - "GeoNetwork/util/Old.js", - "GeoNetwork/util/SearchTools.js", - "GeoNetwork/util/INSPIRESearchFormTools.js", - "GeoNetwork/util/SearchFormTools.js", - "GeoNetwork/util/CSWSearchTools.js", - "GeoNetwork/data/SubTemplateTypeStore.js", - "GeoNetwork/util/HelpTools.js", -// "GeoNetwork/util/LinkTools.js", - "GeoNetwork/data/GroupStore.js", - "GeoNetwork/data/UserStore.js", - "GeoNetwork/data/StatusStore.js", - "GeoNetwork/data/CategoryStore.js", - "GeoNetwork/data/ValidationRuleStore.js", - "GeoNetwork/data/LanguageStore.js", - "GeoNetwork/data/SuggestionStore.js", - "GeoNetwork/data/ThesaurusFeedStore.js", - "GeoNetwork/data/RegionStore.js", - "GeoNetwork/data/CodeListStore.js", - "GeoNetwork/data/ThesaurusStore.js", - "GeoNetwork/data/CatalogueSourceStore.js", - "GeoNetwork/data/HarvesterStore.js", - "GeoNetwork/data/MetadataThumbnailStore.js", - "GeoNetwork/data/MetadataResultsStore.js", - "GeoNetwork/data/MetadataResultsFastStore.js", - "GeoNetwork/data/MetadataRelationStore.js", - "GeoNetwork/data/MetadataCSWResultsStore.js", - "GeoNetwork/data/MetadataSummaryStore.js", - "GeoNetwork/data/OpenSearchSuggestionReader.js", - "GeoNetwork/data/OpenSearchSuggestionStore.js", - "GeoNetwork/form/SearchField.js", - "GeoNetwork/form/GeometryMapField.js", - "GeoNetwork/form/OpenSearchSuggestionTextField.js", - "GeoNetwork/widgets/LoginForm.js", - "GeoNetwork/widgets/Templates.js", - "GeoNetwork/widgets/MetadataMenu.js", - "GeoNetwork/widgets/SearchFormPanel.js", - "GeoNetwork/widgets/FeedbackForm.js", - "GeoNetwork/widgets/MetadataResultsView.js", - "GeoNetwork/widgets/MetadataResultsToolbar.js", - "GeoNetwork/widgets/FacetsPanel.js", - "GeoNetwork/widgets/TagCloudView.js", - "GeoNetwork/widgets/admin/AdminTools.js", - "GeoNetwork/widgets/admin/MetadataInsertPanel.js", - "GeoNetwork/widgets/admin/HarvesterPanel.js", - "GeoNetwork/widgets/admin/SubTemplateManagerPanel.js", - "GeoNetwork/widgets/admin/PrivilegesPanel.js", - "GeoNetwork/widgets/view/ViewWindow.js", - "GeoNetwork/widgets/view/ViewPanel.js", - "GeoNetwork/widgets/editor/KeywordSelectionPanel.js", - "GeoNetwork/widgets/editor/ConceptSelectionPanel.js", - "GeoNetwork/widgets/editor/CRSSelectionPanel.js", - "GeoNetwork/widgets/editor/SubTemplateSelectionPanel.js", - "GeoNetwork/widgets/editor/NewMetadataPanel.js", - "GeoNetwork/widgets/editor/LogoSelectionPanel.js", - "GeoNetwork/widgets/editor/LinkedMetadataSelectionPanel.js", - "GeoNetwork/widgets/editor/EditorTools.js", - "GeoNetwork/widgets/editor/SuggestionsPanel.js", - "GeoNetwork/widgets/editor/HelpPanel.js", - "GeoNetwork/widgets/editor/GeoPublisherPanel.js", - "GeoNetwork/widgets/editor/ThumbnailPanel.js", - "GeoNetwork/widgets/editor/LinkResourcesWindow.js", - "GeoNetwork/widgets/editor/LinkedMetadataPanel.js", - "GeoNetwork/widgets/editor/ValidationPanel.js", - "GeoNetwork/widgets/editor/EditorPanel.js", - "GeoNetwork/widgets/editor/EditorToolbar.js", - "GeoNetwork/widgets/OGCServiceQuickRegister.js", - "GeoNetwork/map/ExtentMap.js", - "GeoNetwork/map/core/OGCUtil.js", - "GeoNetwork/map/core/CatalogueInterface.js", - "GeoNetwork/map/core/WMCManager.js", - "GeoNetwork/map/Control/ExtentBox.js", - "GeoNetwork/map/Control/ZoomWheel.js", - "GeoNetwork/map/widgets/tree/WMSListGenerator.js", - "GeoNetwork/map/widgets/tree/WMSTreeGenerator.js", - "GeoNetwork/map/widgets/wms/BrowserPanel.js", - "GeoNetwork/map/widgets/wms/LayerInfoPanel.js", - "GeoNetwork/map/widgets/wms/LayerStylesPanel.js", - "GeoNetwork/map/widgets/wms/PreviewPanel.js", - "GeoNetwork/map/widgets/wms/WMSLayerInfo.js", - "GeoNetwork/map/widgets/FeatureInfoPanel.js", - "GeoNetwork/map/widgets/LegendPanel.js", - "GeoNetwork/map/widgets/OpacitySlider.js", - "GeoNetwork/map/widgets/ProjectionSelector.js", - "GeoNetwork/map/widgets/TimeSelector.js", - "GeoNetwork/map/widgets/WxSExtractor.js", - "GeoNetwork/map/windows/BaseWindow.js", - "GeoNetwork/map/windows/SingletonWindowManager.js", - "GeoNetwork/map/windows/AddWMS.js", - "GeoNetwork/map/windows/FeatureInfo.js", - "GeoNetwork/map/windows/Opacity.js", - "GeoNetwork/map/windows/LoadWmc.js", - "GeoNetwork/map/windows/Disclaimer.js", - "GeoNetwork/map/windows/LayerStyles.js", - "GeoNetwork/map/windows/WmsLayerMetadata.js", - "GeoNetwork/map/windows/WMSTime.js", - "../../OpenLayers/addins/LoadingPanel.js", - "../../OpenLayers/addins/ScaleBar.js", - "../../OpenLayers/addins/Format/CSWGetRecords/v2_0_2_GeoNetwork.js", - "../../OpenLayers/addins/Format/GeoNetworkRecords.js" - //"GeoNetwork/map/widgets/PrintAction.js" - ); - - var allScriptTags = new Array(jsfiles.length); - - var host = getScriptLocation() + "lib/"; - for (var i=0, len=jsfiles.length; i"; - } - document.write(allScriptTags.join("")); - } -})(); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Catalogue.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Catalogue.js deleted file mode 100644 index deef9c043a4..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Catalogue.js +++ /dev/null @@ -1,1613 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork'); - -/** api: (define) - * module = GeoNetwork - * class = Catalogue - * base_link = `Ext.util.Observable `_ - */ -/** api: example - * - * Sample code to create a GeoNetwork catalogue connection on the - * same host as the web page (ig. http://localhost/geonetwork will be the - * default connection url): - * - * .. code-block:: javascript - * - * var catalogue = new GeoNetwork.Catalogue({ - * metadataStore : GeoNetwork.data.MetadataResultsStore(), - * summaryStore : GeoNetwork.data.MetadataSummaryStore() - * }); - * - */ -/** api: constructor - * .. class:: GeoNetwork(config) - * - * Create a GeoNetwork catalogue client. - * - * - * Catalogue client is recommended to be running on the same - * host as the catalogue in order to be used without a proxy - * for XHR requests. Catalogue could run with a proxy but some - * functionnalities will not be able because they require a - * continuity in the session (often broken by the use of - * a proxy). - * - * If the application need both cross domain and local - * domain XHR Request configure OpenLayers.ProxyHost with - * the following: - * - * .. code-block:: javascript - * - * OpenLayers.ProxyHost = function(url) { - * if (url.indexOf(window.location.host)!=-1) { - * return url; - * } else { - * return OpenLayers.ProxyHostURL + encodeURIComponent(url); - * } - * }; - * - * - * - * To be improved & discussed : - * - * * i18n : generate from GeoNetwork file ? - * - * * memory usage (eg. destroy calls) - * - * * massive action : hack made embedded existing HTML page in a panel - * - * and overriding JS in Old.js - * - * * search form : remote & Z39.50 - * - * * global var named catalogue required (eg. Templates) should be improved, How ? - * - * * add more events to component in order to reduce dependencies - * - * * session state ? using localStorage or cookie ? - * - */ -GeoNetwork.Catalogue = Ext.extend(Ext.util.Observable, { - /** api: property[SERVERURL] - * ``String`` GeoNetwork catalogue host URL. - */ - SERVERURL: null, - - /** api: property[URL] - * ``String`` GeoNetwork catalogue URL. - */ - URL: null, - - /** api: property[LANG] - * ``String`` Optional GeoNetwork language - * parameter use for all services (eg. - * http://localhost/geonetwork/en/xml.search). - * ``DEFAULT_LANG`` by default. - */ - LANG: "en", - - /** api: property[LANG] - * ``String`` Default language - */ - DEFAULT_LANG: "en", - - - EDITOR_MODE : { - IN_OTHER_WINDOW : 1, - IN_EDITOR_POPUP : 2 - }, - - editMode : 1, - - /** api: config[hostUrl] - * ``String`` Optional GeoNetwork host name. - * Default value is web page host name. - * - * api: example - * .. code-block:: javascript - * - * var catalogue = new GeoNetwork.Catalogue({ - * hostUrl : 'http://www.fao.org/', - * servlet : 'geonetwork' - * }); - * - * - */ - hostUrl: null, - - /** api: config[servlet] - * ``String`` Optional GeoNetwork servlet name. - * Default value is ``geonetwork``. - */ - servlet: null, - - extentMap: null, - - /** api: property[services] - * ``Object`` The list of GeoNetwork services - */ - services: {}, - - /** api: property[windowOption] - * ``String`` Configuration of popup windows - */ - windowOption: "menubar=no,location=no,toolbar=no,directories=no", - - /** api: property[windowName] - * ``String`` Name of popup windows - * - * FIXME : this is always the same, assumming the main app will - * always popup in the same window. Maybe that's not a good idea - * in order to allow multi editors for example. - */ - windowName: "", - - /** api: property[startRecord] - * ``Number`` Index of the first record for current search - */ - startRecord: 1, - - /** api: config[mdStore] - * ``GeoNetwork.data.MetadataResultsStore`` A store holding - * search results (see :class:`GeoNetwork.data.MetadataResultsStore` ) - */ - mdStore: null, - - /** api: config[summaryStore] - * ``GeoNetwork.data.MetadataSummaryStore`` The store - * for search summary results (see :class:`GeoNetwork.data.MetadataSummaryStore` ). - */ - summaryStore: null, - - /** api: config[statusBarId] - * ``String`` Optional identifier of an ``Ext.Element`` or a DOM element - * to be use to display status information. - */ - statusBarId: null, - - /** api: config[mdDisplayPanelId] - * ``String`` Optional identifier of a panel to use to display metadata - */ - mdDisplayPanelId: undefined, - /** api: config[resultsView] - * ``String`` Optional metadata results view panel - */ - resultsView: undefined, - /** api: config[mdOverlayedCmpId] - * ``String`` Not used for now - */ - mdOverlayedCmpId: undefined, - - /** api: property[identifiedUser] - * ``Object`` Current user information and role. - */ - identifiedUser: undefined, - - metadataEditFn: undefined, - /** api: config[adminAppUrl] - * ``String`` URL to the administration interface - * TODO : should we go to admin service by default ? - * - */ - adminAppUrl: '', - /** private: property[selectedRecords] - * ``Number`` Number of selected records - */ - selectedRecords: 0, - - /** - * private: property[casEnabled] - * ``Boolean`` If is cas is the authentication - * mechanism. getInfo will set this property - */ - casEnabled : false, - - /** private: property[info] - * ``Object`` Information about the catalog retrieved from xml.info service - */ - info: null, - /** private: method[constructor] - * Initializes the catalogue connection configuration - * and service URL. - * - */ - constructor: function(config){ - config = config || {}; - Ext.apply(this, config); - - - if (this.hostUrl) { - // relative path - if (this.hostUrl.indexOf('http') === -1) { - this.hostUrl = window.location.href.match(/http.*\//, '') + this.hostUrl; - } - this.SERVERURL = this.hostUrl; - } else { - this.SERVERURL = 'http://' + window.location.host + '/'; - } - - // Set catalogue URL based on hostUrl first - if (this.hostUrl) { - this.URL = this.SERVERURL; - } else if (this.servlet) { - this.URL = this.SERVERURL + this.servlet; - } else { - this.URL = this.SERVERURL + 'geonetwork'; - } - - if (!this.node) { - this.node = 'srv'; - } - - this.LANG = (this.lang ? this.lang : this.DEFAULT_LANG); - - // Register GeoNetwork services URL - var serviceUrl = this.URL + '/' + this.node + '/' + this.LANG + "/"; - this.services = { - rootUrl: serviceUrl, - csw: serviceUrl + 'csw', - feedback: serviceUrl + 'feedback.send', - xmlSearch: serviceUrl + 'xml.search', - mdSelect: serviceUrl + 'metadata.select', - mdView: serviceUrl + 'view', - mdXMLInsert: serviceUrl + 'xml.metadata.insert', - mdInsertPaste: serviceUrl + 'xml.metadata.insert.paste', - mdInsertUpload: serviceUrl + 'xml.mef.import.ui', - mdShow: serviceUrl + 'metadata.show.embedded', - mdMEF: serviceUrl + 'mef.export', - mdXMLGet: serviceUrl + 'xml.metadata.get', - mdRDFGet: serviceUrl + 'rdf.metadata.get', - mdXMLGet19139: serviceUrl + 'xml_iso19139', - mdXMLGetDC: serviceUrl + 'xml_dublin-core', - mdXMLGetFGDC: serviceUrl + 'xml_fgdc-std', - mdXMLGet19115: serviceUrl + 'xml_iso19115to19139', - mdDuplicate: serviceUrl + 'metadata.duplicate.form', - mdDelete: serviceUrl + 'metadata.delete', - mdExtract: serviceUrl + 'metadata.service.extract', - mdPrint: serviceUrl + 'pdf', - //mdEdit : serviceUrl + 'metadata.edit', - mdEdit: serviceUrl + 'edit', - mdCreate: serviceUrl + 'metadata.create.new', - mdUpdate: serviceUrl + 'metadata.update.new', - mdProcessingXml: serviceUrl + 'xml.metadata.processing', - mdProcessing: serviceUrl + 'metadata.processing.new', - mdMassiveChildrenForm: serviceUrl + 'metadata.batch.children.form', - mdAdmin: serviceUrl + 'metadata.admin.form', - mdAdminSave: serviceUrl + 'md.privileges.update', - mdAdminXml: serviceUrl + 'xml.metadata.admin.form', - mdBatchAdminXml: serviceUrl + 'md.privileges.batch', - mdBatchSaveXml: serviceUrl + 'md.privileges.batch.update', - mdValidate: serviceUrl + 'xml.metadata.validate', - mdSuggestion: serviceUrl + 'metadata.suggestion', - mdCategory: serviceUrl + 'metadata.category.form', - mdRelationInsert: serviceUrl + 'xml.relation.insert', - mdRelationDelete: serviceUrl + 'xml.relation.delete', - mdRelation: serviceUrl + 'xml.relation', - mdGetThumbnail: serviceUrl + 'metadata.thumbnail', - mdSetThumbnail: serviceUrl + 'md.thumbnail.upload', - mdUnsetThumbnail: serviceUrl + 'metadata.thumbnail.unset.new', - mdImport: serviceUrl + 'metadata.xmlinsert.form', - mdStatus: serviceUrl + 'metadata.status.form', - mdStatusSet: serviceUrl + 'metadata.status', - mdVersioning: serviceUrl + 'metadata.version', - subTemplateType: serviceUrl + 'subtemplate.types', - subTemplate: serviceUrl + 'subtemplate', - upload: serviceUrl + 'resources.upload.new', - uploadResource: serviceUrl + 'resource.upload.and.link', - delResource: serviceUrl + 'resource.del.and.detach', - prepareDownload: serviceUrl + 'prepare.file.download', - fileDisclaimer: serviceUrl + 'file.disclaimer', - fileDownload: serviceUrl + 'file.download', - geopublisher: serviceUrl + 'geoserver.publisher', - login: this.URL + '/j_spring_security_check', - logout: this.URL + '/j_spring_security_logout', - mef: serviceUrl + 'mef.export?format=full&version=2', - csv: serviceUrl + 'csv.search', - pdf: serviceUrl + 'pdf.selection.search', - harvestingStart: serviceUrl + 'xml.harvesting.start', - harvestingStop: serviceUrl + 'xml.harvesting.stop', - harvestingRun: serviceUrl + 'xml.harvesting.run', - harvestingAdd: serviceUrl + 'xml.harvesting.add', - harvestingUpdate: serviceUrl + 'xml.harvesting.update', - harvestingRemove: serviceUrl + 'xml.harvesting.remove', - thesaurusAdd: serviceUrl + 'thesaurus.add', - thesaurusActivate: serviceUrl + 'thesaurus.activate', - thesaurusDelete: serviceUrl + 'thesaurus.delete', - thesaurusUpload: serviceUrl + 'xml.thesaurus.upload', - thesaurusDownload: serviceUrl + 'thesaurus.download', - thesaurusConceptAdd: serviceUrl + 'thesaurus.addelement', - thesaurusConceptUpdate: serviceUrl + 'thesaurus.updateelement', - thesaurusConceptDelete: serviceUrl + 'thesaurus.deleteelement', - getIcons: serviceUrl + 'xml.harvesting.info?type=icons', - opensearchSuggest: serviceUrl + 'suggest', - massiveOp: { - NewOwner: serviceUrl + 'metadata.batch.newowner.form', - Categories: serviceUrl + 'metadata.batch.category.form', - Delete: serviceUrl + 'metadata.batch.delete', - Privileges: serviceUrl + 'metadata.batch.admin.form', - Versioning: serviceUrl + 'metadata.batch.version', - Status: serviceUrl + 'metadata.batch.status.form', - Replace: serviceUrl + 'metadata.batch.replace.form' - }, - metadataMassiveUpdatePrivilege: serviceUrl + 'metadata.batch.update.privileges', - metadataMassiveUpdateCategories: serviceUrl + 'metadata.batch.update.categories', - metadataMassiveNewOwner: serviceUrl + 'metadata.batch.newowner', - getMyInfo: serviceUrl + 'xml.info?type=me', - getGroups: serviceUrl + 'xml.info?type=groups', - getRegions: serviceUrl + 'xml.info?type=regions', - getSources: serviceUrl + 'xml.info?type=sources', - getUsers: serviceUrl + 'xml.info?type=users', - getSiteInfo: serviceUrl + 'xml.info?type=site&type=auth&type=userGroupOnly', - getInspireInfo: serviceUrl + 'xml.info?type=inspire', - getIsoLanguages: serviceUrl + 'isolanguages', - schemaInfo: serviceUrl + 'xml.schema.info', - getZ3950repositories: serviceUrl + 'xml.info?type=z3950repositories', - getCategories: serviceUrl + 'xml.info?type=categories', - getHarvesters: serviceUrl + 'xml.harvesting.get', - rate: serviceUrl + 'xml.metadata.rate', - readOnly: serviceUrl + 'xml.info?type=readonly', - xmlConfig: serviceUrl + 'xml.config.get', - admin: serviceUrl + 'admin', - xmlError: serviceUrl + 'xml.main.error', - searchKeyword: serviceUrl + 'xml.search.keywords', - getThesaurus: serviceUrl + 'xml.thesaurus.getList', - getStatus: serviceUrl + 'xml.info?type=status', - getKeyword: serviceUrl + 'xml.keyword.get', - searchCRS: serviceUrl + 'crs.search', - getCRSTypes: serviceUrl + 'crs.types', - logoAdd: serviceUrl + 'logo.add', - updatePassword: serviceUrl + 'change.password#/', - updateUserInfo: serviceUrl + 'admin.console#/organization/users/', - harvestingAdmin: serviceUrl + 'admin.console#/harvest', - logoUrl: this.URL + '/images/logos/', - imgUrl: this.URL + '/images/', - harvesterLogoUrl: this.URL + '/images/harvesting/', - getImportXSL: serviceUrl + 'get.conversions.xsl', - proxy: this.URL + '/proxy' - }; - - // TODO : init only once required (ie. metadata show) - this.extentMap = new GeoNetwork.map.ExtentMap(); - - /** private: event[onSelectionChange] - * Fires after the selection change. - */ - /** private: event[afterLogin] - * Fires after the user logged in. - */ - /** private: event[afterLogout] - * Fires after the user logged out. - */ - /** private: event[afterBadLogin] - * Fires after bad user logged in. - */ - /** private: event[afterBadLogout] - * Fires after bad user logged out. - */ - this.addEvents('selectionchange', 'afterLogin', 'afterLogout', 'afterBadLogin', 'afterBadLogout', 'afterDelete'); - - GeoNetwork.Catalogue.superclass.constructor.call(this, config); - }, - setServiceUrl: function(serviceName, url) { - this.services[serviceName] = this.services.rootUrl + url; - }, - /** api: method[isIdentified] - * - * FIXME : return Object - */ - isIdentified: function(){ - return !this.identifiedUser ? false : true; - }, - /** api: method[isAdmin] - * Return true if current user is an admin - */ - isAdmin: function(){ - return this.identifiedUser.role === "Administrator"; - }, - /** api: method[canSetInternalPrivileges] - * Return true if current user can set privileges to internal groups (ie. internet, intranet) - */ - canSetInternalPrivileges: function(){ - return this.identifiedUser.role === "Administrator" || this.identifiedUser.role === "Reviewer"; - }, - /** api: method[isReadOnly] - * Return true if GN is is read-only mode - * - * Only refresh status every 10 sec to not - * call too many times the server status info service. - */ - isReadOnlyCheckInterval: 10000, - isReadOnlyStatus: false, - isReadOnlyLastCheck: null, - isReadOnly: function(){ - var start = new Date().getTime(); - var interval = start - this.isReadOnlyLastCheck; - if (this.isReadOnlyLastCheck == null || - interval > this.isReadOnlyCheckInterval) { - this.isReadOnlyStatus = false; - var request = OpenLayers.Request.GET({ - url: this.services.readOnly, - async: false - }), ro; - - if (request.responseXML) { - var xml = request.responseXML.documentElement; - ro = xml.getElementsByTagName('readonly')[0]; - if(ro) { - this.isReadOnlyStatus = ro.childNodes[0].nodeValue === "true"; - this.isReadOnlyLastCheck = new Date().getTime(); - } - } - } - return this.isReadOnlyStatus; - }, - /** api: method[onAfterLogin] - * :param e: ``Object`` - * - * The "onAfterLogin" listener. - * - * Listeners will be called with the following arguments: - * - * * ``this`` : GeoNetwork.Catalogue - * - * * ``user`` : Current user FIXME - * - */ - onAfterLogin: function(){ - this.fireEvent('afterLogin', this, this.identifiedUser); - }, - /** api: method[onAfterBadLogin] - * :param e: ``Object`` - * - * The "onAfterBadLogin" listener. - * - */ - onAfterBadLogin: function(){ - this.fireEvent('afterBadLogin', this, this.identifiedUser); - }, - /** api: method[onAfterLogout] - * :param e: ``Object`` - * - * The "onAfterLogout" listener. - */ - onAfterLogout: function(){ - this.fireEvent('afterLogout', this, this.identifiedUser); - }, - /** api: method[onAfterBadLogout] - * :param e: ``Object`` - * - * The "onAfterBadLogout" listener. - */ - onAfterBadLogout: function(){ - this.fireEvent('afterBadLogout', this, this.identifiedUser); - }, - /** api: method[onAfterDelete] - * :param e: ``Object`` - * - * The "onAfterDelete" listener. - * - * Listeners will be called with the following arguments: - * - * * ``this`` : GeoNetwork.Catalogue - * - */ - onAfterDelete: function(){ - this.fireEvent('afterDelete', this); - }, - /** api: method[onAfterRating] - * :param e: ``Object`` - * - * The "onAfterRating" listener. - * - * Listeners will be called with the following arguments: - * - * * ``this`` : GeoNetwork.Catalogue - * - */ - onAfterRating: function(){ - this.fireEvent('afterRating', this); - }, - /** api: method[onAfterStatus] - * :param e: ``Object`` - * - * The "onAfterStatus" listener. - * - * Listeners will be called with the following arguments: - * - * * ``this`` : GeoNetwork.Catalogue - * - */ - onAfterStatus: function(){ - this.fireEvent('afterStatus', this); - }, - /** private: method[setSelectedRecords] - * :param nb: ``Number`` - * - * Set number of selected records - */ - setSelectedRecords: function(nb){ - this.selectedRecords = parseInt(nb, 10); - this.onSelectionChange(); - }, - getSelectedRecords: function(){ - return this.selectedRecords; - }, - onSelectionChange: function(){ - this.fireEvent('selectionchange', this, this.getSelectedRecords()); - }, - /** api: method[getInfo] - * :param refresh: ``boolean`` force refreshing the catalog info if not available. - * - * Return catalogue information (site name, organization, id, casEnabled). - */ - getInfo: function (refresh) { - if (refresh || this.info === null) { - this.info = {}; - var properties = ['name', 'organization', 'siteId', 'casEnabled', 'userGroupOnly']; - var request = OpenLayers.Request.GET({ - url: this.services.getSiteInfo, - async: false - }); - - //IE10 issue - if(!request.responseXML) { - var parser = new DOMParser(); - request.responseXML = parser.parseFromString(request.responseText, "application/xml"); - } - - if (request.responseXML) { - var xml = request.responseXML.documentElement; - Ext.each(properties, function(item, idx){ - var children = xml.getElementsByTagName(item)[0]; - if (children) { - this.info[item] = children.childNodes[0].nodeValue; - } - }, this); - } - this.casEnabled = this.info.casEnabled === 'true'; - } - return this.info; - }, - /** api: method[getInspireInfo] - * - * Return catalogue inspire information (enable, enableSearchPanel). - */ - getInspireInfo: function(){ - var info = {}; - var properties = ['enable', 'enableSearchPanel']; - var request = OpenLayers.Request.GET({ - url: this.services.getInspireInfo, - async: false - }); - - //IE10 issue - if(!request.responseXML) { - var parser = new DOMParser(); - request.responseXML = parser.parseFromString(request.responseText, "application/xml"); - } - if (request.responseXML) { - var xml = request.responseXML.documentElement; - Ext.each(properties, function(item, idx){ - var i = xml.getElementsByTagName(item)[0]; - info[item] = i && i.childNodes[0] && i.childNodes[0].nodeValue; - }); - } - return info; - }, - /** private: method[updateStatus] - * - * Update status bar information. Status bar could be an - * HTML div or an Ext.component - * - * TODO : Ext.Element MUST have an update method. - * - */ - updateStatus: function(msg){ - if (this.statusBarId) { - var el = Ext.getCmp(this.statusBarId); - if (el) { - // In case of a TextItem - el.update(msg); - return; - } - - el = Ext.getDom(this.statusBarId); - if (el) { - el.innerHTML = msg; - return; - } - } - }, - /** api: method[search] - * :param formId: ``String`` An Ext.Form identifier. - * :param onSuccess: ``Function or null`` A function to trigger in - * case of success (Ext.emptyFn by default). - * :param onFailure: ``Function or null`` A function to trigger in - * case of failure (Ext.emptyFn by default). - * :param startRecord: ``Number or null`` The start record for the - * search (Default is 1). The number of records returned by a search - * is defined by an E_hits_per_page field defined in the form. If - * not default value is used. - * :param updateStore: ``Boolean`` false to not update catalogue stores. - * Default to true. - * :param metadataStore: ``GeoNetwork.data.MetadataResultsStore or GeoNetwork.data.MetadataResultsFastStore`` the metadata store to use. If undefined, catalogue metadata store - * :param summaryStore: ``GeoNetwork.data.MetadataSummaryStore`` the summary store to use. If undefined, the catalogue summary store. - * :param async: ``Boolean`` false to run in synchrone mode. Default is true. - * - * Run a search operation using GeoNetwork xml.search service. - * Initialize results and summary stores. - */ - search: function(formOrParams, onSuccess, onFailure, startRecord, updateStore, metadataStore, summaryStore, async){ - - var isCatalogueMdStore = this.metadataStore === metadataStore; - if (isCatalogueMdStore) { - this.updateStatus(OpenLayers.i18n('searching')); - } - - if (updateStore !== false) { - updateStore = true; - } - if (!startRecord) { - startRecord = this.startRecord; - } - if (!onSuccess) { - onSuccess = Ext.emptyFn; - } - if (!onFailure) { - onFailure = Ext.emptyFn; - } - if (metadataStore === undefined) { - metadataStore = this.metadataStore; - } - if (summaryStore === undefined) { - summaryStore = this.summaryStore; - } - if (updateStore) { - metadataStore.removeAll(); - } - if (typeof formOrParams === 'object') { - GeoNetwork.util.SearchTools.doQueryFromParams(formOrParams, this, startRecord, onSuccess, onFailure, updateStore, metadataStore, summaryStore, async); - } else { - GeoNetwork.util.SearchTools.doQueryFromForm(formOrParams, this, startRecord, onSuccess, onFailure, updateStore, metadataStore, summaryStore, async); - } - }, - /** api: method[kvpSearch] - * :param query: ``String`` A KVP search string (eg. any=africa to - * do a full text search for africa). All GeoNetwork search terms - * could be used. - * :param onSuccess: ``Function or null`` A function to trigger in - * case of success (Ext.emptyFn by default). - * :param onFailure: ``Function or null`` A function to trigger in - * case of failure (Ext.emptyFn by default). - * :param startRecord: ``Number or null`` The start record for the - * search (Default is 1). The number of records returned by a search - * is defined by an E_hits_per_page field defined in the form. If - * not default value is used. - * :param updateStore: ``Boolean`` true to update catalogue attached stores. - * :param async: ``Boolean`` false to run in synchrone mode. Default is true. - * - * Run a search operation based on KVP query using GeoNetwork - * xml.search service. Initialize results and summary stores. - * KVP search could be used in fast mode in order to quickly - * populate a summary store (for a TagCloud for example). - */ - kvpSearch: function(query, onSuccess, onFailure, startRecord, updateStore, metadataStore, summaryStore, async){ - - if (updateStore !== false) { - updateStore = true; - } - if (!startRecord) { - startRecord = this.startRecord; - } - if (!onSuccess) { - onSuccess = Ext.emptyFn; - } - if (!onFailure) { - onFailure = Ext.emptyFn; - } - if (!metadataStore) { - metadataStore = this.metadataStore; - } - if (!summaryStore) { - summaryStore = this.summaryStore; - } - if (updateStore) { - metadataStore.removeAll(); - } - GeoNetwork.util.SearchTools.doQuery(query, this, startRecord, onSuccess, onFailure, updateStore, metadataStore, summaryStore, async); - }, - /** api: method[cswSearch] - * :param formId: ``String`` An Ext.Form identifier - * :param onSuccess: ``Function or null`` A function to trigger in - * case of success (Ext.emptyFn by default) - * :param onFailure: ``Function or null`` A function to trigger in - * case of failure (Ext.emptyFn by default) - * :param startRecord: ``Number or null`` The start record for the - * search (Default is 1). The number of records returned by a search - * is defined by an E_hits_per_page field defined in the form. If - * not default value is used. - * - * Run a CSW search operation using GeoNetwork csw service. - * Initialize results and summary stores. - */ - cswSearch: function(formId, onSuccess, onFailure, startRecord){ - this.metadataCSWStore.removeAll(); - if (onSuccess) { - onSuccess = Ext.emptyFn; - } - if (onFailure) { - onFailure = Ext.emptyFn; - } - if (startRecord) { - startRecord = this.startRecord; - } - GeoNetwork.util.CSWSearchTools.doCSWQueryFromForm(formId, this, startRecord, onSuccess, null, onFailure); - }, - /** api: method[metadataSelect] - * :param uuids: ``Array(String)`` A list of uuids to select. - * - * Add uuids to current user selection. - */ - metadataSelect: function(type, uuids){ - this.setSelectedRecords(0); - var app = this; - var i = 0; - - for (i = 0; i < uuids.length; i++) { - OpenLayers.Request.GET({ - url: this.services.mdSelect, - params: { - id: uuids[i], - selected: type - }, - success: function(response){ - var nb = response.responseXML.documentElement.getElementsByTagName("Selected")[0].childNodes[0].nodeValue; - if (nb) { - app.setSelectedRecords(nb); - } - }, - failure: function(response){ - Ext.Msg.alert('Selection failed', response.responseText); - } - }); - } - }, - /** api: method[metadataRate] - * :param uuid: ``String`` Metadata identifier - * :param rating: ``Number`` Rate - * - * Update metadata record rating information - */ - metadataRate: function(uuid, rating, onSuccess){ - - OpenLayers.Request.GET({ - url: this.services.rate, - params: { - uuid: uuid, - rating: rating - }, - success: function(response){ - var nb = response.responseXML.documentElement.childNodes[0].nodeValue; - if (onSuccess) { - onSuccess(nb); - } - - catalogue.onAfterRating(); - - return nb; - }, - failure: function(response){ - Ext.Msg.alert('Rating failed', response.responseText); - } - }); - }, - /** api: method[metadataSelectAll] - * :param onSuccess: ``Function`` A function to trigger in case of success. - * - * Select all records in current search. - */ - metadataSelectAll: function(onSuccess){ - this.metadataSelection('add-all', onSuccess); - }, - /** api: method[metadataSelectNone] - * :param onSuccess: ``Function`` A function to trigger in case of success. - * - * Remove all records in current selection. - */ - metadataSelectNone: function(onSuccess){ - this.metadataSelection('remove-all', onSuccess); - }, - /** api: private[metadataSelection] - * :param type: remove-all or add-all - * :param onSuccess: function to trigger on success - * - * Private method called after selection call operations. - * Use GeoNetwork selection service. - */ - metadataSelection: function(type, onSuccess){ - // CHECKME : is this a good option ? - var app = this; - - OpenLayers.Request.GET({ - url: this.services.mdSelect, - params: { - selected: type - }, - success: function(response){ - var nb = response.responseXML.documentElement.getElementsByTagName("Selected")[0].childNodes[0].nodeValue; - if (nb) { - app.setSelectedRecords(nb); - } - - if (onSuccess) { - onSuccess(); - } - }, - failure: function(response){ - // TODO app.selectedRecords = - // response.responseXML.documentElement.getElementsByTagName("Selected")[0].childNodes[0].nodeValue; - } - }); - }, - /** api: method[csvExport] - * - * Export current selection in CSV format. - */ - csvExport: function(){ - window.open(this.services.csv, this.windowName, this.windowOption); - }, - /** api: method[mefExport] - * - * Export current selection in MEF format. - */ - mefExport: function(){ - location.replace(this.services.mef); - }, - /** api: method[pdfExport] - * :param sortField: ``String`` sort field name - * :param sortOrder: ``String`` sort order - * - * Export current selection in PDF format. - */ - pdfExport: function(sortField, sortOrder){ - var pdfExportUrl = this.services.pdf; - - if (sortField != undefined) { - pdfExportUrl = pdfExportUrl + "?sortBy=" + sortField; - - if (sortOrder != undefined) { - pdfExportUrl = pdfExportUrl + "&sortOrder=" + sortOrder; - } - } - - location.replace(pdfExportUrl); - }, - /** api: method[metadataShow] - * :param uuid: ``String`` uuid of the metadata to dislay - * - * Display a metadata record in a Ext.Panel or a Ext.Window. - * Defined GeoNetwork.defaultViewMode variable to change default view mode. - * If not set, simple mode is used. - * - * Define metadataShowFn in order to override metadata show default behavior:: - * - * this.metadataShowFn(uuid, record, url, maximized, width, height); - */ - metadataShow: function(uuid, maximized, width, height){ - // UUID may contains special character like # - var url = this.services.mdView + '?uuid=' + escape(uuid); - var bd = Ext.getBody(); - - if (this.resultsView) { - var record = this.metadataStore.getAt(this.metadataStore.find('uuid', uuid)); - - // No current search available with this record information - if (!record) { - // Retrieve information in synchrone mode - var store = GeoNetwork.data.MetadataResultsFastStore(); - this.kvpSearch("fast=index&_uuid=" + uuid, null, null, null, true, store, null, false); - record = store.getAt(store.find('uuid', uuid)); - } - - // metadata deleted or not visible to current user - if (record !== undefined) { - if (this.metadataShowFn) { - this.metadataShowFn(uuid, record, url, maximized, width, height); - } else { - var win = new GeoNetwork.view.ViewWindow({ - serviceUrl: url, - lang: this.lang, - currTab: GeoNetwork.defaultViewMode || 'simple', - printDefaultForTabs: GeoNetwork.printDefaultForTabs || false, - printUrl: GeoNetwork.printUrl || 'print.html', - catalogue: this, - maximized: maximized || false, - metadataUuid: uuid, - record: record, - resultsView: this.resultsView - }); - win.show(this.resultsView); - win.alignTo(bd, 'tr-tr'); - } - } else { - GeoNetwork.Message().msg({ - title: OpenLayers.i18n('error'), - msg: OpenLayers.i18n('metadata-not-found'), - tokens: { - uuid: uuid - }, - status: 'warning', - target: Ext.getBody() - }); - } - } - }, - metadataShowById: function(id, maximized, width, height){ - var url = this.services.mdView + '?id=' + id, record; - - if (this.resultsView) { - // No current search available with this record information - if (!record) { - // Retrieve information in synchrone mode - var store = GeoNetwork.data.MetadataResultsFastStore(); - // TODO : This failed to load template information - this.kvpSearch("fast=index&_id=" + id, null, null, null, true, store, null, false); - record = store.getAt(store.find('id', id)); - } - this.metadataShow(record ? record.get('uuid') : undefined, maximized, width, height); - } - }, - /** api: method[metadataXMLShow] - * :param uuid: ``String`` uuid of the metadata to dislay - * - * Display a metadata record in a new window in XML format - * - */ - metadataXMLShow: function(uuid, schema){ - // Default GeoNetwork XML service - var service = this.services.mdXMLGet; - - // ISO 19139 or ISO profil will be displayed in ISO19139 - if (schema === 'iso19139') { - service = this.services.mdXMLGet19139; - } else if (schema === 'dublin-core') { - service = this.services.mdXMLGetDC; - } else if (schema === 'fgdc') { - service = this.services.mdXMLGetFGDC; - } else if (schema === 'iso19115') { - service = this.services.mdXMLGet19115; // Force ISO19115 record to 19139 - } - - var url = service + '?uuid=' + uuid; - window.open(url, this.windowName, this.windowOption); - }, - /** api: method[metadataXMLShow] - * :param uuid: ``String`` uuid of the metadata to dislay - * - * Display a metadata record in a new window in XML format - * - */ - metadataPrint: function(uuid){ - var url = this.services.mdPrint + '?uuid=' + uuid; - location.replace(url); - }, - /** api: method[metadataMEF] - * :param uuid: ``String`` uuid of the metadata to export in MEF format - * - * Open new window to retrieve MEF file for the metadata record - * - */ - metadataMEF: function(uuid){ - var url = this.services.mdMEF + '?version=2&uuid=' + uuid; - location.replace(url); - }, - /** - * Return true if browser is supported. - * Display an error message if not and return false. - */ - isSupportedBrowser: function(msg) { - if (Ext.isIE6 || Ext.isIE7 || Ext.isIE8) { - this.showError(OpenLayers.i18n('unsupportedBrowser'), msg); - return false; - } else { - return true; - } - }, - /** api: method[metadataEdit] - * :param uuid: ``String`` Uuid of the metadata record to edit - * - * Open a metadata editor. - * - * FIXME : metadata.edit service does not support uuid param - */ - metadataEdit: function(id, create, group, child, isTemplate, schema){ - - switch(this.editMode) { - case this.EDITOR_MODE.IN_EDITOR_POPUP: - if (this.metadataEditFn) { - this.metadataEditFn(id, create, group, child, isTemplate, schema); - } - break; - default: - var url; - if (create) { - child = child ? 'y' : 'n'; - url = this.services.mdCreate + '?id=' + id + '&group=' + group + - '&template=' + isTemplate + '&child=' + child; - } else { - url = this.services.mdEdit + '?id=' + id; - } - window.open(url, this.windowName, this.windowOption); - } - }, - metadataEdit2: function(id, create, group, child, isTemplate, schema){ - if (this.isSupportedBrowser(OpenLayers.i18n('editorBrowserRestriction'))) { - var url = 'catalog.edit#/'; - if (create) { - if (id) { - if (child) { - url += 'create?childOf=' + id; - } else { - url += 'create?from=' + id; - } - } else { - url += 'create'; - } - } else { - url += 'metadata/' + id; - } - window.open(url, '_blank'); - } - }, - /** api: method[metadataDuplicate] - * :param uuid: ``String`` Uuid of the metadata to duplicate - * - * Create a metadata by duplication of an existing one - */ - metadataDuplicate: function(uuid){ - window.open(this.services.mdDuplicate + '?uuid=' + uuid, this.windowName, this.windowOption); - }, - /** api: method[metadataCreateChild] - * :param uuid: ``String`` Uuid of the metadata to duplicate - * - * Create a child metadata record from an existing one - */ - metadataCreateChild: function(uuid){ - window.open(this.services.mdDuplicate + '?child=y&uuid=' + uuid, this.windowName, this.windowOption); - }, - /** api: method[metadataDuplicateWithSchema] - * :param schema: ``String`` Schema - * - * Create a metadata record in one of the schema - */ - metadataDuplicateWithSchema: function(uuid, schema){ - window.open(this.services.mdDuplicate + '?uuid=' + uuid + - "&schema=" + - schema, this.windowName, this.windowOption); - }, - /** api: method[metadataDelete] - * :param uuid: ``String`` Uuid of the metadata - * - * Delete metadata record. - */ - metadataDelete: function(uuid){ - Ext.Msg.confirm(OpenLayers.i18n('deleteRecord'), OpenLayers.i18n('deleteConfirm'), this.metadataDeleteDo, uuid); - }, - /** api: private[metadataDeleteDo] - * - * Private method called after user confirmation. - * Use GeoNetwork metadata.delete service. - * - * FIXME : need a global var named catalogue - * TODO : trigger results refresh ? - * TODO : create a status or popup bar object to display info - */ - metadataDeleteDo: function(btn){ - if (btn === 'yes') { - var params = { - uuid: this - }; - catalogue.doAction(catalogue.services.mdDelete, params, - OpenLayers.i18n('deleteRecordSuccess'), - OpenLayers.i18n('deleteRecordFailure'), - catalogue.onAfterDelete.bind(catalogue)); - } - }, - /** api: method[doAction] - * :param url: ``String`` The service URL to call - * :param params: ``Object`` The service parameters - * :param msgSuccess: ``String`` Optional popup title on success - * :param msgFailure: ``String`` Optional popup title on failure - * :param onSuccess: ``Function`` Optional function to trigger on success - * :param onFailure: ``Function`` Optional function to trigger on failure - * - * - * Method called to run a - * GeoNetwork service and popup a message after success and failure. - * - * TODO : create a status or popup bar object to display info - */ - doAction: function(url, params, msgSuccess, msgFailure, onSuccess, onFailure){ - if (url.indexOf('http') === -1) { - url = this.services.rootUrl + url; - } - - OpenLayers.Request.GET({ - url: url, - params: params, - success: function(response){ - if (msgSuccess) { - GeoNetwork.Message().msg({ - title: OpenLayers.i18n(msgSuccess), - msg: response.responseText, - status: '', - target: Ext.getBody() - }); - } - - if (onSuccess) { - onSuccess(response); - } - }, - failure: function(response){ - if (msgFailure) { - Ext.Msg.alert(msgFailure, response.responseText); - } - if (onFailure) { - onFailure(response); - } - } - }); - }, - getNodeText: function(node){ - if (node) { - return node.innerText || node.textContent || node.text; - } else { - return ''; - } - }, - /** api: method[isLoggedIn] - * - * Get the xml.info for me. If user is not identified - * response xml will have a me element with an authenticated attribute. - * If catalogue URL is wrong, response status is 404 (check catalogue URL). - * In case of exception continue catalogue connection validation - * using the xml.main.error service (@see checkError). - */ - isLoggedIn: function(){ - var response = OpenLayers.Request.GET({ - url: this.services.getMyInfo, - async: false - }), exception, authenticated, me; - - if(!response.responseXML) { - var parser = new DOMParser(); - response.responseXML = parser.parseFromString(response.responseText, "application/xml"); - } - me = response.responseXML.getElementsByTagName('me')[0]; - authenticated = me.getAttribute('authenticated') == 'true'; - - // Check status and also check than an Exception is not described in the HTML response - // in case of bad startup - exception = response.responseText.indexOf('Exception') !== -1; - - if (response.status === 200 && authenticated) { - this.identifiedUser = { - id: this.getNodeText(me.getElementsByTagName('id')[0]), - username: this.getNodeText(me.getElementsByTagName('username')[0]), - name: this.getNodeText(me.getElementsByTagName('name')[0]), - surname: this.getNodeText(me.getElementsByTagName('surname')[0]), - email: this.getNodeText(me.getElementsByTagName('email')[0]), - hash: this.getNodeText(me.getElementsByTagName('hash')[0]), - role: this.getNodeText(me.getElementsByTagName('profile')[0]) - }; - this.onAfterLogin(); - return true; - } else if (response.status === 404) { - this.showError(OpenLayers.i18n('connectIssue'), - OpenLayers.i18n('connectIssueMsg') + this.services.rootUrl + '.'); - } else if (exception) { - this.checkError(); - return false; - } else { - // Reset user cookie information - if (cookie) { - cookie.set('user', undefined); - } - - this.identifiedUser = undefined; - this.onAfterBadLogin(); - - return false; - } - }, - postToUrl: function (path, params, method) { - method = method || "post"; // Set method to post by default if not specified. - - // The rest of this code assumes you are not using a library. - // It can be made less wordy if you use one. - var form = document.createElement("form"); - form.setAttribute("method", method); - form.setAttribute("action", path); - - for(var key in params) { - if(params.hasOwnProperty(key)) { - var hiddenField = document.createElement("input"); - hiddenField.setAttribute("type", "hidden"); - hiddenField.setAttribute("name", key); - hiddenField.setAttribute("value", params[key]); - - form.appendChild(hiddenField); - } - } - - document.body.appendChild(form); - form.submit(); - }, - /** api: method[login] - * :param username: ``String`` The user name - * :param password: ``String`` The password for the user - * - * Log in to the catalogue. - * - * Fires the afterLogin or afterBadLogin events - * - * TODO : GeoNetwork does not return any information about the - * user. Those information are required in the client side. - */ - login: function(username, password){ - var app = this, user; - var intervalID; - var loginAttempts = 0; - var loginWindow; - if (this.casEnabled) { - loginWindow = window.open(this.URL+'/srv/'+this.LANG+'/login.form?casLogin', '_casLogin', 'menubar=no,location=no,toolbar=no', true); - intervalID = setInterval(function (){ - loginAttempts += 1; - if(loginAttempts > (5*60*2)) { - clearInterval (intervalID); - app.identifiedUser = undefined; - app.onAfterBadLogin(); - } else if(loginWindow.closed) { - clearInterval (intervalID); - app.isLoggedIn(); - } - }, 500); - } else { - var params = {username: username, password: password}; - if (this.node) { - params.node = this.node; - } - params.redirectUrl = '/..' + location.pathname; - this.postToUrl(this.services.login, params, 'POST'); -// OpenLayers.Request.POST({ -// url: this.services.login, -// data: OpenLayers.Util.getParameterString(params), -// headers: { -// "Content-Type": "application/x-www-form-urlencoded" -// }, -// success: function(response){ -// app.isLoggedIn(); // will get the user information and trigger after login event -// }, -// failure: function(response){ -// app.identifiedUser = undefined; -// app.onAfterBadLogin(); -// // TODO : Get Exception from GeoNetwork -// } -// }); - } - }, - /** api: method[logout] - * Log out from the catalogue. - * - * Fires the afterLogout or afterBadLogout events - */ - logout: function(){ - if (this.casEnabled) { - window.location = this.services.logout; - } else { - var params = {}; - params.redirectUrl = '/..' + location.pathname; - this.postToUrl(this.services.logout, params, 'POST'); - -// var app = this; -// OpenLayers.Request.GET({ -// url: this.services.logout, -// async: false, // logout does not seem to work when it is asynchronous request -// success: function(response){ -// app.identifiedUser = undefined; -// app.onAfterLogout(); -// }, -// failure: function(response){ -// app.identifiedUser = undefined; -// app.onAfterBadLogout(); -// } -// }); - } - }, - /** api: method[checkError] - * Check if catalogue started correctly - * - * :param successCb: A callback to run on success. Argument this and response are passed as parameters. - */ - checkError: function(successCb){ - var app = this, error, msg; - - OpenLayers.Request.GET({ - url: this.services.xmlError, - success: function(response){ - error = app.parseError(response.responseXML); - msg = error.info + " " + error.exc + "
      " + error.stack; - app.showError('Catalogue error', msg); - if (successCb) { - successCb(app, response); - } - }, - failure: function(response){ - app.showError('Catalogue error', response.status); - } - }); - }, - /** api: method[showError] - * Display an alert message box. - * - * :param title: The message box title - * :param msg: The message in the box - */ - showError: function(title, msg){ - Ext.MessageBox.show({ - title: title, - msg: msg, - buttons: Ext.MessageBox.OK, - icon: Ext.MessageBox.ERROR - }); - }, - /** api: method[parseError] - * Parse a GeoNetwork startup error exception. - * - * :param xml: The xml error - */ - parseError: function(xml){ - var error = xml.getElementsByTagName('error')[0]; - - return { - stack: error.getElementsByTagName('Stack')[0].firstChild.nodeValue, - exc: error.getElementsByTagName('Exception')[0].firstChild.nodeValue, - resource: error.getElementsByTagName('Resource')[0].firstChild.nodeValue, - msg: error.getElementsByTagName('Message')[0].firstChild.nodeValue, - provider: error.getElementsByTagName('Provider')[0].firstChild.nodeValue, - info: error.getElementsByTagName('Error')[0].firstChild.nodeValue - }; - }, - /** api: method[admin] - * - * Open the administration interface according to adminAppUrl properties. - */ - admin: function(){ - if (this.isSupportedBrowser(OpenLayers.i18n('editorBrowserRestriction'))) { - location.href = this.adminAppUrl; - } - }, - /** api: method[admin] - * - * Open the administration interface according to adminAppUrl properties. - */ - moveToURL: function(url){ - location.href = url; - }, - metadataImport: function(){ - location.href = this.services.mdImport; - }, - /** api: method[massiveOp] - * :param type: Type of massive operation. One of ``NewOwner``, - * ``Categories``, ``Delete``, ``Privileges`` - * - * Load massive operation in a window - * align to top and centered. - * - * TODO : Could we have a window like a modal box ? - * no bottom borders. - * - * FIXME : Need work on GeoNetwork side to fix JS calls - */ - massiveOp: function(type, cb){ - if (type === 'Privileges') { - var url = this.services.mdBatchAdminXml + "?id=" + id; - var privilegesPanel = new GeoNetwork.admin.PrivilegesPanel({ - id: id, - url: url, - batch: true, - onlyUserGroup: this.info.userGroupOnly.toLowerCase() === 'true' || false - }); - this.modalAction(OpenLayers.i18n('setBatchPrivileges'), privilegesPanel, cb); - } else if (type === 'Replace') { - var url = this.services.massiveOp[type]; - this.modalAction(OpenLayers.i18n('massiveOp') + " - " + type, url, cb, true); - } else { - var url = this.services.massiveOp[type]; - this.modalAction(OpenLayers.i18n('massiveOp') + " - " + type, url, cb); - } - }, - /** private: method[modalAction] - * - * Create a modal window and load the URL content or add the panel - * in the modal window. - * - * If no callback provided, default callback on error, close the window. - * - * TODO : retrieve error message on error (currently HTML services are - * called with HTML response not easy to parse) - */ - modalAction: function(title, urlOrPanel, cb, scripts){ - if (urlOrPanel) { - var app = this, win, defaultCb = function(el, success, response, options) { - if (!success){ - app.showError('Catalogue error', title); - win.close(); - } - }; - - - if(typeof(scripts) == 'undefined') { - scripts = false; - } - - var item; - if(typeof(urlOrPanel) == 'string') { - item = new Ext.Panel({ - autoLoad: { - url: urlOrPanel, - callback: cb || defaultCb, - scripts: scripts, - scope: win - }, - border: false, - frame: false, - autoScroll: true - }) - } - else { - item =urlOrPanel; - } - - - win = new Ext.Window({ - id: 'modalWindow', - layout: 'fit', - width: 900, - height: 500, - closeAction: 'destroy', - plain: true, - modal: true, - draggable: false, - title: title, - items: item - }); - win.show(this); - win.alignTo(Ext.getBody(), 't-t'); - - } - }, - /** api: method[metadataAdmin] - * Metadata admin form for privileges - */ - metadataAdmin: function(record){ - var url = this.services.mdAdminXml + "?id=" + record.get('id'); - var privilegesPanel = new GeoNetwork.admin.PrivilegesPanel({ - id: record.get('id'), - url: url, - onlyUserGroup: (this.info && this.info.userGroupOnly.toLowerCase() === 'true') || false - }); - this.modalAction(OpenLayers.i18n('setPrivileges') + ' - ' + record.get('title'), privilegesPanel); - }, - /** api: method[metadataAdmin] - * Metadata publication. If record is published, action will unpublished it. - */ - metadataPublish: function(record, messageTarget){ - var published = record.get('isPublishedToAll') === 'true', - flag = published ? 'off' : 'on', - pivileges = ['_1_0=' + flag, '_1_1=' + flag, '_1_5=' + flag, '_1_6=' + flag], - // View, Interactive Map, Download, Featured - service = this.services.mdAdminSave + '?update=true&id=' + record.get('id') + '&', - url = service + pivileges.join('&'), - app = this; - - OpenLayers.Request.GET({ - url: url, - success: function(response){ - if (messageTarget) { - GeoNetwork.Message().msg({ - title: OpenLayers.i18n('metadataRecordPublishedTitle'), - msg: published ? - OpenLayers.i18n('metadataRecordUnPublished') : - OpenLayers.i18n('metadataRecordPublished'), - tokens: { - title: record.get('title') - }, - status: 'info', - target: messageTarget - }); - } - }, - failure: function(response){ - app.showError(OpenLayers.i18n('metadataRecordPublishedTitle'), response.status); - } - }); - }, - /** api: method[metadataStatus] - * Open status form to update metadata status - */ - metadataStatus: function(record){ - var url = this.services.mdStatus + "?id=" + record.get('id'); - this.modalAction(OpenLayers.i18n('setStatus') + ' - ' + record.get('title'), url); - }, - /** api: method[metadataSetStatus] - * Change status for this metadata - */ - metadataSetStatus: function(id, status, msg){ - var url = this.services.mdStatusSet + "?id=" + id + "&status=" + status + "&changeMessage=" + msg; - - catalogue.doAction(catalogue.services.mdStatusSet, { - id: id, - status: status, - changeMessage: msg - }, - undefined, - OpenLayers.i18n('error'), - function () { - GeoNetwork.Message().msg({ - title: OpenLayers.i18n('enableWorkflow'), - msg: OpenLayers.i18n('enableWorkflowStart'), - status: '', - target: Ext.getBody() - }); - catalogue.onAfterStatus(); - }); - }, - /** api: method[metadataVersioning] - * Active versioning for this metadata - */ - metadataVersioning: function(id){ - var url = this.services.mdVersioning + "?id=" + id; - this.modalAction(OpenLayers.i18n('setVersioning'), url); - }, - /** api: method[metadataCategory] - * Metadata admin form for categories - */ - metadataCategory: function(id){ - var url = this.services.mdCategory + "?id=" + id; - this.modalAction(OpenLayers.i18n('setCategories'), url); - }, - /** api: method[metadataPrepareDownload] - * Prepare download metadata popup - */ - metadataPrepareDownload: function(id){ - var url = this.services.prepareDownload + "?id=" + id; - this.modalAction(OpenLayers.i18n('prepareDownload'), url); - } -}); - -/** api: xtype = gn_catalogue */ -Ext.reg('gn_catalogue', GeoNetwork.Catalogue); diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Message.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Message.js deleted file mode 100644 index 8d01b2ff312..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Message.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork'); - -GeoNetwork.Message = function () { - var msgCt; - function createBox(t, s, c) { - return ['
      ', t, '
      ', s, '
      '].join('');; - } - return { - /** api: method[msg] - * :param config: ``Object`` configuration for the message - * title: the message title - * msg: the message content - * tokens: the token to substitute in the msg if any. Default is undefined. - * status: the CSS class to use (success, warning). Default style if undefined. - * target: an element id. document if undefined - * - * - * Display a message or alert - */ - msg : function (config) { - // title, format, status, target - if (!msgCt) { - msgCt = Ext.DomHelper.insertFirst(document.body, {id: 'msg-div'}, true); - } - msgCt.alignTo(config.target || document, 't-t'); - var s = OpenLayers.String.format(config.msg, config.tokens); - var m = Ext.DomHelper.append(msgCt, {html: createBox(config.title, s, config.status)}, true); - m.slideIn('t').pause(config.pause || 4).fadeOut({remove: true}); - } - }; -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/SingleFile.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/SingleFile.js deleted file mode 100644 index 3ca7541221a..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/SingleFile.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace("GeoNetwork"); - -GeoNetwork.singleFile = true; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Util.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Util.js deleted file mode 100644 index ccfd7e467ad..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Util.js +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork'); - -//Required for IE6, 7, 8 -//https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== "function") { - // closest thing possible to the ECMAScript 5 internal IsCallable function - throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); - } - - var aArgs = Array.prototype.slice.call(arguments, 1), - fToBind = this, - fNOP = function () {}, - fBound = function () { - return fToBind.apply(this instanceof fNOP && oThis - ? this - : oThis, - aArgs.concat(Array.prototype.slice.call(arguments))); - }; - - fNOP.prototype = this.prototype; - fBound.prototype = new fNOP(); - - return fBound; - }; -} - -GeoNetwork.Lang = {}; - -GeoNetwork.Util = { - defaultLocale: 'eng', - /** - * Supported GeoNetwork GUI languages - */ - locales: [ - ['ar', 'عربي', 'ara'], - ['ca', 'Català', 'cat'], - ['cn', '中文', 'chi'], - ['de', 'Deutsch', 'ger'], - ['en', 'English', 'eng'], - ['es', 'Español', 'spa'], - ['fr', 'Français', 'fre'], - ['it', 'Italiano', 'ita'], - ['nl', 'Nederlands', 'dut'], - ['no', 'Norsk', 'nor'], - ['pl', 'Polski', 'pol'], - ['pt', 'Рortuguês', 'por'], - ['ru', 'Русский', 'rus'], - ['fi', 'Suomeksi', 'fin'], - ['tr', 'Türkçe', 'tur'] - - ], - /** api: method[setLang] - * :param lang: String ISO 3 letters code - * :param baseUrl: String Base URL use to load Ext loc files - * - * Set OpenLayers lang and load ext required lang files - */ - setLang: function(lang, baseUrl){ - lang = lang || GeoNetwork.Util.defaultLocale; - // translate to ISO2 language code - var openlayerLang = this.getISO2LangCode(lang); - - OpenLayers.Lang.setCode(openlayerLang); - var s = document.createElement("script"); - s.type = 'text/javascript'; - s.src = baseUrl + "/js/ext/src/locale/ext-lang-" + openlayerLang + ".js"; - document.getElementsByTagName("head")[0].appendChild(s); - }, - /** api: method[setLang] - * :param lang: String ISO 3 letters code - * - * - * Return a valid language code if translation is available. - * Catalogue use ISO639-2 code. - */ - getCatalogueLang: function(lang){ - var i; - for (i = 0; i < GeoNetwork.Util.locales.length; i++) { - if (GeoNetwork.Util.locales[i][0] === lang) { - return GeoNetwork.Util.locales[i][2]; - } - } - return 'eng'; - }, - /** api: method[setLang] - * :param lang: String ISO 3 letters code - * - * Return ISO2 language code (Used by OpenLayers lang and before GeoNetwork 2.7.0) - * for corresponding ISO639-2 language code. - */ - getISO2LangCode: function(lang){ - var i; - for (i = 0; i < GeoNetwork.Util.locales.length; i++) { - if (GeoNetwork.Util.locales[i][2] === lang) { - return GeoNetwork.Util.locales[i][0]; - } - } - return 'en'; - }, - /** api: method[getParameters] - * :param url: String URL to parse - * - * Get list of URL parameters including anchor - */ - getParameters: function(url){ - var parameters = OpenLayers.Util.getParameters(url); - if (OpenLayers.String.contains(url, '#')) { - var start = url.indexOf('#') + 1; - var end = url.length; - var paramsString = url.substring(start, end); - - var pairs = paramsString.split(/[\/]/); - for (var i = 0, len = pairs.length; i < len; ++i) { - var keyValue = pairs[i].split('='); - var key = keyValue[0]; - var value = keyValue[1] || ''; - parameters[key] = value; - } - } - return parameters; - }, - getBaseUrl: function(url){ - return url.substring(0, url.indexOf('?') || url.indexOf('#') || url.length); - }, - /** api: property[protocolToCSS] - * - * Provide a mapping between various GeoNetwork protocol and the CSS icon class - */ - protocolToCSS: { - 'application/vnd.ogc.wms_xml': 'addLayerIcon', - 'application/vnd.ogc.wmc': 'addLayerIcon', - 'OGC:WMS': 'addLayer', - 'application/vnd.google-earth.kml+xml': 'md-mn-kml', - 'application/zip': 'md-mn-zip', - 'WWW:DOWNLOAD-1.0-http--download': 'md-mn-zip', - 'application/x-compressed': 'md-mn-zip', - 'text/html': 'md-mn-www', - 'text/plain': 'md-mn-www' - }, - // TODO : add function to compute color map - defaultColorMap: [ - "#2205fd", - "#28bc03", - "#bc3303", - "#e4ff04", - "#ff04a0", - "#a6ff96", - "#408d5d", - "#7d253e", - "#2ce37e", - "#10008c", - "#ff9e05", - "#ff7b5d", - "#ff0000", - "#00FF00"], - /** api: method[generateColorMap] - * :param classes: integer Number of classes - * - * Return a random color map - */ - generateColorMap: function (classes) { - var colors = []; - for (var i = 0; i < classes; i++) { - // http://paulirish.com/2009/random-hex-color-code-snippets/ - colors[i] = '#'+('00000'+(Math.random()*(1<<24)|0).toString(16)).slice(-6); - } - return colors; - }, - /** api: method[updateHeadInfo] - * :param info: Object with the following properties - * - * - title: a title properties to be use as document title - * - * - meta: an Object of element to be added - * as meta tags. - * - * - tagsToRemove: an Object of META name to remove (default is subject, author, keywords). - * - */ - updateHeadInfo: function (info) { - if (info && info.title) { - document.title = info.title; - } - GeoNetwork.Util.removeMetaTags(info.tagsToRemove || {'subject': true, 'author': true, 'keywords': true}); - - if (info) { - for (var key in info.meta) { - if (info.meta.hasOwnProperty(key)) { - var values = info.meta[key]; - Ext.each(values, function (item) { - GeoNetwork.Util.addMetaTag(key, item); - }); - } - } - } - }, - /** api: method[addMetaTag] - * :param name: the name of the META tag - * :param content: the content of the META tag - * - * Add a META tag with name and content to the HEAD. - * - */ - addMetaTag: function (name, content) { - var meta = document.createElement('meta'); - meta.name = name; - meta.content = content; - document.getElementsByTagName('head')[0].appendChild(meta); - }, - /** api: method[removeMetaTags] - * :param tagToRemove: Object with the list of tag to remove - * - * Remove all META tags from HEAD which names match one of the - * tag to remove. - * - */ - removeMetaTags: function (tagsToRemove) { - var metas = Ext.DomQuery.jsSelect('head > meta'); - Ext.each(metas, function (meta) { - var name = meta.getAttribute('name'); - if (tagsToRemove[name]) { - Ext.get(meta).remove(); - } - }); - }, - /** api: method[buildPermalinkMenu] - * :param l: String or Function If String the link is added as is, if a function - * the function is called on 'show' event - * :param scope: Object The scope on which the l function is called. - * - * Create a permalink menu which is updated on show. - * - * TODO : maybe move on widget package - this is GUI related? - * - * Return Ext.menu.Menu - */ - buildPermalinkMenu: function (l, scope) { - var menu = new Ext.menu.Menu(); - var permalinkMenu = new Ext.menu.TextItem({text: '
       '}); - menu.add( - '' + OpenLayers.i18n('permalinkInfo') + '', - permalinkMenu - ); - // update link when item is displayed - var updatePermalink = function() { - var link = l; - if (typeof(l) == 'function') { - link = l.apply(scope); - } - var id = 'permalink-' + permalinkMenu.getId(); - permalinkMenu.update('' - + '
      ' - + 'Link', - true, - // Select permalink input for user to easily copy/paste link - function() { - // On IE8, select() on an element scroll to top of page, why ? - if (!Ext.isIE8) { - // update callback is not really called after update - // so add a short timeout TODO - setTimeout(function(){ - var e = Ext.get(id); - if (e) { - e.dom.select(); - } - }, 100); - } - }); - - }; - // onstatechange does not work because the menu item may be not be rendered - //this.permalinkProvider.on('statechange', onStatechange, this.permalinkMenu); - menu.on('show', updatePermalink, scope); - return new Ext.Button({ - iconCls: 'linkIcon', - menu: menu - }); - } -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CatalogueSourceStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CatalogueSourceStore.js deleted file mode 100644 index 28c95abaabd..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CatalogueSourceStore.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = CatalogueSourceStore - */ -/** api: example - * - * Sample code to create a catalogue sources combobox from the catalogue store. - * - * .. code-block:: javascript - * - * - * var services = catalogue.services; - * var catStore = GeoNetwork.data.CatalogueSourceStore(services.getSources); - * catStore.load(); - * - * var cbCat = new Ext.form.ComboBox( { - * name : 'E_siteId', // siteId is Lucene field name - * mode : 'local', - * triggerAction: 'all', - * fieldLabel : 'Catalogue', - * store : catStore, - * valueField : 'id', - * displayField : 'name', - * tpl : '' - * }); - * - */ -/** api: method[CatalogueSourceStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork catalogue sources. - * - * :param url: ``String`` Usually the xml.info service URL. See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ for mode information. - * - */ -GeoNetwork.data.CatalogueSourceStore = function(url){ - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'source', - idPath: 'id', - fields: [{ - name: 'id', - mapping: 'uuid' - }, { - name: 'name' - }] - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CategoryStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CategoryStore.js deleted file mode 100644 index 1bfd0ba6800..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CategoryStore.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = CategoryStore - */ -/** api: method[CategoryStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork categories including labels in different language. - * - * :param url: ``String`` Usually the xml.info service URL. - * See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ - * for mode information. - * - */ -GeoNetwork.data.CategoryStore = function(url){ - - /** - * Create a list of label - */ - function getLabel(v, record){ - var labels = {}; - var label = record.getElementsByTagName('label'); - var i; - - if (label.length === 1) { - var children = label[0].childNodes; - var child; - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - if (child.nodeType === 1) { - labels[child.nodeName] = child.firstChild.nodeValue; - } - } - } - return labels; - } - - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'category', - idPath: 'id', - fields: [{ - name: 'id', - mapping: '@id' - }, { - name: 'name' - }, { - name: 'label', - convert: getLabel - }] - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CodeListStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CodeListStore.js deleted file mode 100644 index 6996488fc9f..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/CodeListStore.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = CodeListStore - */ -/** api: method[CodeListStore] - * A pre-configured `Ext.data.Store `_ - * for GeoNetwork codeList. Codelist are defined by a code, a label and a description - * - * :param url: ``String`` Usually the xml.schema.info service URL. - */ -GeoNetwork.data.CodeListStore = function(config){ - - var schema = config.schema || 'iso19139'; - var requestBody = ''; - var model = [{ - name: 'code' - }, { - name: 'label' - }, { - name: 'description' - }]; - - var DataRecord = Ext.data.Record.create(model); - var store = new Ext.data.Store({ - fields: model - }); - - // Improve ? Here we use OL to load the response (how to POST body using Ext) - // and load results in the returned store. - OpenLayers.Request.POST({ - url: config.url, - data: requestBody, - success: function(response){ - var help = response.responseXML.getElementsByTagName('entry'); - - for (var i = 0; i < help.length; i++) { - var record = new DataRecord({ - code: help[i].getElementsByTagName('code')[0].firstChild.nodeValue, - label: help[i].getElementsByTagName('label')[0].firstChild.nodeValue, - description: help[i].getElementsByTagName('description')[0].firstChild.nodeValue - }); - store.add(record); - } - } - }); - - return store; -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/GroupStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/GroupStore.js deleted file mode 100644 index 94cc5a1e722..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/GroupStore.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = GroupStore - */ -/** api: method[GroupStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork groups. Groups visibility depends on user privileges. - * - * :param url: ``String`` Usually the xml.info service URL. - * See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ - * for mode information. - */ -GeoNetwork.data.GroupStore = function(url){ - /** - * Create a list of label // TODO : merge with other stores - */ - function getLabel(v, record){ - var labels = {}; - var i; - var label = record.getElementsByTagName('label'); - if (label.length === 1) { - var children = label[0].childNodes; - var child; - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - if (child.nodeType === 1) { - labels[child.nodeName] = child.firstChild.nodeValue; - } - } - } - return labels; - } - function getLabelForCurrentLang(v, record){ - var labels = {}; - var i; - var label = record.getElementsByTagName('label'); - if (label.length === 1) { - var children = label[0].childNodes; - var child; - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - if (child.nodeType === 1 && child.nodeName == catalogue.lang) { - label = child.firstChild.nodeValue; - } - } - } - return label; - } - - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'group/group', - idPath: 'id', - fields: [{ - name: 'id', - mapping: '@id' - }, { - name: 'name' - }, { - name: 'description' - }, { - name: 'email' - }, { - name: 'referrer' - }, { - name: 'label', - convert: getLabel - }, { - name: 'labelInLang', - convert: getLabelForCurrentLang - }] - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/HarvesterStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/HarvesterStore.js deleted file mode 100644 index f9bba87c536..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/HarvesterStore.js +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = HarvesterStore - */ -/** api: method[HarvesterStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork harvesters. - * - * See :class:`GeoNetwork.admin.HarvesterPanel` - * - * :param url: ``String`` Usually the xml.harvester.get service URL. - * See `service description <../../../developers/xml_services/services_harvesting.html#xml-harvesting-get>`_ - * for mode information. - */ -GeoNetwork.data.HarvesterStore = function(url){ - /** - * Return an array of categories - */ - function getCategories(v, record){ - var categories = [], - i, - catNode = record.getElementsByTagName('categories'); - if (catNode.length === 1) { - var cats = catNode[0].getElementsByTagName('category'); - for (i = 0; i < cats.length; i++) { - categories.push(cats[i].getAttribute('id')); - } - } - return categories; - } - - /** - * Return an array of operation - */ - function getOperation(v, record){ - var operation = [], - i, - ops = record.getElementsByTagName('operation'); - for (i = 0; i < ops.length; i++) { - var op = ops[i]; - operation.push(op.getAttribute('name')); - } - return operation; - } - - /** - * Read privileges node - */ - function getPrivileges(v, record){ - - var Privilege = Ext.data.Record.create([{ - name: 'group_id', - mapping: '@id' - }, { - name: 'operation', - convert: getOperation - }]); - - // Maybe the use of a reader here is not so useful - var pReader = new Ext.data.XmlReader({ - record: "group" - }, Privilege); - - var r = pReader.readRecords(record); - return r; - } - - return new Ext.data.XmlStore({ - autoDestroy: true, - url: url, - // reader configs - record: 'node', // records will have an "Item" tag - idPath: '@id', - fields: [{ - name: 'id', - mapping: '@id' - }, { - name: 'type', - mapping: '@type' - }, { - name: 'site_name', - mapping: 'site/name' - }, { - name: 'site_uuid', - mapping: 'site/uuid' - }, /* GeoNetwork */ { - name: 'site_host', - mapping: 'site/host' - }, { - name: 'site_servlet', - mapping: 'site/servlet' - }, { - name: 'site_port', - mapping: 'site/port' - }, /* OGC WxS */ { - name: 'site_url', - mapping: 'site/url' - }, { - name: 'site_icon', - mapping: 'site/icon' - }, { - name: 'site_ogctype', - mapping: 'site/ogctype' - }, { - name: 'options_lang', - mapping: 'options/lang' - }, { - name: 'options_topic', - mapping: 'options/topic' - }, { - name: 'options_createthumbnails', - mapping: 'options/createthumbnails' - }, { - name: 'options_uselayer', - mapping: 'options/uselayer' - }, { - name: 'options_uselayermd', - mapping: 'options/uselayermd' - }, { - name: 'options_datasetcategory', - mapping: 'options/datasetcategory' - }, { - name: 'privileges', - convert: getPrivileges - }, { - name: 'categories', - convert: getCategories - }, { - name: 'site_account_use', - mapping: 'site/account/use' - }, { - name: 'site_account_username', - mapping: 'site/account/username' - }, { - name: 'site_account_password', - mapping: 'site/account/password' - }, { - name: 'options_every', - mapping: 'options/every' - }, { - name: 'options_onerunonly', - mapping: 'options/onerunonly' - }, { - name: 'options_status', - mapping: 'options/status' - }, { - name: 'info_lastrun', - mapping: 'info/lastRun' - }, { - name: 'info_running', - mapping: 'info/running' - }, { - name: 'info_result_total', - mapping: 'info/result/total' - }, { - name: 'info_result_added', - mapping: 'info/result/added' - }, { - name: 'info_result_layer', - mapping: 'info/result/layer' - }, { - name: 'info_result_layerUuidExist', - mapping: 'info/result/layerUuidExist' - }, { - name: 'info_result_layerUsingMdUrl', - mapping: 'info/result/layerUsingMdUrl' - }, { - name: 'info_result_unknownSchema', - mapping: 'info/result/unknownSchema' - }, { - name: 'info_result_removed', - mapping: 'info/result/removed' - }, { - name: 'info_result_unretrievable', - mapping: 'info/result/unretrievable' - }, { - name: 'info_result_badFormat', - mapping: 'info/result/badFormat' - }, { - name: 'info_result_doesNotValidate', - mapping: 'info/result/doesNotValidate' - }, { - name: 'info_result_thumbnails', - mapping: 'info/result/thumbnails' - }, { - name: 'info_result_thumbnailsFailed', - mapping: 'info/result/thumbnailsFailed' - }, { - name: 'error_message', - mapping: 'error/message' - }, { - name: 'error_class', - mapping: 'error/class' - }, { - name: 'error_stack' - // TODO convert stack to text or object mapping : 'error/message' - }] - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/LanguageStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/LanguageStore.js deleted file mode 100644 index 8101724aea4..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/LanguageStore.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = LanguageStore - */ -/** api: method[LanguageStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork languages. - * - * :param url: ``String`` Usually the xml.info service URL. - * See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ - * for mode information. - */ -GeoNetwork.data.LanguageStore = function(url, lang){ - - var ln = lang; - - /** - * Create a list of label // TODO duplicate with categoryStore and probably others - */ - function getLabel(v, record){ - var labels = {}; - var i; - var label = record.getElementsByTagName('label'); - if (label.length === 1) { - var children = label[0].childNodes; - var child; - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - if (child.nodeType === 1) { - labels[child.nodeName] = child.firstChild.nodeValue; - } - } - } - return labels; - } - - function getName(v, record){ - var labels = {}; - var i; - var label = record.getElementsByTagName('label'); - if (label.length === 1) { - var children = label[0].childNodes; - var child; - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - if ((child.nodeType === 1) && (child.nodeName == ln)) { - return child.firstChild.nodeValue; - } - } - } - return ''; - } - - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'record ', - idPath: 'id', - fields: [{ - name: 'id' - }, { - name: 'code' - },{ - name: 'label', - convert: getLabel - }, { - name: 'name', - convert: getName - }] - }); -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataCSWResultsStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataCSWResultsStore.js deleted file mode 100644 index a4bbe8053eb..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataCSWResultsStore.js +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = MetadataCSWResultsStore - */ -/** api: constructor - * .. class:: GeoNetwork.data.MetadataCSWResultsStore() - * - * A pre-configured `Ext.data.JsonStore `_ - * for CSW results. A CSW store does not contains - * any catalogue information about metadata (ie. geonet:info:* elements). This store - * could only be used to do search and display results (not metadata - * management). - * - * Records will be similar to :class:`GeoNetwork.data.MetadataResultsStore` records. - * - * Depends on ``OpenLayers.Format.GeoNetworkRecords``. - */ -GeoNetwork.data.MetadataCSWResultsStore = function(){ - - function getThumbnails(v, record){ - var i, uri; - - if (record.URI) { - for (i = 0; i < record.URI.length; i++) { - uri = record.URI[i]; - if (uri.name === 'thumbnail') { - if (uri.value.indexOf('http') === -1) { - return GeoNetwork.Catalogue.URL + "/srv/en/" + uri.value; - } else { - return uri.value; - } - } - } - } - return ''; - } - - function getCapabilitiesUrl(v, record){ - var i, uri; - - if (record.URI) { - for (i = 0; i < record.URI.length; i++) { - uri = record.URI[i]; - if (uri.protocol && uri.protocol.indexOf('http-get-capabilities') !== -1) { - return uri.value; - } - } - } - return ''; - } - - /** - * Some convert function to face empty geonet_info parameters BUG in - * GeoNetwork when retrieving iso19115 record through CSW - */ - function getSource(v, record){ - if (record.geonet_info) { - return record.geonet_info.source[0]; - } else { - return ''; - } - } - - function getPopularity(v, record){ - if (record.geonet_info) { - return record.geonet_info.popularity[0]; - } else { - return ''; - } - } - - function getRating(v, record){ - if (record.geonet_info) { - return record.geonet_info.rating[0]; - } else { - return ''; - } - } - - function getDownload(v, record){ - if (record.geonet_info) { - return record.geonet_info.download[0]; - } else { - return ''; - } - } - - function getOwnerName(v, record){ - if (record.geonet_info) { - return record.geonet_info.ownername[0]; - } else { - return ''; - } - } - - function getIsHarvested(v, record){ - if (record.geonet_info && record.geonet_info.is_harvested) { - return record.geonet_info.is_harvested[0]; - } else { - return ''; - } - } - - function getEdit(v, record){ - if (record.geonet_info && record.geonet_info.edit) { - return record.geonet_info.edit; - } else { - return 'false'; - } - } - - - return new Ext.data.JsonStore({ - totalProperty: 'SearchResults.numberOfRecordsMatched', - root: 'records', - fields: [{ - name: 'title', - mapping: 'title[0].value', - defaultValue: '' - }, { - name: 'abstract', - mapping: 'abstract', - defaultValue: '' - }, { - name: 'subject', - mapping: 'subject' - }, { - name: 'uuid', - mapping: 'identifier[0].value', - defaultValue: '' - }, { - name: 'thumbnail', - convert: getThumbnails - }, { - name: 'uri', - mapping: 'uri', - defaultValue: '' - }, { - name: 'getCapabilitiesUrl', - convert: getCapabilitiesUrl - }, { - name: 'isharvested', - convert: getIsHarvested - }, { - name: 'source', - convert: getSource - }, { - name: 'rating', - convert: getRating - }, { - name: 'popularity', - convert: getPopularity - }, { - name: 'download', - convert: getDownload - }, { - name: 'ownername', - convert: getOwnerName - }, { - name: 'edit', - convert: getEdit - }, { - name: 'bbox', - mapping: 'BoundingBox', - defaultValue: '' - }] - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataRelationStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataRelationStore.js deleted file mode 100644 index e4d091e4b17..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataRelationStore.js +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = MetadataRelationStore - */ -/** api: method[MetadataRelationStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork metadata relation (relation to services, datasets, feature catalogues - * sources, relations and parent records). - * - * :param url: ``String`` Usually the xml.relation service URL. - * - * :param grouping: ``boolean`` Set to true to return a Ext.data.GroupingStore - */ -GeoNetwork.data.MetadataRelationStore = function(url, params, grouping){ - var fields = [{ - name: 'id' - }, { - name: 'uuid' - }, { - name: 'title' - }, { - name: 'abstract' - }, { - name: 'keyword' - }, { - name: 'type', - mapping: '@type' - }, { - name: 'subType', - mapping: '@subType' - }]; - - if (grouping) { - var reader = new Ext.data.XmlReader({ - record: 'relation', - idProperty: 'uuid' - }, fields); - - return new Ext.data.GroupingStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - params: params, - disableCaching: false - }), - reader: reader, - groupField: 'type', - sortInfo: { - field: 'type', - direction: "ASC" - } - }); - } else { - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'relation', - idPath: 'uuid', - fields: fields - }); - } -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataResultsFastStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataResultsFastStore.js deleted file mode 100644 index 22f4ee58178..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataResultsFastStore.js +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = MetadataResultsFastStore - */ -/** api: constructor - * .. class:: GeoNetwork.data.MetadataResultsFastStore() - * - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork results. - * - * To be used with the "q" search service which use only index content. - * - * - * TODO : Merge by extension with MetadataResultsStore - * - */ -GeoNetwork.data.MetadataResultsFastStore = function(){ - var separator = "|"; - - function getTitle(v, record){ - if (record.title && record.title[0]) { - return record.title[0].value; - } else if (record.defaultTitle && record.defaultTitle[0]) { - return record.defaultTitle[0].value; - } else { - return ''; - } - } - function getValidationInfo(v, record){ - if (record.valid) { - return record.valid[0].value; - } else { - return '-1'; - } - } - function getIdxMsg(v, record){ - if (record.idxMsg) { - var info = record.idxMsg[0].value.split('|'); - return info; - } else { - return ''; - } - } - function getValidationDetails(v, record){ - var i, validity = [], validInfo; - for (var key in record) { - if (record.hasOwnProperty(key) && key.indexOf('valid_') !== -1) { - var obj = record[key]; - validity.push({ - valid: obj[0].value, - type: key.split('_')[1], - ratio: '' // TODO - }); - } - } - return validity; - } - - function getThumbnails(v, record){ - var i; - var uri = ''; - var currentUri; - - if (record.image) { - - for (i = 0; i < record.image.length; i++) { - var tokens = record.image[i].value.split(separator); - currentUri = tokens[1]; - // Return the first URL even if not http (FIXME ?) - if (tokens[0] == 'thumbnail' && currentUri.indexOf('http') !== -1 || i === 0) { - uri = currentUri; - } - } - } - return uri; - } - - function getOverview(v, record){ - var i; - var uri = ''; - var currentUri; - - if (record.image) { - - for (i = 0; i < record.image.length; i++) { - var tokens = record.image[i].value.split(separator); - currentUri = tokens[1]; - // Return the first URL even if not http (FIXME ?) - if (tokens[0] == 'overview' && currentUri.indexOf('http') !== -1 || i === 0) { - uri = currentUri; - } - } - } - return uri; - } - - function getContact(v, record){ - var i, contact = [], el, name; - - if (record.responsibleParty) { - for (i = 0; i < record.responsibleParty.length; i++) { - var tokens = record.responsibleParty[i].value.split(separator); - contact.push({ - applies: tokens[1], - logo: tokens[3], - role: tokens[0], - name: tokens[2] - }); - } - } - return contact; - } - function getOrganization(v, record) { - var orgName, el; - if (record.responsibleParty) { - for (i = 0; i < record.responsibleParty.length; i++) { - var tokens = record.responsibleParty[i].value.split(separator); - if(tokens[2]) { - orgName = tokens[2]; - break; - } - } - } - return orgName; - } - - function getEmail(v, record) { - var email, el; - if (record.responsibleParty) { - for (i = 0; i < record.responsibleParty.length; i++) { - var tokens = record.responsibleParty[i].value.split(separator); - if(tokens[4]) { - email = tokens[4]; - break; - } - } - } - return email; - } - - function getLinks(v, record){ - var links = []; - if (record.link) { - for (i = 0; i < record.link.length; i++) { - var tokens = record.link[i].value.split(separator); - links.push({ - name: tokens[0], - title: tokens[1], - href: tokens[2], - protocol: tokens[3], - type: tokens[4] - }); - } - } - return links; - } - - /** - * Some convert function to face empty geonet_info parameters - * BUG in GeoNetwork when retrieving iso19115 record through CSW - */ - function getSource(v, record){ - if (record.geonet_info && record.geonet_info.source) { - return record.geonet_info.source[0].value; - } else { - return ''; - } - } - - function getCredit(v, record){ - if (record.credit) { - return record.credit; - } else { - return ''; - } - } - - function getPopularity(v, record){ - if (record.popularity) { - return record.popularity[0].value; - } else { - return ''; - } - } - - function getRating(v, record){ - if (record.rating) { - return record.rating[0].value; - } else { - return ''; - } - } - - function getStatus(v, record){ - if (record.mdStatus) { - return record.mdStatus[0].value; - } else { - return ''; - } - } - - function getDownload(v, record){ - if (record.geonet_info && record.geonet_info.download) { - return (record.geonet_info.download[0].value === 'true'); - } else { - return false; - } - } - - function getDynamic(v, record){ - if (record.geonet_info && record.geonet_info.dynamic) { - return (record.geonet_info.dynamic[0].value === 'true'); - } else { - return false; - } - } - - function getOwnerName(v, record){ - if (record.userinfo && record.userinfo[0].value) { - var userinfo = record.userinfo[0].value.split(separator); - try { - return userinfo[2] + " " + userinfo[1]; // User profile + ' (' + OpenLayers.i18n(userinfo[3]) + ')'; - } catch (e) { - return ''; - } - } else { - return ''; - } - } - - function getIsHarvested(v, record){ - if (record.isHarvested) { - return record.isHarvested[0].value; - } else { - return ''; - } - } - function getHarvesterType(v, record){ - // FIXME - if (record.geonet_info && record.geonet_info.harvestInfo && record.geonet_info.harvestInfo.type) { - return record.geonet_info.harvestInfo.type[0].value; - } else { - return ''; - } - } - function getCategory(v, record){ - if (record.category) { - return record.category; - } else { - return ''; - } - } - function getChangeDate(v, record){ - if (record.geonet_info && record.geonet_info.changeDate) { - return record.geonet_info.changeDate[0].value; - } else { - return ''; - } - } - function getCreateDate(v, record){ - if (record.geonet_info && record.geonet_info.createDate) { - return record.geonet_info.createDate[0].value; - } else { - return ''; - } - } - function getSelected(v, record){ - if (record.geonet_info && record.geonet_info.selected) { - return record.geonet_info.selected[0].value; - } else { - return ''; - } - } - function getPublished(v, record){ - if (record.geonet_info && record.geonet_info.isPublishedToAll) { - return record.geonet_info.isPublishedToAll[0].value; - } else { - return 'false'; - } - } - function getAbstract(v, record){ - if (record['abstract'] && record['abstract'][0]) { - return record['abstract'][0].value; - } else { - return ''; - } - } - function getType(v, record){ - if (record['type'] && record['type'][0]) { - return record['type'][0].value; - } else { - return ''; - } - } - function getSpatialRepresentationType(v, record){ - if (record['spatialRepresentationType'] && record['spatialRepresentationType'][0]) { - return record['spatialRepresentationType'][0].value; - } else { - return ''; - } - } - function getEdit(v, record){ - if (record.geonet_info && record.geonet_info.edit) { - return record.geonet_info.edit[0].value; - } else { - return 'false'; - } - } - function getDisplayOrder(v, record){ - if (record.displayOrder) { - return record.displayOrder[0].value; - } else { - return 0; - } - } - - - return new Ext.data.JsonStore({ - totalProperty: 'summary.count', - root: 'records', - fast: 'index', - service: 'q', - fields: [{ - name: 'title', - convert: getTitle - }, { - name: 'abstract', - convert: getAbstract - }, { - name: 'type', - convert: getType - }, { - name: 'subject', - mapping: 'keyword', - defaultValue: '' - }, { - name: 'spatialRepresentationType', - convert: getSpatialRepresentationType - }, { - name: 'uuid', - mapping: 'geonet_info.uuid[0].value', - defaultValue: '' - }, { - name: 'id', - mapping: 'geonet_info.id[0].value', - defaultValue: '' - }, { - name: 'schema', - mapping: 'geonet_info.schema[0].value', - defaultValue: '' - }, { - name: 'contact', - convert: getContact - }, { - name: 'email', - convert: getEmail - }, { - name: 'organization', - convert: getOrganization - }, { - name: 'credit', - convert: getCredit - }, { - name: 'thumbnail', - convert: getThumbnails - }, { - name: 'overview', - convert: getOverview - }, { - name: 'links', - convert: getLinks - }, { - name: 'uri', - mapping: 'uri', - defaultValue: '' - }, { - name: 'isharvested', - convert: getIsHarvested - }, { - name: 'harvestertype', - convert: getHarvesterType - }, { - name: 'createdate', - convert: getCreateDate - }, { - name: 'changedate', - convert: getChangeDate - }, { - name: 'selected', - convert: getSelected - }, { - name: 'source', - convert: getSource - }, { - name: 'category', - convert: getCategory - }, { - name: 'rating', - convert: getRating - }, { - name: 'status', - convert: getStatus - }, { - name: 'popularity', - convert: getPopularity - }, { - name: 'download', - convert: getDownload - }, { - name: 'dynamic', - convert: getDynamic - }, { - name: 'ownername', - convert: getOwnerName - }, { - name: 'edit', - convert: getEdit - }, { - name: 'bbox', - mapping: 'BoundingBox', - defaultValue: '' - }, { - name: 'isPublishedToAll', - convert: getPublished - }, { - name: 'displayOrder', - convert: getDisplayOrder, - sortType: 'asInt' - }, { - name: 'valid', - convert: getValidationInfo - }, { - name: 'valid_details', - convert: getValidationDetails - }, { - name: 'idxMsg', - convert: getIdxMsg - } - ] - }); -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataResultsStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataResultsStore.js deleted file mode 100644 index 395e74d9441..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataResultsStore.js +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = MetadataResultsStore - */ -/** api: constructor - * .. class:: GeoNetwork.data.MetadataResultsStore() - * - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork results. - * - * Depends on ``OpenLayers.Format.GeoNetworkRecords``. - * - * Fields available are: - * - * * id : The metadata internal identifier - * * uuid : The metadata unique identifier - * * schema : The schema (eg. dublin-code, iso19139) - * * title - * * abstract - * * subject ``Array()`` - * * thumbnail - * * links ``Array()`` - * * contacts ``Array()`` - * * uri Not used - * * isharvested - * * source - * * rating - * * popularity - * * download - * * ownername - * * valid : The validation status - * * valid_details : The validation information for each level of validation - * * edit - * * bbox ``Array()`` - * - * FIXME : this is not a constructor, it's a function. - * Is that good enough ? Comment also applied to other Stores - * - * TODO : handle multiple thumbnail ? - */ -GeoNetwork.data.MetadataResultsStore = function(){ - - function getTitle(v, record){ - if (record.title && record.title[0]) { - return record.title[0].value; - } else if (record.defaultTitle && record.defaultTitle[0]) { - return record.defaultTitle[0].value; - } else { - return ''; - } - } - function getValidationInfo(v, record){ - var i, validity = [], validInfo; - if (record.geonet_info && record.geonet_info.valid_details) { - validInfo = record.geonet_info.valid_details; - for (i = 0; i < validInfo.length; i++) { - validity.push({ - valid: validInfo.status[i].value, - type: validInfo.type[i].value, - ratio: validInfo.ratio[i].value - }); - } - } - return validity; - } - - function getThumbnails(v, record){ - var i; - var uri = ''; - var currentUri; - - if (record.image) { - for (i = 0; i < record.image.length; i++) { - currentUri = record.image[i].value; - // Return the first URL even if not http (FIXME ?) - if (currentUri.indexOf('http') !== -1 || i === 0) { - uri = currentUri; - } - } - } - return uri; - } - - - function getContact(v, record){ - var i, contact = [], el, name; - - if (record.responsibleParty) { - for (i = 0; i < record.responsibleParty.length; i++) { - el = record.responsibleParty[i]; - - name = (record.responsibleParty.organisationName && record.responsibleParty.organisationName[i] ? - record.responsibleParty.organisationName[i].value : ''); - contact.push({ - applies: el.appliesTo, - logo: el.logo, - role: el.role, - name: name - }); - } - } - return contact; - } - function getOrganization(v, record) { - var orgName, el; - if (record.responsibleParty) { - for (i = 0; i < record.responsibleParty.length; i++) { - var tokens = record.responsibleParty[i].value.split(GeoNetwork.data.MetadataResultsFastStore.separator); - if(tokens[2]) { - orgName = tokens[2]; - break; - } - } - } - return orgName; - } - - function getEmail(v, record) { - var email, el; - if (record.responsibleParty) { - for (i = 0; i < record.responsibleParty.length; i++) { - var tokens = record.responsibleParty[i].value.split(GeoNetwork.data.MetadataResultsFastStore.separator); - if(tokens[4]) { - email = tokens[4]; - break; - } - } - } - return email; - } - function getLinks(v, record){ - if (record.link) { - return record.link; - } - return []; - } - - /** - * Some convert function to face empty geonet_info parameters - * BUG in GeoNetwork when retrieving iso19115 record through CSW - */ - function getSource(v, record){ - if (record.geonet_info && record.geonet_info.source) { - return record.geonet_info.source[0].value; - } else { - return ''; - } - } - - function getPopularity(v, record){ - if (record.geonet_info && record.geonet_info.popularity) { - return record.geonet_info.popularity[0].value; - } else { - return ''; - } - } - - function getRating(v, record){ - if (record.geonet_info && record.geonet_info.rating) { - return record.geonet_info.rating[0].value; - } else { - return ''; - } - } - - function getDownload(v, record){ - if (record.geonet_info && record.geonet_info.download) { - return record.geonet_info.download[0].value; - } else { - return ''; - } - } - - function getOwnerName(v, record){ - if (record.geonet_info && record.geonet_info.ownername) { - return record.geonet_info.ownername[0].value; - } else { - return ''; - } - } - - function getPublicationDate(v, record) { - if (record.geonet_info && record.geonet_info.publicationDate) { - return record.geonet_info.publicationDate[0].value; - } else { - return ''; - } - } - - function getIsHarvested(v, record){ - if (record.geonet_info && record.geonet_info.isHarvested) { - return record.geonet_info.isHarvested[0].value; - } else { - return ''; - } - } - function getHarvesterType(v, record){ - if (record.geonet_info && record.geonet_info.harvestInfo && record.geonet_info.harvestInfo.type) { - return record.geonet_info.harvestInfo.type[0].value; - } else { - return ''; - } - } - function getCategory(v, record){ - if (record.geonet_info && record.geonet_info.category) { - return record.geonet_info.category; - } else { - return ''; - } - } - function getChangeDate(v, record){ - if (record.geonet_info && record.geonet_info.changeDate) { - return record.geonet_info.changeDate[0].value; - } else { - return ''; - } - } - function getCreateDate(v, record){ - if (record.geonet_info && record.geonet_info.createDate) { - return record.geonet_info.createDate[0].value; - } else { - return ''; - } - } - function getSelected(v, record){ - if (record.geonet_info && record.geonet_info.selected) { - return record.geonet_info.selected[0].value; - } else { - return ''; - } - } - function getAbstract(v, record){ - if (record['abstract']) { - return record['abstract'][0].value; - } else { - return ''; - } - } - function getType(v, record){ - if (record['type']) { - return record['type'][0].value; - } else { - return ''; - } - } - function getEdit(v, record){ - if (record.geonet_info && record.geonet_info.edit) { - return record.geonet_info.edit[0].value; - } else { - return 'false'; - } - } - function getDisplayOrder(v, record){ - if (record.geonet_info && record.geonet_info.displayOrder) { - return record.geonet_info.displayOrder[0].value; - } else { - return 0; - } - } - - return new Ext.data.JsonStore({ - totalProperty: 'summary.count', - root: 'records', - fast: 'false', - service: 'xml.search', - fields: [{ - name: 'title', - convert: getTitle - }, { - name: 'abstract', - convert: getAbstract - }, { - name: 'type', - convert: getType - }, { - name: 'subject', - mapping: 'keyword', - defaultValue: '' - }, { - name: 'uuid', - mapping: 'geonet_info.uuid[0].value', - defaultValue: '' - }, { - name: 'id', - mapping: 'geonet_info.id[0].value', - defaultValue: '' - }, { - name: 'schema', - mapping: 'geonet_info.schema[0].value', - defaultValue: '' - }, { - name: 'contact', - convert: getContact - }, { - name: 'email', - convert: getEmail - }, { - name: 'organization', - convert: getOrganization - }, { - name: 'thumbnail', - convert: getThumbnails - }, { - name: 'links', - convert: getLinks - }, { - name: 'uri', - mapping: 'uri', - defaultValue: '' - }, { - name: 'isharvested', - convert: getIsHarvested - }, { - name: 'harvestertype', - convert: getHarvesterType - }, { - name: 'createdate', - convert: getCreateDate - }, { - name: 'changedate', - convert: getChangeDate - }, { - name : 'publicationdate', - convert : this.getPublicationDate - }, { - name: 'selected', - convert: getSelected - }, { - name: 'source', - convert: getSource - }, { - name: 'category', - convert: getCategory - }, { - name: 'rating', - convert: getRating - }, { - name: 'popularity', - convert: getPopularity - }, { - name: 'download', - convert: getDownload - }, { - name: 'ownername', - convert: getOwnerName - }, { - name: 'edit', - convert: getEdit - }, { - name: 'bbox', - mapping: 'BoundingBox', - defaultValue: '' - }, { - name: 'displayOrder', - convert: getDisplayOrder, - sortType: 'asInt' - }, { - name: 'valid', - mapping: 'geonet_info.valid[0].value', - defaultValue: '-1' - }, { - name: 'valid_details', - convert: getValidationInfo - }] - }); -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataSummaryStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataSummaryStore.js deleted file mode 100644 index 239e0b3d454..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/MetadataSummaryStore.js +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = MetadataSummaryStore - */ -/** api: method[MetadataSummaryStore] - * - * return a pre-configured `Ext.data.JsonStore * `_ - * for GeoNetwork summary. - * - * - * .. code-block:: xml - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * `_ - * for GeoNetwork metadata thumbnails. - * - * :param url: ``String`` Usually the metadata.thumbnail service URL. - * - * - * .. code-block:: javascript - * - * this.store = new GeoNetwork.data.MetadataThumbnailStore( - * catalogue.services.getThumbnail, - * {id: this.metadataId} - * ); - * - */ -GeoNetwork.data.MetadataThumbnailStore = function(url, params){ - - var fields = [{ - name: 'href' - }, { - name: 'desc' - }, { - name: 'type' - }, { - name: 'mimetype' - }]; - - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'POST', - url: url, - params: params, - disableCaching: false - }), - record: 'thumbnail', - idPath: 'href', - fields: fields - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/OpenSearchSuggestionReader.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/OpenSearchSuggestionReader.js deleted file mode 100644 index 07ef1ec1bf2..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/OpenSearchSuggestionReader.js +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace("GeoNetwork.data"); - -/** api: (define) - * module = GeoNetwork.data - * class = OpenSearchSuggestionReader - * base_link = `Ext.data.JsonReader `_ - */ -/** api: constructor - * .. class:: OpenSearchSuggestionReader(meta, recordType) - * - * Create a new OpenSearch suggestion reader object. - * - * An Ext.ArrayReader could not be used because it seems that - * we cannot retrieve the root based on an array index. - * In OpenSearch, root is the 2nd column of the array: - * - * .. code-block:: javascript - * - * ["sea",["sears","search engines","search engine", - * - */ -GeoNetwork.data.OpenSearchSuggestionReader = function(meta, recordType){ - meta = meta || {}; - GeoNetwork.data.OpenSearchSuggestionReader.superclass.constructor.call(this, meta, recordType || meta.fields); - -}; - -Ext.extend(GeoNetwork.data.OpenSearchSuggestionReader, Ext.data.JsonReader, { - /** - * Index of the root element in the Array - */ - rootId: undefined, - - /** private: method[readRecords] - * :arg data: ``DOMElement or String or Array`` A document element or XHR response - * string. As an alternative to fetching attributes data - * from a remote source, an array of attribute objects can - * be provided given that the properties of each attribute - * object map to a provided field name. :return: ``Object`` - * A data block which is used by an ``Ext.data.Store`` as a - * cache of ``Ext.data.Records``. - * - * Create a data block containing Ext.data.Records from an - * OpenSearch suggestion document. - */ - readRecords: function(o){ - this.arrayData = o; - var i, j; - var s = this.meta, sid = s ? Ext.num(s.idIndex, s.id) : null, recordType = this.recordType, fields = recordType.prototype.fields, records = [], success = true, v; - - // FIXME : should be from constructor - this.rootId = 1; - var root = (!this.rootId ? this.getRoot(o) : o[this.rootId]); - - for (i = 0, len = root.length; i < len; i++) { - var n = root[i], values = {}, id = ((sid || sid === 0) && - n[sid] !== undefined && - n[sid] !== "" ? n[sid] : null); - for (j = 0, jlen = fields.length; j < jlen; j++) { - var f = fields.items[j], k = f.mapping !== undefined && - f.mapping !== null ? f.mapping : j; - v = n[k] !== undefined ? n[k] : f.defaultValue; - v = f.convert(v, n); - values[f.name] = n; - } - var record = new recordType(values, id); - record.json = n; - records[records.length] = record; - } - - var totalRecords = records.length; - - if (s.totalProperty) { - v = parseInt(this.getTotal(o), 10); - if (!isNaN(v)) { - totalRecords = v; - } - } - if (s.successProperty) { - v = this.getSuccess(o); - if (v === false || v === 'false') { - success = false; - } - } - return { - success: true, - records: records, - totalRecords: records.length - }; - - } - -}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/OpenSearchSuggestionStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/OpenSearchSuggestionStore.js deleted file mode 100644 index 59165754f58..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/OpenSearchSuggestionStore.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace("GeoNetwork.data"); - -/** api: (define) - * module = GeoNetwork.data - * class = OpenSearchSuggestionStore - * base_link = `Ext.data.Store `_ - */ -Ext.namespace("GeoNetwork.data"); - -/** api: constructor - * .. class:: OpenSearchSuggestionStore(config) - * - * Small helper class to make creating stores for remotely-loaded attributes - * data easier. OpenSearchSuggestionStore is pre-configured with a built-in - * ``Ext.data.HttpProxy`` and :class:`GeoNetwork.data.OpenSearchSuggestionReader`. - * The HttpProxy is configured to allow caching (disableCaching: false) and - * uses GET. - */ -GeoNetwork.data.OpenSearchSuggestionStore = function(c){ - c = c || {}; - GeoNetwork.data.OpenSearchSuggestionStore.superclass.constructor.call(this, Ext.apply(c, { - proxy: c.proxy || - (!c.data ? new Ext.data.HttpProxy({ - url: c.url, - disableCaching: false, - method: "GET" - }) : undefined), - reader: new GeoNetwork.data.OpenSearchSuggestionReader(c, c.fields || - ["value"] // TODO : add extra field according to OpenSearch suggestion (not supported by GeoNetwork yet) -) - })); -}; -Ext.extend(GeoNetwork.data.OpenSearchSuggestionStore, Ext.data.Store); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/RegionStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/RegionStore.js deleted file mode 100644 index cbaecd705fc..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/RegionStore.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = RegionStore - */ -/** api: method[RegionStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork regions. - * - * :param url: ``String`` Usually the xml.info service URL. - * See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ - * for mode information. - */ -GeoNetwork.data.RegionStore = function(url){ - /** - * Create a list of label // TODO duplicate with categoryStore and probably others - */ - function getLabel(v, record){ - var labels = {}; - var i; - var label = record.getElementsByTagName('label'); - if (label.length === 1) { - var children = label[0].childNodes; - var child; - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - if (child.nodeType === 1) { - labels[child.nodeName] = child.firstChild.nodeValue; - } - } - } - return labels; - } - - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'region', - idPath: '@id', - fields: [{ - name: 'id', - mapping: '@id' - }, { - name: 'north' - }, { - name: 'south' - }, { - name: 'east' - }, { - name: 'west' - }, { - name: 'label', - convert: getLabel - }] - }); -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/StatusStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/StatusStore.js deleted file mode 100644 index 0ff75a2b1c8..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/StatusStore.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = StatusStore - */ -/** api: method[StatusStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork metadata status including labels in different language. - * - * :param url: ``String`` Usually the xml.info?type=status service URL. - * See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ - * for mode information. - * - */ -GeoNetwork.data.StatusStore = function(url){ - - /** - * Create a list of label - */ - function getLabel(v, record){ - var labels = {}; - var label = record.getElementsByTagName('label'); - var i; - - if (label.length === 1) { - var children = label[0].childNodes; - var child; - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - if (child.nodeType === 1) { - labels[child.nodeName] = child.firstChild.nodeValue; - } - } - } - return labels; - } - - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'status', - idPath: 'id', - fields: [{ - name: 'id', - mapping: '@id' - }, { - name: 'name' - }, { - name: 'reserved' - }, { - name: 'label', - convert: getLabel - }] - }); -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/SubTemplateTypeStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/SubTemplateTypeStore.js deleted file mode 100644 index 8ccfe47c96b..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/SubTemplateTypeStore.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = SubTemplateTypeStore - */ -/** api: method[SubTemplateTypeStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork sub-template types. - * - * See :class:`GeoNetwork.editor.SubTemplateSelectionPanel` - * - * - * :param url: ``String`` Usually the xml.info service URL. - * See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ - * for mode information. - */ -GeoNetwork.data.SubTemplateTypeStore = function(url){ - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'record', - idPath: 'type', - fields: [{ - name: 'type' - },{ - name: 'schema' - },{ - name: 'label' - },{ - name: 'description' - }] - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/SuggestionStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/SuggestionStore.js deleted file mode 100644 index 3ac58882945..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/SuggestionStore.js +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = SuggestionStore - */ -/** api: method[SuggestionStore] - * A pre-configured `Ext.data.JsonStore `_ - * or `Ext.data.XmlStore `_ - * for metadata suggestion. - * - * See :class:`GeoNetwork.editor.SuggestionsPanel` - * - * :param url: ``String`` Usually the xml.metadata.validate service URL. - * :param grouping: ``boolean`` Set to true to return a Ext.data.GroupingStore - */ -GeoNetwork.data.SuggestionStore = function(url, params, grouping){ - - function getStatusIcon(v, record){ - var status = record.getAttribute('type'); - return ' '; - } - - var fields = [{ - name: 'id', - mapping: '@id' - }, { - name: 'name', - mapping: '@process' - }, { - name: 'target', - mapping: '@target' - }, { - name: 'category', - mapping: '@category' - }, { - name: 'desc', - mapping: 'name' - }, { - name: 'params', - mapping: 'params' - }, { - name: 'operational', - mapping: 'operational' - }]; - - if (grouping) { - var reader = new Ext.data.XmlReader({ - record: 'suggestion', - idProperty: '@id' - }, fields); - - return new Ext.data.GroupingStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'POST', - url: url, - params: params, - disableCaching: false - }), - reader: reader, - groupField: 'category', - sortInfo: { - field: 'target', - direction: "ASC" - } - }); - } else { - return new Ext.data.XmlStore({ - autoDestroy: true, - baseParams: params, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'suggestion', - idPath: '@id', - fields: fields - }); - } -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/ThesaurusStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/ThesaurusStore.js deleted file mode 100644 index 07c4a930b72..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/ThesaurusStore.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = ThesaurusStore - */ -/** api: method[ThesaurusStore] - * A pre-configured `Ext.data.Store `_ - * for GeoNetwork SKOS thesaurus. - * - * :param url: ``String`` Usually the xml.thesaurus.getList service URL. - */ -GeoNetwork.data.ThesaurusStore = function(config){ - var DataRecord = Ext.data.Record.create([{ - name: 'filename' - }, { - name: 'title' - }, { - name: 'theme', - mapping: 'dname' - }, { - name: 'id', - mapping: 'key' - }, { - name: 'defaultNamespace' - }, { - name: 'type' - }, { - name: 'activated' - }]); - - var store = new Ext.data.Store({ - url: config.url, // FIXME - reader: new Ext.data.XmlReader({ - record: 'thesaurus' - }, DataRecord), - sortInfo: config.sortInfo || { - field: 'title', - direction: 'ASC' - }, - fields: ['filename', 'theme', 'id', 'title', 'type', 'activated', 'defaultNamespace'], - listeners: config.listeners - }); - - if (config.allOption) { - // add the "any thesaurus" record - var record = new DataRecord({ - filename: OpenLayers.i18n('anyThesaurus'), - activated: 'y' - }); - record.set('id', ''); - store.add(record); - } - - if (config.activatedOnly) { - // Filter activated thesaurus only - store.on('load', function() { - var coll = this.query('activated', 'n'); - coll.each(function (item, idx) { - this.removeAt(this.indexOf(item)); - }, store); - }, store); - } - - store.load({ - add: true - }); - - return store; -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/UserStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/UserStore.js deleted file mode 100644 index bcf7c9b61a9..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/UserStore.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = UserStore - */ -/** api: method[UserStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork users. Users visibility depends on user privileges. - * - * :param url: ``String`` Usually the xml.info service URL. - * See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ - * for mode information. - */ -GeoNetwork.data.UserStore = function(url){ - - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'user', // records will have an "Item" tag - idPath: 'id', - fields: [{ - name: 'id' - }, { - name: 'username' - }, { - name: 'surname' - }, { - name: 'name' - }, { - name: 'profile' - }, { - name: 'address' - }, { - name: 'email' - }, { - name: 'city' - }, { - name: 'state' - }, { - name: 'zip' - }, { - name: 'country' - }, { - name: 'organisation' - }, { - name: 'kind' - }] - }); -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/ValidationRuleStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/ValidationRuleStore.js deleted file mode 100644 index 1f1a7b98134..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/ValidationRuleStore.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = ValidationRuleStore - */ -/** api: method[ValidationRuleStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork validation report rules. - * - * :param url: ``String`` Usually the xml.metadata.validate service URL. - * - * :param grouping: ``boolean`` Set to true to return a Ext.data.GroupingStore - */ -GeoNetwork.data.ValidationRuleStore = function(url, params, grouping){ - - function getStatusIcon(v, record){ - var status = record.getAttribute('type'); - return ' '; - } - - var fields = [{ - name: 'id', - mapping: '@id' - }, { - name: 'group', - mapping: '@group' - }, { - name: 'status', - mapping: '@type' - }, { - name: 'statusIcon', - convert: getStatusIcon - }, { - name: 'title' - }, { - name: 'details' - }, { - name: 'msg' - }]; - - if (grouping) { - var reader = new Ext.data.XmlReader({ - record: 'rule', - idProperty: 'id' - }, fields); - - return new Ext.data.GroupingStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'POST', - url: url, - params: params, - disableCaching: false - }), - reader: reader, - groupField: 'group', - sortInfo: { - field: 'status', - direction: "ASC" - } - }); - } else { - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - params: params, - disableCaching: false - }), - record: 'rule', - idPath: '@id', - fields: fields - }); - } -}; diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/Z3950RepositoryStore.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/Z3950RepositoryStore.js deleted file mode 100644 index b2e70ee5951..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/data/Z3950RepositoryStore.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, - * Rome - Italy. email: geonetwork@osgeo.org - */ -Ext.namespace('GeoNetwork.data'); - -/** api: (define) - * module = GeoNetwork.data - * class = Z3950RepositoryStore - */ -/** api: method[Z3950RepositoryStore] - * A pre-configured `Ext.data.JsonStore `_ - * for GeoNetwork Z39.50 Repository. - * - * :param url: ``String`` Usually the xml.info service URL. - * See `xml.info service description <../../../developers/xml_services/services_general.html#xml-info>`_ - * for mode information. - */ -GeoNetwork.data.Z3950RepositoryStore = function(url){ - - return new Ext.data.XmlStore({ - autoDestroy: true, - proxy: new Ext.data.HttpProxy({ - method: 'GET', - url: url, - disableCaching: false - }), - record: 'repository', - idPath: 'id', - fields: [{ - name: 'id', - mapping: '@id' - }, { - name: 'code', - mapping: 'id/@code' - }, { - name: 'name', - mapping: 'label' - }] - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/form/GeometryMapField.js b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/form/GeometryMapField.js deleted file mode 100644 index 0cdb52aabe5..00000000000 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/form/GeometryMapField.js +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Copyright (C) 2001-2011 Food and Agriculture Organization of the - * United Nations (FAO-UN), United Nations World Food Programme (WFP) - * and United Nations Environment Programme (UNEP) - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ -Ext.namespace('GeoNetwork.form'); - -/** api: (define) - * module = GeoNetwork.form - * class = GeometryMapField - * base_link = `GeoExt.MapPanel `_ - */ - -/** api: example - * - * - * .. code-block:: javascript - * - * var fields = []; - * var geomField = new Ext.form.TextField( { - * name : 'E_geometry', - * id : 'geometry', - * fieldLabel : 'WKT geometry', - * // toolTip : '(eg. POLYGON((-180 -90,180 -90,180 90,-180 90,-180 - * // -90)) or POINT(6 10))', - * hideLabel : false - * }); - * - * var geomWithMapField = new GeoNetwork.form.GeometryMapField({ - * geometryFieldId : 'geometry', - * layers : [new OpenLayers.Layer.WMS( - * "Global Imagery", "http://maps.opengeo.org/geowebcache/service/wms", - * {layers: "bluemarble"} - * )], - * zoom: 1 - * }); - * fields.push(geomField, geomWithMapField); - * - * var searchForm = new Ext.FormPanel( { - * items : fields, - * ... - * - */ - -/** api: constructor - * .. class:: GeometryMapField(config) - * - * Create a small map which has to be related to an existing - * (hidden) text field for the geometry criteria. - * On map move, the geometry field is updated with the current - * map extent as WKT. - * - * A Checkbox is available to turn off the field update. - * - * - * TODO : - * * Support other projection - * * Add draw buttons (like current minimap) - * * Add list of well know region to quickly zoom to an AOI or a Gazetter service like GeoNames.org ? - */ -GeoNetwork.form.GeometryMapField = Ext.extend(GeoExt.MapPanel, { - // TODO : Add capablitiy to change layer_style and drawing layer_style - layer_style: OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']), - - /** api: config[geometryFieldId] - * ``String`` Identifier of an Ext.form.TextField to update - * with the WKT representation of the map extent. If undefined, - * a hidden text field is created to store the geometry. - */ - geometryFieldId : undefined, - - /** api: property[geometryField] - * ``Ext.form.TextField`` The TextField to update - */ - geometryField : undefined, - mapOptions: undefined, - extentBox : undefined, - vectorLayer : undefined, - /** private: property[nearYou] - * Near you button - */ - nearYou : undefined, - - /** private: method[initStyle] - * Define default layer styles - */ - initStyle: function(){ - // See http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Feature/Vector-js.html for more style info - this.layer_style.fillOpacity = 0; - this.layer_style.strokeOpacity = 0.8; - this.layer_style.strokeDashstyle = 'dash'; - this.layer_style.strokeWidth = 4; - }, - createExtentControl: function() { - var action; - - // Restrict to map extent action or draw polygon control - if (this.restrictToMapExtent) { - action = new Ext.form.Checkbox( { - boxLabel : OpenLayers.i18n('restrictSearchToMap'), - checked : this.activated ? true : false, - listeners : { - check : function(cb, checked) { - this.geometryField.setValue(''); - this.nearYou.toggle(false); - - if (checked) { - this.on('aftermapmove', this.setField, this); - this.fireEvent('aftermapmove'); - } else { - this.un('aftermapmove', this.setField, this); - } - }, - scope : panel - } - }); - this.getTopToolbar().add(action); - - if (this.activated) { - this.on('aftermapmove', this.setField, this); - } - } else { - this.initStyle(); - this.extentBox = new GeoNetwork.Control.ExtentBox({ - wktelement: this.geometryField, - vectorLayerStyle: this.layer_style - }); - action = new GeoExt.Action({ - control: this.extentBox, - toggleGroup: this.map.id + "move", - allowDepress: false, - pressed: this.activated ? true : false, - map: this.map, - tooltip: { - title: OpenLayers.i18n("selectExtentTooltipTitle"), - text: OpenLayers.i18n("selectExtentTooltipText") - }, - iconCls: 'selextent' - }); - this.vectorLayer = this.extentBox.getOrCreateLayer(); - var clearAction = { - iconCls: "clearPolygon", - tooltip: { - title: OpenLayers.i18n("clearExtentTooltipTitle"), - text: OpenLayers.i18n("clearExtentTooltipText") - }, - handler: function(){ - this.vectorLayer.destroyFeatures(); - this.geometryField.setValue(''); - }, - scope: this - }; - this.getTopToolbar().add(action, clearAction); - } - - if (this.nearYouControl) { - this.getTopToolbar().add(this.nearYou); - } - - return action; - }, - /** private: method[createToolbar] - * Create the default toolbar - */ - createNavBar : function() { - var items = []; - var panel = this; - - this.nearYou = new Ext.Button( { - iconCls : 'md-mn mn-user-location', - iconAlign : 'right', - tooltip: OpenLayers.i18n('mapNearYou'), - enableToggle : true, - toggleGroup: this.map.id + "move", - listeners : { - toggle : function(bt, pressed) { - var o = this; - if (pressed) { - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(function(position) { - o.map.panTo(new OpenLayers.LonLat(position.coords.longitude, position.coords.latitude)); - o.geometryField.setValue('POINT(' + position.coords.latitude + ' ' + - position.coords.longitude + ')'); - }); //, function(error){console.log(error);}); - } - } else { - o.geometryField.setValue(''); - } - }, - scope : panel - } - }); - - var zoomAllAction = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomToMaxExtent(), - map: this.map, - iconCls: 'zoomfull', - tooltip: {title: OpenLayers.i18n("zoomToMaxExtentTooltipTitle"), text: OpenLayers.i18n("zoomToMaxExtentTooltipText")} - }); - - var zoomInAction = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomBox(), - map: this.map, - toggleGroup: this.map.id + "move", - allowDepress: false, - iconCls: 'zoomin', - tooltip: {title: OpenLayers.i18n("zoominTooltipTitle"), text: OpenLayers.i18n("zoominTooltipText")} - }); - - var zoomOutAction = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomBox({ - displayClass: 'ZoomOut', - out: true - }), - map: this.map, - toggleGroup: this.map.id + "move", - allowDepress: false, - tooltip: {title: OpenLayers.i18n("zoomoutTooltipTitle"), text: OpenLayers.i18n("zoomoutTooltipText")}, - iconCls: 'zoomout' - }); - - var panAction = new GeoExt.Action({ - control: new OpenLayers.Control.DragPan({ - isDefault: true - }), - toggleGroup: this.map.id + "move", - allowDepress: false, - pressed: this.activated ? false : true, - map: this.map, - iconCls: 'pan', - tooltip: {title: OpenLayers.i18n("dragTooltipTitle"), text: OpenLayers.i18n("dragTooltipText")} - }); - - items.push(zoomAllAction, zoomInAction, zoomOutAction, panAction, '->'); - - //this.getTopToolbar().add(items); - return items; - }, - - /** api: property[mapOptions] - * ``Object`` The default mapOptions. By default WGS84 world based map. - */ - /** api: property[width] - * ``Number`` Width default to 290 // TODO Remove ? - */ - /** api: property[height] - * ``Number`` Height default to 180 // TODO Remove ? - */ - /** api: property[restrictToMapExtent] - * ``Boolean`` Define if extent should be restricted to map extent - */ - /** api: property[border] - * ``Boolean`` No border by default - */ - /** api: property[activated] - * ``Boolean`` Define if the control is activated on startup. - * False by default to not update the geometry field. - */ - defaultConfig : { - id : 'geometryMap', // FIXME : This is hardcoded - width: 290, - height: 180, - stateful: false, - border : false, - activated : false, - restrictToMapExtent : false, - nearYouControl : true - }, - /** private: method[initComponent] - * Initializes the component - */ - initComponent : function() { - Ext.applyIf(this, this.defaultConfig); - - var options = this.mapOptions || { - projection: "EPSG:4326", - units: "degrees", - maxExtent: new OpenLayers.Bounds(-180,-90,180,90), - restrictedExtent: new OpenLayers.Bounds(-180,-90,180,90), - controls: [] - }; - - if (!options.controls) { - options.controls = []; - } - - if(this.layers && this.layers.length > 0) { - for(i=0;i
      "),initTemplates:function(){Ext.grid.PivotGridView.superclass.initTemplates.apply(this,arguments);var a=this.templates||{};if(!a.gcell){a.gcell=new Ext.XTemplate('','
      ',this.grid.enableHdMenu?'':"","{value}","
      ","")}this.templates=a;this.hrowRe=new RegExp("ux-grid-hd-group-row-(\\d+)","")},initElements:function(){Ext.grid.PivotGridView.superclass.initElements.apply(this,arguments);this.rowHeadersEl=new Ext.Element(this.scroller.child("div.x-grid3-row-headers"));this.headerTitleEl=new Ext.Element(this.mainHd.child("div.x-grid3-header-title"))},getGridInnerWidth:function(){var a=Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this,arguments);return a-this.getTotalRowHeaderWidth()},getTotalRowHeaderWidth:function(){var d=this.getRowHeaders(),c=d.length,b=0,a;for(a=0;a0&&d>0){h=h||o.data[a[g-1].dataIndex]!=l[d-1].data[a[g-1].dataIndex]}if(h){s.push({header:q,span:p,start:b});b+=p;p=0}if(k){s.push({header:n,span:p+1,start:b});b+=p;p=0}q=n;p++}c.push({items:s,width:e.width||this.defaultHeaderWidth});q=undefined}return c}});Ext.grid.HeaderDragZone=Ext.extend(Ext.dd.DragZone,{maxDragWidth:120,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,c);if(b){this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b))}this.scroll=false},getDragData:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findHeaderCell(a);if(b){return{ddel:b.firstChild,header:b}}return false},onInitDrag:function(a){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var b=this.dragData.ddel.cloneNode(true);b.id=Ext.id();b.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(b);return true},afterValidDrop:function(){this.completeDrop()},afterInvalidDrop:function(){this.completeDrop()},completeDrop:function(){var a=this.view,b=this.dragHeadersDisabled;setTimeout(function(){a.headersDisabled=b},50)}});Ext.grid.HeaderDropZone=Ext.extend(Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:" "},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:" "},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,a.getGridEl().dom)},getTargetFromEvent:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findCellIndex(a);if(b!==false){return this.view.getHeaderCell(b)}},nextVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.nextSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.nextSibling}return null},prevVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.prevSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.prevSibling}return null},positionIndicator:function(d,k,j){var a=Ext.lib.Event.getPageX(j),g=Ext.lib.Dom.getRegion(k.firstChild),c,i,b=g.top+this.proxyOffsets[1];if((g.right-a)<=(g.right-g.left)/2){c=g.right+this.view.borderWidth;i="after"}else{c=g.left;i="before"}if(this.grid.colModel.isFixed(this.view.getCellIndex(k))){return false}c+=this.proxyOffsets[0];this.proxyTop.setLeftTop(c,b);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(c,b+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return i},onNodeEnter:function(d,a,c,b){if(b.header!=d){this.positionIndicator(b.header,d,c)}},onNodeOver:function(g,b,d,c){var a=false;if(c.header!=g){a=this.positionIndicator(c.header,g,d)}if(!a){this.proxyTop.hide();this.proxyBottom.hide()}return a?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(d,a,c,b){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(b,m,g,c){var d=c.header;if(d!=b){var k=this.grid.colModel,j=Ext.lib.Event.getPageX(g),a=Ext.lib.Dom.getRegion(b.firstChild),o=(a.right-j)<=((a.right-a.left)/2)?"after":"before",i=this.view.getCellIndex(d),l=this.view.getCellIndex(b);if(o=="after"){l++}if(i=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){this.config[a].setEditor(b)},destroy:function(){var b=this.config.length,a=0;for(;a0},isSelected:function(a){var b=Ext.isNumber(a)?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,i,h){if(h.button!==0||this.isLocked()){return}var a=this.grid.getView();if(h.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,i,h.ctrlKey);this.last=c;a.focusRow(i)}else{var b=this.isSelected(i);if(h.ctrlKey&&b){this.deselectRow(i)}else{if(!b||this.getCount()>1){this.selectRow(i,h.ctrlKey||h.shiftKey);a.focusRow(i)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}if(!this.silent){this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(n,l){var d=l.getKey(),h,i=this.grid,p=i.lastEdit,j=i.activeEditor,b=l.shiftKey,o,p,a,m;if(d==l.TAB){l.stopEvent();j.completeEdit();if(b){h=i.walkCells(j.row,j.col-1,-1,this.acceptsNav,this)}else{h=i.walkCells(j.row,j.col+1,1,this.acceptsNav,this)}}else{if(d==l.ENTER){if(this.moveEditorOnEnter!==false){if(b){h=i.walkCells(p.row-1,p.col,-1,this.acceptsNav,this)}else{h=i.walkCells(p.row+1,p.col,1,this.acceptsNav,this)}}}}if(h){a=h[0];m=h[1];this.onEditorSelect(a,p.row);if(i.isEditor&&i.editing){o=i.activeEditor;if(o&&o.field.triggerBlur){o.field.triggerBlur()}}i.startEditing(a,m)}},onEditorSelect:function(b,a){if(a!=b){this.selectRow(b)}},destroy:function(){Ext.destroy(this.rowNav);this.rowNav=null;Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=Ext.extend(Ext.util.Observable,{isColumn:true,constructor:function(b){Ext.apply(this,b);if(Ext.isString(this.renderer)){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}if(!this.scope){this.scope=this}var a=this.editor;delete this.editor;this.setEditor(a);this.addEvents("click","contextmenu","dblclick","mousedown");Ext.grid.Column.superclass.constructor.call(this)},processEvent:function(b,d,c,g,a){return this.fireEvent(b,this,c,g,d)},destroy:function(){if(this.setEditor){this.setEditor(null)}this.purgeListeners()},renderer:function(a){return a},getEditor:function(a){return this.editable!==false?this.editor:null},setEditor:function(b){var a=this.editor;if(a){if(a.gridEditor){a.gridEditor.destroy();delete a.gridEditor}else{a.destroy()}}this.editor=null;if(b){if(!b.isXType){b=Ext.create(b,"textfield")}this.editor=b}},getCellEditor:function(b){var a=this.getEditor(b);if(a){if(!a.startEdit){if(!a.gridEditor){a.gridEditor=new Ext.grid.GridEditor(a)}a=a.gridEditor}}return a}});Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:" ",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=(!Ext.isPrimitive(this.tpl)&&this.tpl.compile)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.ActionColumn=Ext.extend(Ext.grid.Column,{header:" ",actionIdRe:/x-action-col-(\d+)/,altText:"",constructor:function(b){var g=this,c=b.items||(g.items=[g]),a=c.length,d,e;Ext.grid.ActionColumn.superclass.constructor.call(g,b);g.renderer=function(h,i){h=Ext.isFunction(b.renderer)?b.renderer.apply(this,arguments)||"":"";i.css+=" x-action-col-cell";for(d=0;d"}return h}},destroy:function(){delete this.items;delete this.renderer;return Ext.grid.ActionColumn.superclass.destroy.apply(this,arguments)},processEvent:function(c,i,d,j,b){var a=i.getTarget().className.match(this.actionIdRe),h,g;if(a&&(h=this.items[parseInt(a[1],10)])){if(c=="click"){(g=h.handler||this.handler)&&g.call(h.scope||this.scope||this,d,j,b,h,i)}else{if((c=="mousedown")&&(h.stopSelection!==false)){return false}}}return Ext.grid.ActionColumn.superclass.processEvent.apply(this,arguments)}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn,actioncolumn:Ext.grid.ActionColumn};Ext.grid.RowNumberer=Ext.extend(Object,{header:"",width:23,sortable:false,constructor:function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}},fixed:true,hideable:false,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}});Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'
       
      ',width:20,sortable:false,menuDisabled:true,fixed:true,hideable:false,dataIndex:"",id:"checker",isColumn:true,constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){Ext.fly(this.grid.getView().innerHd).on("mousedown",this.onHdMouseDown,this)},this)},processEvent:function(b,d,c,g,a){if(b=="mousedown"){this.onMouseDown(d,d.getTarget());return false}else{return Ext.grid.Column.prototype.processEvent.apply(this,arguments)}},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true);this.grid.getView().focusRow(a)}}}},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'
       
      '},onEditorSelect:function(b,a){if(a!=b&&!this.checkOnly){this.selectRow(b)}}});Ext.grid.CellSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{constructor:function(a){Ext.apply(this,a);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)},initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.on(Ext.EventManager.getKeyEvent(),this.handleKeyDown,this);this.grid.getView().on({scope:this,refresh:this.onViewChange,rowupdated:this.onRowUpdated,beforerowremoved:this.clearSelections,beforerowsinserted:this.clearSelections});if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(a){this.select(a.row,a.column,false,true,a.record)},onRowUpdated:function(a,b,c){if(this.selection&&this.selection.record==c){a.onCellSelect(b,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(b){var a=this.selection;if(a){if(b!==true){this.grid.view.onCellDeselect(a.cell[0],a.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(b,d,a,c){if(c.button!==0||this.isLocked()){return}this.select(d,a)},select:function(g,c,b,e,d){if(this.fireEvent("beforecellselect",this,g,c)!==false){this.clearSelections();d=d||this.grid.store.getAt(g);this.selection={record:d,cell:[g,c]};if(!b){var a=this.grid.getView();a.onCellSelect(g,c);if(e!==true){a.focusCell(g,c)}}this.fireEvent("cellselect",this,g,c);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(c,b,a){return !a.isHidden(b)},onEditorKey:function(b,a){if(a.getKey()==a.TAB){this.handleKeyDown(a)}},handleKeyDown:function(j){if(!j.isNavKeyPress()){return}var d=j.getKey(),i=this.grid,p=this.selection,b=this,m=function(g,c,e){return i.walkCells(g,c,e,i.isEditor&&i.editing?b.acceptsNav:b.isSelectable,b)},o,h,a,l,n;switch(d){case j.ESC:case j.PAGE_UP:case j.PAGE_DOWN:break;default:j.stopEvent();break}if(!p){o=m(0,0,1);if(o){this.select(o[0],o[1])}return}o=p.cell;a=o[0];l=o[1];switch(d){case j.TAB:if(j.shiftKey){h=m(a,l-1,-1)}else{h=m(a,l+1,1)}break;case j.DOWN:h=m(a+1,l,1);break;case j.UP:h=m(a-1,l,-1);break;case j.RIGHT:h=m(a,l+1,1);break;case j.LEFT:h=m(a,l-1,-1);break;case j.ENTER:if(i.isEditor&&!i.editing){i.startEditing(a,l);return}break}if(h){a=h[0];l=h[1];this.select(a,l);if(i.isEditor&&i.editing){n=i.activeEditor;if(n&&n.field.triggerBlur){n.field.triggerBlur()}i.startEditing(a,l)}}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)}});Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:false,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.getGridEl().on("mousewheel",this.stopEditing.createDelegate(this,[true]),this);this.on("columnresize",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{var a=this.getView();if(this.clicksToEdit=="auto"&&a.mainBody){a.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}},onResize:function(){Ext.grid.EditorGridPanel.superclass.onResize.apply(this,arguments);var a=this.activeEditor;if(this.editing&&a){a.realign(true)}},onCellDblClick:function(b,c,a){this.startEditing(c,a)},onAutoEditClick:function(c,b){if(c.button!==0){return}var g=this.view.findRowIndex(b),a=this.view.findCellIndex(b);if(g!==false&&a!==false){this.stopEditing();if(this.selModel.getSelectedCell){var d=this.selModel.getSelectedCell();if(d&&d[0]===g&&d[1]===a){this.startEditing(g,a)}}else{if(this.selModel.isSelected(g)){this.startEditing(g,a)}}}},onEditComplete:function(b,d,a){this.editing=false;this.lastActiveEditor=this.activeEditor;this.activeEditor=null;var c=b.record,h=this.colModel.getDataIndex(b.col);d=this.postEditValue(d,a,c,h);if(this.forceValidation===true||String(d)!==String(a)){var g={grid:this,record:c,field:h,originalValue:a,value:d,row:b.row,column:b.col,cancel:false};if(this.fireEvent("validateedit",g)!==false&&!g.cancel&&String(d)!==String(a)){c.set(h,g.value);delete g.cancel;this.fireEvent("afteredit",g)}}this.view.focusCell(b.row,b.col)},startEditing:function(i,c){this.stopEditing();if(this.colModel.isCellEditable(c,i)){this.view.ensureVisible(i,c,true);var d=this.store.getAt(i),h=this.colModel.getDataIndex(c),g={grid:this,record:d,field:h,value:d.data[h],row:i,column:c,cancel:false};if(this.fireEvent("beforeedit",g)!==false&&!g.cancel){this.editing=true;var b=this.colModel.getCellEditor(c,i);if(!b){return}if(!b.rendered){b.parentEl=this.view.getEditorParent(b);b.on({scope:this,render:{fn:function(e){e.field.focus(false,true)},single:true,scope:this},specialkey:function(k,j){this.getSelectionModel().onEditorKey(k,j)},complete:this.onEditComplete,canceledit:this.stopEditing.createDelegate(this,[true])})}Ext.apply(b,{row:i,col:c,record:d});this.lastEdit={row:i,col:c};this.activeEditor=b;b.selectSameEditor=(this.activeEditor==this.lastActiveEditor);var a=this.preEditValue(d,h);b.startEdit(this.view.getCell(i,c).firstChild,Ext.isDefined(a)?a:"");(function(){delete b.selectSameEditor}).defer(50)}}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&Ext.isString(b)?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&Ext.isString(c)?Ext.util.Format.htmlEncode(c):c},stopEditing:function(b){if(this.editing){var a=this.lastActiveEditor=this.activeEditor;if(a){a[b===true?"cancelEdit":"completeEdit"]();this.view.focusCell(a.row,a.col)}this.activeEditor=null}this.editing=false}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(b,a){Ext.grid.GridEditor.superclass.constructor.call(this,b,a);b.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=Ext.extend(Ext.util.Observable,{constructor:function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)},setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)},setValue:function(d,c,a){var b=this.getRec(d);if(b){b.set("value",c);this.source[d]=c}else{if(a){this.source[d]=c;b=new Ext.grid.PropertyRecord({name:d,value:c},d);this.store.add(b)}}},remove:function(b){var a=this.getRec(b);if(a){this.store.remove(a);delete this.source[b]}},getRec:function(a){return this.store.getById(a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=Ext.extend(Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",constructor:function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:this.trueText},{tag:"option",value:"false",html:this.falseText}]},getValue:function(){return this.el.dom.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a,{autoSize:"both"})};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)},renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return this[a?"trueText":"falseText"]},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(d,b,c){var a=this.grid.customRenderers[c.get("name")];if(a){return a.apply(this,arguments)}var e=d;if(Ext.isDate(d)){e=this.renderDate(d)}else{if(typeof d=="boolean"){e=this.renderBool(d)}}return Ext.util.Format.htmlEncode(e)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);this.destroyEditors(this.editors);this.destroyEditors(this.grid.customEditors)},destroyEditors:function(b){for(var a in b){Ext.destroy(b[a])}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customRenderers=this.customRenderers||{};this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.reg("propertygrid",Ext.grid.PropertyGrid);Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",groupMode:"value",cancelEditOnToggle:true,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('
      ','
      ',this.groupTextTpl,"
      ",'
      ')}this.startGroup.compile();if(!this.endGroup){this.endGroup="
      "}},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(d,a,b){if(this.canGroup()&&!this.ignoreAdd){var c=this.getScrollState();this.fireEvent("beforerowsinserted",d,b,b+(a.length-1));this.refresh();this.restoreScroll(c);this.fireEvent("rowsinserted",d,b,b+(a.length-1))}else{if(!this.canGroup()){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(this.canGroup(),true)}},renderUI:function(){var a=Ext.grid.GroupingView.superclass.renderUI.call(this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}return a},processEvent:function(b,i){Ext.grid.GroupingView.superclass.processEvent.call(this,b,i);var h=i.getTarget(".x-grid-group-hd",this.mainBody);if(h){var g=this.getGroupField(),d=this.getPrefix(g),a=h.id.substring(d.length),c=new RegExp("gp-"+Ext.escapeRe(g)+"--hd");a=a.substr(0,a.length-3);if(a||c.test(h.id)){this.grid.fireEvent("group"+b,this.grid,g,a,i)}if(b=="mousedown"&&i.button==0){this.toggleGroup(h.parentNode)}}},onGroupByClick:function(){var a=this.grid;this.enableGrouping=true;a.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));a.fireEvent("groupchange",a,a.store.getGroupState());this.beforeMenuShow();this.refresh()},onShowGroupsClick:function(a,b){this.enableGrouping=b;if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping();this.grid.fireEvent("groupchange",this,null)}},toggleRowIndex:function(c,a){if(!this.canGroup()){return}var b=this.getRow(c);if(b){this.toggleGroup(this.findGroup(b),a)}},toggleGroup:function(c,b){var a=Ext.get(c),d=Ext.util.Format.htmlEncode(a.id);b=Ext.isDefined(b)?b:a.hasClass("x-grid-group-collapsed");if(this.state[d]!==b){if(this.cancelEditOnToggle!==false){this.grid.stopEditing(true)}this.state[d]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")}},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/web-client/src/main/resources/apps/js/ext/index.html b/web-client/src/main/resources/apps/js/ext/index.html deleted file mode 100644 index 7507084f72e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/index.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - -Welcome to Ext JS - - - - -
      - -
      -
      -

      Learn

      -

      Use the included files to view samples and our API documentation.

      -

      For advanced, hands-on support, please see our premium support subscriptions. Larger organizations can use our enterprise training and services.

      - -
      - -
      -

      Engage

      -

      Our community forums have over 100,000 registered users and are a great place to ask questions and interact with other Ext JS developers.

      - - - - -
      - -
      -

      License

      -

      Ext JS is dual licensed. This means:

      -
        -
      • Free to use and test in your local development environment.
      • -
      • Free to use in your open source projects.
      • -
      • Purchase a developer license if you don’t plan on releasing your website or application’s code as open source.
      • -
      -

      To purchase a commercial license, please see our pricing page.

      -
      -
      - -
      -
      -

      - - - - - - - - -

      -
      -

      Check out our Job Board »

      -
      - -
      - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/license.txt b/web-client/src/main/resources/apps/js/ext/license.txt deleted file mode 100644 index 215b7bd3414..00000000000 --- a/web-client/src/main/resources/apps/js/ext/license.txt +++ /dev/null @@ -1,41 +0,0 @@ -Ext JS - JavaScript Library -Copyright (c) 2006-2011, Sencha Inc. -All rights reserved. -licensing@sencha.com - -http://www.sencha.com/license - -Open Source License ------------------------------------------------------------------------------------------- -Ext JS is licensed under the terms of the Open Source GPL 3.0 license. - -http://www.gnu.org/licenses/gpl.html - -There are several FLOSS exceptions available for use with this release for -open source applications that are distributed under a license other than the GPL. - -* Open Source License Exception for Applications - - http://www.sencha.com/products/floss-exception.php - -* Open Source License Exception for Development - - http://www.sencha.com/products/ux-exception.php - - -Commercial License ------------------------------------------------------------------------------------------- -This is the appropriate option if you are creating proprietary applications and you are -not prepared to distribute and share the source code of your application under the -GPL v3 license. Please visit http://www.sencha.com/license for more details. - - -OEM / Reseller License ------------------------------------------------------------------------------------------- -For more details, please visit: http://www.sencha.com/license. - --- - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY RIGHTS. See the GNU -General Public License for more details. \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/cmp-foundation-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/cmp-foundation-debug.js deleted file mode 100644 index be0aee6c46d..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/cmp-foundation-debug.js +++ /dev/null @@ -1,14756 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.ComponentMgr - *

      Provides a registry of all Components (instances of {@link Ext.Component} or any subclass - * thereof) on a page so that they can be easily accessed by {@link Ext.Component component} - * {@link Ext.Component#id id} (see {@link #get}, or the convenience method {@link Ext#getCmp Ext.getCmp}).

      - *

      This object also provides a registry of available Component classes - * indexed by a mnemonic code known as the Component's {@link Ext.Component#xtype xtype}. - * The {@link Ext.Component#xtype xtype} provides a way to avoid instantiating child Components - * when creating a full, nested config object for a complete Ext page.

      - *

      A child Component may be specified simply as a config object - * as long as the correct {@link Ext.Component#xtype xtype} is specified so that if and when the Component - * needs rendering, the correct type can be looked up for lazy instantiation.

      - *

      For a list of all available {@link Ext.Component#xtype xtypes}, see {@link Ext.Component}.

      - * @singleton - */ -Ext.ComponentMgr = function(){ - var all = new Ext.util.MixedCollection(); - var types = {}; - var ptypes = {}; - - return { - /** - * Registers a component. - * @param {Ext.Component} c The component - */ - register : function(c){ - all.add(c); - }, - - /** - * Unregisters a component. - * @param {Ext.Component} c The component - */ - unregister : function(c){ - all.remove(c); - }, - - /** - * Returns a component by {@link Ext.Component#id id}. - * For additional details see {@link Ext.util.MixedCollection#get}. - * @param {String} id The component {@link Ext.Component#id id} - * @return Ext.Component The Component, undefined if not found, or null if a - * Class was found. - */ - get : function(id){ - return all.get(id); - }, - - /** - * Registers a function that will be called when a Component with the specified id is added to ComponentMgr. This will happen on instantiation. - * @param {String} id The component {@link Ext.Component#id id} - * @param {Function} fn The callback function - * @param {Object} scope The scope (this reference) in which the callback is executed. Defaults to the Component. - */ - onAvailable : function(id, fn, scope){ - all.on("add", function(index, o){ - if(o.id == id){ - fn.call(scope || o, o); - all.un("add", fn, scope); - } - }); - }, - - /** - * The MixedCollection used internally for the component cache. An example usage may be subscribing to - * events on the MixedCollection to monitor addition or removal. Read-only. - * @type {MixedCollection} - */ - all : all, - - /** - * The xtypes that have been registered with the component manager. - * @type {Object} - */ - types : types, - - /** - * The ptypes that have been registered with the component manager. - * @type {Object} - */ - ptypes: ptypes, - - /** - * Checks if a Component type is registered. - * @param {Ext.Component} xtype The mnemonic string by which the Component class may be looked up - * @return {Boolean} Whether the type is registered. - */ - isRegistered : function(xtype){ - return types[xtype] !== undefined; - }, - - /** - * Checks if a Plugin type is registered. - * @param {Ext.Component} ptype The mnemonic string by which the Plugin class may be looked up - * @return {Boolean} Whether the type is registered. - */ - isPluginRegistered : function(ptype){ - return ptypes[ptype] !== undefined; - }, - - /** - *

      Registers a new Component constructor, keyed by a new - * {@link Ext.Component#xtype}.

      - *

      Use this method (or its alias {@link Ext#reg Ext.reg}) to register new - * subclasses of {@link Ext.Component} so that lazy instantiation may be used when specifying - * child Components. - * see {@link Ext.Container#items}

      - * @param {String} xtype The mnemonic string by which the Component class may be looked up. - * @param {Constructor} cls The new Component class. - */ - registerType : function(xtype, cls){ - types[xtype] = cls; - cls.xtype = xtype; - }, - - /** - * Creates a new Component from the specified config object using the - * config object's {@link Ext.component#xtype xtype} to determine the class to instantiate. - * @param {Object} config A configuration object for the Component you wish to create. - * @param {Constructor} defaultType The constructor to provide the default Component type if - * the config object does not contain a xtype. (Optional if the config contains a xtype). - * @return {Ext.Component} The newly instantiated Component. - */ - create : function(config, defaultType){ - return config.render ? config : new types[config.xtype || defaultType](config); - }, - - /** - *

      Registers a new Plugin constructor, keyed by a new - * {@link Ext.Component#ptype}.

      - *

      Use this method (or its alias {@link Ext#preg Ext.preg}) to register new - * plugins for {@link Ext.Component}s so that lazy instantiation may be used when specifying - * Plugins.

      - * @param {String} ptype The mnemonic string by which the Plugin class may be looked up. - * @param {Constructor} cls The new Plugin class. - */ - registerPlugin : function(ptype, cls){ - ptypes[ptype] = cls; - cls.ptype = ptype; - }, - - /** - * Creates a new Plugin from the specified config object using the - * config object's {@link Ext.component#ptype ptype} to determine the class to instantiate. - * @param {Object} config A configuration object for the Plugin you wish to create. - * @param {Constructor} defaultType The constructor to provide the default Plugin type if - * the config object does not contain a ptype. (Optional if the config contains a ptype). - * @return {Ext.Component} The newly instantiated Plugin. - */ - createPlugin : function(config, defaultType){ - var PluginCls = ptypes[config.ptype || defaultType]; - if (PluginCls.init) { - return PluginCls; - } else { - return new PluginCls(config); - } - } - }; -}(); - -/** - * Shorthand for {@link Ext.ComponentMgr#registerType} - * @param {String} xtype The {@link Ext.component#xtype mnemonic string} by which the Component class - * may be looked up. - * @param {Constructor} cls The new Component class. - * @member Ext - * @method reg - */ -Ext.reg = Ext.ComponentMgr.registerType; // this will be called a lot internally, shorthand to keep the bytes down -/** - * Shorthand for {@link Ext.ComponentMgr#registerPlugin} - * @param {String} ptype The {@link Ext.component#ptype mnemonic string} by which the Plugin class - * may be looked up. - * @param {Constructor} cls The new Plugin class. - * @member Ext - * @method preg - */ -Ext.preg = Ext.ComponentMgr.registerPlugin; -/** - * Shorthand for {@link Ext.ComponentMgr#create} - * Creates a new Component from the specified config object using the - * config object's {@link Ext.component#xtype xtype} to determine the class to instantiate. - * @param {Object} config A configuration object for the Component you wish to create. - * @param {Constructor} defaultType The constructor to provide the default Component type if - * the config object does not contain a xtype. (Optional if the config contains a xtype). - * @return {Ext.Component} The newly instantiated Component. - * @member Ext - * @method create - */ -Ext.create = Ext.ComponentMgr.create;/** - * @class Ext.Component - * @extends Ext.util.Observable - *

      Base class for all Ext components. All subclasses of Component may participate in the automated - * Ext component lifecycle of creation, rendering and destruction which is provided by the {@link Ext.Container Container} class. - * Components may be added to a Container through the {@link Ext.Container#items items} config option at the time the Container is created, - * or they may be added dynamically via the {@link Ext.Container#add add} method.

      - *

      The Component base class has built-in support for basic hide/show and enable/disable behavior.

      - *

      All Components are registered with the {@link Ext.ComponentMgr} on construction so that they can be referenced at any time via - * {@link Ext#getCmp}, passing the {@link #id}.

      - *

      All user-developed visual widgets that are required to participate in automated lifecycle and size management should subclass Component (or - * {@link Ext.BoxComponent} if managed box model handling is required, ie height and width management).

      - *

      See the Creating new UI controls tutorial for details on how - * and to either extend or augment ExtJs base classes to create custom Components.

      - *

      Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking the - * xtype like {@link #getXType} and {@link #isXType}. This is the list of all valid xtypes:

      - *
      -xtype            Class
      --------------    ------------------
      -box              {@link Ext.BoxComponent}
      -button           {@link Ext.Button}
      -buttongroup      {@link Ext.ButtonGroup}
      -colorpalette     {@link Ext.ColorPalette}
      -component        {@link Ext.Component}
      -container        {@link Ext.Container}
      -cycle            {@link Ext.CycleButton}
      -dataview         {@link Ext.DataView}
      -datepicker       {@link Ext.DatePicker}
      -editor           {@link Ext.Editor}
      -editorgrid       {@link Ext.grid.EditorGridPanel}
      -flash            {@link Ext.FlashComponent}
      -grid             {@link Ext.grid.GridPanel}
      -listview         {@link Ext.ListView}
      -multislider      {@link Ext.slider.MultiSlider}
      -panel            {@link Ext.Panel}
      -progress         {@link Ext.ProgressBar}
      -propertygrid     {@link Ext.grid.PropertyGrid}
      -slider           {@link Ext.slider.SingleSlider}
      -spacer           {@link Ext.Spacer}
      -splitbutton      {@link Ext.SplitButton}
      -tabpanel         {@link Ext.TabPanel}
      -treepanel        {@link Ext.tree.TreePanel}
      -viewport         {@link Ext.ViewPort}
      -window           {@link Ext.Window}
      -
      -Toolbar components
      ----------------------------------------
      -paging           {@link Ext.PagingToolbar}
      -toolbar          {@link Ext.Toolbar}
      -tbbutton         {@link Ext.Toolbar.Button}        (deprecated; use button)
      -tbfill           {@link Ext.Toolbar.Fill}
      -tbitem           {@link Ext.Toolbar.Item}
      -tbseparator      {@link Ext.Toolbar.Separator}
      -tbspacer         {@link Ext.Toolbar.Spacer}
      -tbsplit          {@link Ext.Toolbar.SplitButton}   (deprecated; use splitbutton)
      -tbtext           {@link Ext.Toolbar.TextItem}
      -
      -Menu components
      ----------------------------------------
      -menu             {@link Ext.menu.Menu}
      -colormenu        {@link Ext.menu.ColorMenu}
      -datemenu         {@link Ext.menu.DateMenu}
      -menubaseitem     {@link Ext.menu.BaseItem}
      -menucheckitem    {@link Ext.menu.CheckItem}
      -menuitem         {@link Ext.menu.Item}
      -menuseparator    {@link Ext.menu.Separator}
      -menutextitem     {@link Ext.menu.TextItem}
      -
      -Form components
      ----------------------------------------
      -form             {@link Ext.form.FormPanel}
      -checkbox         {@link Ext.form.Checkbox}
      -checkboxgroup    {@link Ext.form.CheckboxGroup}
      -combo            {@link Ext.form.ComboBox}
      -compositefield   {@link Ext.form.CompositeField}
      -datefield        {@link Ext.form.DateField}
      -displayfield     {@link Ext.form.DisplayField}
      -field            {@link Ext.form.Field}
      -fieldset         {@link Ext.form.FieldSet}
      -hidden           {@link Ext.form.Hidden}
      -htmleditor       {@link Ext.form.HtmlEditor}
      -label            {@link Ext.form.Label}
      -numberfield      {@link Ext.form.NumberField}
      -radio            {@link Ext.form.Radio}
      -radiogroup       {@link Ext.form.RadioGroup}
      -textarea         {@link Ext.form.TextArea}
      -textfield        {@link Ext.form.TextField}
      -timefield        {@link Ext.form.TimeField}
      -trigger          {@link Ext.form.TriggerField}
      -
      -Chart components
      ----------------------------------------
      -chart            {@link Ext.chart.Chart}
      -barchart         {@link Ext.chart.BarChart}
      -cartesianchart   {@link Ext.chart.CartesianChart}
      -columnchart      {@link Ext.chart.ColumnChart}
      -linechart        {@link Ext.chart.LineChart}
      -piechart         {@link Ext.chart.PieChart}
      -
      -Store xtypes
      ----------------------------------------
      -arraystore       {@link Ext.data.ArrayStore}
      -directstore      {@link Ext.data.DirectStore}
      -groupingstore    {@link Ext.data.GroupingStore}
      -jsonstore        {@link Ext.data.JsonStore}
      -simplestore      {@link Ext.data.SimpleStore}      (deprecated; use arraystore)
      -store            {@link Ext.data.Store}
      -xmlstore         {@link Ext.data.XmlStore}
      -
      - * @constructor - * @param {Ext.Element/String/Object} config The configuration options may be specified as either: - *
        - *
      • an element : - *

        it is set as the internal element and its id used as the component id

      • - *
      • a string : - *

        it is assumed to be the id of an existing element and is used as the component id

      • - *
      • anything else : - *

        it is assumed to be a standard config object and is applied to the component

      • - *
      - */ -Ext.Component = function(config){ - config = config || {}; - if(config.initialConfig){ - if(config.isAction){ // actions - this.baseAction = config; - } - config = config.initialConfig; // component cloning / action set up - }else if(config.tagName || config.dom || Ext.isString(config)){ // element object - config = {applyTo: config, id: config.id || config}; - } - - /** - * This Component's initial configuration specification. Read-only. - * @type Object - * @property initialConfig - */ - this.initialConfig = config; - - Ext.apply(this, config); - this.addEvents( - /** - * @event added - * Fires when a component is added to an Ext.Container - * @param {Ext.Component} this - * @param {Ext.Container} ownerCt Container which holds the component - * @param {number} index Position at which the component was added - */ - 'added', - /** - * @event disable - * Fires after the component is disabled. - * @param {Ext.Component} this - */ - 'disable', - /** - * @event enable - * Fires after the component is enabled. - * @param {Ext.Component} this - */ - 'enable', - /** - * @event beforeshow - * Fires before the component is shown by calling the {@link #show} method. - * Return false from an event handler to stop the show. - * @param {Ext.Component} this - */ - 'beforeshow', - /** - * @event show - * Fires after the component is shown when calling the {@link #show} method. - * @param {Ext.Component} this - */ - 'show', - /** - * @event beforehide - * Fires before the component is hidden by calling the {@link #hide} method. - * Return false from an event handler to stop the hide. - * @param {Ext.Component} this - */ - 'beforehide', - /** - * @event hide - * Fires after the component is hidden. - * Fires after the component is hidden when calling the {@link #hide} method. - * @param {Ext.Component} this - */ - 'hide', - /** - * @event removed - * Fires when a component is removed from an Ext.Container - * @param {Ext.Component} this - * @param {Ext.Container} ownerCt Container which holds the component - */ - 'removed', - /** - * @event beforerender - * Fires before the component is {@link #rendered}. Return false from an - * event handler to stop the {@link #render}. - * @param {Ext.Component} this - */ - 'beforerender', - /** - * @event render - * Fires after the component markup is {@link #rendered}. - * @param {Ext.Component} this - */ - 'render', - /** - * @event afterrender - *

      Fires after the component rendering is finished.

      - *

      The afterrender event is fired after this Component has been {@link #rendered}, been postprocesed - * by any afterRender method defined for the Component, and, if {@link #stateful}, after state - * has been restored.

      - * @param {Ext.Component} this - */ - 'afterrender', - /** - * @event beforedestroy - * Fires before the component is {@link #destroy}ed. Return false from an event handler to stop the {@link #destroy}. - * @param {Ext.Component} this - */ - 'beforedestroy', - /** - * @event destroy - * Fires after the component is {@link #destroy}ed. - * @param {Ext.Component} this - */ - 'destroy', - /** - * @event beforestaterestore - * Fires before the state of the component is restored. Return false from an event handler to stop the restore. - * @param {Ext.Component} this - * @param {Object} state The hash of state values returned from the StateProvider. If this - * event is not vetoed, then the state object is passed to applyState. By default, - * that simply copies property values into this Component. The method maybe overriden to - * provide custom state restoration. - */ - 'beforestaterestore', - /** - * @event staterestore - * Fires after the state of the component is restored. - * @param {Ext.Component} this - * @param {Object} state The hash of state values returned from the StateProvider. This is passed - * to applyState. By default, that simply copies property values into this - * Component. The method maybe overriden to provide custom state restoration. - */ - 'staterestore', - /** - * @event beforestatesave - * Fires before the state of the component is saved to the configured state provider. Return false to stop the save. - * @param {Ext.Component} this - * @param {Object} state The hash of state values. This is determined by calling - * getState() on the Component. This method must be provided by the - * developer to return whetever representation of state is required, by default, Ext.Component - * has a null implementation. - */ - 'beforestatesave', - /** - * @event statesave - * Fires after the state of the component is saved to the configured state provider. - * @param {Ext.Component} this - * @param {Object} state The hash of state values. This is determined by calling - * getState() on the Component. This method must be provided by the - * developer to return whetever representation of state is required, by default, Ext.Component - * has a null implementation. - */ - 'statesave' - ); - this.getId(); - Ext.ComponentMgr.register(this); - Ext.Component.superclass.constructor.call(this); - - if(this.baseAction){ - this.baseAction.addComponent(this); - } - - this.initComponent(); - - if(this.plugins){ - if(Ext.isArray(this.plugins)){ - for(var i = 0, len = this.plugins.length; i < len; i++){ - this.plugins[i] = this.initPlugin(this.plugins[i]); - } - }else{ - this.plugins = this.initPlugin(this.plugins); - } - } - - if(this.stateful !== false){ - this.initState(); - } - - if(this.applyTo){ - this.applyToMarkup(this.applyTo); - delete this.applyTo; - }else if(this.renderTo){ - this.render(this.renderTo); - delete this.renderTo; - } -}; - -// private -Ext.Component.AUTO_ID = 1000; - -Ext.extend(Ext.Component, Ext.util.Observable, { - // Configs below are used for all Components when rendered by FormLayout. - /** - * @cfg {String} fieldLabel

      The label text to display next to this Component (defaults to '').

      - *

      Note: this config is only used when this Component is rendered by a Container which - * has been configured to use the {@link Ext.layout.FormLayout FormLayout} layout manager (e.g. - * {@link Ext.form.FormPanel} or specifying layout:'form').


      - *

      Also see {@link #hideLabel} and - * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.

      - * Example use:
      
      -new Ext.FormPanel({
      -    height: 100,
      -    renderTo: Ext.getBody(),
      -    items: [{
      -        xtype: 'textfield',
      -        fieldLabel: 'Name'
      -    }]
      -});
      -
      - */ - /** - * @cfg {String} labelStyle

      A CSS style specification string to apply directly to this field's - * label. Defaults to the container's labelStyle value if set (e.g., - * {@link Ext.layout.FormLayout#labelStyle} , or '').

      - *

      Note: see the note for {@link #clearCls}.


      - *

      Also see {@link #hideLabel} and - * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.

      - * Example use:
      
      -new Ext.FormPanel({
      -    height: 100,
      -    renderTo: Ext.getBody(),
      -    items: [{
      -        xtype: 'textfield',
      -        fieldLabel: 'Name',
      -        labelStyle: 'font-weight:bold;'
      -    }]
      -});
      -
      - */ - /** - * @cfg {String} labelSeparator

      The separator to display after the text of each - * {@link #fieldLabel}. This property may be configured at various levels. - * The order of precedence is: - *

        - *
      • field / component level
      • - *
      • container level
      • - *
      • {@link Ext.layout.FormLayout#labelSeparator layout level} (defaults to colon ':')
      • - *
      - * To display no separator for this field's label specify empty string ''.

      - *

      Note: see the note for {@link #clearCls}.


      - *

      Also see {@link #hideLabel} and - * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.

      - * Example use:
      
      -new Ext.FormPanel({
      -    height: 100,
      -    renderTo: Ext.getBody(),
      -    layoutConfig: {
      -        labelSeparator: '~'   // layout config has lowest priority (defaults to ':')
      -    },
      -    {@link Ext.layout.FormLayout#labelSeparator labelSeparator}: '>>',     // config at container level
      -    items: [{
      -        xtype: 'textfield',
      -        fieldLabel: 'Field 1',
      -        labelSeparator: '...' // field/component level config supersedes others
      -    },{
      -        xtype: 'textfield',
      -        fieldLabel: 'Field 2' // labelSeparator will be '='
      -    }]
      -});
      -
      - */ - /** - * @cfg {Boolean} hideLabel

      true to completely hide the label element - * ({@link #fieldLabel label} and {@link #labelSeparator separator}). Defaults to false. - * By default, even if you do not specify a {@link #fieldLabel} the space will still be - * reserved so that the field will line up with other fields that do have labels. - * Setting this to true will cause the field to not reserve that space.

      - *

      Note: see the note for {@link #clearCls}.


      - * Example use:
      
      -new Ext.FormPanel({
      -    height: 100,
      -    renderTo: Ext.getBody(),
      -    items: [{
      -        xtype: 'textfield'
      -        hideLabel: true
      -    }]
      -});
      -
      - */ - /** - * @cfg {String} clearCls

      The CSS class used to to apply to the special clearing div rendered - * directly after each form field wrapper to provide field clearing (defaults to - * 'x-form-clear-left').

      - *

      Note: this config is only used when this Component is rendered by a Container - * which has been configured to use the {@link Ext.layout.FormLayout FormLayout} layout - * manager (e.g. {@link Ext.form.FormPanel} or specifying layout:'form') and either a - * {@link #fieldLabel} is specified or isFormField=true is specified.


      - *

      See {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl} also.

      - */ - /** - * @cfg {String} itemCls - *

      Note: this config is only used when this Component is rendered by a Container which - * has been configured to use the {@link Ext.layout.FormLayout FormLayout} layout manager (e.g. - * {@link Ext.form.FormPanel} or specifying layout:'form').


      - *

      An additional CSS class to apply to the div wrapping the form item - * element of this field. If supplied, itemCls at the field level will override - * the default itemCls supplied at the container level. The value specified for - * itemCls will be added to the default class ('x-form-item').

      - *

      Since it is applied to the item wrapper (see - * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}), it allows - * you to write standard CSS rules that can apply to the field, the label (if specified), or - * any other element within the markup for the field.

      - *

      Note: see the note for {@link #fieldLabel}.


      - * Example use:
      
      -// Apply a style to the field's label:
      -<style>
      -    .required .x-form-item-label {font-weight:bold;color:red;}
      -</style>
      -
      -new Ext.FormPanel({
      -    height: 100,
      -    renderTo: Ext.getBody(),
      -    items: [{
      -        xtype: 'textfield',
      -        fieldLabel: 'Name',
      -        itemCls: 'required' //this label will be styled
      -    },{
      -        xtype: 'textfield',
      -        fieldLabel: 'Favorite Color'
      -    }]
      -});
      -
      - */ - - /** - * @cfg {String} id - *

      The unique id of this component (defaults to an {@link #getId auto-assigned id}). - * You should assign an id if you need to be able to access the component later and you do - * not have an object reference available (e.g., using {@link Ext}.{@link Ext#getCmp getCmp}).

      - *

      Note that this id will also be used as the element id for the containing HTML element - * that is rendered to the page for this component. This allows you to write id-based CSS - * rules to style the specific instance of this component uniquely, and also to select - * sub-elements using this component's id as the parent.

      - *

      Note: to avoid complications imposed by a unique id also see - * {@link #itemId} and {@link #ref}.

      - *

      Note: to access the container of an item see {@link #ownerCt}.

      - */ - /** - * @cfg {String} itemId - *

      An itemId can be used as an alternative way to get a reference to a component - * when no object reference is available. Instead of using an {@link #id} with - * {@link Ext}.{@link Ext#getCmp getCmp}, use itemId with - * {@link Ext.Container}.{@link Ext.Container#getComponent getComponent} which will retrieve - * itemId's or {@link #id}'s. Since itemId's are an index to the - * container's internal MixedCollection, the itemId is scoped locally to the container -- - * avoiding potential conflicts with {@link Ext.ComponentMgr} which requires a unique - * {@link #id}.

      - *
      
      -var c = new Ext.Panel({ //
      -    {@link Ext.BoxComponent#height height}: 300,
      -    {@link #renderTo}: document.body,
      -    {@link Ext.Container#layout layout}: 'auto',
      -    {@link Ext.Container#items items}: [
      -        {
      -            itemId: 'p1',
      -            {@link Ext.Panel#title title}: 'Panel 1',
      -            {@link Ext.BoxComponent#height height}: 150
      -        },
      -        {
      -            itemId: 'p2',
      -            {@link Ext.Panel#title title}: 'Panel 2',
      -            {@link Ext.BoxComponent#height height}: 150
      -        }
      -    ]
      -})
      -p1 = c.{@link Ext.Container#getComponent getComponent}('p1'); // not the same as {@link Ext#getCmp Ext.getCmp()}
      -p2 = p1.{@link #ownerCt}.{@link Ext.Container#getComponent getComponent}('p2'); // reference via a sibling
      -     * 
      - *

      Also see {@link #id} and {@link #ref}.

      - *

      Note: to access the container of an item see {@link #ownerCt}.

      - */ - /** - * @cfg {String} xtype - * The registered xtype to create. This config option is not used when passing - * a config object into a constructor. This config option is used only when - * lazy instantiation is being used, and a child item of a Container is being - * specified not as a fully instantiated Component, but as a Component config - * object. The xtype will be looked up at render time up to determine what - * type of child Component to create.

      - * The predefined xtypes are listed {@link Ext.Component here}. - *

      - * If you subclass Components to create your own Components, you may register - * them using {@link Ext.ComponentMgr#registerType} in order to be able to - * take advantage of lazy instantiation and rendering. - */ - /** - * @cfg {String} ptype - * The registered ptype to create. This config option is not used when passing - * a config object into a constructor. This config option is used only when - * lazy instantiation is being used, and a Plugin is being - * specified not as a fully instantiated Component, but as a Component config - * object. The ptype will be looked up at render time up to determine what - * type of Plugin to create.

      - * If you create your own Plugins, you may register them using - * {@link Ext.ComponentMgr#registerPlugin} in order to be able to - * take advantage of lazy instantiation and rendering. - */ - /** - * @cfg {String} cls - * An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be - * useful for adding customized styles to the component or any of its children using standard CSS rules. - */ - /** - * @cfg {String} overCls - * An optional extra CSS class that will be added to this component's Element when the mouse moves - * over the Element, and removed when the mouse moves out. (defaults to ''). This can be - * useful for adding customized 'active' or 'hover' styles to the component or any of its children using standard CSS rules. - */ - /** - * @cfg {String} style - * A custom style specification to be applied to this component's Element. Should be a valid argument to - * {@link Ext.Element#applyStyles}. - *
      
      -new Ext.Panel({
      -    title: 'Some Title',
      -    renderTo: Ext.getBody(),
      -    width: 400, height: 300,
      -    layout: 'form',
      -    items: [{
      -        xtype: 'textarea',
      -        style: {
      -            width: '95%',
      -            marginBottom: '10px'
      -        }
      -    },
      -        new Ext.Button({
      -            text: 'Send',
      -            minWidth: '100',
      -            style: {
      -                marginBottom: '10px'
      -            }
      -        })
      -    ]
      -});
      -     * 
      - */ - /** - * @cfg {String} ctCls - *

      An optional extra CSS class that will be added to this component's container. This can be useful for - * adding customized styles to the container or any of its children using standard CSS rules. See - * {@link Ext.layout.ContainerLayout}.{@link Ext.layout.ContainerLayout#extraCls extraCls} also.

      - *

      Note: ctCls defaults to '' except for the following class - * which assigns a value by default: - *

        - *
      • {@link Ext.layout.Box Box Layout} : 'x-box-layout-ct'
      • - *
      - * To configure the above Class with an extra CSS class append to the default. For example, - * for BoxLayout (Hbox and Vbox):
      
      -     * ctCls: 'x-box-layout-ct custom-class'
      -     * 
      - *

      - */ - /** - * @cfg {Boolean} disabled - * Render this component disabled (default is false). - */ - disabled : false, - /** - * @cfg {Boolean} hidden - * Render this component hidden (default is false). If true, the - * {@link #hide} method will be called internally. - */ - hidden : false, - /** - * @cfg {Object/Array} plugins - * An object or array of objects that will provide custom functionality for this component. The only - * requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component. - * When a component is created, if any plugins are available, the component will call the init method on each - * plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the - * component as needed to provide its functionality. - */ - /** - * @cfg {Mixed} applyTo - *

      Specify the id of the element, a DOM element or an existing Element corresponding to a DIV - * that is already present in the document that specifies some structural markup for this - * component.

        - *
      • Description :
          - *
          When applyTo is used, constituent parts of the component can also be specified - * by id or CSS class name within the main element, and the component being created may attempt - * to create its subcomponents from that markup if applicable.
          - *
      • - *
      • Notes :
          - *
          When using this config, a call to render() is not required.
          - *
          If applyTo is specified, any value passed for {@link #renderTo} will be ignored and the target - * element's parent node will automatically be used as the component's container.
          - *
      • - *
      - */ - /** - * @cfg {Mixed} renderTo - *

      Specify the id of the element, a DOM element or an existing Element that this component - * will be rendered into.

        - *
      • Notes :
          - *
          Do not use this option if the Component is to be a child item of - * a {@link Ext.Container Container}. It is the responsibility of the - * {@link Ext.Container Container}'s {@link Ext.Container#layout layout manager} - * to render and manage its child items.
          - *
          When using this config, a call to render() is not required.
          - *
      • - *
      - *

      See {@link #render} also.

      - */ - /** - * @cfg {Boolean} stateful - *

      A flag which causes the Component to attempt to restore the state of - * internal properties from a saved state on startup. The component must have - * either a {@link #stateId} or {@link #id} assigned - * for state to be managed. Auto-generated ids are not guaranteed to be stable - * across page loads and cannot be relied upon to save and restore the same - * state for a component.

      - *

      For state saving to work, the state manager's provider must have been - * set to an implementation of {@link Ext.state.Provider} which overrides the - * {@link Ext.state.Provider#set set} and {@link Ext.state.Provider#get get} - * methods to save and recall name/value pairs. A built-in implementation, - * {@link Ext.state.CookieProvider} is available.

      - *

      To set the state provider for the current page:

      - *
      
      -Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
      -    expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now
      -}));
      -     * 
      - *

      A stateful Component attempts to save state when one of the events - * listed in the {@link #stateEvents} configuration fires.

      - *

      To save state, a stateful Component first serializes its state by - * calling getState. By default, this function does - * nothing. The developer must provide an implementation which returns an - * object hash which represents the Component's restorable state.

      - *

      The value yielded by getState is passed to {@link Ext.state.Manager#set} - * which uses the configured {@link Ext.state.Provider} to save the object - * keyed by the Component's {@link stateId}, or, if that is not - * specified, its {@link #id}.

      - *

      During construction, a stateful Component attempts to restore - * its state by calling {@link Ext.state.Manager#get} passing the - * {@link #stateId}, or, if that is not specified, the - * {@link #id}.

      - *

      The resulting object is passed to applyState. - * The default implementation of applyState simply copies - * properties into the object, but a developer may override this to support - * more behaviour.

      - *

      You can perform extra processing on state save and restore by attaching - * handlers to the {@link #beforestaterestore}, {@link #staterestore}, - * {@link #beforestatesave} and {@link #statesave} events.

      - */ - /** - * @cfg {String} stateId - * The unique id for this component to use for state management purposes - * (defaults to the component id if one was set, otherwise null if the - * component is using a generated id). - *

      See {@link #stateful} for an explanation of saving and - * restoring Component state.

      - */ - /** - * @cfg {Array} stateEvents - *

      An array of events that, when fired, should trigger this component to - * save its state (defaults to none). stateEvents may be any type - * of event supported by this component, including browser or custom events - * (e.g., ['click', 'customerchange']).

      - *

      See {@link #stateful} for an explanation of saving and - * restoring Component state.

      - */ - /** - * @cfg {Mixed} autoEl - *

      A tag name or {@link Ext.DomHelper DomHelper} spec used to create the {@link #getEl Element} which will - * encapsulate this Component.

      - *

      You do not normally need to specify this. For the base classes {@link Ext.Component}, {@link Ext.BoxComponent}, - * and {@link Ext.Container}, this defaults to 'div'. The more complex Ext classes use a more complex - * DOM structure created by their own onRender methods.

      - *

      This is intended to allow the developer to create application-specific utility Components encapsulated by - * different DOM elements. Example usage:

      
      -{
      -    xtype: 'box',
      -    autoEl: {
      -        tag: 'img',
      -        src: 'http://www.example.com/example.jpg'
      -    }
      -}, {
      -    xtype: 'box',
      -    autoEl: {
      -        tag: 'blockquote',
      -        html: 'autoEl is cool!'
      -    }
      -}, {
      -    xtype: 'container',
      -    autoEl: 'ul',
      -    cls: 'ux-unordered-list',
      -    items: {
      -        xtype: 'box',
      -        autoEl: 'li',
      -        html: 'First list item'
      -    }
      -}
      -
      - */ - autoEl : 'div', - - /** - * @cfg {String} disabledClass - * CSS class added to the component when it is disabled (defaults to 'x-item-disabled'). - */ - disabledClass : 'x-item-disabled', - /** - * @cfg {Boolean} allowDomMove - * Whether the component can move the Dom node when rendering (defaults to true). - */ - allowDomMove : true, - /** - * @cfg {Boolean} autoShow - * True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove - * them on render (defaults to false). - */ - autoShow : false, - /** - * @cfg {String} hideMode - *

      How this component should be hidden. Supported values are 'visibility' - * (css visibility), 'offsets' (negative offset position) and 'display' - * (css display).

      - *

      Note: the default of 'display' is generally preferred - * since items are automatically laid out when they are first shown (no sizing - * is done while hidden).

      - */ - hideMode : 'display', - /** - * @cfg {Boolean} hideParent - * True to hide and show the component's container when hide/show is called on the component, false to hide - * and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide - * button on a window by setting hide:true on the button when adding it to its parent container. - */ - hideParent : false, - /** - *

      The {@link Ext.Element} which encapsulates this Component. Read-only.

      - *

      This will usually be a <DIV> element created by the class's onRender method, but - * that may be overridden using the {@link #autoEl} config.

      - *

      Note: this element will not be available until this Component has been rendered.


      - *

      To add listeners for DOM events to this Component (as opposed to listeners - * for this Component's own Observable events), see the {@link Ext.util.Observable#listeners listeners} - * config for a suggestion, or use a render listener directly:

      
      -new Ext.Panel({
      -    title: 'The Clickable Panel',
      -    listeners: {
      -        render: function(p) {
      -            // Append the Panel to the click handler's argument list.
      -            p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));
      -        },
      -        single: true  // Remove the listener after first invocation
      -    }
      -});
      -
      - *

      See also {@link #getEl getEl}

      - * @type Ext.Element - * @property el - */ - /** - * This Component's owner {@link Ext.Container Container} (defaults to undefined, and is set automatically when - * this Component is added to a Container). Read-only. - *

      Note: to access items within the Container see {@link #itemId}.

      - * @type Ext.Container - * @property ownerCt - */ - /** - * True if this component is hidden. Read-only. - * @type Boolean - * @property hidden - */ - /** - * True if this component is disabled. Read-only. - * @type Boolean - * @property disabled - */ - /** - * True if this component has been rendered. Read-only. - * @type Boolean - * @property rendered - */ - rendered : false, - - /** - * @cfg {String} contentEl - *

      Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content - * for this component.

      - *
        - *
      • Description : - *
        This config option is used to take an existing HTML element and place it in the layout element - * of a new component (it simply moves the specified DOM element after the Component is rendered to use as the content.
      • - *
      • Notes : - *
        The specified HTML element is appended to the layout element of the component after any configured - * {@link #html HTML} has been inserted, and so the document will not contain this element at the time the {@link #render} event is fired.
        - *
        The specified HTML element used will not participate in any {@link Ext.Container#layout layout} - * scheme that the Component may use. It is just HTML. Layouts operate on child {@link Ext.Container#items items}.
        - *
        Add either the x-hidden or the x-hide-display CSS class to - * prevent a brief flicker of the content before it is rendered to the panel.
      • - *
      - */ - /** - * @cfg {String/Object} html - * An HTML fragment, or a {@link Ext.DomHelper DomHelper} specification to use as the layout element - * content (defaults to ''). The HTML content is added after the component is rendered, - * so the document will not contain this HTML at the time the {@link #render} event is fired. - * This content is inserted into the body before any configured {@link #contentEl} is appended. - */ - - /** - * @cfg {Mixed} tpl - * An {@link Ext.Template}, {@link Ext.XTemplate} - * or an array of strings to form an Ext.XTemplate. - * Used in conjunction with the {@link #data} and - * {@link #tplWriteMode} configurations. - */ - - /** - * @cfg {String} tplWriteMode The Ext.(X)Template method to use when - * updating the content area of the Component. Defaults to 'overwrite' - * (see {@link Ext.XTemplate#overwrite}). - */ - tplWriteMode : 'overwrite', - - /** - * @cfg {Mixed} data - * The initial set of data to apply to the {@link #tpl} to - * update the content area of the Component. - */ - - /** - * @cfg {Array} bubbleEvents - *

      An array of events that, when fired, should be bubbled to any parent container. - * See {@link Ext.util.Observable#enableBubble}. - * Defaults to []. - */ - bubbleEvents: [], - - - // private - ctype : 'Ext.Component', - - // private - actionMode : 'el', - - // private - getActionEl : function(){ - return this[this.actionMode]; - }, - - initPlugin : function(p){ - if(p.ptype && !Ext.isFunction(p.init)){ - p = Ext.ComponentMgr.createPlugin(p); - }else if(Ext.isString(p)){ - p = Ext.ComponentMgr.createPlugin({ - ptype: p - }); - } - p.init(this); - return p; - }, - - /* // protected - * Function to be implemented by Component subclasses to be part of standard component initialization flow (it is empty by default). - *

      
      -// Traditional constructor:
      -Ext.Foo = function(config){
      -    // call superclass constructor:
      -    Ext.Foo.superclass.constructor.call(this, config);
      -
      -    this.addEvents({
      -        // add events
      -    });
      -};
      -Ext.extend(Ext.Foo, Ext.Bar, {
      -   // class body
      -}
      -
      -// initComponent replaces the constructor:
      -Ext.Foo = Ext.extend(Ext.Bar, {
      -    initComponent : function(){
      -        // call superclass initComponent
      -        Ext.Container.superclass.initComponent.call(this);
      -
      -        this.addEvents({
      -            // add events
      -        });
      -    }
      -}
      -
      - */ - initComponent : function(){ - /* - * this is double processing, however it allows people to be able to do - * Ext.apply(this, { - * listeners: { - * //here - * } - * }); - * MyClass.superclass.initComponent.call(this); - */ - if(this.listeners){ - this.on(this.listeners); - delete this.listeners; - } - this.enableBubble(this.bubbleEvents); - }, - - /** - *

      Render this Component into the passed HTML element.

      - *

      If you are using a {@link Ext.Container Container} object to house this Component, then - * do not use the render method.

      - *

      A Container's child Components are rendered by that Container's - * {@link Ext.Container#layout layout} manager when the Container is first rendered.

      - *

      Certain layout managers allow dynamic addition of child components. Those that do - * include {@link Ext.layout.CardLayout}, {@link Ext.layout.AnchorLayout}, - * {@link Ext.layout.FormLayout}, {@link Ext.layout.TableLayout}.

      - *

      If the Container is already rendered when a new child Component is added, you may need to call - * the Container's {@link Ext.Container#doLayout doLayout} to refresh the view which causes any - * unrendered child Components to be rendered. This is required so that you can add multiple - * child components if needed while only refreshing the layout once.

      - *

      When creating complex UIs, it is important to remember that sizing and positioning - * of child items is the responsibility of the Container's {@link Ext.Container#layout layout} manager. - * If you expect child items to be sized in response to user interactions, you must - * configure the Container with a layout manager which creates and manages the type of layout you - * have in mind.

      - *

      Omitting the Container's {@link Ext.Container#layout layout} config means that a basic - * layout manager is used which does nothing but render child components sequentially into the - * Container. No sizing or positioning will be performed in this situation.

      - * @param {Element/HTMLElement/String} container (optional) The element this Component should be - * rendered into. If it is being created from existing markup, this should be omitted. - * @param {String/Number} position (optional) The element ID or DOM node index within the container before - * which this component will be inserted (defaults to appending to the end of the container) - */ - render : function(container, position){ - if(!this.rendered && this.fireEvent('beforerender', this) !== false){ - if(!container && this.el){ - this.el = Ext.get(this.el); - container = this.el.dom.parentNode; - this.allowDomMove = false; - } - this.container = Ext.get(container); - if(this.ctCls){ - this.container.addClass(this.ctCls); - } - this.rendered = true; - if(position !== undefined){ - if(Ext.isNumber(position)){ - position = this.container.dom.childNodes[position]; - }else{ - position = Ext.getDom(position); - } - } - this.onRender(this.container, position || null); - if(this.autoShow){ - this.el.removeClass(['x-hidden','x-hide-' + this.hideMode]); - } - if(this.cls){ - this.el.addClass(this.cls); - delete this.cls; - } - if(this.style){ - this.el.applyStyles(this.style); - delete this.style; - } - if(this.overCls){ - this.el.addClassOnOver(this.overCls); - } - this.fireEvent('render', this); - - - // Populate content of the component with html, contentEl or - // a tpl. - var contentTarget = this.getContentTarget(); - if (this.html){ - contentTarget.update(Ext.DomHelper.markup(this.html)); - delete this.html; - } - if (this.contentEl){ - var ce = Ext.getDom(this.contentEl); - Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']); - contentTarget.appendChild(ce); - } - if (this.tpl) { - if (!this.tpl.compile) { - this.tpl = new Ext.XTemplate(this.tpl); - } - if (this.data) { - this.tpl[this.tplWriteMode](contentTarget, this.data); - delete this.data; - } - } - this.afterRender(this.container); - - - if(this.hidden){ - // call this so we don't fire initial hide events. - this.doHide(); - } - if(this.disabled){ - // pass silent so the event doesn't fire the first time. - this.disable(true); - } - - if(this.stateful !== false){ - this.initStateEvents(); - } - this.fireEvent('afterrender', this); - } - return this; - }, - - - /** - * Update the content area of a component. - * @param {Mixed} htmlOrData - * If this component has been configured with a template via the tpl config - * then it will use this argument as data to populate the template. - * If this component was not configured with a template, the components - * content area will be updated via Ext.Element update - * @param {Boolean} loadScripts - * (optional) Only legitimate when using the html configuration. Defaults to false - * @param {Function} callback - * (optional) Only legitimate when using the html configuration. Callback to execute when scripts have finished loading - */ - update: function(htmlOrData, loadScripts, cb) { - var contentTarget = this.getContentTarget(); - if (this.tpl && typeof htmlOrData !== "string") { - this.tpl[this.tplWriteMode](contentTarget, htmlOrData || {}); - } else { - var html = Ext.isObject(htmlOrData) ? Ext.DomHelper.markup(htmlOrData) : htmlOrData; - contentTarget.update(html, loadScripts, cb); - } - }, - - - /** - * @private - * Method to manage awareness of when components are added to their - * respective Container, firing an added event. - * References are established at add time rather than at render time. - * @param {Ext.Container} container Container which holds the component - * @param {number} pos Position at which the component was added - */ - onAdded : function(container, pos) { - this.ownerCt = container; - this.initRef(); - this.fireEvent('added', this, container, pos); - }, - - /** - * @private - * Method to manage awareness of when components are removed from their - * respective Container, firing an removed event. References are properly - * cleaned up after removing a component from its owning container. - */ - onRemoved : function() { - this.removeRef(); - this.fireEvent('removed', this, this.ownerCt); - delete this.ownerCt; - }, - - /** - * @private - * Method to establish a reference to a component. - */ - initRef : function() { - /** - * @cfg {String} ref - *

      A path specification, relative to the Component's {@link #ownerCt} - * specifying into which ancestor Container to place a named reference to this Component.

      - *

      The ancestor axis can be traversed by using '/' characters in the path. - * For example, to put a reference to a Toolbar Button into the Panel which owns the Toolbar:

      
      -var myGrid = new Ext.grid.EditorGridPanel({
      -    title: 'My EditorGridPanel',
      -    store: myStore,
      -    colModel: myColModel,
      -    tbar: [{
      -        text: 'Save',
      -        handler: saveChanges,
      -        disabled: true,
      -        ref: '../saveButton'
      -    }],
      -    listeners: {
      -        afteredit: function() {
      -//          The button reference is in the GridPanel
      -            myGrid.saveButton.enable();
      -        }
      -    }
      -});
      -
      - *

      In the code above, if the ref had been 'saveButton' - * the reference would have been placed into the Toolbar. Each '/' in the ref - * moves up one level from the Component's {@link #ownerCt}.

      - *

      Also see the {@link #added} and {@link #removed} events.

      - */ - if(this.ref && !this.refOwner){ - var levels = this.ref.split('/'), - last = levels.length, - i = 0, - t = this; - - while(t && i < last){ - t = t.ownerCt; - ++i; - } - if(t){ - t[this.refName = levels[--i]] = this; - /** - * @type Ext.Container - * @property refOwner - * The ancestor Container into which the {@link #ref} reference was inserted if this Component - * is a child of a Container, and has been configured with a ref. - */ - this.refOwner = t; - } - } - }, - - removeRef : function() { - if (this.refOwner && this.refName) { - delete this.refOwner[this.refName]; - delete this.refOwner; - } - }, - - // private - initState : function(){ - if(Ext.state.Manager){ - var id = this.getStateId(); - if(id){ - var state = Ext.state.Manager.get(id); - if(state){ - if(this.fireEvent('beforestaterestore', this, state) !== false){ - this.applyState(Ext.apply({}, state)); - this.fireEvent('staterestore', this, state); - } - } - } - } - }, - - // private - getStateId : function(){ - return this.stateId || ((/^(ext-comp-|ext-gen)/).test(String(this.id)) ? null : this.id); - }, - - // private - initStateEvents : function(){ - if(this.stateEvents){ - for(var i = 0, e; e = this.stateEvents[i]; i++){ - this.on(e, this.saveState, this, {delay:100}); - } - } - }, - - // private - applyState : function(state){ - if(state){ - Ext.apply(this, state); - } - }, - - // private - getState : function(){ - return null; - }, - - // private - saveState : function(){ - if(Ext.state.Manager && this.stateful !== false){ - var id = this.getStateId(); - if(id){ - var state = this.getState(); - if(this.fireEvent('beforestatesave', this, state) !== false){ - Ext.state.Manager.set(id, state); - this.fireEvent('statesave', this, state); - } - } - } - }, - - /** - * Apply this component to existing markup that is valid. With this function, no call to render() is required. - * @param {String/HTMLElement} el - */ - applyToMarkup : function(el){ - this.allowDomMove = false; - this.el = Ext.get(el); - this.render(this.el.dom.parentNode); - }, - - /** - * Adds a CSS class to the component's underlying element. - * @param {string} cls The CSS class name to add - * @return {Ext.Component} this - */ - addClass : function(cls){ - if(this.el){ - this.el.addClass(cls); - }else{ - this.cls = this.cls ? this.cls + ' ' + cls : cls; - } - return this; - }, - - /** - * Removes a CSS class from the component's underlying element. - * @param {string} cls The CSS class name to remove - * @return {Ext.Component} this - */ - removeClass : function(cls){ - if(this.el){ - this.el.removeClass(cls); - }else if(this.cls){ - this.cls = this.cls.split(' ').remove(cls).join(' '); - } - return this; - }, - - // private - // default function is not really useful - onRender : function(ct, position){ - if(!this.el && this.autoEl){ - if(Ext.isString(this.autoEl)){ - this.el = document.createElement(this.autoEl); - }else{ - var div = document.createElement('div'); - Ext.DomHelper.overwrite(div, this.autoEl); - this.el = div.firstChild; - } - if (!this.el.id) { - this.el.id = this.getId(); - } - } - if(this.el){ - this.el = Ext.get(this.el); - if(this.allowDomMove !== false){ - ct.dom.insertBefore(this.el.dom, position); - if (div) { - Ext.removeNode(div); - div = null; - } - } - } - }, - - // private - getAutoCreate : function(){ - var cfg = Ext.isObject(this.autoCreate) ? - this.autoCreate : Ext.apply({}, this.defaultAutoCreate); - if(this.id && !cfg.id){ - cfg.id = this.id; - } - return cfg; - }, - - // private - afterRender : Ext.emptyFn, - - /** - * Destroys this component by purging any event listeners, removing the component's element from the DOM, - * removing the component from its {@link Ext.Container} (if applicable) and unregistering it from - * {@link Ext.ComponentMgr}. Destruction is generally handled automatically by the framework and this method - * should usually not need to be called directly. - * - */ - destroy : function(){ - if(!this.isDestroyed){ - if(this.fireEvent('beforedestroy', this) !== false){ - this.destroying = true; - this.beforeDestroy(); - if(this.ownerCt && this.ownerCt.remove){ - this.ownerCt.remove(this, false); - } - if(this.rendered){ - this.el.remove(); - if(this.actionMode == 'container' || this.removeMode == 'container'){ - this.container.remove(); - } - } - // Stop any buffered tasks - if(this.focusTask && this.focusTask.cancel){ - this.focusTask.cancel(); - } - this.onDestroy(); - Ext.ComponentMgr.unregister(this); - this.fireEvent('destroy', this); - this.purgeListeners(); - this.destroying = false; - this.isDestroyed = true; - } - } - }, - - deleteMembers : function(){ - var args = arguments; - for(var i = 0, len = args.length; i < len; ++i){ - delete this[args[i]]; - } - }, - - // private - beforeDestroy : Ext.emptyFn, - - // private - onDestroy : Ext.emptyFn, - - /** - *

      Returns the {@link Ext.Element} which encapsulates this Component.

      - *

      This will usually be a <DIV> element created by the class's onRender method, but - * that may be overridden using the {@link #autoEl} config.

      - *

      Note: this element will not be available until this Component has been rendered.


      - *

      To add listeners for DOM events to this Component (as opposed to listeners - * for this Component's own Observable events), see the {@link #listeners} config for a suggestion, - * or use a render listener directly:

      
      -new Ext.Panel({
      -    title: 'The Clickable Panel',
      -    listeners: {
      -        render: function(p) {
      -            // Append the Panel to the click handler's argument list.
      -            p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));
      -        },
      -        single: true  // Remove the listener after first invocation
      -    }
      -});
      -
      - * @return {Ext.Element} The Element which encapsulates this Component. - */ - getEl : function(){ - return this.el; - }, - - // private - getContentTarget : function(){ - return this.el; - }, - - /** - * Returns the id of this component or automatically generates and - * returns an id if an id is not defined yet:
      
      -     * 'ext-comp-' + (++Ext.Component.AUTO_ID)
      -     * 
      - * @return {String} id - */ - getId : function(){ - return this.id || (this.id = 'ext-comp-' + (++Ext.Component.AUTO_ID)); - }, - - /** - * Returns the {@link #itemId} of this component. If an - * {@link #itemId} was not assigned through configuration the - * id is returned using {@link #getId}. - * @return {String} - */ - getItemId : function(){ - return this.itemId || this.getId(); - }, - - /** - * Try to focus this component. - * @param {Boolean} selectText (optional) If applicable, true to also select the text in this component - * @param {Boolean/Number} delay (optional) Delay the focus this number of milliseconds (true for 10 milliseconds) - * @return {Ext.Component} this - */ - focus : function(selectText, delay){ - if(delay){ - this.focusTask = new Ext.util.DelayedTask(this.focus, this, [selectText, false]); - this.focusTask.delay(Ext.isNumber(delay) ? delay : 10); - return this; - } - if(this.rendered && !this.isDestroyed){ - this.el.focus(); - if(selectText === true){ - this.el.dom.select(); - } - } - return this; - }, - - // private - blur : function(){ - if(this.rendered){ - this.el.blur(); - } - return this; - }, - - /** - * Disable this component and fire the 'disable' event. - * @return {Ext.Component} this - */ - disable : function(/* private */ silent){ - if(this.rendered){ - this.onDisable(); - } - this.disabled = true; - if(silent !== true){ - this.fireEvent('disable', this); - } - return this; - }, - - // private - onDisable : function(){ - this.getActionEl().addClass(this.disabledClass); - this.el.dom.disabled = true; - }, - - /** - * Enable this component and fire the 'enable' event. - * @return {Ext.Component} this - */ - enable : function(){ - if(this.rendered){ - this.onEnable(); - } - this.disabled = false; - this.fireEvent('enable', this); - return this; - }, - - // private - onEnable : function(){ - this.getActionEl().removeClass(this.disabledClass); - this.el.dom.disabled = false; - }, - - /** - * Convenience function for setting disabled/enabled by boolean. - * @param {Boolean} disabled - * @return {Ext.Component} this - */ - setDisabled : function(disabled){ - return this[disabled ? 'disable' : 'enable'](); - }, - - /** - * Show this component. Listen to the '{@link #beforeshow}' event and return - * false to cancel showing the component. Fires the '{@link #show}' - * event after showing the component. - * @return {Ext.Component} this - */ - show : function(){ - if(this.fireEvent('beforeshow', this) !== false){ - this.hidden = false; - if(this.autoRender){ - this.render(Ext.isBoolean(this.autoRender) ? Ext.getBody() : this.autoRender); - } - if(this.rendered){ - this.onShow(); - } - this.fireEvent('show', this); - } - return this; - }, - - // private - onShow : function(){ - this.getVisibilityEl().removeClass('x-hide-' + this.hideMode); - }, - - /** - * Hide this component. Listen to the '{@link #beforehide}' event and return - * false to cancel hiding the component. Fires the '{@link #hide}' - * event after hiding the component. Note this method is called internally if - * the component is configured to be {@link #hidden}. - * @return {Ext.Component} this - */ - hide : function(){ - if(this.fireEvent('beforehide', this) !== false){ - this.doHide(); - this.fireEvent('hide', this); - } - return this; - }, - - // private - doHide: function(){ - this.hidden = true; - if(this.rendered){ - this.onHide(); - } - }, - - // private - onHide : function(){ - this.getVisibilityEl().addClass('x-hide-' + this.hideMode); - }, - - // private - getVisibilityEl : function(){ - return this.hideParent ? this.container : this.getActionEl(); - }, - - /** - * Convenience function to hide or show this component by boolean. - * @param {Boolean} visible True to show, false to hide - * @return {Ext.Component} this - */ - setVisible : function(visible){ - return this[visible ? 'show' : 'hide'](); - }, - - /** - * Returns true if this component is visible. - * @return {Boolean} True if this component is visible, false otherwise. - */ - isVisible : function(){ - return this.rendered && this.getVisibilityEl().isVisible(); - }, - - /** - * Clone the current component using the original config values passed into this instance by default. - * @param {Object} overrides A new config containing any properties to override in the cloned version. - * An id property can be passed on this object, otherwise one will be generated to avoid duplicates. - * @return {Ext.Component} clone The cloned copy of this component - */ - cloneConfig : function(overrides){ - overrides = overrides || {}; - var id = overrides.id || Ext.id(); - var cfg = Ext.applyIf(overrides, this.initialConfig); - cfg.id = id; // prevent dup id - return new this.constructor(cfg); - }, - - /** - * Gets the xtype for this component as registered with {@link Ext.ComponentMgr}. For a list of all - * available xtypes, see the {@link Ext.Component} header. Example usage: - *
      
      -var t = new Ext.form.TextField();
      -alert(t.getXType());  // alerts 'textfield'
      -
      - * @return {String} The xtype - */ - getXType : function(){ - return this.constructor.xtype; - }, - - /** - *

      Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended - * from the xtype (default) or whether it is directly of the xtype specified (shallow = true).

      - *

      If using your own subclasses, be aware that a Component must register its own xtype - * to participate in determination of inherited xtypes.

      - *

      For a list of all available xtypes, see the {@link Ext.Component} header.

      - *

      Example usage:

      - *
      
      -var t = new Ext.form.TextField();
      -var isText = t.isXType('textfield');        // true
      -var isBoxSubclass = t.isXType('box');       // true, descended from BoxComponent
      -var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
      -
      - * @param {String/Ext.Component/Class} xtype The xtype to check for this Component. Note that the the component can either be an instance - * or a component class: - *
      
      -var c = new Ext.Component();
      -console.log(c.isXType(c));
      -console.log(c.isXType(Ext.Component)); 
      -
      - * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is - * the default), or true to check whether this Component is directly of the specified xtype. - * @return {Boolean} True if this component descends from the specified xtype, false otherwise. - */ - isXType : function(xtype, shallow){ - //assume a string by default - if (Ext.isFunction(xtype)){ - xtype = xtype.xtype; //handle being passed the class, e.g. Ext.Component - }else if (Ext.isObject(xtype)){ - xtype = xtype.constructor.xtype; //handle being passed an instance - } - - return !shallow ? ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : this.constructor.xtype == xtype; - }, - - /** - *

      Returns this Component's xtype hierarchy as a slash-delimited string. For a list of all - * available xtypes, see the {@link Ext.Component} header.

      - *

      If using your own subclasses, be aware that a Component must register its own xtype - * to participate in determination of inherited xtypes.

      - *

      Example usage:

      - *
      
      -var t = new Ext.form.TextField();
      -alert(t.getXTypes());  // alerts 'component/box/field/textfield'
      -
      - * @return {String} The xtype hierarchy string - */ - getXTypes : function(){ - var tc = this.constructor; - if(!tc.xtypes){ - var c = [], sc = this; - while(sc && sc.constructor.xtype){ - c.unshift(sc.constructor.xtype); - sc = sc.constructor.superclass; - } - tc.xtypeChain = c; - tc.xtypes = c.join('/'); - } - return tc.xtypes; - }, - - /** - * Find a container above this component at any level by a custom function. If the passed function returns - * true, the container will be returned. - * @param {Function} fn The custom function to call with the arguments (container, this component). - * @return {Ext.Container} The first Container for which the custom function returns true - */ - findParentBy : function(fn) { - for (var p = this.ownerCt; (p != null) && !fn(p, this); p = p.ownerCt); - return p || null; - }, - - /** - * Find a container above this component at any level by xtype or class - * @param {String/Ext.Component/Class} xtype The xtype to check for this Component. Note that the the component can either be an instance - * or a component class: - * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is - * the default), or true to check whether this Component is directly of the specified xtype. - * @return {Ext.Container} The first Container which matches the given xtype or class - */ - findParentByType : function(xtype, shallow){ - return this.findParentBy(function(c){ - return c.isXType(xtype, shallow); - }); - }, - - /** - * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of - * function call will be the scope provided or the current component. The arguments to the function - * will be the args provided or the current component. If the function returns false at any point, - * the bubble is stopped. - * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope of the function (defaults to current node) - * @param {Array} args (optional) The args to call the function with (default to passing the current component) - * @return {Ext.Component} this - */ - bubble : function(fn, scope, args){ - var p = this; - while(p){ - if(fn.apply(scope || p, args || [p]) === false){ - break; - } - p = p.ownerCt; - } - return this; - }, - - // protected - getPositionEl : function(){ - return this.positionEl || this.el; - }, - - // private - purgeListeners : function(){ - Ext.Component.superclass.purgeListeners.call(this); - if(this.mons){ - this.on('beforedestroy', this.clearMons, this, {single: true}); - } - }, - - // private - clearMons : function(){ - Ext.each(this.mons, function(m){ - m.item.un(m.ename, m.fn, m.scope); - }, this); - this.mons = []; - }, - - // private - createMons: function(){ - if(!this.mons){ - this.mons = []; - this.on('beforedestroy', this.clearMons, this, {single: true}); - } - }, - - /** - *

      Adds listeners to any Observable object (or Elements) which are automatically removed when this Component - * is destroyed. Usage:

      -myGridPanel.mon(myGridPanel.getSelectionModel(), 'selectionchange', handleSelectionChange, null, {buffer: 50});
      -
      - *

      or:

      -myGridPanel.mon(myGridPanel.getSelectionModel(), {
      -    selectionchange: handleSelectionChange,
      -    buffer: 50
      -});
      -
      - * @param {Observable|Element} item The item to which to add a listener/listeners. - * @param {Object|String} ename The event name, or an object containing event name properties. - * @param {Function} fn Optional. If the ename parameter was an event name, this - * is the handler function. - * @param {Object} scope Optional. If the ename parameter was an event name, this - * is the scope (this reference) in which the handler function is executed. - * @param {Object} opt Optional. If the ename parameter was an event name, this - * is the {@link Ext.util.Observable#addListener addListener} options. - */ - mon : function(item, ename, fn, scope, opt){ - this.createMons(); - if(Ext.isObject(ename)){ - var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/; - - var o = ename; - for(var e in o){ - if(propRe.test(e)){ - continue; - } - if(Ext.isFunction(o[e])){ - // shared options - this.mons.push({ - item: item, ename: e, fn: o[e], scope: o.scope - }); - item.on(e, o[e], o.scope, o); - }else{ - // individual options - this.mons.push({ - item: item, ename: e, fn: o[e], scope: o.scope - }); - item.on(e, o[e]); - } - } - return; - } - - this.mons.push({ - item: item, ename: ename, fn: fn, scope: scope - }); - item.on(ename, fn, scope, opt); - }, - - /** - * Removes listeners that were added by the {@link #mon} method. - * @param {Observable|Element} item The item from which to remove a listener/listeners. - * @param {Object|String} ename The event name, or an object containing event name properties. - * @param {Function} fn Optional. If the ename parameter was an event name, this - * is the handler function. - * @param {Object} scope Optional. If the ename parameter was an event name, this - * is the scope (this reference) in which the handler function is executed. - */ - mun : function(item, ename, fn, scope){ - var found, mon; - this.createMons(); - for(var i = 0, len = this.mons.length; i < len; ++i){ - mon = this.mons[i]; - if(item === mon.item && ename == mon.ename && fn === mon.fn && scope === mon.scope){ - this.mons.splice(i, 1); - item.un(ename, fn, scope); - found = true; - break; - } - } - return found; - }, - - /** - * Returns the next component in the owning container - * @return Ext.Component - */ - nextSibling : function(){ - if(this.ownerCt){ - var index = this.ownerCt.items.indexOf(this); - if(index != -1 && index+1 < this.ownerCt.items.getCount()){ - return this.ownerCt.items.itemAt(index+1); - } - } - return null; - }, - - /** - * Returns the previous component in the owning container - * @return Ext.Component - */ - previousSibling : function(){ - if(this.ownerCt){ - var index = this.ownerCt.items.indexOf(this); - if(index > 0){ - return this.ownerCt.items.itemAt(index-1); - } - } - return null; - }, - - /** - * Provides the link for Observable's fireEvent method to bubble up the ownership hierarchy. - * @return {Ext.Container} the Container which owns this Component. - */ - getBubbleTarget : function(){ - return this.ownerCt; - } -}); - -Ext.reg('component', Ext.Component); -/** - * @class Ext.Action - *

      An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it - * can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI - * updates across any components that support the Action interface (primarily {@link Ext.Toolbar}, {@link Ext.Button} - * and {@link Ext.menu.Menu} components).

      - *

      Aside from supporting the config object interface, any component that needs to use Actions must also support - * the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string), - * setDisabled(boolean), setVisible(boolean) and setHandler(function).

      - * Example usage:
      - *
      
      -// Define the shared action.  Each component below will have the same
      -// display text and icon, and will display the same message on click.
      -var action = new Ext.Action({
      -    {@link #text}: 'Do something',
      -    {@link #handler}: function(){
      -        Ext.Msg.alert('Click', 'You did something.');
      -    },
      -    {@link #iconCls}: 'do-something',
      -    {@link #itemId}: 'myAction'
      -});
      -
      -var panel = new Ext.Panel({
      -    title: 'Actions',
      -    width: 500,
      -    height: 300,
      -    tbar: [
      -        // Add the action directly to a toolbar as a menu button
      -        action,
      -        {
      -            text: 'Action Menu',
      -            // Add the action to a menu as a text item
      -            menu: [action]
      -        }
      -    ],
      -    items: [
      -        // Add the action to the panel body as a standard button
      -        new Ext.Button(action)
      -    ],
      -    renderTo: Ext.getBody()
      -});
      -
      -// Change the text for all components using the action
      -action.setText('Something else');
      -
      -// Reference an action through a container using the itemId
      -var btn = panel.getComponent('myAction');
      -var aRef = btn.baseAction;
      -aRef.setText('New text');
      -
      - * @constructor - * @param {Object} config The configuration options - */ -Ext.Action = Ext.extend(Object, { - /** - * @cfg {String} text The text to set for all components using this action (defaults to ''). - */ - /** - * @cfg {String} iconCls - * The CSS class selector that specifies a background image to be used as the header icon for - * all components using this action (defaults to ''). - *

      An example of specifying a custom icon class would be something like: - *

      
      -// specify the property in the config for the class:
      -     ...
      -     iconCls: 'do-something'
      -
      -// css class that specifies background image to be used as the icon image:
      -.do-something { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
      -
      - */ - /** - * @cfg {Boolean} disabled True to disable all components using this action, false to enable them (defaults to false). - */ - /** - * @cfg {Boolean} hidden True to hide all components using this action, false to show them (defaults to false). - */ - /** - * @cfg {Function} handler The function that will be invoked by each component tied to this action - * when the component's primary event is triggered (defaults to undefined). - */ - /** - * @cfg {String} itemId - * See {@link Ext.Component}.{@link Ext.Component#itemId itemId}. - */ - /** - * @cfg {Object} scope The scope (this reference) in which the - * {@link #handler} is executed. Defaults to this Button. - */ - - constructor : function(config){ - this.initialConfig = config; - this.itemId = config.itemId = (config.itemId || config.id || Ext.id()); - this.items = []; - }, - - // private - isAction : true, - - /** - * Sets the text to be displayed by all components using this action. - * @param {String} text The text to display - */ - setText : function(text){ - this.initialConfig.text = text; - this.callEach('setText', [text]); - }, - - /** - * Gets the text currently displayed by all components using this action. - */ - getText : function(){ - return this.initialConfig.text; - }, - - /** - * Sets the icon CSS class for all components using this action. The class should supply - * a background image that will be used as the icon image. - * @param {String} cls The CSS class supplying the icon image - */ - setIconClass : function(cls){ - this.initialConfig.iconCls = cls; - this.callEach('setIconClass', [cls]); - }, - - /** - * Gets the icon CSS class currently used by all components using this action. - */ - getIconClass : function(){ - return this.initialConfig.iconCls; - }, - - /** - * Sets the disabled state of all components using this action. Shortcut method - * for {@link #enable} and {@link #disable}. - * @param {Boolean} disabled True to disable the component, false to enable it - */ - setDisabled : function(v){ - this.initialConfig.disabled = v; - this.callEach('setDisabled', [v]); - }, - - /** - * Enables all components using this action. - */ - enable : function(){ - this.setDisabled(false); - }, - - /** - * Disables all components using this action. - */ - disable : function(){ - this.setDisabled(true); - }, - - /** - * Returns true if the components using this action are currently disabled, else returns false. - */ - isDisabled : function(){ - return this.initialConfig.disabled; - }, - - /** - * Sets the hidden state of all components using this action. Shortcut method - * for {@link #hide} and {@link #show}. - * @param {Boolean} hidden True to hide the component, false to show it - */ - setHidden : function(v){ - this.initialConfig.hidden = v; - this.callEach('setVisible', [!v]); - }, - - /** - * Shows all components using this action. - */ - show : function(){ - this.setHidden(false); - }, - - /** - * Hides all components using this action. - */ - hide : function(){ - this.setHidden(true); - }, - - /** - * Returns true if the components using this action are currently hidden, else returns false. - */ - isHidden : function(){ - return this.initialConfig.hidden; - }, - - /** - * Sets the function that will be called by each Component using this action when its primary event is triggered. - * @param {Function} fn The function that will be invoked by the action's components. The function - * will be called with no arguments. - * @param {Object} scope The scope (this reference) in which the function is executed. Defaults to the Component firing the event. - */ - setHandler : function(fn, scope){ - this.initialConfig.handler = fn; - this.initialConfig.scope = scope; - this.callEach('setHandler', [fn, scope]); - }, - - /** - * Executes the specified function once for each Component currently tied to this action. The function passed - * in should accept a single argument that will be an object that supports the basic Action config/method interface. - * @param {Function} fn The function to execute for each component - * @param {Object} scope The scope (this reference) in which the function is executed. Defaults to the Component. - */ - each : function(fn, scope){ - Ext.each(this.items, fn, scope); - }, - - // private - callEach : function(fnName, args){ - var cs = this.items; - for(var i = 0, len = cs.length; i < len; i++){ - cs[i][fnName].apply(cs[i], args); - } - }, - - // private - addComponent : function(comp){ - this.items.push(comp); - comp.on('destroy', this.removeComponent, this); - }, - - // private - removeComponent : function(comp){ - this.items.remove(comp); - }, - - /** - * Executes this action manually using the handler function specified in the original config object - * or the handler function set with {@link #setHandler}. Any arguments passed to this - * function will be passed on to the handler function. - * @param {Mixed} arg1 (optional) Variable number of arguments passed to the handler function - * @param {Mixed} arg2 (optional) - * @param {Mixed} etc... (optional) - */ - execute : function(){ - this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments); - } -}); -/** - * @class Ext.Layer - * @extends Ext.Element - * An extended {@link Ext.Element} object that supports a shadow and shim, constrain to viewport and - * automatic maintaining of shadow/shim positions. - * @cfg {Boolean} shim False to disable the iframe shim in browsers which need one (defaults to true) - * @cfg {String/Boolean} shadow True to automatically create an {@link Ext.Shadow}, or a string indicating the - * shadow's display {@link Ext.Shadow#mode}. False to disable the shadow. (defaults to false) - * @cfg {Object} dh DomHelper object config to create element with (defaults to {tag: 'div', cls: 'x-layer'}). - * @cfg {Boolean} constrain False to disable constrain to viewport (defaults to true) - * @cfg {String} cls CSS class to add to the element - * @cfg {Number} zindex Starting z-index (defaults to 11000) - * @cfg {Number} shadowOffset Number of pixels to offset the shadow (defaults to 4) - * @cfg {Boolean} useDisplay - * Defaults to use css offsets to hide the Layer. Specify true - * to use css style 'display:none;' to hide the Layer. - * @constructor - * @param {Object} config An object with config options. - * @param {String/HTMLElement} existingEl (optional) Uses an existing DOM element. If the element is not found it creates it. - */ -(function(){ -Ext.Layer = function(config, existingEl){ - config = config || {}; - var dh = Ext.DomHelper, - cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body; - - if (existingEl) { - this.dom = Ext.getDom(existingEl); - } - if(!this.dom){ - var o = config.dh || {tag: 'div', cls: 'x-layer'}; - this.dom = dh.append(pel, o); - } - if(config.cls){ - this.addClass(config.cls); - } - this.constrain = config.constrain !== false; - this.setVisibilityMode(Ext.Element.VISIBILITY); - if(config.id){ - this.id = this.dom.id = config.id; - }else{ - this.id = Ext.id(this.dom); - } - this.zindex = config.zindex || this.getZIndex(); - this.position('absolute', this.zindex); - if(config.shadow){ - this.shadowOffset = config.shadowOffset || 4; - this.shadow = new Ext.Shadow({ - offset : this.shadowOffset, - mode : config.shadow - }); - }else{ - this.shadowOffset = 0; - } - this.useShim = config.shim !== false && Ext.useShims; - this.useDisplay = config.useDisplay; - this.hide(); -}; - -var supr = Ext.Element.prototype; - -// shims are shared among layer to keep from having 100 iframes -var shims = []; - -Ext.extend(Ext.Layer, Ext.Element, { - - getZIndex : function(){ - return this.zindex || parseInt((this.getShim() || this).getStyle('z-index'), 10) || 11000; - }, - - getShim : function(){ - if(!this.useShim){ - return null; - } - if(this.shim){ - return this.shim; - } - var shim = shims.shift(); - if(!shim){ - shim = this.createShim(); - shim.enableDisplayMode('block'); - shim.dom.style.display = 'none'; - shim.dom.style.visibility = 'visible'; - } - var pn = this.dom.parentNode; - if(shim.dom.parentNode != pn){ - pn.insertBefore(shim.dom, this.dom); - } - shim.setStyle('z-index', this.getZIndex()-2); - this.shim = shim; - return shim; - }, - - hideShim : function(){ - if(this.shim){ - this.shim.setDisplayed(false); - shims.push(this.shim); - delete this.shim; - } - }, - - disableShadow : function(){ - if(this.shadow){ - this.shadowDisabled = true; - this.shadow.hide(); - this.lastShadowOffset = this.shadowOffset; - this.shadowOffset = 0; - } - }, - - enableShadow : function(show){ - if(this.shadow){ - this.shadowDisabled = false; - if(Ext.isDefined(this.lastShadowOffset)) { - this.shadowOffset = this.lastShadowOffset; - delete this.lastShadowOffset; - } - if(show){ - this.sync(true); - } - } - }, - - // private - // this code can execute repeatedly in milliseconds (i.e. during a drag) so - // code size was sacrificed for effeciency (e.g. no getBox/setBox, no XY calls) - sync : function(doShow){ - var shadow = this.shadow; - if(!this.updating && this.isVisible() && (shadow || this.useShim)){ - var shim = this.getShim(), - w = this.getWidth(), - h = this.getHeight(), - l = this.getLeft(true), - t = this.getTop(true); - - if(shadow && !this.shadowDisabled){ - if(doShow && !shadow.isVisible()){ - shadow.show(this); - }else{ - shadow.realign(l, t, w, h); - } - if(shim){ - if(doShow){ - shim.show(); - } - // fit the shim behind the shadow, so it is shimmed too - var shadowAdj = shadow.el.getXY(), shimStyle = shim.dom.style, - shadowSize = shadow.el.getSize(); - shimStyle.left = (shadowAdj[0])+'px'; - shimStyle.top = (shadowAdj[1])+'px'; - shimStyle.width = (shadowSize.width)+'px'; - shimStyle.height = (shadowSize.height)+'px'; - } - }else if(shim){ - if(doShow){ - shim.show(); - } - shim.setSize(w, h); - shim.setLeftTop(l, t); - } - } - }, - - // private - destroy : function(){ - this.hideShim(); - if(this.shadow){ - this.shadow.hide(); - } - this.removeAllListeners(); - Ext.removeNode(this.dom); - delete this.dom; - }, - - remove : function(){ - this.destroy(); - }, - - // private - beginUpdate : function(){ - this.updating = true; - }, - - // private - endUpdate : function(){ - this.updating = false; - this.sync(true); - }, - - // private - hideUnders : function(negOffset){ - if(this.shadow){ - this.shadow.hide(); - } - this.hideShim(); - }, - - // private - constrainXY : function(){ - if(this.constrain){ - var vw = Ext.lib.Dom.getViewWidth(), - vh = Ext.lib.Dom.getViewHeight(); - var s = Ext.getDoc().getScroll(); - - var xy = this.getXY(); - var x = xy[0], y = xy[1]; - var so = this.shadowOffset; - var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so; - // only move it if it needs it - var moved = false; - // first validate right/bottom - if((x + w) > vw+s.left){ - x = vw - w - so; - moved = true; - } - if((y + h) > vh+s.top){ - y = vh - h - so; - moved = true; - } - // then make sure top/left isn't negative - if(x < s.left){ - x = s.left; - moved = true; - } - if(y < s.top){ - y = s.top; - moved = true; - } - if(moved){ - if(this.avoidY){ - var ay = this.avoidY; - if(y <= ay && (y+h) >= ay){ - y = ay-h-5; - } - } - xy = [x, y]; - this.storeXY(xy); - supr.setXY.call(this, xy); - this.sync(); - } - } - return this; - }, - - getConstrainOffset : function(){ - return this.shadowOffset; - }, - - isVisible : function(){ - return this.visible; - }, - - // private - showAction : function(){ - this.visible = true; // track visibility to prevent getStyle calls - if(this.useDisplay === true){ - this.setDisplayed(''); - }else if(this.lastXY){ - supr.setXY.call(this, this.lastXY); - }else if(this.lastLT){ - supr.setLeftTop.call(this, this.lastLT[0], this.lastLT[1]); - } - }, - - // private - hideAction : function(){ - this.visible = false; - if(this.useDisplay === true){ - this.setDisplayed(false); - }else{ - this.setLeftTop(-10000,-10000); - } - }, - - // overridden Element method - setVisible : function(v, a, d, c, e){ - if(v){ - this.showAction(); - } - if(a && v){ - var cb = function(){ - this.sync(true); - if(c){ - c(); - } - }.createDelegate(this); - supr.setVisible.call(this, true, true, d, cb, e); - }else{ - if(!v){ - this.hideUnders(true); - } - var cb = c; - if(a){ - cb = function(){ - this.hideAction(); - if(c){ - c(); - } - }.createDelegate(this); - } - supr.setVisible.call(this, v, a, d, cb, e); - if(v){ - this.sync(true); - }else if(!a){ - this.hideAction(); - } - } - return this; - }, - - storeXY : function(xy){ - delete this.lastLT; - this.lastXY = xy; - }, - - storeLeftTop : function(left, top){ - delete this.lastXY; - this.lastLT = [left, top]; - }, - - // private - beforeFx : function(){ - this.beforeAction(); - return Ext.Layer.superclass.beforeFx.apply(this, arguments); - }, - - // private - afterFx : function(){ - Ext.Layer.superclass.afterFx.apply(this, arguments); - this.sync(this.isVisible()); - }, - - // private - beforeAction : function(){ - if(!this.updating && this.shadow){ - this.shadow.hide(); - } - }, - - // overridden Element method - setLeft : function(left){ - this.storeLeftTop(left, this.getTop(true)); - supr.setLeft.apply(this, arguments); - this.sync(); - return this; - }, - - setTop : function(top){ - this.storeLeftTop(this.getLeft(true), top); - supr.setTop.apply(this, arguments); - this.sync(); - return this; - }, - - setLeftTop : function(left, top){ - this.storeLeftTop(left, top); - supr.setLeftTop.apply(this, arguments); - this.sync(); - return this; - }, - - setXY : function(xy, a, d, c, e){ - this.fixDisplay(); - this.beforeAction(); - this.storeXY(xy); - var cb = this.createCB(c); - supr.setXY.call(this, xy, a, d, cb, e); - if(!a){ - cb(); - } - return this; - }, - - // private - createCB : function(c){ - var el = this; - return function(){ - el.constrainXY(); - el.sync(true); - if(c){ - c(); - } - }; - }, - - // overridden Element method - setX : function(x, a, d, c, e){ - this.setXY([x, this.getY()], a, d, c, e); - return this; - }, - - // overridden Element method - setY : function(y, a, d, c, e){ - this.setXY([this.getX(), y], a, d, c, e); - return this; - }, - - // overridden Element method - setSize : function(w, h, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - supr.setSize.call(this, w, h, a, d, cb, e); - if(!a){ - cb(); - } - return this; - }, - - // overridden Element method - setWidth : function(w, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - supr.setWidth.call(this, w, a, d, cb, e); - if(!a){ - cb(); - } - return this; - }, - - // overridden Element method - setHeight : function(h, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - supr.setHeight.call(this, h, a, d, cb, e); - if(!a){ - cb(); - } - return this; - }, - - // overridden Element method - setBounds : function(x, y, w, h, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - if(!a){ - this.storeXY([x, y]); - supr.setXY.call(this, [x, y]); - supr.setSize.call(this, w, h, a, d, cb, e); - cb(); - }else{ - supr.setBounds.call(this, x, y, w, h, a, d, cb, e); - } - return this; - }, - - /** - * Sets the z-index of this layer and adjusts any shadow and shim z-indexes. The layer z-index is automatically - * incremented by two more than the value passed in so that it always shows above any shadow or shim (the shadow - * element, if any, will be assigned z-index + 1, and the shim element, if any, will be assigned the unmodified z-index). - * @param {Number} zindex The new z-index to set - * @return {this} The Layer - */ - setZIndex : function(zindex){ - this.zindex = zindex; - this.setStyle('z-index', zindex + 2); - if(this.shadow){ - this.shadow.setZIndex(zindex + 1); - } - if(this.shim){ - this.shim.setStyle('z-index', zindex); - } - return this; - } -}); -})(); -/** - * @class Ext.Shadow - * Simple class that can provide a shadow effect for any element. Note that the element MUST be absolutely positioned, - * and the shadow does not provide any shimming. This should be used only in simple cases -- for more advanced - * functionality that can also provide the same shadow effect, see the {@link Ext.Layer} class. - * @constructor - * Create a new Shadow - * @param {Object} config The config object - */ -Ext.Shadow = function(config) { - Ext.apply(this, config); - if (typeof this.mode != "string") { - this.mode = this.defaultMode; - } - var o = this.offset, - a = { - h: 0 - }, - rad = Math.floor(this.offset / 2); - switch (this.mode.toLowerCase()) { - // all this hideous nonsense calculates the various offsets for shadows - case "drop": - a.w = 0; - a.l = a.t = o; - a.t -= 1; - if (Ext.isIE) { - a.l -= this.offset + rad; - a.t -= this.offset + rad; - a.w -= rad; - a.h -= rad; - a.t += 1; - } - break; - case "sides": - a.w = (o * 2); - a.l = -o; - a.t = o - 1; - if (Ext.isIE) { - a.l -= (this.offset - rad); - a.t -= this.offset + rad; - a.l += 1; - a.w -= (this.offset - rad) * 2; - a.w -= rad + 1; - a.h -= 1; - } - break; - case "frame": - a.w = a.h = (o * 2); - a.l = a.t = -o; - a.t += 1; - a.h -= 2; - if (Ext.isIE) { - a.l -= (this.offset - rad); - a.t -= (this.offset - rad); - a.l += 1; - a.w -= (this.offset + rad + 1); - a.h -= (this.offset + rad); - a.h += 1; - } - break; - }; - - this.adjusts = a; -}; - -Ext.Shadow.prototype = { - /** - * @cfg {String} mode - * The shadow display mode. Supports the following options:
        - *
      • sides : Shadow displays on both sides and bottom only
      • - *
      • frame : Shadow displays equally on all four sides
      • - *
      • drop : Traditional bottom-right drop shadow
      • - *
      - */ - /** - * @cfg {String} offset - * The number of pixels to offset the shadow from the element (defaults to 4) - */ - offset: 4, - - // private - defaultMode: "drop", - - /** - * Displays the shadow under the target element - * @param {Mixed} targetEl The id or element under which the shadow should display - */ - show: function(target) { - target = Ext.get(target); - if (!this.el) { - this.el = Ext.Shadow.Pool.pull(); - if (this.el.dom.nextSibling != target.dom) { - this.el.insertBefore(target); - } - } - this.el.setStyle("z-index", this.zIndex || parseInt(target.getStyle("z-index"), 10) - 1); - if (Ext.isIE) { - this.el.dom.style.filter = "progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius=" + (this.offset) + ")"; - } - this.realign( - target.getLeft(true), - target.getTop(true), - target.getWidth(), - target.getHeight() - ); - this.el.dom.style.display = "block"; - }, - - /** - * Returns true if the shadow is visible, else false - */ - isVisible: function() { - return this.el ? true: false; - }, - - /** - * Direct alignment when values are already available. Show must be called at least once before - * calling this method to ensure it is initialized. - * @param {Number} left The target element left position - * @param {Number} top The target element top position - * @param {Number} width The target element width - * @param {Number} height The target element height - */ - realign: function(l, t, w, h) { - if (!this.el) { - return; - } - var a = this.adjusts, - d = this.el.dom, - s = d.style, - iea = 0, - sw = (w + a.w), - sh = (h + a.h), - sws = sw + "px", - shs = sh + "px", - cn, - sww; - s.left = (l + a.l) + "px"; - s.top = (t + a.t) + "px"; - if (s.width != sws || s.height != shs) { - s.width = sws; - s.height = shs; - if (!Ext.isIE) { - cn = d.childNodes; - sww = Math.max(0, (sw - 12)) + "px"; - cn[0].childNodes[1].style.width = sww; - cn[1].childNodes[1].style.width = sww; - cn[2].childNodes[1].style.width = sww; - cn[1].style.height = Math.max(0, (sh - 12)) + "px"; - } - } - }, - - /** - * Hides this shadow - */ - hide: function() { - if (this.el) { - this.el.dom.style.display = "none"; - Ext.Shadow.Pool.push(this.el); - delete this.el; - } - }, - - /** - * Adjust the z-index of this shadow - * @param {Number} zindex The new z-index - */ - setZIndex: function(z) { - this.zIndex = z; - if (this.el) { - this.el.setStyle("z-index", z); - } - } -}; - -// Private utility class that manages the internal Shadow cache -Ext.Shadow.Pool = function() { - var p = [], - markup = Ext.isIE ? - '
      ': - '
      '; - return { - pull: function() { - var sh = p.shift(); - if (!sh) { - sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, markup)); - sh.autoBoxAdjust = false; - } - return sh; - }, - - push: function(sh) { - p.push(sh); - } - }; -}();/** - * @class Ext.BoxComponent - * @extends Ext.Component - *

      Base class for any {@link Ext.Component Component} that is to be sized as a box, using width and height.

      - *

      BoxComponent provides automatic box model adjustments for sizing and positioning and will work correctly - * within the Component rendering model.

      - *

      A BoxComponent may be created as a custom Component which encapsulates any HTML element, either a pre-existing - * element, or one that is created to your specifications at render time. Usually, to participate in layouts, - * a Component will need to be a BoxComponent in order to have its width and height managed.

      - *

      To use a pre-existing element as a BoxComponent, configure it so that you preset the el property to the - * element to reference:

      
      -var pageHeader = new Ext.BoxComponent({
      -    el: 'my-header-div'
      -});
      - * This may then be {@link Ext.Container#add added} to a {@link Ext.Container Container} as a child item.

      - *

      To create a BoxComponent based around a HTML element to be created at render time, use the - * {@link Ext.Component#autoEl autoEl} config option which takes the form of a - * {@link Ext.DomHelper DomHelper} specification:

      
      -var myImage = new Ext.BoxComponent({
      -    autoEl: {
      -        tag: 'img',
      -        src: '/images/my-image.jpg'
      -    }
      -});

      - * @constructor - * @param {Ext.Element/String/Object} config The configuration options. - * @xtype box - */ -Ext.BoxComponent = Ext.extend(Ext.Component, { - - // Configs below are used for all Components when rendered by BoxLayout. - /** - * @cfg {Number} flex - *

      Note: this config is only used when this Component is rendered - * by a Container which has been configured to use a {@link Ext.layout.BoxLayout BoxLayout}. - * Each child Component with a flex property will be flexed either vertically (by a VBoxLayout) - * or horizontally (by an HBoxLayout) according to the item's relative flex value - * compared to the sum of all Components with flex value specified. Any child items that have - * either a flex = 0 or flex = undefined will not be 'flexed' (the initial size will not be changed). - */ - // Configs below are used for all Components when rendered by AnchorLayout. - /** - * @cfg {String} anchor

      Note: this config is only used when this Component is rendered - * by a Container which has been configured to use an {@link Ext.layout.AnchorLayout AnchorLayout} (or subclass thereof). - * based layout manager, for example:

        - *
      • {@link Ext.form.FormPanel}
      • - *
      • specifying layout: 'anchor' // or 'form', or 'absolute'
      • - *

      - *

      See {@link Ext.layout.AnchorLayout}.{@link Ext.layout.AnchorLayout#anchor anchor} also.

      - */ - // tabTip config is used when a BoxComponent is a child of a TabPanel - /** - * @cfg {String} tabTip - *

      Note: this config is only used when this BoxComponent is a child item of a TabPanel.

      - * A string to be used as innerHTML (html tags are accepted) to show in a tooltip when mousing over - * the associated tab selector element. {@link Ext.QuickTips}.init() - * must be called in order for the tips to render. - */ - // Configs below are used for all Components when rendered by BorderLayout. - /** - * @cfg {String} region

      Note: this config is only used when this BoxComponent is rendered - * by a Container which has been configured to use the {@link Ext.layout.BorderLayout BorderLayout} - * layout manager (e.g. specifying layout:'border').


      - *

      See {@link Ext.layout.BorderLayout} also.

      - */ - // margins config is used when a BoxComponent is rendered by BorderLayout or BoxLayout. - /** - * @cfg {Object} margins

      Note: this config is only used when this BoxComponent is rendered - * by a Container which has been configured to use the {@link Ext.layout.BorderLayout BorderLayout} - * or one of the two {@link Ext.layout.BoxLayout BoxLayout} subclasses.

      - *

      An object containing margins to apply to this BoxComponent in the - * format:

      
      -{
      -    top: (top margin),
      -    right: (right margin),
      -    bottom: (bottom margin),
      -    left: (left margin)
      -}
      - *

      May also be a string containing space-separated, numeric margin values. The order of the - * sides associated with each value matches the way CSS processes margin values:

      - *

        - *
      • If there is only one value, it applies to all sides.
      • - *
      • If there are two values, the top and bottom borders are set to the first value and the - * right and left are set to the second.
      • - *
      • If there are three values, the top is set to the first value, the left and right are set - * to the second, and the bottom is set to the third.
      • - *
      • If there are four values, they apply to the top, right, bottom, and left, respectively.
      • - *

      - *

      Defaults to:

      
      -     * {top:0, right:0, bottom:0, left:0}
      -     * 
      - */ - /** - * @cfg {Number} x - * The local x (left) coordinate for this component if contained within a positioning container. - */ - /** - * @cfg {Number} y - * The local y (top) coordinate for this component if contained within a positioning container. - */ - /** - * @cfg {Number} pageX - * The page level x coordinate for this component if contained within a positioning container. - */ - /** - * @cfg {Number} pageY - * The page level y coordinate for this component if contained within a positioning container. - */ - /** - * @cfg {Number} height - * The height of this component in pixels (defaults to auto). - * Note to express this dimension as a percentage or offset see {@link Ext.Component#anchor}. - */ - /** - * @cfg {Number} width - * The width of this component in pixels (defaults to auto). - * Note to express this dimension as a percentage or offset see {@link Ext.Component#anchor}. - */ - /** - * @cfg {Number} boxMinHeight - *

      The minimum value in pixels which this BoxComponent will set its height to.

      - *

      Warning: This will override any size management applied by layout managers.

      - */ - /** - * @cfg {Number} boxMinWidth - *

      The minimum value in pixels which this BoxComponent will set its width to.

      - *

      Warning: This will override any size management applied by layout managers.

      - */ - /** - * @cfg {Number} boxMaxHeight - *

      The maximum value in pixels which this BoxComponent will set its height to.

      - *

      Warning: This will override any size management applied by layout managers.

      - */ - /** - * @cfg {Number} boxMaxWidth - *

      The maximum value in pixels which this BoxComponent will set its width to.

      - *

      Warning: This will override any size management applied by layout managers.

      - */ - /** - * @cfg {Boolean} autoHeight - *

      True to use height:'auto', false to use fixed height (or allow it to be managed by its parent - * Container's {@link Ext.Container#layout layout manager}. Defaults to false.

      - *

      Note: Although many components inherit this config option, not all will - * function as expected with a height of 'auto'. Setting autoHeight:true means that the - * browser will manage height based on the element's contents, and that Ext will not manage it at all.

      - *

      If the browser is managing the height, be aware that resizes performed by the browser in response - * to changes within the structure of the Component cannot be detected. Therefore changes to the height might - * result in elements needing to be synchronized with the new height. Example:

      
      -var w = new Ext.Window({
      -    title: 'Window',
      -    width: 600,
      -    autoHeight: true,
      -    items: {
      -        title: 'Collapse Me',
      -        height: 400,
      -        collapsible: true,
      -        border: false,
      -        listeners: {
      -            beforecollapse: function() {
      -                w.el.shadow.hide();
      -            },
      -            beforeexpand: function() {
      -                w.el.shadow.hide();
      -            },
      -            collapse: function() {
      -                w.syncShadow();
      -            },
      -            expand: function() {
      -                w.syncShadow();
      -            }
      -        }
      -    }
      -}).show();
      -
      - */ - /** - * @cfg {Boolean} autoWidth - *

      True to use width:'auto', false to use fixed width (or allow it to be managed by its parent - * Container's {@link Ext.Container#layout layout manager}. Defaults to false.

      - *

      Note: Although many components inherit this config option, not all will - * function as expected with a width of 'auto'. Setting autoWidth:true means that the - * browser will manage width based on the element's contents, and that Ext will not manage it at all.

      - *

      If the browser is managing the width, be aware that resizes performed by the browser in response - * to changes within the structure of the Component cannot be detected. Therefore changes to the width might - * result in elements needing to be synchronized with the new width. For example, where the target element is:

      
      -<div id='grid-container' style='margin-left:25%;width:50%'></div>
      -
      - * A Panel rendered into that target element must listen for browser window resize in order to relay its - * child items when the browser changes its width:
      
      -var myPanel = new Ext.Panel({
      -    renderTo: 'grid-container',
      -    monitorResize: true, // relay on browser resize
      -    title: 'Panel',
      -    height: 400,
      -    autoWidth: true,
      -    layout: 'hbox',
      -    layoutConfig: {
      -        align: 'stretch'
      -    },
      -    defaults: {
      -        flex: 1
      -    },
      -    items: [{
      -        title: 'Box 1',
      -    }, {
      -        title: 'Box 2'
      -    }, {
      -        title: 'Box 3'
      -    }],
      -});
      -
      - */ - /** - * @cfg {Boolean} autoScroll - * true to use overflow:'auto' on the components layout element and show scroll bars automatically when - * necessary, false to clip any overflowing content (defaults to false). - */ - - /* // private internal config - * {Boolean} deferHeight - * True to defer height calculations to an external component, false to allow this component to set its own - * height (defaults to false). - */ - - // private - initComponent : function(){ - Ext.BoxComponent.superclass.initComponent.call(this); - this.addEvents( - /** - * @event resize - * Fires after the component is resized. - * @param {Ext.Component} this - * @param {Number} adjWidth The box-adjusted width that was set - * @param {Number} adjHeight The box-adjusted height that was set - * @param {Number} rawWidth The width that was originally specified - * @param {Number} rawHeight The height that was originally specified - */ - 'resize', - /** - * @event move - * Fires after the component is moved. - * @param {Ext.Component} this - * @param {Number} x The new x position - * @param {Number} y The new y position - */ - 'move' - ); - }, - - // private, set in afterRender to signify that the component has been rendered - boxReady : false, - // private, used to defer height settings to subclasses - deferHeight: false, - - /** - * Sets the width and height of this BoxComponent. This method fires the {@link #resize} event. This method can accept - * either width and height as separate arguments, or you can pass a size object like {width:10, height:20}. - * @param {Mixed} width The new width to set. This may be one of:
        - *
      • A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS width style.
      • - *
      • A size object in the format {width: widthValue, height: heightValue}.
      • - *
      • undefined to leave the width unchanged.
      • - *
      - * @param {Mixed} height The new height to set (not required if a size object is passed as the first arg). - * This may be one of:
        - *
      • A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS height style. Animation may not be used.
      • - *
      • undefined to leave the height unchanged.
      • - *
      - * @return {Ext.BoxComponent} this - */ - setSize : function(w, h){ - - // support for standard size objects - if(typeof w == 'object'){ - h = w.height; - w = w.width; - } - if (Ext.isDefined(w) && Ext.isDefined(this.boxMinWidth) && (w < this.boxMinWidth)) { - w = this.boxMinWidth; - } - if (Ext.isDefined(h) && Ext.isDefined(this.boxMinHeight) && (h < this.boxMinHeight)) { - h = this.boxMinHeight; - } - if (Ext.isDefined(w) && Ext.isDefined(this.boxMaxWidth) && (w > this.boxMaxWidth)) { - w = this.boxMaxWidth; - } - if (Ext.isDefined(h) && Ext.isDefined(this.boxMaxHeight) && (h > this.boxMaxHeight)) { - h = this.boxMaxHeight; - } - // not rendered - if(!this.boxReady){ - this.width = w; - this.height = h; - return this; - } - - // prevent recalcs when not needed - if(this.cacheSizes !== false && this.lastSize && this.lastSize.width == w && this.lastSize.height == h){ - return this; - } - this.lastSize = {width: w, height: h}; - var adj = this.adjustSize(w, h), - aw = adj.width, - ah = adj.height, - rz; - if(aw !== undefined || ah !== undefined){ // this code is nasty but performs better with floaters - rz = this.getResizeEl(); - if(!this.deferHeight && aw !== undefined && ah !== undefined){ - rz.setSize(aw, ah); - }else if(!this.deferHeight && ah !== undefined){ - rz.setHeight(ah); - }else if(aw !== undefined){ - rz.setWidth(aw); - } - this.onResize(aw, ah, w, h); - this.fireEvent('resize', this, aw, ah, w, h); - } - return this; - }, - - /** - * Sets the width of the component. This method fires the {@link #resize} event. - * @param {Mixed} width The new width to set. This may be one of:
        - *
      • A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS width style.
      • - *
      - * @return {Ext.BoxComponent} this - */ - setWidth : function(width){ - return this.setSize(width); - }, - - /** - * Sets the height of the component. This method fires the {@link #resize} event. - * @param {Mixed} height The new height to set. This may be one of:
        - *
      • A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS height style.
      • - *
      • undefined to leave the height unchanged.
      • - *
      - * @return {Ext.BoxComponent} this - */ - setHeight : function(height){ - return this.setSize(undefined, height); - }, - - /** - * Gets the current size of the component's underlying element. - * @return {Object} An object containing the element's size {width: (element width), height: (element height)} - */ - getSize : function(){ - return this.getResizeEl().getSize(); - }, - - /** - * Gets the current width of the component's underlying element. - * @return {Number} - */ - getWidth : function(){ - return this.getResizeEl().getWidth(); - }, - - /** - * Gets the current height of the component's underlying element. - * @return {Number} - */ - getHeight : function(){ - return this.getResizeEl().getHeight(); - }, - - /** - * Gets the current size of the component's underlying element, including space taken by its margins. - * @return {Object} An object containing the element's size {width: (element width + left/right margins), height: (element height + top/bottom margins)} - */ - getOuterSize : function(){ - var el = this.getResizeEl(); - return {width: el.getWidth() + el.getMargins('lr'), - height: el.getHeight() + el.getMargins('tb')}; - }, - - /** - * Gets the current XY position of the component's underlying element. - * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false) - * @return {Array} The XY position of the element (e.g., [100, 200]) - */ - getPosition : function(local){ - var el = this.getPositionEl(); - if(local === true){ - return [el.getLeft(true), el.getTop(true)]; - } - return this.xy || el.getXY(); - }, - - /** - * Gets the current box measurements of the component's underlying element. - * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false) - * @return {Object} box An object in the format {x, y, width, height} - */ - getBox : function(local){ - var pos = this.getPosition(local); - var s = this.getSize(); - s.x = pos[0]; - s.y = pos[1]; - return s; - }, - - /** - * Sets the current box measurements of the component's underlying element. - * @param {Object} box An object in the format {x, y, width, height} - * @return {Ext.BoxComponent} this - */ - updateBox : function(box){ - this.setSize(box.width, box.height); - this.setPagePosition(box.x, box.y); - return this; - }, - - /** - *

      Returns the outermost Element of this Component which defines the Components overall size.

      - *

      Usually this will return the same Element as {@link #getEl}, - * but in some cases, a Component may have some more wrapping Elements around its main - * active Element.

      - *

      An example is a ComboBox. It is encased in a wrapping Element which - * contains both the <input> Element (which is what would be returned - * by its {@link #getEl} method, and the trigger button Element. - * This Element is returned as the resizeEl. - * @return {Ext.Element} The Element which is to be resized by size managing layouts. - */ - getResizeEl : function(){ - return this.resizeEl || this.el; - }, - - /** - * Sets the overflow on the content element of the component. - * @param {Boolean} scroll True to allow the Component to auto scroll. - * @return {Ext.BoxComponent} this - */ - setAutoScroll : function(scroll){ - if(this.rendered){ - this.getContentTarget().setOverflow(scroll ? 'auto' : ''); - } - this.autoScroll = scroll; - return this; - }, - - /** - * Sets the left and top of the component. To set the page XY position instead, use {@link #setPagePosition}. - * This method fires the {@link #move} event. - * @param {Number} left The new left - * @param {Number} top The new top - * @return {Ext.BoxComponent} this - */ - setPosition : function(x, y){ - if(x && typeof x[1] == 'number'){ - y = x[1]; - x = x[0]; - } - this.x = x; - this.y = y; - if(!this.boxReady){ - return this; - } - var adj = this.adjustPosition(x, y); - var ax = adj.x, ay = adj.y; - - var el = this.getPositionEl(); - if(ax !== undefined || ay !== undefined){ - if(ax !== undefined && ay !== undefined){ - el.setLeftTop(ax, ay); - }else if(ax !== undefined){ - el.setLeft(ax); - }else if(ay !== undefined){ - el.setTop(ay); - } - this.onPosition(ax, ay); - this.fireEvent('move', this, ax, ay); - } - return this; - }, - - /** - * Sets the page XY position of the component. To set the left and top instead, use {@link #setPosition}. - * This method fires the {@link #move} event. - * @param {Number} x The new x position - * @param {Number} y The new y position - * @return {Ext.BoxComponent} this - */ - setPagePosition : function(x, y){ - if(x && typeof x[1] == 'number'){ - y = x[1]; - x = x[0]; - } - this.pageX = x; - this.pageY = y; - if(!this.boxReady){ - return; - } - if(x === undefined || y === undefined){ // cannot translate undefined points - return; - } - var p = this.getPositionEl().translatePoints(x, y); - this.setPosition(p.left, p.top); - return this; - }, - - // private - afterRender : function(){ - Ext.BoxComponent.superclass.afterRender.call(this); - if(this.resizeEl){ - this.resizeEl = Ext.get(this.resizeEl); - } - if(this.positionEl){ - this.positionEl = Ext.get(this.positionEl); - } - this.boxReady = true; - Ext.isDefined(this.autoScroll) && this.setAutoScroll(this.autoScroll); - this.setSize(this.width, this.height); - if(this.x || this.y){ - this.setPosition(this.x, this.y); - }else if(this.pageX || this.pageY){ - this.setPagePosition(this.pageX, this.pageY); - } - }, - - /** - * Force the component's size to recalculate based on the underlying element's current height and width. - * @return {Ext.BoxComponent} this - */ - syncSize : function(){ - delete this.lastSize; - this.setSize(this.autoWidth ? undefined : this.getResizeEl().getWidth(), this.autoHeight ? undefined : this.getResizeEl().getHeight()); - return this; - }, - - /* // protected - * Called after the component is resized, this method is empty by default but can be implemented by any - * subclass that needs to perform custom logic after a resize occurs. - * @param {Number} adjWidth The box-adjusted width that was set - * @param {Number} adjHeight The box-adjusted height that was set - * @param {Number} rawWidth The width that was originally specified - * @param {Number} rawHeight The height that was originally specified - */ - onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){ - }, - - /* // protected - * Called after the component is moved, this method is empty by default but can be implemented by any - * subclass that needs to perform custom logic after a move occurs. - * @param {Number} x The new x position - * @param {Number} y The new y position - */ - onPosition : function(x, y){ - - }, - - // private - adjustSize : function(w, h){ - if(this.autoWidth){ - w = 'auto'; - } - if(this.autoHeight){ - h = 'auto'; - } - return {width : w, height: h}; - }, - - // private - adjustPosition : function(x, y){ - return {x : x, y: y}; - } -}); -Ext.reg('box', Ext.BoxComponent); - - -/** - * @class Ext.Spacer - * @extends Ext.BoxComponent - *

      Used to provide a sizable space in a layout.

      - * @constructor - * @param {Object} config - */ -Ext.Spacer = Ext.extend(Ext.BoxComponent, { - autoEl:'div' -}); -Ext.reg('spacer', Ext.Spacer);/** - * @class Ext.SplitBar - * @extends Ext.util.Observable - * Creates draggable splitter bar functionality from two elements (element to be dragged and element to be resized). - *

      - * Usage: - *
      
      -var split = new Ext.SplitBar("elementToDrag", "elementToSize",
      -                   Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT);
      -split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container"));
      -split.minSize = 100;
      -split.maxSize = 600;
      -split.animate = true;
      -split.on('moved', splitterMoved);
      -
      - * @constructor - * Create a new SplitBar - * @param {Mixed} dragElement The element to be dragged and act as the SplitBar. - * @param {Mixed} resizingElement The element to be resized based on where the SplitBar element is dragged - * @param {Number} orientation (optional) Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL) - * @param {Number} placement (optional) Either Ext.SplitBar.LEFT or Ext.SplitBar.RIGHT for horizontal or - Ext.SplitBar.TOP or Ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the initial - position of the SplitBar). - */ -Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){ - - /** @private */ - this.el = Ext.get(dragElement, true); - this.el.dom.unselectable = "on"; - /** @private */ - this.resizingEl = Ext.get(resizingElement, true); - - /** - * @private - * The orientation of the split. Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL) - * Note: If this is changed after creating the SplitBar, the placement property must be manually updated - * @type Number - */ - this.orientation = orientation || Ext.SplitBar.HORIZONTAL; - - /** - * The increment, in pixels by which to move this SplitBar. When undefined, the SplitBar moves smoothly. - * @type Number - * @property tickSize - */ - /** - * The minimum size of the resizing element. (Defaults to 0) - * @type Number - */ - this.minSize = 0; - - /** - * The maximum size of the resizing element. (Defaults to 2000) - * @type Number - */ - this.maxSize = 2000; - - /** - * Whether to animate the transition to the new size - * @type Boolean - */ - this.animate = false; - - /** - * Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes. - * @type Boolean - */ - this.useShim = false; - - /** @private */ - this.shim = null; - - if(!existingProxy){ - /** @private */ - this.proxy = Ext.SplitBar.createProxy(this.orientation); - }else{ - this.proxy = Ext.get(existingProxy).dom; - } - /** @private */ - this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId : this.proxy.id}); - - /** @private */ - this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this); - - /** @private */ - this.dd.endDrag = this.onEndProxyDrag.createDelegate(this); - - /** @private */ - this.dragSpecs = {}; - - /** - * @private The adapter to use to positon and resize elements - */ - this.adapter = new Ext.SplitBar.BasicLayoutAdapter(); - this.adapter.init(this); - - if(this.orientation == Ext.SplitBar.HORIZONTAL){ - /** @private */ - this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT); - this.el.addClass("x-splitbar-h"); - }else{ - /** @private */ - this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM); - this.el.addClass("x-splitbar-v"); - } - - this.addEvents( - /** - * @event resize - * Fires when the splitter is moved (alias for {@link #moved}) - * @param {Ext.SplitBar} this - * @param {Number} newSize the new width or height - */ - "resize", - /** - * @event moved - * Fires when the splitter is moved - * @param {Ext.SplitBar} this - * @param {Number} newSize the new width or height - */ - "moved", - /** - * @event beforeresize - * Fires before the splitter is dragged - * @param {Ext.SplitBar} this - */ - "beforeresize", - - "beforeapply" - ); - - Ext.SplitBar.superclass.constructor.call(this); -}; - -Ext.extend(Ext.SplitBar, Ext.util.Observable, { - onStartProxyDrag : function(x, y){ - this.fireEvent("beforeresize", this); - this.overlay = Ext.DomHelper.append(document.body, {cls: "x-drag-overlay", html: " "}, true); - this.overlay.unselectable(); - this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); - this.overlay.show(); - Ext.get(this.proxy).setDisplayed("block"); - var size = this.adapter.getElementSize(this); - this.activeMinSize = this.getMinimumSize(); - this.activeMaxSize = this.getMaximumSize(); - var c1 = size - this.activeMinSize; - var c2 = Math.max(this.activeMaxSize - size, 0); - if(this.orientation == Ext.SplitBar.HORIZONTAL){ - this.dd.resetConstraints(); - this.dd.setXConstraint( - this.placement == Ext.SplitBar.LEFT ? c1 : c2, - this.placement == Ext.SplitBar.LEFT ? c2 : c1, - this.tickSize - ); - this.dd.setYConstraint(0, 0); - }else{ - this.dd.resetConstraints(); - this.dd.setXConstraint(0, 0); - this.dd.setYConstraint( - this.placement == Ext.SplitBar.TOP ? c1 : c2, - this.placement == Ext.SplitBar.TOP ? c2 : c1, - this.tickSize - ); - } - this.dragSpecs.startSize = size; - this.dragSpecs.startPoint = [x, y]; - Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, x, y); - }, - - /** - * @private Called after the drag operation by the DDProxy - */ - onEndProxyDrag : function(e){ - Ext.get(this.proxy).setDisplayed(false); - var endPoint = Ext.lib.Event.getXY(e); - if(this.overlay){ - Ext.destroy(this.overlay); - delete this.overlay; - } - var newSize; - if(this.orientation == Ext.SplitBar.HORIZONTAL){ - newSize = this.dragSpecs.startSize + - (this.placement == Ext.SplitBar.LEFT ? - endPoint[0] - this.dragSpecs.startPoint[0] : - this.dragSpecs.startPoint[0] - endPoint[0] - ); - }else{ - newSize = this.dragSpecs.startSize + - (this.placement == Ext.SplitBar.TOP ? - endPoint[1] - this.dragSpecs.startPoint[1] : - this.dragSpecs.startPoint[1] - endPoint[1] - ); - } - newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize); - if(newSize != this.dragSpecs.startSize){ - if(this.fireEvent('beforeapply', this, newSize) !== false){ - this.adapter.setElementSize(this, newSize); - this.fireEvent("moved", this, newSize); - this.fireEvent("resize", this, newSize); - } - } - }, - - /** - * Get the adapter this SplitBar uses - * @return The adapter object - */ - getAdapter : function(){ - return this.adapter; - }, - - /** - * Set the adapter this SplitBar uses - * @param {Object} adapter A SplitBar adapter object - */ - setAdapter : function(adapter){ - this.adapter = adapter; - this.adapter.init(this); - }, - - /** - * Gets the minimum size for the resizing element - * @return {Number} The minimum size - */ - getMinimumSize : function(){ - return this.minSize; - }, - - /** - * Sets the minimum size for the resizing element - * @param {Number} minSize The minimum size - */ - setMinimumSize : function(minSize){ - this.minSize = minSize; - }, - - /** - * Gets the maximum size for the resizing element - * @return {Number} The maximum size - */ - getMaximumSize : function(){ - return this.maxSize; - }, - - /** - * Sets the maximum size for the resizing element - * @param {Number} maxSize The maximum size - */ - setMaximumSize : function(maxSize){ - this.maxSize = maxSize; - }, - - /** - * Sets the initialize size for the resizing element - * @param {Number} size The initial size - */ - setCurrentSize : function(size){ - var oldAnimate = this.animate; - this.animate = false; - this.adapter.setElementSize(this, size); - this.animate = oldAnimate; - }, - - /** - * Destroy this splitbar. - * @param {Boolean} removeEl True to remove the element - */ - destroy : function(removeEl){ - Ext.destroy(this.shim, Ext.get(this.proxy)); - this.dd.unreg(); - if(removeEl){ - this.el.remove(); - } - this.purgeListeners(); - } -}); - -/** - * @private static Create our own proxy element element. So it will be the same same size on all browsers, we won't use borders. Instead we use a background color. - */ -Ext.SplitBar.createProxy = function(dir){ - var proxy = new Ext.Element(document.createElement("div")); - document.body.appendChild(proxy.dom); - proxy.unselectable(); - var cls = 'x-splitbar-proxy'; - proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v')); - return proxy.dom; -}; - -/** - * @class Ext.SplitBar.BasicLayoutAdapter - * Default Adapter. It assumes the splitter and resizing element are not positioned - * elements and only gets/sets the width of the element. Generally used for table based layouts. - */ -Ext.SplitBar.BasicLayoutAdapter = function(){ -}; - -Ext.SplitBar.BasicLayoutAdapter.prototype = { - // do nothing for now - init : function(s){ - - }, - /** - * Called before drag operations to get the current size of the resizing element. - * @param {Ext.SplitBar} s The SplitBar using this adapter - */ - getElementSize : function(s){ - if(s.orientation == Ext.SplitBar.HORIZONTAL){ - return s.resizingEl.getWidth(); - }else{ - return s.resizingEl.getHeight(); - } - }, - - /** - * Called after drag operations to set the size of the resizing element. - * @param {Ext.SplitBar} s The SplitBar using this adapter - * @param {Number} newSize The new size to set - * @param {Function} onComplete A function to be invoked when resizing is complete - */ - setElementSize : function(s, newSize, onComplete){ - if(s.orientation == Ext.SplitBar.HORIZONTAL){ - if(!s.animate){ - s.resizingEl.setWidth(newSize); - if(onComplete){ - onComplete(s, newSize); - } - }else{ - s.resizingEl.setWidth(newSize, true, .1, onComplete, 'easeOut'); - } - }else{ - - if(!s.animate){ - s.resizingEl.setHeight(newSize); - if(onComplete){ - onComplete(s, newSize); - } - }else{ - s.resizingEl.setHeight(newSize, true, .1, onComplete, 'easeOut'); - } - } - } -}; - -/** - *@class Ext.SplitBar.AbsoluteLayoutAdapter - * @extends Ext.SplitBar.BasicLayoutAdapter - * Adapter that moves the splitter element to align with the resized sizing element. - * Used with an absolute positioned SplitBar. - * @param {Mixed} container The container that wraps around the absolute positioned content. If it's - * document.body, make sure you assign an id to the body element. - */ -Ext.SplitBar.AbsoluteLayoutAdapter = function(container){ - this.basic = new Ext.SplitBar.BasicLayoutAdapter(); - this.container = Ext.get(container); -}; - -Ext.SplitBar.AbsoluteLayoutAdapter.prototype = { - init : function(s){ - this.basic.init(s); - }, - - getElementSize : function(s){ - return this.basic.getElementSize(s); - }, - - setElementSize : function(s, newSize, onComplete){ - this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s])); - }, - - moveSplitter : function(s){ - var yes = Ext.SplitBar; - switch(s.placement){ - case yes.LEFT: - s.el.setX(s.resizingEl.getRight()); - break; - case yes.RIGHT: - s.el.setStyle("right", (this.container.getWidth() - s.resizingEl.getLeft()) + "px"); - break; - case yes.TOP: - s.el.setY(s.resizingEl.getBottom()); - break; - case yes.BOTTOM: - s.el.setY(s.resizingEl.getTop() - s.el.getHeight()); - break; - } - } -}; - -/** - * Orientation constant - Create a vertical SplitBar - * @static - * @type Number - */ -Ext.SplitBar.VERTICAL = 1; - -/** - * Orientation constant - Create a horizontal SplitBar - * @static - * @type Number - */ -Ext.SplitBar.HORIZONTAL = 2; - -/** - * Placement constant - The resizing element is to the left of the splitter element - * @static - * @type Number - */ -Ext.SplitBar.LEFT = 1; - -/** - * Placement constant - The resizing element is to the right of the splitter element - * @static - * @type Number - */ -Ext.SplitBar.RIGHT = 2; - -/** - * Placement constant - The resizing element is positioned above the splitter element - * @static - * @type Number - */ -Ext.SplitBar.TOP = 3; - -/** - * Placement constant - The resizing element is positioned under splitter element - * @static - * @type Number - */ -Ext.SplitBar.BOTTOM = 4; -/** - * @class Ext.Container - * @extends Ext.BoxComponent - *

      Base class for any {@link Ext.BoxComponent} that may contain other Components. Containers handle the - * basic behavior of containing items, namely adding, inserting and removing items.

      - * - *

      The most commonly used Container classes are {@link Ext.Panel}, {@link Ext.Window} and {@link Ext.TabPanel}. - * If you do not need the capabilities offered by the aforementioned classes you can create a lightweight - * Container to be encapsulated by an HTML element to your specifications by using the - * {@link Ext.Component#autoEl autoEl} config option. This is a useful technique when creating - * embedded {@link Ext.layout.ColumnLayout column} layouts inside {@link Ext.form.FormPanel FormPanels} - * for example.

      - * - *

      The code below illustrates both how to explicitly create a Container, and how to implicitly - * create one using the 'container' xtype:

      
      -// explicitly create a Container
      -var embeddedColumns = new Ext.Container({
      -    autoEl: 'div',  // This is the default
      -    layout: 'column',
      -    defaults: {
      -        // implicitly create Container by specifying xtype
      -        xtype: 'container',
      -        autoEl: 'div', // This is the default.
      -        layout: 'form',
      -        columnWidth: 0.5,
      -        style: {
      -            padding: '10px'
      -        }
      -    },
      -//  The two items below will be Ext.Containers, each encapsulated by a <DIV> element.
      -    items: [{
      -        items: {
      -            xtype: 'datefield',
      -            name: 'startDate',
      -            fieldLabel: 'Start date'
      -        }
      -    }, {
      -        items: {
      -            xtype: 'datefield',
      -            name: 'endDate',
      -            fieldLabel: 'End date'
      -        }
      -    }]
      -});

      - * - *

      Layout

      - *

      Container classes delegate the rendering of child Components to a layout - * manager class which must be configured into the Container using the - * {@link #layout} configuration property.

      - *

      When either specifying child {@link #items} of a Container, - * or dynamically {@link #add adding} Components to a Container, remember to - * consider how you wish the Container to arrange those child elements, and - * whether those child elements need to be sized using one of Ext's built-in - * {@link #layout} schemes. By default, Containers use the - * {@link Ext.layout.ContainerLayout ContainerLayout} scheme which only - * renders child components, appending them one after the other inside the - * Container, and does not apply any sizing at all.

      - *

      A common mistake is when a developer neglects to specify a - * {@link #layout} (e.g. widgets like GridPanels or - * TreePanels are added to Containers for which no {@link #layout} - * has been specified). If a Container is left to use the default - * {@link Ext.layout.ContainerLayout ContainerLayout} scheme, none of its - * child components will be resized, or changed in any way when the Container - * is resized.

      - *

      Certain layout managers allow dynamic addition of child components. - * Those that do include {@link Ext.layout.CardLayout}, - * {@link Ext.layout.AnchorLayout}, {@link Ext.layout.FormLayout}, and - * {@link Ext.layout.TableLayout}. For example:

      
      -//  Create the GridPanel.
      -var myNewGrid = new Ext.grid.GridPanel({
      -    store: myStore,
      -    columns: myColumnModel,
      -    title: 'Results', // the title becomes the title of the tab
      -});
      -
      -myTabPanel.add(myNewGrid); // {@link Ext.TabPanel} implicitly uses {@link Ext.layout.CardLayout CardLayout}
      -myTabPanel.{@link Ext.TabPanel#setActiveTab setActiveTab}(myNewGrid);
      - * 

      - *

      The example above adds a newly created GridPanel to a TabPanel. Note that - * a TabPanel uses {@link Ext.layout.CardLayout} as its layout manager which - * means all its child items are sized to {@link Ext.layout.FitLayout fit} - * exactly into its client area. - *

      Overnesting is a common problem. - * An example of overnesting occurs when a GridPanel is added to a TabPanel - * by wrapping the GridPanel inside a wrapping Panel (that has no - * {@link #layout} specified) and then add that wrapping Panel - * to the TabPanel. The point to realize is that a GridPanel is a - * Component which can be added directly to a Container. If the wrapping Panel - * has no {@link #layout} configuration, then the overnested - * GridPanel will not be sized as expected.

      - * - *

      Adding via remote configuration

      - * - *

      A server side script can be used to add Components which are generated dynamically on the server. - * An example of adding a GridPanel to a TabPanel where the GridPanel is generated by the server - * based on certain parameters: - *

      
      -// execute an Ajax request to invoke server side script:
      -Ext.Ajax.request({
      -    url: 'gen-invoice-grid.php',
      -    // send additional parameters to instruct server script
      -    params: {
      -        startDate: Ext.getCmp('start-date').getValue(),
      -        endDate: Ext.getCmp('end-date').getValue()
      -    },
      -    // process the response object to add it to the TabPanel:
      -    success: function(xhr) {
      -        var newComponent = eval(xhr.responseText); // see discussion below
      -        myTabPanel.add(newComponent); // add the component to the TabPanel
      -        myTabPanel.setActiveTab(newComponent);
      -    },
      -    failure: function() {
      -        Ext.Msg.alert("Grid create failed", "Server communication failure");
      -    }
      -});
      -
      - *

      The server script needs to return an executable Javascript statement which, when processed - * using eval(), will return either a config object with an {@link Ext.Component#xtype xtype}, - * or an instantiated Component. The server might return this for example:

      
      -(function() {
      -    function formatDate(value){
      -        return value ? value.dateFormat('M d, Y') : '';
      -    };
      -
      -    var store = new Ext.data.Store({
      -        url: 'get-invoice-data.php',
      -        baseParams: {
      -            startDate: '01/01/2008',
      -            endDate: '01/31/2008'
      -        },
      -        reader: new Ext.data.JsonReader({
      -            record: 'transaction',
      -            idProperty: 'id',
      -            totalRecords: 'total'
      -        }, [
      -           'customer',
      -           'invNo',
      -           {name: 'date', type: 'date', dateFormat: 'm/d/Y'},
      -           {name: 'value', type: 'float'}
      -        ])
      -    });
      -
      -    var grid = new Ext.grid.GridPanel({
      -        title: 'Invoice Report',
      -        bbar: new Ext.PagingToolbar(store),
      -        store: store,
      -        columns: [
      -            {header: "Customer", width: 250, dataIndex: 'customer', sortable: true},
      -            {header: "Invoice Number", width: 120, dataIndex: 'invNo', sortable: true},
      -            {header: "Invoice Date", width: 100, dataIndex: 'date', renderer: formatDate, sortable: true},
      -            {header: "Value", width: 120, dataIndex: 'value', renderer: 'usMoney', sortable: true}
      -        ],
      -    });
      -    store.load();
      -    return grid;  // return instantiated component
      -})();
      -
      - *

      When the above code fragment is passed through the eval function in the success handler - * of the Ajax request, the code is executed by the Javascript processor, and the anonymous function - * runs, and returns the instantiated grid component.

      - *

      Note: since the code above is generated by a server script, the baseParams for - * the Store, the metadata to allow generation of the Record layout, and the ColumnModel - * can all be generated into the code since these are all known on the server.

      - * - * @xtype container - */ -Ext.Container = Ext.extend(Ext.BoxComponent, { - /** - * @cfg {Boolean} monitorResize - * True to automatically monitor window resize events to handle anything that is sensitive to the current size - * of the viewport. This value is typically managed by the chosen {@link #layout} and should not need - * to be set manually. - */ - /** - * @cfg {String/Object} layout - *

      *Important: In order for child items to be correctly sized and - * positioned, typically a layout manager must be specified through - * the layout configuration option.

      - *

      The sizing and positioning of child {@link items} is the responsibility of - * the Container's layout manager which creates and manages the type of layout - * you have in mind. For example:

      
      -new Ext.Window({
      -    width:300, height: 300,
      -    layout: 'fit', // explicitly set layout manager: override the default (layout:'auto')
      -    items: [{
      -        title: 'Panel inside a Window'
      -    }]
      -}).show();
      -     * 
      - *

      If the {@link #layout} configuration is not explicitly specified for - * a general purpose container (e.g. Container or Panel) the - * {@link Ext.layout.ContainerLayout default layout manager} will be used - * which does nothing but render child components sequentially into the - * Container (no sizing or positioning will be performed in this situation). - * Some container classes implicitly specify a default layout - * (e.g. FormPanel specifies layout:'form'). Other specific - * purpose classes internally specify/manage their internal layout (e.g. - * GridPanel, TabPanel, TreePanel, Toolbar, Menu, etc.).

      - *

      layout may be specified as either as an Object or - * as a String:

        - * - *
      • Specify as an Object
      • - *
          - *
        • Example usage:
        • -
          
          -layout: {
          -    type: 'vbox',
          -    padding: '5',
          -    align: 'left'
          -}
          -
          - * - *
        • type
        • - *

          The layout type to be used for this container. If not specified, - * a default {@link Ext.layout.ContainerLayout} will be created and used.

          - *

          Valid layout type values are:

          - *
            - *
          • {@link Ext.layout.AbsoluteLayout absolute}
          • - *
          • {@link Ext.layout.AccordionLayout accordion}
          • - *
          • {@link Ext.layout.AnchorLayout anchor}
          • - *
          • {@link Ext.layout.ContainerLayout auto}     Default
          • - *
          • {@link Ext.layout.BorderLayout border}
          • - *
          • {@link Ext.layout.CardLayout card}
          • - *
          • {@link Ext.layout.ColumnLayout column}
          • - *
          • {@link Ext.layout.FitLayout fit}
          • - *
          • {@link Ext.layout.FormLayout form}
          • - *
          • {@link Ext.layout.HBoxLayout hbox}
          • - *
          • {@link Ext.layout.MenuLayout menu}
          • - *
          • {@link Ext.layout.TableLayout table}
          • - *
          • {@link Ext.layout.ToolbarLayout toolbar}
          • - *
          • {@link Ext.layout.VBoxLayout vbox}
          • - *
          - * - *
        • Layout specific configuration properties
        • - *

          Additional layout specific configuration properties may also be - * specified. For complete details regarding the valid config options for - * each layout type, see the layout class corresponding to the type - * specified.

          - * - *
        - * - *
      • Specify as a String
      • - *
          - *
        • Example usage:
        • -
          
          -layout: 'vbox',
          -layoutConfig: {
          -    padding: '5',
          -    align: 'left'
          -}
          -
          - *
        • layout
        • - *

          The layout type to be used for this container (see list - * of valid layout type values above).


          - *
        • {@link #layoutConfig}
        • - *

          Additional layout specific configuration properties. For complete - * details regarding the valid config options for each layout type, see the - * layout class corresponding to the layout specified.

          - *
      - */ - /** - * @cfg {Object} layoutConfig - * This is a config object containing properties specific to the chosen - * {@link #layout} if {@link #layout} - * has been specified as a string.

      - */ - /** - * @cfg {Boolean/Number} bufferResize - * When set to true (50 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer - * the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers - * with a large quantity of sub-components for which frequent layout calls would be expensive. Defaults to 50. - */ - bufferResize: 50, - - /** - * @cfg {String/Number} activeItem - * A string component id or the numeric index of the component that should be initially activated within the - * container's layout on render. For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first - * item in the container's collection). activeItem only applies to layout styles that can display - * items one at a time (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout} and - * {@link Ext.layout.FitLayout}). Related to {@link Ext.layout.ContainerLayout#activeItem}. - */ - /** - * @cfg {Object/Array} items - *
      ** IMPORTANT: be sure to {@link #layout specify a layout} if needed ! **
      - *

      A single item, or an array of child Components to be added to this container, - * for example:

      - *
      
      -// specifying a single item
      -items: {...},
      -layout: 'fit',    // specify a layout!
      -
      -// specifying multiple items
      -items: [{...}, {...}],
      -layout: 'anchor', // specify a layout!
      -     * 
      - *

      Each item may be:

      - *
        - *
      • any type of object based on {@link Ext.Component}
      • - *
      • a fully instanciated object or
      • - *
      • an object literal that:
      • - *
          - *
        • has a specified {@link Ext.Component#xtype xtype}
        • - *
        • the {@link Ext.Component#xtype} specified is associated with the Component - * desired and should be chosen from one of the available xtypes as listed - * in {@link Ext.Component}.
        • - *
        • If an {@link Ext.Component#xtype xtype} is not explicitly - * specified, the {@link #defaultType} for that Container is used.
        • - *
        • will be "lazily instanciated", avoiding the overhead of constructing a fully - * instanciated Component object
        • - *
      - *

      Notes:

      - *
        - *
      • Ext uses lazy rendering. Child Components will only be rendered - * should it become necessary. Items are automatically laid out when they are first - * shown (no sizing is done while hidden), or in response to a {@link #doLayout} call.
      • - *
      • Do not specify {@link Ext.Panel#contentEl contentEl}/ - * {@link Ext.Panel#html html} with items.
      • - *
      - */ - /** - * @cfg {Object|Function} defaults - *

      This option is a means of applying default settings to all added items whether added through the {@link #items} - * config or via the {@link #add} or {@link #insert} methods.

      - *

      If an added item is a config object, and not an instantiated Component, then the default properties are - * unconditionally applied. If the added item is an instantiated Component, then the default properties are - * applied conditionally so as not to override existing properties in the item.

      - *

      If the defaults option is specified as a function, then the function will be called using this Container as the - * scope (this reference) and passing the added item as the first parameter. Any resulting object - * from that call is then applied to the item as default properties.

      - *

      For example, to automatically apply padding to the body of each of a set of - * contained {@link Ext.Panel} items, you could pass: defaults: {bodyStyle:'padding:15px'}.

      - *

      Usage:

      
      -defaults: {               // defaults are applied to items, not the container
      -    autoScroll:true
      -},
      -items: [
      -    {
      -        xtype: 'panel',   // defaults do not have precedence over
      -        id: 'panel1',     // options in config objects, so the defaults
      -        autoScroll: false // will not be applied here, panel1 will be autoScroll:false
      -    },
      -    new Ext.Panel({       // defaults do have precedence over options
      -        id: 'panel2',     // options in components, so the defaults
      -        autoScroll: false // will be applied here, panel2 will be autoScroll:true.
      -    })
      -]
      -     * 
      - */ - - - /** @cfg {Boolean} autoDestroy - * If true the container will automatically destroy any contained component that is removed from it, else - * destruction must be handled manually (defaults to true). - */ - autoDestroy : true, - - /** @cfg {Boolean} forceLayout - * If true the container will force a layout initially even if hidden or collapsed. This option - * is useful for forcing forms to render in collapsed or hidden containers. (defaults to false). - */ - forceLayout: false, - - /** @cfg {Boolean} hideBorders - * True to hide the borders of each contained component, false to defer to the component's existing - * border settings (defaults to false). - */ - /** @cfg {String} defaultType - *

      The default {@link Ext.Component xtype} of child Components to create in this Container when - * a child item is specified as a raw configuration object, rather than as an instantiated Component.

      - *

      Defaults to 'panel', except {@link Ext.menu.Menu} which defaults to 'menuitem', - * and {@link Ext.Toolbar} and {@link Ext.ButtonGroup} which default to 'button'.

      - */ - defaultType : 'panel', - - /** @cfg {String} resizeEvent - * The event to listen to for resizing in layouts. Defaults to 'resize'. - */ - resizeEvent: 'resize', - - /** - * @cfg {Array} bubbleEvents - *

      An array of events that, when fired, should be bubbled to any parent container. - * See {@link Ext.util.Observable#enableBubble}. - * Defaults to ['add', 'remove']. - */ - bubbleEvents: ['add', 'remove'], - - // private - initComponent : function(){ - Ext.Container.superclass.initComponent.call(this); - - this.addEvents( - /** - * @event afterlayout - * Fires when the components in this container are arranged by the associated layout manager. - * @param {Ext.Container} this - * @param {ContainerLayout} layout The ContainerLayout implementation for this container - */ - 'afterlayout', - /** - * @event beforeadd - * Fires before any {@link Ext.Component} is added or inserted into the container. - * A handler can return false to cancel the add. - * @param {Ext.Container} this - * @param {Ext.Component} component The component being added - * @param {Number} index The index at which the component will be added to the container's items collection - */ - 'beforeadd', - /** - * @event beforeremove - * Fires before any {@link Ext.Component} is removed from the container. A handler can return - * false to cancel the remove. - * @param {Ext.Container} this - * @param {Ext.Component} component The component being removed - */ - 'beforeremove', - /** - * @event add - * @bubbles - * Fires after any {@link Ext.Component} is added or inserted into the container. - * @param {Ext.Container} this - * @param {Ext.Component} component The component that was added - * @param {Number} index The index at which the component was added to the container's items collection - */ - 'add', - /** - * @event remove - * @bubbles - * Fires after any {@link Ext.Component} is removed from the container. - * @param {Ext.Container} this - * @param {Ext.Component} component The component that was removed - */ - 'remove' - ); - - /** - * The collection of components in this container as a {@link Ext.util.MixedCollection} - * @type MixedCollection - * @property items - */ - var items = this.items; - if(items){ - delete this.items; - this.add(items); - } - }, - - // private - initItems : function(){ - if(!this.items){ - this.items = new Ext.util.MixedCollection(false, this.getComponentId); - this.getLayout(); // initialize the layout - } - }, - - // private - setLayout : function(layout){ - if(this.layout && this.layout != layout){ - this.layout.setContainer(null); - } - this.layout = layout; - this.initItems(); - layout.setContainer(this); - }, - - afterRender: function(){ - // Render this Container, this should be done before setLayout is called which - // will hook onResize - Ext.Container.superclass.afterRender.call(this); - if(!this.layout){ - this.layout = 'auto'; - } - if(Ext.isObject(this.layout) && !this.layout.layout){ - this.layoutConfig = this.layout; - this.layout = this.layoutConfig.type; - } - if(Ext.isString(this.layout)){ - this.layout = new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig); - } - this.setLayout(this.layout); - - // If a CardLayout, the active item set - if(this.activeItem !== undefined && this.layout.setActiveItem){ - var item = this.activeItem; - delete this.activeItem; - this.layout.setActiveItem(item); - } - - // If we have no ownerCt, render and size all children - if(!this.ownerCt){ - this.doLayout(false, true); - } - - // This is a manually configured flag set by users in conjunction with renderTo. - // Not to be confused with the flag by the same name used in Layouts. - if(this.monitorResize === true){ - Ext.EventManager.onWindowResize(this.doLayout, this, [false]); - } - }, - - /** - *

      Returns the Element to be used to contain the child Components of this Container.

      - *

      An implementation is provided which returns the Container's {@link #getEl Element}, but - * if there is a more complex structure to a Container, this may be overridden to return - * the element into which the {@link #layout layout} renders child Components.

      - * @return {Ext.Element} The Element to render child Components into. - */ - getLayoutTarget : function(){ - return this.el; - }, - - // private - used as the key lookup function for the items collection - getComponentId : function(comp){ - return comp.getItemId(); - }, - - /** - *

      Adds {@link Ext.Component Component}(s) to this Container.

      - *

      Description : - *

        - *
      • Fires the {@link #beforeadd} event before adding
      • - *
      • The Container's {@link #defaults default config values} will be applied - * accordingly (see {@link #defaults} for details).
      • - *
      • Fires the {@link #add} event after the component has been added.
      • - *
      - *

      Notes : - *

        - *
      • If the Container is already rendered when add - * is called, you may need to call {@link #doLayout} to refresh the view which causes - * any unrendered child Components to be rendered. This is required so that you can - * add multiple child components if needed while only refreshing the layout - * once. For example:
        
        -var tb = new {@link Ext.Toolbar}();
        -tb.render(document.body);  // toolbar is rendered
        -tb.add({text:'Button 1'}); // add multiple items ({@link #defaultType} for {@link Ext.Toolbar Toolbar} is 'button')
        -tb.add({text:'Button 2'});
        -tb.{@link #doLayout}();             // refresh the layout
        -     * 
      • - *
      • Warning: Containers directly managed by the BorderLayout layout manager - * may not be removed or added. See the Notes for {@link Ext.layout.BorderLayout BorderLayout} - * for more details.
      • - *
      - * @param {...Object/Array} component - *

      Either one or more Components to add or an Array of Components to add. See - * {@link #items} for additional information.

      - * @return {Ext.Component/Array} The Components that were added. - */ - add : function(comp){ - this.initItems(); - var args = arguments.length > 1; - if(args || Ext.isArray(comp)){ - var result = []; - Ext.each(args ? arguments : comp, function(c){ - result.push(this.add(c)); - }, this); - return result; - } - var c = this.lookupComponent(this.applyDefaults(comp)); - var index = this.items.length; - if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){ - this.items.add(c); - // *onAdded - c.onAdded(this, index); - this.onAdd(c); - this.fireEvent('add', this, c, index); - } - return c; - }, - - onAdd : function(c){ - // Empty template method - }, - - // private - onAdded : function(container, pos) { - //overridden here so we can cascade down, not worth creating a template method. - this.ownerCt = container; - this.initRef(); - //initialize references for child items - this.cascade(function(c){ - c.initRef(); - }); - this.fireEvent('added', this, container, pos); - }, - - /** - * Inserts a Component into this Container at a specified index. Fires the - * {@link #beforeadd} event before inserting, then fires the {@link #add} event after the - * Component has been inserted. - * @param {Number} index The index at which the Component will be inserted - * into the Container's items collection - * @param {Ext.Component} component The child Component to insert.

      - * Ext uses lazy rendering, and will only render the inserted Component should - * it become necessary.

      - * A Component config object may be passed in order to avoid the overhead of - * constructing a real Component object if lazy rendering might mean that the - * inserted Component will not be rendered immediately. To take advantage of - * this 'lazy instantiation', set the {@link Ext.Component#xtype} config - * property to the registered type of the Component wanted.

      - * For a list of all available xtypes, see {@link Ext.Component}. - * @return {Ext.Component} component The Component (or config object) that was - * inserted with the Container's default config values applied. - */ - insert : function(index, comp) { - var args = arguments, - length = args.length, - result = [], - i, c; - - this.initItems(); - - if (length > 2) { - for (i = length - 1; i >= 1; --i) { - result.push(this.insert(index, args[i])); - } - return result; - } - - c = this.lookupComponent(this.applyDefaults(comp)); - index = Math.min(index, this.items.length); - - if (this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false) { - if (c.ownerCt == this) { - this.items.remove(c); - } - this.items.insert(index, c); - c.onAdded(this, index); - this.onAdd(c); - this.fireEvent('add', this, c, index); - } - - return c; - }, - - // private - applyDefaults : function(c){ - var d = this.defaults; - if(d){ - if(Ext.isFunction(d)){ - d = d.call(this, c); - } - if(Ext.isString(c)){ - c = Ext.ComponentMgr.get(c); - Ext.apply(c, d); - }else if(!c.events){ - Ext.applyIf(c.isAction ? c.initialConfig : c, d); - }else{ - Ext.apply(c, d); - } - } - return c; - }, - - // private - onBeforeAdd : function(item){ - if(item.ownerCt){ - item.ownerCt.remove(item, false); - } - if(this.hideBorders === true){ - item.border = (item.border === true); - } - }, - - /** - * Removes a component from this container. Fires the {@link #beforeremove} event before removing, then fires - * the {@link #remove} event after the component has been removed. - * @param {Component/String} component The component reference or id to remove. - * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function. - * Defaults to the value of this Container's {@link #autoDestroy} config. - * @return {Ext.Component} component The Component that was removed. - */ - remove : function(comp, autoDestroy){ - this.initItems(); - var c = this.getComponent(comp); - if(c && this.fireEvent('beforeremove', this, c) !== false){ - this.doRemove(c, autoDestroy); - this.fireEvent('remove', this, c); - } - return c; - }, - - onRemove: function(c){ - // Empty template method - }, - - // private - doRemove: function(c, autoDestroy){ - var l = this.layout, - hasLayout = l && this.rendered; - - if(hasLayout){ - l.onRemove(c); - } - this.items.remove(c); - c.onRemoved(); - this.onRemove(c); - if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){ - c.destroy(); - } - if(hasLayout){ - l.afterRemove(c); - } - }, - - /** - * Removes all components from this container. - * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function. - * Defaults to the value of this Container's {@link #autoDestroy} config. - * @return {Array} Array of the destroyed components - */ - removeAll: function(autoDestroy){ - this.initItems(); - var item, rem = [], items = []; - this.items.each(function(i){ - rem.push(i); - }); - for (var i = 0, len = rem.length; i < len; ++i){ - item = rem[i]; - this.remove(item, autoDestroy); - if(item.ownerCt !== this){ - items.push(item); - } - } - return items; - }, - - /** - * Examines this container's {@link #items} property - * and gets a direct child component of this container. - * @param {String/Number} comp This parameter may be any of the following: - *
        - *
      • a String : representing the {@link Ext.Component#itemId itemId} - * or {@link Ext.Component#id id} of the child component
      • - *
      • a Number : representing the position of the child component - * within the {@link #items} property
      • - *
      - *

      For additional information see {@link Ext.util.MixedCollection#get}. - * @return Ext.Component The component (if found). - */ - getComponent : function(comp){ - if(Ext.isObject(comp)){ - comp = comp.getItemId(); - } - return this.items.get(comp); - }, - - // private - lookupComponent : function(comp){ - if(Ext.isString(comp)){ - return Ext.ComponentMgr.get(comp); - }else if(!comp.events){ - return this.createComponent(comp); - } - return comp; - }, - - // private - createComponent : function(config, defaultType){ - if (config.render) { - return config; - } - // add in ownerCt at creation time but then immediately - // remove so that onBeforeAdd can handle it - var c = Ext.create(Ext.apply({ - ownerCt: this - }, config), defaultType || this.defaultType); - delete c.initialConfig.ownerCt; - delete c.ownerCt; - return c; - }, - - /** - * @private - * We can only lay out if there is a view area in which to layout. - * display:none on the layout target, *or any of its parent elements* will mean it has no view area. - */ - canLayout : function() { - var el = this.getVisibilityEl(); - return el && el.dom && !el.isStyle("display", "none"); - }, - - /** - * Force this container's layout to be recalculated. A call to this function is required after adding a new component - * to an already rendered container, or possibly after changing sizing/position properties of child components. - * @param {Boolean} shallow (optional) True to only calc the layout of this component, and let child components auto - * calc layouts as required (defaults to false, which calls doLayout recursively for each subcontainer) - * @param {Boolean} force (optional) True to force a layout to occur, even if the item is hidden. - * @return {Ext.Container} this - */ - - doLayout : function(shallow, force){ - var rendered = this.rendered, - forceLayout = force || this.forceLayout; - - if(this.collapsed || !this.canLayout()){ - this.deferLayout = this.deferLayout || !shallow; - if(!forceLayout){ - return; - } - shallow = shallow && !this.deferLayout; - } else { - delete this.deferLayout; - } - if(rendered && this.layout){ - this.layout.layout(); - } - if(shallow !== true && this.items){ - var cs = this.items.items; - for(var i = 0, len = cs.length; i < len; i++){ - var c = cs[i]; - if(c.doLayout){ - c.doLayout(false, forceLayout); - } - } - } - if(rendered){ - this.onLayout(shallow, forceLayout); - } - // Initial layout completed - this.hasLayout = true; - delete this.forceLayout; - }, - - onLayout : Ext.emptyFn, - - // private - shouldBufferLayout: function(){ - /* - * Returns true if the container should buffer a layout. - * This is true only if the container has previously been laid out - * and has a parent container that is pending a layout. - */ - var hl = this.hasLayout; - if(this.ownerCt){ - // Only ever buffer if we've laid out the first time and we have one pending. - return hl ? !this.hasLayoutPending() : false; - } - // Never buffer initial layout - return hl; - }, - - // private - hasLayoutPending: function(){ - // Traverse hierarchy to see if any parent container has a pending layout. - var pending = false; - this.ownerCt.bubble(function(c){ - if(c.layoutPending){ - pending = true; - return false; - } - }); - return pending; - }, - - onShow : function(){ - // removes css classes that were added to hide - Ext.Container.superclass.onShow.call(this); - // If we were sized during the time we were hidden, layout. - if(Ext.isDefined(this.deferLayout)){ - delete this.deferLayout; - this.doLayout(true); - } - }, - - /** - * Returns the layout currently in use by the container. If the container does not currently have a layout - * set, a default {@link Ext.layout.ContainerLayout} will be created and set as the container's layout. - * @return {ContainerLayout} layout The container's layout - */ - getLayout : function(){ - if(!this.layout){ - var layout = new Ext.layout.AutoLayout(this.layoutConfig); - this.setLayout(layout); - } - return this.layout; - }, - - // private - beforeDestroy : function(){ - var c; - if(this.items){ - while(c = this.items.first()){ - this.doRemove(c, true); - } - } - if(this.monitorResize){ - Ext.EventManager.removeResizeListener(this.doLayout, this); - } - Ext.destroy(this.layout); - Ext.Container.superclass.beforeDestroy.call(this); - }, - - /** - * Cascades down the component/container heirarchy from this component (called first), calling the specified function with - * each component. The scope (this) of - * function call will be the scope provided or the current component. The arguments to the function - * will be the args provided or the current component. If the function returns false at any point, - * the cascade is stopped on that branch. - * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope of the function (defaults to current component) - * @param {Array} args (optional) The args to call the function with (defaults to passing the current component) - * @return {Ext.Container} this - */ - cascade : function(fn, scope, args){ - if(fn.apply(scope || this, args || [this]) !== false){ - if(this.items){ - var cs = this.items.items; - for(var i = 0, len = cs.length; i < len; i++){ - if(cs[i].cascade){ - cs[i].cascade(fn, scope, args); - }else{ - fn.apply(scope || cs[i], args || [cs[i]]); - } - } - } - } - return this; - }, - - /** - * Find a component under this container at any level by id - * @param {String} id - * @deprecated Fairly useless method, since you can just use Ext.getCmp. Should be removed for 4.0 - * If you need to test if an id belongs to a container, you can use getCmp and findParent*. - * @return Ext.Component - */ - findById : function(id){ - var m = null, - ct = this; - this.cascade(function(c){ - if(ct != c && c.id === id){ - m = c; - return false; - } - }); - return m; - }, - - /** - * Find a component under this container at any level by xtype or class - * @param {String/Class} xtype The xtype string for a component, or the class of the component directly - * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is - * the default), or true to check whether this Component is directly of the specified xtype. - * @return {Array} Array of Ext.Components - */ - findByType : function(xtype, shallow){ - return this.findBy(function(c){ - return c.isXType(xtype, shallow); - }); - }, - - /** - * Find a component under this container at any level by property - * @param {String} prop - * @param {String} value - * @return {Array} Array of Ext.Components - */ - find : function(prop, value){ - return this.findBy(function(c){ - return c[prop] === value; - }); - }, - - /** - * Find a component under this container at any level by a custom function. If the passed function returns - * true, the component will be included in the results. The passed function is called with the arguments (component, this container). - * @param {Function} fn The function to call - * @param {Object} scope (optional) - * @return {Array} Array of Ext.Components - */ - findBy : function(fn, scope){ - var m = [], ct = this; - this.cascade(function(c){ - if(ct != c && fn.call(scope || c, c, ct) === true){ - m.push(c); - } - }); - return m; - }, - - /** - * Get a component contained by this container (alias for items.get(key)) - * @param {String/Number} key The index or id of the component - * @deprecated Should be removed in 4.0, since getComponent does the same thing. - * @return {Ext.Component} Ext.Component - */ - get : function(key){ - return this.getComponent(key); - } -}); - -Ext.Container.LAYOUTS = {}; -Ext.reg('container', Ext.Container); -/** - * @class Ext.layout.ContainerLayout - *

      This class is intended to be extended or created via the {@link Ext.Container#layout layout} - * configuration property. See {@link Ext.Container#layout} for additional details.

      - */ -Ext.layout.ContainerLayout = Ext.extend(Object, { - /** - * @cfg {String} extraCls - *

      An optional extra CSS class that will be added to the container. This can be useful for adding - * customized styles to the container or any of its children using standard CSS rules. See - * {@link Ext.Component}.{@link Ext.Component#ctCls ctCls} also.

      - *

      Note: extraCls defaults to '' except for the following classes - * which assign a value by default: - *

        - *
      • {@link Ext.layout.AbsoluteLayout Absolute Layout} : 'x-abs-layout-item'
      • - *
      • {@link Ext.layout.Box Box Layout} : 'x-box-item'
      • - *
      • {@link Ext.layout.ColumnLayout Column Layout} : 'x-column'
      • - *
      - * To configure the above Classes with an extra CSS class append to the default. For example, - * for ColumnLayout:
      
      -     * extraCls: 'x-column custom-class'
      -     * 
      - *

      - */ - /** - * @cfg {Boolean} renderHidden - * True to hide each contained item on render (defaults to false). - */ - - /** - * A reference to the {@link Ext.Component} that is active. For example,
      
      -     * if(myPanel.layout.activeItem.id == 'item-1') { ... }
      -     * 
      - * activeItem only applies to layout styles that can display items one at a time - * (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout} - * and {@link Ext.layout.FitLayout}). Read-only. Related to {@link Ext.Container#activeItem}. - * @type {Ext.Component} - * @property activeItem - */ - - // private - monitorResize:false, - // private - activeItem : null, - - constructor : function(config){ - this.id = Ext.id(null, 'ext-layout-'); - Ext.apply(this, config); - }, - - type: 'container', - - /* Workaround for how IE measures autoWidth elements. It prefers bottom-up measurements - whereas other browser prefer top-down. We will hide all target child elements before we measure and - put them back to get an accurate measurement. - */ - IEMeasureHack : function(target, viewFlag) { - var tChildren = target.dom.childNodes, tLen = tChildren.length, c, d = [], e, i, ret; - for (i = 0 ; i < tLen ; i++) { - c = tChildren[i]; - e = Ext.get(c); - if (e) { - d[i] = e.getStyle('display'); - e.setStyle({display: 'none'}); - } - } - ret = target ? target.getViewSize(viewFlag) : {}; - for (i = 0 ; i < tLen ; i++) { - c = tChildren[i]; - e = Ext.get(c); - if (e) { - e.setStyle({display: d[i]}); - } - } - return ret; - }, - - // Placeholder for the derived layouts - getLayoutTargetSize : Ext.EmptyFn, - - // private - layout : function(){ - var ct = this.container, target = ct.getLayoutTarget(); - if(!(this.hasLayout || Ext.isEmpty(this.targetCls))){ - target.addClass(this.targetCls); - } - this.onLayout(ct, target); - ct.fireEvent('afterlayout', ct, this); - }, - - // private - onLayout : function(ct, target){ - this.renderAll(ct, target); - }, - - // private - isValidParent : function(c, target){ - return target && c.getPositionEl().dom.parentNode == (target.dom || target); - }, - - // private - renderAll : function(ct, target){ - var items = ct.items.items, i, c, len = items.length; - for(i = 0; i < len; i++) { - c = items[i]; - if(c && (!c.rendered || !this.isValidParent(c, target))){ - this.renderItem(c, i, target); - } - } - }, - - /** - * @private - * Renders the given Component into the target Element. If the Component is already rendered, - * it is moved to the provided target instead. - * @param {Ext.Component} c The Component to render - * @param {Number} position The position within the target to render the item to - * @param {Ext.Element} target The target Element - */ - renderItem : function(c, position, target){ - if (c) { - if (!c.rendered) { - c.render(target, position); - this.configureItem(c); - } else if (!this.isValidParent(c, target)) { - if (Ext.isNumber(position)) { - position = target.dom.childNodes[position]; - } - - target.dom.insertBefore(c.getPositionEl().dom, position || null); - c.container = target; - this.configureItem(c); - } - } - }, - - // private. - // Get all rendered items to lay out. - getRenderedItems: function(ct){ - var t = ct.getLayoutTarget(), cti = ct.items.items, len = cti.length, i, c, items = []; - for (i = 0; i < len; i++) { - if((c = cti[i]).rendered && this.isValidParent(c, t) && c.shouldLayout !== false){ - items.push(c); - } - }; - return items; - }, - - /** - * @private - * Applies extraCls and hides the item if renderHidden is true - */ - configureItem: function(c){ - if (this.extraCls) { - var t = c.getPositionEl ? c.getPositionEl() : c; - t.addClass(this.extraCls); - } - - // If we are forcing a layout, do so *before* we hide so elements have height/width - if (c.doLayout && this.forceLayout) { - c.doLayout(); - } - if (this.renderHidden && c != this.activeItem) { - c.hide(); - } - }, - - onRemove: function(c){ - if(this.activeItem == c){ - delete this.activeItem; - } - if(c.rendered && this.extraCls){ - var t = c.getPositionEl ? c.getPositionEl() : c; - t.removeClass(this.extraCls); - } - }, - - afterRemove: function(c){ - if(c.removeRestore){ - c.removeMode = 'container'; - delete c.removeRestore; - } - }, - - // private - onResize: function(){ - var ct = this.container, - b; - if(ct.collapsed){ - return; - } - if(b = ct.bufferResize && ct.shouldBufferLayout()){ - if(!this.resizeTask){ - this.resizeTask = new Ext.util.DelayedTask(this.runLayout, this); - this.resizeBuffer = Ext.isNumber(b) ? b : 50; - } - ct.layoutPending = true; - this.resizeTask.delay(this.resizeBuffer); - }else{ - this.runLayout(); - } - }, - - runLayout: function(){ - var ct = this.container; - this.layout(); - ct.onLayout(); - delete ct.layoutPending; - }, - - // private - setContainer : function(ct){ - /** - * This monitorResize flag will be renamed soon as to avoid confusion - * with the Container version which hooks onWindowResize to doLayout - * - * monitorResize flag in this context attaches the resize event between - * a container and it's layout - */ - if(this.monitorResize && ct != this.container){ - var old = this.container; - if(old){ - old.un(old.resizeEvent, this.onResize, this); - } - if(ct){ - ct.on(ct.resizeEvent, this.onResize, this); - } - } - this.container = ct; - }, - - /** - * Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations - * (e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result) - * @param {Number|String} v The encoded margins - * @return {Object} An object with margin sizes for top, right, bottom and left - */ - parseMargins : function(v){ - if (Ext.isNumber(v)) { - v = v.toString(); - } - var ms = v.split(' '), - len = ms.length; - - if (len == 1) { - ms[1] = ms[2] = ms[3] = ms[0]; - } else if(len == 2) { - ms[2] = ms[0]; - ms[3] = ms[1]; - } else if(len == 3) { - ms[3] = ms[1]; - } - - return { - top :parseInt(ms[0], 10) || 0, - right :parseInt(ms[1], 10) || 0, - bottom:parseInt(ms[2], 10) || 0, - left :parseInt(ms[3], 10) || 0 - }; - }, - - /** - * The {@link Ext.Template Ext.Template} used by Field rendering layout classes (such as - * {@link Ext.layout.FormLayout}) to create the DOM structure of a fully wrapped, - * labeled and styled form Field. A default Template is supplied, but this may be - * overriden to create custom field structures. The template processes values returned from - * {@link Ext.layout.FormLayout#getTemplateArgs}. - * @property fieldTpl - * @type Ext.Template - */ - fieldTpl: (function() { - var t = new Ext.Template( - '
      ', - '', - '
      ', - '
      ', - '
      ' - ); - t.disableFormats = true; - return t.compile(); - })(), - - /* - * Destroys this layout. This is a template method that is empty by default, but should be implemented - * by subclasses that require explicit destruction to purge event handlers or remove DOM nodes. - * @protected - */ - destroy : function(){ - // Stop any buffered layout tasks - if(this.resizeTask && this.resizeTask.cancel){ - this.resizeTask.cancel(); - } - if(this.container) { - this.container.un(this.container.resizeEvent, this.onResize, this); - } - if(!Ext.isEmpty(this.targetCls)){ - var target = this.container.getLayoutTarget(); - if(target){ - target.removeClass(this.targetCls); - } - } - } -});/** - * @class Ext.layout.AutoLayout - *

      The AutoLayout is the default layout manager delegated by {@link Ext.Container} to - * render any child Components when no {@link Ext.Container#layout layout} is configured into - * a {@link Ext.Container Container}.. AutoLayout provides only a passthrough of any layout calls - * to any child containers.

      - */ -Ext.layout.AutoLayout = Ext.extend(Ext.layout.ContainerLayout, { - type: 'auto', - - monitorResize: true, - - onLayout : function(ct, target){ - Ext.layout.AutoLayout.superclass.onLayout.call(this, ct, target); - var cs = this.getRenderedItems(ct), len = cs.length, i, c; - for(i = 0; i < len; i++){ - c = cs[i]; - if (c.doLayout){ - // Shallow layout children - c.doLayout(true); - } - } - } -}); - -Ext.Container.LAYOUTS['auto'] = Ext.layout.AutoLayout; -/** - * @class Ext.layout.FitLayout - * @extends Ext.layout.ContainerLayout - *

      This is a base class for layouts that contain a single item that automatically expands to fill the layout's - * container. This class is intended to be extended or created via the layout:'fit' {@link Ext.Container#layout} - * config, and should generally not need to be created directly via the new keyword.

      - *

      FitLayout does not have any direct config options (other than inherited ones). To fit a panel to a container - * using FitLayout, simply set layout:'fit' on the container and add a single panel to it. If the container has - * multiple panels, only the first one will be displayed. Example usage:

      - *
      
      -var p = new Ext.Panel({
      -    title: 'Fit Layout',
      -    layout:'fit',
      -    items: {
      -        title: 'Inner Panel',
      -        html: '<p>This is the inner panel content</p>',
      -        border: false
      -    }
      -});
      -
      - */ -Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, { - // private - monitorResize:true, - - type: 'fit', - - getLayoutTargetSize : function() { - var target = this.container.getLayoutTarget(); - if (!target) { - return {}; - } - // Style Sized (scrollbars not included) - return target.getStyleSize(); - }, - - // private - onLayout : function(ct, target){ - Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target); - if(!ct.collapsed){ - this.setItemSize(this.activeItem || ct.items.itemAt(0), this.getLayoutTargetSize()); - } - }, - - // private - setItemSize : function(item, size){ - if(item && size.height > 0){ // display none? - item.setSize(size); - } - } -}); -Ext.Container.LAYOUTS['fit'] = Ext.layout.FitLayout;/** - * @class Ext.layout.CardLayout - * @extends Ext.layout.FitLayout - *

      This layout manages multiple child Components, each fitted to the Container, where only a single child Component can be - * visible at any given time. This layout style is most commonly used for wizards, tab implementations, etc. - * This class is intended to be extended or created via the layout:'card' {@link Ext.Container#layout} config, - * and should generally not need to be created directly via the new keyword.

      - *

      The CardLayout's focal method is {@link #setActiveItem}. Since only one panel is displayed at a time, - * the only way to move from one Component to the next is by calling setActiveItem, passing the id or index of - * the next panel to display. The layout itself does not provide a user interface for handling this navigation, - * so that functionality must be provided by the developer.

      - *

      In the following example, a simplistic wizard setup is demonstrated. A button bar is added - * to the footer of the containing panel to provide navigation buttons. The buttons will be handled by a - * common navigation routine -- for this example, the implementation of that routine has been ommitted since - * it can be any type of custom logic. Note that other uses of a CardLayout (like a tab control) would require a - * completely different implementation. For serious implementations, a better approach would be to extend - * CardLayout to provide the custom functionality needed. Example usage:

      - *
      
      -var navHandler = function(direction){
      -    // This routine could contain business logic required to manage the navigation steps.
      -    // It would call setActiveItem as needed, manage navigation button state, handle any
      -    // branching logic that might be required, handle alternate actions like cancellation
      -    // or finalization, etc.  A complete wizard implementation could get pretty
      -    // sophisticated depending on the complexity required, and should probably be
      -    // done as a subclass of CardLayout in a real-world implementation.
      -};
      -
      -var card = new Ext.Panel({
      -    title: 'Example Wizard',
      -    layout:'card',
      -    activeItem: 0, // make sure the active item is set on the container config!
      -    bodyStyle: 'padding:15px',
      -    defaults: {
      -        // applied to each contained panel
      -        border:false
      -    },
      -    // just an example of one possible navigation scheme, using buttons
      -    bbar: [
      -        {
      -            id: 'move-prev',
      -            text: 'Back',
      -            handler: navHandler.createDelegate(this, [-1]),
      -            disabled: true
      -        },
      -        '->', // greedy spacer so that the buttons are aligned to each side
      -        {
      -            id: 'move-next',
      -            text: 'Next',
      -            handler: navHandler.createDelegate(this, [1])
      -        }
      -    ],
      -    // the panels (or "cards") within the layout
      -    items: [{
      -        id: 'card-0',
      -        html: '<h1>Welcome to the Wizard!</h1><p>Step 1 of 3</p>'
      -    },{
      -        id: 'card-1',
      -        html: '<p>Step 2 of 3</p>'
      -    },{
      -        id: 'card-2',
      -        html: '<h1>Congratulations!</h1><p>Step 3 of 3 - Complete</p>'
      -    }]
      -});
      -
      - */ -Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, { - /** - * @cfg {Boolean} deferredRender - * True to render each contained item at the time it becomes active, false to render all contained items - * as soon as the layout is rendered (defaults to false). If there is a significant amount of content or - * a lot of heavy controls being rendered into panels that are not displayed by default, setting this to - * true might improve performance. - */ - deferredRender : false, - - /** - * @cfg {Boolean} layoutOnCardChange - * True to force a layout of the active item when the active card is changed. Defaults to false. - */ - layoutOnCardChange : false, - - /** - * @cfg {Boolean} renderHidden @hide - */ - // private - renderHidden : true, - - type: 'card', - - /** - * Sets the active (visible) item in the layout. - * @param {String/Number} item The string component id or numeric index of the item to activate - */ - setActiveItem : function(item){ - var ai = this.activeItem, - ct = this.container; - item = ct.getComponent(item); - - // Is this a valid, different card? - if(item && ai != item){ - - // Changing cards, hide the current one - if(ai){ - ai.hide(); - if (ai.hidden !== true) { - return false; - } - ai.fireEvent('deactivate', ai); - } - - var layout = item.doLayout && (this.layoutOnCardChange || !item.rendered); - - // Change activeItem reference - this.activeItem = item; - - // The container is about to get a recursive layout, remove any deferLayout reference - // because it will trigger a redundant layout. - delete item.deferLayout; - - // Show the new component - item.show(); - - this.layout(); - - if(layout){ - item.doLayout(); - } - item.fireEvent('activate', item); - } - }, - - // private - renderAll : function(ct, target){ - if(this.deferredRender){ - this.renderItem(this.activeItem, undefined, target); - }else{ - Ext.layout.CardLayout.superclass.renderAll.call(this, ct, target); - } - } -}); -Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout; -/** - * @class Ext.layout.AnchorLayout - * @extends Ext.layout.ContainerLayout - *

      This is a layout that enables anchoring of contained elements relative to the container's dimensions. - * If the container is resized, all anchored items are automatically rerendered according to their - * {@link #anchor} rules.

      - *

      This class is intended to be extended or created via the layout:'anchor' {@link Ext.Container#layout} - * config, and should generally not need to be created directly via the new keyword.

      - *

      AnchorLayout does not have any direct config options (other than inherited ones). By default, - * AnchorLayout will calculate anchor measurements based on the size of the container itself. However, the - * container using the AnchorLayout can supply an anchoring-specific config property of anchorSize. - * If anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating - * anchor measurements based on it instead, allowing the container to be sized independently of the anchoring - * logic if necessary. For example:

      - *
      
      -var viewport = new Ext.Viewport({
      -    layout:'anchor',
      -    anchorSize: {width:800, height:600},
      -    items:[{
      -        title:'Item 1',
      -        html:'Content 1',
      -        width:800,
      -        anchor:'right 20%'
      -    },{
      -        title:'Item 2',
      -        html:'Content 2',
      -        width:300,
      -        anchor:'50% 30%'
      -    },{
      -        title:'Item 3',
      -        html:'Content 3',
      -        width:600,
      -        anchor:'-100 50%'
      -    }]
      -});
      - * 
      - */ -Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, { - /** - * @cfg {String} anchor - *

      This configuation option is to be applied to child items of a container managed by - * this layout (ie. configured with layout:'anchor').


      - * - *

      This value is what tells the layout how an item should be anchored to the container. items - * added to an AnchorLayout accept an anchoring-specific config property of anchor which is a string - * containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%'). - * The following types of anchor values are supported:

        - * - *
      • Percentage : Any value between 1 and 100, expressed as a percentage.
        - * The first anchor is the percentage width that the item should take up within the container, and the - * second is the percentage height. For example:
        
        -// two values specified
        -anchor: '100% 50%' // render item complete width of the container and
        -                   // 1/2 height of the container
        -// one value specified
        -anchor: '100%'     // the width value; the height will default to auto
        -     * 
      • - * - *
      • Offsets : Any positive or negative integer value.
        - * This is a raw adjustment where the first anchor is the offset from the right edge of the container, - * and the second is the offset from the bottom edge. For example:
        
        -// two values specified
        -anchor: '-50 -100' // render item the complete width of the container
        -                   // minus 50 pixels and
        -                   // the complete height minus 100 pixels.
        -// one value specified
        -anchor: '-50'      // anchor value is assumed to be the right offset value
        -                   // bottom offset will default to 0
        -     * 
      • - * - *
      • Sides : Valid values are 'right' (or 'r') and 'bottom' - * (or 'b').
        - * Either the container must have a fixed size or an anchorSize config value defined at render time in - * order for these to have any effect.
      • - * - *
      • Mixed :
        - * Anchor values can also be mixed as needed. For example, to render the width offset from the container - * right edge by 50 pixels and 75% of the container's height use: - *
        
        -anchor: '-50 75%'
        -     * 
      • - * - * - *
      - */ - - // private - monitorResize : true, - - type : 'anchor', - - /** - * @cfg {String} defaultAnchor - * - * default anchor for all child container items applied if no anchor or specific width is set on the child item. Defaults to '100%'. - * - */ - defaultAnchor : '100%', - - parseAnchorRE : /^(r|right|b|bottom)$/i, - - - getLayoutTargetSize : function() { - var target = this.container.getLayoutTarget(), ret = {}; - if (target) { - ret = target.getViewSize(); - - // IE in strict mode will return a width of 0 on the 1st pass of getViewSize. - // Use getStyleSize to verify the 0 width, the adjustment pass will then work properly - // with getViewSize - if (Ext.isIE && Ext.isStrict && ret.width == 0){ - ret = target.getStyleSize(); - } - ret.width -= target.getPadding('lr'); - ret.height -= target.getPadding('tb'); - } - return ret; - }, - - // private - onLayout : function(container, target) { - Ext.layout.AnchorLayout.superclass.onLayout.call(this, container, target); - - var size = this.getLayoutTargetSize(), - containerWidth = size.width, - containerHeight = size.height, - overflow = target.getStyle('overflow'), - components = this.getRenderedItems(container), - len = components.length, - boxes = [], - box, - anchorWidth, - anchorHeight, - component, - anchorSpec, - calcWidth, - calcHeight, - anchorsArray, - totalHeight = 0, - i, - el; - - if(containerWidth < 20 && containerHeight < 20){ - return; - } - - // find the container anchoring size - if(container.anchorSize) { - if(typeof container.anchorSize == 'number') { - anchorWidth = container.anchorSize; - } else { - anchorWidth = container.anchorSize.width; - anchorHeight = container.anchorSize.height; - } - } else { - anchorWidth = container.initialConfig.width; - anchorHeight = container.initialConfig.height; - } - - for(i = 0; i < len; i++) { - component = components[i]; - el = component.getPositionEl(); - - // If a child container item has no anchor and no specific width, set the child to the default anchor size - if (!component.anchor && component.items && !Ext.isNumber(component.width) && !(Ext.isIE6 && Ext.isStrict)){ - component.anchor = this.defaultAnchor; - } - - if(component.anchor) { - anchorSpec = component.anchorSpec; - // cache all anchor values - if(!anchorSpec){ - anchorsArray = component.anchor.split(' '); - component.anchorSpec = anchorSpec = { - right: this.parseAnchor(anchorsArray[0], component.initialConfig.width, anchorWidth), - bottom: this.parseAnchor(anchorsArray[1], component.initialConfig.height, anchorHeight) - }; - } - calcWidth = anchorSpec.right ? this.adjustWidthAnchor(anchorSpec.right(containerWidth) - el.getMargins('lr'), component) : undefined; - calcHeight = anchorSpec.bottom ? this.adjustHeightAnchor(anchorSpec.bottom(containerHeight) - el.getMargins('tb'), component) : undefined; - - if(calcWidth || calcHeight) { - boxes.push({ - component: component, - width: calcWidth || undefined, - height: calcHeight || undefined - }); - } - } - } - for (i = 0, len = boxes.length; i < len; i++) { - box = boxes[i]; - box.component.setSize(box.width, box.height); - } - - if (overflow && overflow != 'hidden' && !this.adjustmentPass) { - var newTargetSize = this.getLayoutTargetSize(); - if (newTargetSize.width != size.width || newTargetSize.height != size.height){ - this.adjustmentPass = true; - this.onLayout(container, target); - } - } - - delete this.adjustmentPass; - }, - - // private - parseAnchor : function(a, start, cstart) { - if (a && a != 'none') { - var last; - // standard anchor - if (this.parseAnchorRE.test(a)) { - var diff = cstart - start; - return function(v){ - if(v !== last){ - last = v; - return v - diff; - } - }; - // percentage - } else if(a.indexOf('%') != -1) { - var ratio = parseFloat(a.replace('%', ''))*.01; - return function(v){ - if(v !== last){ - last = v; - return Math.floor(v*ratio); - } - }; - // simple offset adjustment - } else { - a = parseInt(a, 10); - if (!isNaN(a)) { - return function(v) { - if (v !== last) { - last = v; - return v + a; - } - }; - } - } - } - return false; - }, - - // private - adjustWidthAnchor : function(value, comp){ - return value; - }, - - // private - adjustHeightAnchor : function(value, comp){ - return value; - } - - /** - * @property activeItem - * @hide - */ -}); -Ext.Container.LAYOUTS['anchor'] = Ext.layout.AnchorLayout; -/** - * @class Ext.layout.ColumnLayout - * @extends Ext.layout.ContainerLayout - *

      This is the layout style of choice for creating structural layouts in a multi-column format where the width of - * each column can be specified as a percentage or fixed width, but the height is allowed to vary based on the content. - * This class is intended to be extended or created via the layout:'column' {@link Ext.Container#layout} config, - * and should generally not need to be created directly via the new keyword.

      - *

      ColumnLayout does not have any direct config options (other than inherited ones), but it does support a - * specific config property of columnWidth that can be included in the config of any panel added to it. The - * layout will use the columnWidth (if present) or width of each panel during layout to determine how to size each panel. - * If width or columnWidth is not specified for a given panel, its width will default to the panel's width (or auto).

      - *

      The width property is always evaluated as pixels, and must be a number greater than or equal to 1. - * The columnWidth property is always evaluated as a percentage, and must be a decimal value greater than 0 and - * less than 1 (e.g., .25).

      - *

      The basic rules for specifying column widths are pretty simple. The logic makes two passes through the - * set of contained panels. During the first layout pass, all panels that either have a fixed width or none - * specified (auto) are skipped, but their widths are subtracted from the overall container width. During the second - * pass, all panels with columnWidths are assigned pixel widths in proportion to their percentages based on - * the total remaining container width. In other words, percentage width panels are designed to fill the space - * left over by all the fixed-width and/or auto-width panels. Because of this, while you can specify any number of columns - * with different percentages, the columnWidths must always add up to 1 (or 100%) when added together, otherwise your - * layout may not render as expected. Example usage:

      - *
      
      -// All columns are percentages -- they must add up to 1
      -var p = new Ext.Panel({
      -    title: 'Column Layout - Percentage Only',
      -    layout:'column',
      -    items: [{
      -        title: 'Column 1',
      -        columnWidth: .25
      -    },{
      -        title: 'Column 2',
      -        columnWidth: .6
      -    },{
      -        title: 'Column 3',
      -        columnWidth: .15
      -    }]
      -});
      -
      -// Mix of width and columnWidth -- all columnWidth values must add up
      -// to 1. The first column will take up exactly 120px, and the last two
      -// columns will fill the remaining container width.
      -var p = new Ext.Panel({
      -    title: 'Column Layout - Mixed',
      -    layout:'column',
      -    items: [{
      -        title: 'Column 1',
      -        width: 120
      -    },{
      -        title: 'Column 2',
      -        columnWidth: .8
      -    },{
      -        title: 'Column 3',
      -        columnWidth: .2
      -    }]
      -});
      -
      - */ -Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { - // private - monitorResize:true, - - type: 'column', - - extraCls: 'x-column', - - scrollOffset : 0, - - // private - - targetCls: 'x-column-layout-ct', - - isValidParent : function(c, target){ - return this.innerCt && c.getPositionEl().dom.parentNode == this.innerCt.dom; - }, - - getLayoutTargetSize : function() { - var target = this.container.getLayoutTarget(), ret; - if (target) { - ret = target.getViewSize(); - - // IE in strict mode will return a width of 0 on the 1st pass of getViewSize. - // Use getStyleSize to verify the 0 width, the adjustment pass will then work properly - // with getViewSize - if (Ext.isIE && Ext.isStrict && ret.width == 0){ - ret = target.getStyleSize(); - } - - ret.width -= target.getPadding('lr'); - ret.height -= target.getPadding('tb'); - } - return ret; - }, - - renderAll : function(ct, target) { - if(!this.innerCt){ - // the innerCt prevents wrapping and shuffling while - // the container is resizing - this.innerCt = target.createChild({cls:'x-column-inner'}); - this.innerCt.createChild({cls:'x-clear'}); - } - Ext.layout.ColumnLayout.superclass.renderAll.call(this, ct, this.innerCt); - }, - - // private - onLayout : function(ct, target){ - var cs = ct.items.items, - len = cs.length, - c, - i, - m, - margins = []; - - this.renderAll(ct, target); - - var size = this.getLayoutTargetSize(); - - if(size.width < 1 && size.height < 1){ // display none? - return; - } - - var w = size.width - this.scrollOffset, - h = size.height, - pw = w; - - this.innerCt.setWidth(w); - - // some columns can be percentages while others are fixed - // so we need to make 2 passes - - for(i = 0; i < len; i++){ - c = cs[i]; - m = c.getPositionEl().getMargins('lr'); - margins[i] = m; - if(!c.columnWidth){ - pw -= (c.getWidth() + m); - } - } - - pw = pw < 0 ? 0 : pw; - - for(i = 0; i < len; i++){ - c = cs[i]; - m = margins[i]; - if(c.columnWidth){ - c.setSize(Math.floor(c.columnWidth * pw) - m); - } - } - - // Browsers differ as to when they account for scrollbars. We need to re-measure to see if the scrollbar - // spaces were accounted for properly. If not, re-layout. - if (Ext.isIE) { - if (i = target.getStyle('overflow') && i != 'hidden' && !this.adjustmentPass) { - var ts = this.getLayoutTargetSize(); - if (ts.width != size.width){ - this.adjustmentPass = true; - this.onLayout(ct, target); - } - } - } - delete this.adjustmentPass; - } - - /** - * @property activeItem - * @hide - */ -}); - -Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout; -/** - * @class Ext.layout.BorderLayout - * @extends Ext.layout.ContainerLayout - *

      This is a multi-pane, application-oriented UI layout style that supports multiple - * nested panels, automatic {@link Ext.layout.BorderLayout.Region#split split} bars between - * {@link Ext.layout.BorderLayout.Region#BorderLayout.Region regions} and built-in - * {@link Ext.layout.BorderLayout.Region#collapsible expanding and collapsing} of regions.

      - *

      This class is intended to be extended or created via the layout:'border' - * {@link Ext.Container#layout} config, and should generally not need to be created directly - * via the new keyword.

      - *

      BorderLayout does not have any direct config options (other than inherited ones). - * All configuration options available for customizing the BorderLayout are at the - * {@link Ext.layout.BorderLayout.Region} and {@link Ext.layout.BorderLayout.SplitRegion} - * levels.

      - *

      Example usage:

      - *
      
      -var myBorderPanel = new Ext.Panel({
      -    {@link Ext.Component#renderTo renderTo}: document.body,
      -    {@link Ext.BoxComponent#width width}: 700,
      -    {@link Ext.BoxComponent#height height}: 500,
      -    {@link Ext.Panel#title title}: 'Border Layout',
      -    {@link Ext.Container#layout layout}: 'border',
      -    {@link Ext.Container#items items}: [{
      -        {@link Ext.Panel#title title}: 'South Region is resizable',
      -        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}: 'south',     // position for region
      -        {@link Ext.BoxComponent#height height}: 100,
      -        {@link Ext.layout.BorderLayout.Region#split split}: true,         // enable resizing
      -        {@link Ext.SplitBar#minSize minSize}: 75,         // defaults to {@link Ext.layout.BorderLayout.Region#minHeight 50}
      -        {@link Ext.SplitBar#maxSize maxSize}: 150,
      -        {@link Ext.layout.BorderLayout.Region#margins margins}: '0 5 5 5'
      -    },{
      -        // xtype: 'panel' implied by default
      -        {@link Ext.Panel#title title}: 'West Region is collapsible',
      -        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}:'west',
      -        {@link Ext.layout.BorderLayout.Region#margins margins}: '5 0 0 5',
      -        {@link Ext.BoxComponent#width width}: 200,
      -        {@link Ext.layout.BorderLayout.Region#collapsible collapsible}: true,   // make collapsible
      -        {@link Ext.layout.BorderLayout.Region#cmargins cmargins}: '5 5 0 5', // adjust top margin when collapsed
      -        {@link Ext.Component#id id}: 'west-region-container',
      -        {@link Ext.Container#layout layout}: 'fit',
      -        {@link Ext.Panel#unstyled unstyled}: true
      -    },{
      -        {@link Ext.Panel#title title}: 'Center Region',
      -        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}: 'center',     // center region is required, no width/height specified
      -        {@link Ext.Component#xtype xtype}: 'container',
      -        {@link Ext.Container#layout layout}: 'fit',
      -        {@link Ext.layout.BorderLayout.Region#margins margins}: '5 5 0 0'
      -    }]
      -});
      -
      - *

      Notes:

        - *
      • Any container using the BorderLayout must have a child item with region:'center'. - * The child item in the center region will always be resized to fill the remaining space not used by - * the other regions in the layout.
      • - *
      • Any child items with a region of west or east must have width defined - * (an integer representing the number of pixels that the region should take up).
      • - *
      • Any child items with a region of north or south must have height defined.
      • - *
      • The regions of a BorderLayout are fixed at render time and thereafter, its child Components may not be removed or added. To add/remove - * Components within a BorderLayout, have them wrapped by an additional Container which is directly - * managed by the BorderLayout. If the region is to be collapsible, the Container used directly - * by the BorderLayout manager should be a Panel. In the following example a Container (an Ext.Panel) - * is added to the west region: - *
        
        -wrc = {@link Ext#getCmp Ext.getCmp}('west-region-container');
        -wrc.{@link Ext.Panel#removeAll removeAll}();
        -wrc.{@link Ext.Container#add add}({
        -    title: 'Added Panel',
        -    html: 'Some content'
        -});
        -wrc.{@link Ext.Container#doLayout doLayout}();
        - * 
        - *
      • - *
      • To reference a {@link Ext.layout.BorderLayout.Region Region}: - *
        
        -wr = myBorderPanel.layout.west;
        - * 
        - *
      • - *
      - */ -Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, { - // private - monitorResize:true, - // private - rendered : false, - - type: 'border', - - targetCls: 'x-border-layout-ct', - - getLayoutTargetSize : function() { - var target = this.container.getLayoutTarget(); - return target ? target.getViewSize() : {}; - }, - - // private - onLayout : function(ct, target){ - var collapsed, i, c, pos, items = ct.items.items, len = items.length; - if(!this.rendered){ - collapsed = []; - for(i = 0; i < len; i++) { - c = items[i]; - pos = c.region; - if(c.collapsed){ - collapsed.push(c); - } - c.collapsed = false; - if(!c.rendered){ - c.render(target, i); - c.getPositionEl().addClass('x-border-panel'); - } - this[pos] = pos != 'center' && c.split ? - new Ext.layout.BorderLayout.SplitRegion(this, c.initialConfig, pos) : - new Ext.layout.BorderLayout.Region(this, c.initialConfig, pos); - this[pos].render(target, c); - } - this.rendered = true; - } - - var size = this.getLayoutTargetSize(); - if(size.width < 20 || size.height < 20){ // display none? - if(collapsed){ - this.restoreCollapsed = collapsed; - } - return; - }else if(this.restoreCollapsed){ - collapsed = this.restoreCollapsed; - delete this.restoreCollapsed; - } - - var w = size.width, h = size.height, - centerW = w, centerH = h, centerY = 0, centerX = 0, - n = this.north, s = this.south, west = this.west, e = this.east, c = this.center, - b, m, totalWidth, totalHeight; - if(!c && Ext.layout.BorderLayout.WARN !== false){ - throw 'No center region defined in BorderLayout ' + ct.id; - } - - if(n && n.isVisible()){ - b = n.getSize(); - m = n.getMargins(); - b.width = w - (m.left+m.right); - b.x = m.left; - b.y = m.top; - centerY = b.height + b.y + m.bottom; - centerH -= centerY; - n.applyLayout(b); - } - if(s && s.isVisible()){ - b = s.getSize(); - m = s.getMargins(); - b.width = w - (m.left+m.right); - b.x = m.left; - totalHeight = (b.height + m.top + m.bottom); - b.y = h - totalHeight + m.top; - centerH -= totalHeight; - s.applyLayout(b); - } - if(west && west.isVisible()){ - b = west.getSize(); - m = west.getMargins(); - b.height = centerH - (m.top+m.bottom); - b.x = m.left; - b.y = centerY + m.top; - totalWidth = (b.width + m.left + m.right); - centerX += totalWidth; - centerW -= totalWidth; - west.applyLayout(b); - } - if(e && e.isVisible()){ - b = e.getSize(); - m = e.getMargins(); - b.height = centerH - (m.top+m.bottom); - totalWidth = (b.width + m.left + m.right); - b.x = w - totalWidth + m.left; - b.y = centerY + m.top; - centerW -= totalWidth; - e.applyLayout(b); - } - if(c){ - m = c.getMargins(); - var centerBox = { - x: centerX + m.left, - y: centerY + m.top, - width: centerW - (m.left+m.right), - height: centerH - (m.top+m.bottom) - }; - c.applyLayout(centerBox); - } - if(collapsed){ - for(i = 0, len = collapsed.length; i < len; i++){ - collapsed[i].collapse(false); - } - } - if(Ext.isIE && Ext.isStrict){ // workaround IE strict repainting issue - target.repaint(); - } - // Putting a border layout into an overflowed container is NOT correct and will make a second layout pass necessary. - if (i = target.getStyle('overflow') && i != 'hidden' && !this.adjustmentPass) { - var ts = this.getLayoutTargetSize(); - if (ts.width != size.width || ts.height != size.height){ - this.adjustmentPass = true; - this.onLayout(ct, target); - } - } - delete this.adjustmentPass; - }, - - destroy: function() { - var r = ['north', 'south', 'east', 'west'], i, region; - for (i = 0; i < r.length; i++) { - region = this[r[i]]; - if(region){ - if(region.destroy){ - region.destroy(); - }else if (region.split){ - region.split.destroy(true); - } - } - } - Ext.layout.BorderLayout.superclass.destroy.call(this); - } - - /** - * @property activeItem - * @hide - */ -}); - -/** - * @class Ext.layout.BorderLayout.Region - *

      This is a region of a {@link Ext.layout.BorderLayout BorderLayout} that acts as a subcontainer - * within the layout. Each region has its own {@link Ext.layout.ContainerLayout layout} that is - * independent of other regions and the containing BorderLayout, and can be any of the - * {@link Ext.layout.ContainerLayout valid Ext layout types}.

      - *

      Region size is managed automatically and cannot be changed by the user -- for - * {@link #split resizable regions}, see {@link Ext.layout.BorderLayout.SplitRegion}.

      - * @constructor - * Create a new Region. - * @param {Layout} layout The {@link Ext.layout.BorderLayout BorderLayout} instance that is managing this Region. - * @param {Object} config The configuration options - * @param {String} position The region position. Valid values are: north, south, - * east, west and center. Every {@link Ext.layout.BorderLayout BorderLayout} - * must have a center region for the primary content -- all other regions are optional. - */ -Ext.layout.BorderLayout.Region = function(layout, config, pos){ - Ext.apply(this, config); - this.layout = layout; - this.position = pos; - this.state = {}; - if(typeof this.margins == 'string'){ - this.margins = this.layout.parseMargins(this.margins); - } - this.margins = Ext.applyIf(this.margins || {}, this.defaultMargins); - if(this.collapsible){ - if(typeof this.cmargins == 'string'){ - this.cmargins = this.layout.parseMargins(this.cmargins); - } - if(this.collapseMode == 'mini' && !this.cmargins){ - this.cmargins = {left:0,top:0,right:0,bottom:0}; - }else{ - this.cmargins = Ext.applyIf(this.cmargins || {}, - pos == 'north' || pos == 'south' ? this.defaultNSCMargins : this.defaultEWCMargins); - } - } -}; - -Ext.layout.BorderLayout.Region.prototype = { - /** - * @cfg {Boolean} animFloat - * When a collapsed region's bar is clicked, the region's panel will be displayed as a floated - * panel that will close again once the user mouses out of that panel (or clicks out if - * {@link #autoHide} = false). Setting {@link #animFloat} = false will - * prevent the open and close of these floated panels from being animated (defaults to true). - */ - /** - * @cfg {Boolean} autoHide - * When a collapsed region's bar is clicked, the region's panel will be displayed as a floated - * panel. If autoHide = true, the panel will automatically hide after the user mouses - * out of the panel. If autoHide = false, the panel will continue to display until the - * user clicks outside of the panel (defaults to true). - */ - /** - * @cfg {String} collapseMode - * collapseMode supports two configuration values:
        - *
      • undefined (default)
        By default, {@link #collapsible} - * regions are collapsed by clicking the expand/collapse tool button that renders into the region's - * title bar.
      • - *
      • 'mini'
        Optionally, when collapseMode is set to - * 'mini' the region's split bar will also display a small collapse button in the center of - * the bar. In 'mini' mode the region will collapse to a thinner bar than in normal mode. - *
      • - *

      - *

      Note: if a collapsible region does not have a title bar, then set collapseMode = - * 'mini' and {@link #split} = true in order for the region to be {@link #collapsible} - * by the user as the expand/collapse tool button (that would go in the title bar) will not be rendered.

      - *

      See also {@link #cmargins}.

      - */ - /** - * @cfg {Object} margins - * An object containing margins to apply to the region when in the expanded state in the - * format:
      
      -{
      -    top: (top margin),
      -    right: (right margin),
      -    bottom: (bottom margin),
      -    left: (left margin)
      -}
      - *

      May also be a string containing space-separated, numeric margin values. The order of the - * sides associated with each value matches the way CSS processes margin values:

      - *

        - *
      • If there is only one value, it applies to all sides.
      • - *
      • If there are two values, the top and bottom borders are set to the first value and the - * right and left are set to the second.
      • - *
      • If there are three values, the top is set to the first value, the left and right are set - * to the second, and the bottom is set to the third.
      • - *
      • If there are four values, they apply to the top, right, bottom, and left, respectively.
      • - *

      - *

      Defaults to:

      
      -     * {top:0, right:0, bottom:0, left:0}
      -     * 
      - */ - /** - * @cfg {Object} cmargins - * An object containing margins to apply to the region when in the collapsed state in the - * format:
      
      -{
      -    top: (top margin),
      -    right: (right margin),
      -    bottom: (bottom margin),
      -    left: (left margin)
      -}
      - *

      May also be a string containing space-separated, numeric margin values. The order of the - * sides associated with each value matches the way CSS processes margin values.

      - *

        - *
      • If there is only one value, it applies to all sides.
      • - *
      • If there are two values, the top and bottom borders are set to the first value and the - * right and left are set to the second.
      • - *
      • If there are three values, the top is set to the first value, the left and right are set - * to the second, and the bottom is set to the third.
      • - *
      • If there are four values, they apply to the top, right, bottom, and left, respectively.
      • - *

      - */ - /** - * @cfg {Boolean} collapsible - *

      true to allow the user to collapse this region (defaults to false). If - * true, an expand/collapse tool button will automatically be rendered into the title - * bar of the region, otherwise the button will not be shown.

      - *

      Note: that a title bar is required to display the collapse/expand toggle button -- if - * no title is specified for the region's panel, the region will only be collapsible if - * {@link #collapseMode} = 'mini' and {@link #split} = true. - */ - collapsible : false, - /** - * @cfg {Boolean} split - *

      true to create a {@link Ext.layout.BorderLayout.SplitRegion SplitRegion} and - * display a 5px wide {@link Ext.SplitBar} between this region and its neighbor, allowing the user to - * resize the regions dynamically. Defaults to false creating a - * {@link Ext.layout.BorderLayout.Region Region}.


      - *

      Notes:

        - *
      • this configuration option is ignored if region='center'
      • - *
      • when split == true, it is common to specify a - * {@link Ext.SplitBar#minSize minSize} and {@link Ext.SplitBar#maxSize maxSize} - * for the {@link Ext.BoxComponent BoxComponent} representing the region. These are not native - * configs of {@link Ext.BoxComponent BoxComponent}, and are used only by this class.
      • - *
      • if {@link #collapseMode} = 'mini' requires split = true to reserve space - * for the collapse tool
      • - *
      - */ - split:false, - /** - * @cfg {Boolean} floatable - * true to allow clicking a collapsed region's bar to display the region's panel floated - * above the layout, false to force the user to fully expand a collapsed region by - * clicking the expand button to see it again (defaults to true). - */ - floatable: true, - /** - * @cfg {Number} minWidth - *

      The minimum allowable width in pixels for this region (defaults to 50). - * maxWidth may also be specified.


      - *

      Note: setting the {@link Ext.SplitBar#minSize minSize} / - * {@link Ext.SplitBar#maxSize maxSize} supersedes any specified - * minWidth / maxWidth.

      - */ - minWidth:50, - /** - * @cfg {Number} minHeight - * The minimum allowable height in pixels for this region (defaults to 50) - * maxHeight may also be specified.


      - *

      Note: setting the {@link Ext.SplitBar#minSize minSize} / - * {@link Ext.SplitBar#maxSize maxSize} supersedes any specified - * minHeight / maxHeight.

      - */ - minHeight:50, - - // private - defaultMargins : {left:0,top:0,right:0,bottom:0}, - // private - defaultNSCMargins : {left:5,top:5,right:5,bottom:5}, - // private - defaultEWCMargins : {left:5,top:0,right:5,bottom:0}, - floatingZIndex: 100, - - /** - * True if this region is collapsed. Read-only. - * @type Boolean - * @property - */ - isCollapsed : false, - - /** - * This region's panel. Read-only. - * @type Ext.Panel - * @property panel - */ - /** - * This region's layout. Read-only. - * @type Layout - * @property layout - */ - /** - * This region's layout position (north, south, east, west or center). Read-only. - * @type String - * @property position - */ - - // private - render : function(ct, p){ - this.panel = p; - p.el.enableDisplayMode(); - this.targetEl = ct; - this.el = p.el; - - var gs = p.getState, ps = this.position; - p.getState = function(){ - return Ext.apply(gs.call(p) || {}, this.state); - }.createDelegate(this); - - if(ps != 'center'){ - p.allowQueuedExpand = false; - p.on({ - beforecollapse: this.beforeCollapse, - collapse: this.onCollapse, - beforeexpand: this.beforeExpand, - expand: this.onExpand, - hide: this.onHide, - show: this.onShow, - scope: this - }); - if(this.collapsible || this.floatable){ - p.collapseEl = 'el'; - p.slideAnchor = this.getSlideAnchor(); - } - if(p.tools && p.tools.toggle){ - p.tools.toggle.addClass('x-tool-collapse-'+ps); - p.tools.toggle.addClassOnOver('x-tool-collapse-'+ps+'-over'); - } - } - }, - - // private - getCollapsedEl : function(){ - if(!this.collapsedEl){ - if(!this.toolTemplate){ - var tt = new Ext.Template( - '
       
      ' - ); - tt.disableFormats = true; - tt.compile(); - Ext.layout.BorderLayout.Region.prototype.toolTemplate = tt; - } - this.collapsedEl = this.targetEl.createChild({ - cls: "x-layout-collapsed x-layout-collapsed-"+this.position, - id: this.panel.id + '-xcollapsed' - }); - this.collapsedEl.enableDisplayMode('block'); - - if(this.collapseMode == 'mini'){ - this.collapsedEl.addClass('x-layout-cmini-'+this.position); - this.miniCollapsedEl = this.collapsedEl.createChild({ - cls: "x-layout-mini x-layout-mini-"+this.position, html: " " - }); - this.miniCollapsedEl.addClassOnOver('x-layout-mini-over'); - this.collapsedEl.addClassOnOver("x-layout-collapsed-over"); - this.collapsedEl.on('click', this.onExpandClick, this, {stopEvent:true}); - }else { - if(this.collapsible !== false && !this.hideCollapseTool) { - var t = this.expandToolEl = this.toolTemplate.append( - this.collapsedEl.dom, - {id:'expand-'+this.position}, true); - t.addClassOnOver('x-tool-expand-'+this.position+'-over'); - t.on('click', this.onExpandClick, this, {stopEvent:true}); - } - if(this.floatable !== false || this.titleCollapse){ - this.collapsedEl.addClassOnOver("x-layout-collapsed-over"); - this.collapsedEl.on("click", this[this.floatable ? 'collapseClick' : 'onExpandClick'], this); - } - } - } - return this.collapsedEl; - }, - - // private - onExpandClick : function(e){ - if(this.isSlid){ - this.panel.expand(false); - }else{ - this.panel.expand(); - } - }, - - // private - onCollapseClick : function(e){ - this.panel.collapse(); - }, - - // private - beforeCollapse : function(p, animate){ - this.lastAnim = animate; - if(this.splitEl){ - this.splitEl.hide(); - } - this.getCollapsedEl().show(); - var el = this.panel.getEl(); - this.originalZIndex = el.getStyle('z-index'); - el.setStyle('z-index', 100); - this.isCollapsed = true; - this.layout.layout(); - }, - - // private - onCollapse : function(animate){ - this.panel.el.setStyle('z-index', 1); - if(this.lastAnim === false || this.panel.animCollapse === false){ - this.getCollapsedEl().dom.style.visibility = 'visible'; - }else{ - this.getCollapsedEl().slideIn(this.panel.slideAnchor, {duration:.2}); - } - this.state.collapsed = true; - this.panel.saveState(); - }, - - // private - beforeExpand : function(animate){ - if(this.isSlid){ - this.afterSlideIn(); - } - var c = this.getCollapsedEl(); - this.el.show(); - if(this.position == 'east' || this.position == 'west'){ - this.panel.setSize(undefined, c.getHeight()); - }else{ - this.panel.setSize(c.getWidth(), undefined); - } - c.hide(); - c.dom.style.visibility = 'hidden'; - this.panel.el.setStyle('z-index', this.floatingZIndex); - }, - - // private - onExpand : function(){ - this.isCollapsed = false; - if(this.splitEl){ - this.splitEl.show(); - } - this.layout.layout(); - this.panel.el.setStyle('z-index', this.originalZIndex); - this.state.collapsed = false; - this.panel.saveState(); - }, - - // private - collapseClick : function(e){ - if(this.isSlid){ - e.stopPropagation(); - this.slideIn(); - }else{ - e.stopPropagation(); - this.slideOut(); - } - }, - - // private - onHide : function(){ - if(this.isCollapsed){ - this.getCollapsedEl().hide(); - }else if(this.splitEl){ - this.splitEl.hide(); - } - }, - - // private - onShow : function(){ - if(this.isCollapsed){ - this.getCollapsedEl().show(); - }else if(this.splitEl){ - this.splitEl.show(); - } - }, - - /** - * True if this region is currently visible, else false. - * @return {Boolean} - */ - isVisible : function(){ - return !this.panel.hidden; - }, - - /** - * Returns the current margins for this region. If the region is collapsed, the - * {@link #cmargins} (collapsed margins) value will be returned, otherwise the - * {@link #margins} value will be returned. - * @return {Object} An object containing the element's margins: {left: (left - * margin), top: (top margin), right: (right margin), bottom: (bottom margin)} - */ - getMargins : function(){ - return this.isCollapsed && this.cmargins ? this.cmargins : this.margins; - }, - - /** - * Returns the current size of this region. If the region is collapsed, the size of the - * collapsedEl will be returned, otherwise the size of the region's panel will be returned. - * @return {Object} An object containing the element's size: {width: (element width), - * height: (element height)} - */ - getSize : function(){ - return this.isCollapsed ? this.getCollapsedEl().getSize() : this.panel.getSize(); - }, - - /** - * Sets the specified panel as the container element for this region. - * @param {Ext.Panel} panel The new panel - */ - setPanel : function(panel){ - this.panel = panel; - }, - - /** - * Returns the minimum allowable width for this region. - * @return {Number} The minimum width - */ - getMinWidth: function(){ - return this.minWidth; - }, - - /** - * Returns the minimum allowable height for this region. - * @return {Number} The minimum height - */ - getMinHeight: function(){ - return this.minHeight; - }, - - // private - applyLayoutCollapsed : function(box){ - var ce = this.getCollapsedEl(); - ce.setLeftTop(box.x, box.y); - ce.setSize(box.width, box.height); - }, - - // private - applyLayout : function(box){ - if(this.isCollapsed){ - this.applyLayoutCollapsed(box); - }else{ - this.panel.setPosition(box.x, box.y); - this.panel.setSize(box.width, box.height); - } - }, - - // private - beforeSlide: function(){ - this.panel.beforeEffect(); - }, - - // private - afterSlide : function(){ - this.panel.afterEffect(); - }, - - // private - initAutoHide : function(){ - if(this.autoHide !== false){ - if(!this.autoHideHd){ - this.autoHideSlideTask = new Ext.util.DelayedTask(this.slideIn, this); - this.autoHideHd = { - "mouseout": function(e){ - if(!e.within(this.el, true)){ - this.autoHideSlideTask.delay(500); - } - }, - "mouseover" : function(e){ - this.autoHideSlideTask.cancel(); - }, - scope : this - }; - } - this.el.on(this.autoHideHd); - this.collapsedEl.on(this.autoHideHd); - } - }, - - // private - clearAutoHide : function(){ - if(this.autoHide !== false){ - this.el.un("mouseout", this.autoHideHd.mouseout); - this.el.un("mouseover", this.autoHideHd.mouseover); - this.collapsedEl.un("mouseout", this.autoHideHd.mouseout); - this.collapsedEl.un("mouseover", this.autoHideHd.mouseover); - } - }, - - // private - clearMonitor : function(){ - Ext.getDoc().un("click", this.slideInIf, this); - }, - - /** - * If this Region is {@link #floatable}, this method slides this Region into full visibility over the top - * of the center Region where it floats until either {@link #slideIn} is called, or other regions of the layout - * are clicked, or the mouse exits the Region. - */ - slideOut : function(){ - if(this.isSlid || this.el.hasActiveFx()){ - return; - } - this.isSlid = true; - var ts = this.panel.tools, dh, pc; - if(ts && ts.toggle){ - ts.toggle.hide(); - } - this.el.show(); - - // Temporarily clear the collapsed flag so we can onResize the panel on the slide - pc = this.panel.collapsed; - this.panel.collapsed = false; - - if(this.position == 'east' || this.position == 'west'){ - // Temporarily clear the deferHeight flag so we can size the height on the slide - dh = this.panel.deferHeight; - this.panel.deferHeight = false; - - this.panel.setSize(undefined, this.collapsedEl.getHeight()); - - // Put the deferHeight flag back after setSize - this.panel.deferHeight = dh; - }else{ - this.panel.setSize(this.collapsedEl.getWidth(), undefined); - } - - // Put the collapsed flag back after onResize - this.panel.collapsed = pc; - - this.restoreLT = [this.el.dom.style.left, this.el.dom.style.top]; - this.el.alignTo(this.collapsedEl, this.getCollapseAnchor()); - this.el.setStyle("z-index", this.floatingZIndex+2); - this.panel.el.replaceClass('x-panel-collapsed', 'x-panel-floating'); - if(this.animFloat !== false){ - this.beforeSlide(); - this.el.slideIn(this.getSlideAnchor(), { - callback: function(){ - this.afterSlide(); - this.initAutoHide(); - Ext.getDoc().on("click", this.slideInIf, this); - }, - scope: this, - block: true - }); - }else{ - this.initAutoHide(); - Ext.getDoc().on("click", this.slideInIf, this); - } - }, - - // private - afterSlideIn : function(){ - this.clearAutoHide(); - this.isSlid = false; - this.clearMonitor(); - this.el.setStyle("z-index", ""); - this.panel.el.replaceClass('x-panel-floating', 'x-panel-collapsed'); - this.el.dom.style.left = this.restoreLT[0]; - this.el.dom.style.top = this.restoreLT[1]; - - var ts = this.panel.tools; - if(ts && ts.toggle){ - ts.toggle.show(); - } - }, - - /** - * If this Region is {@link #floatable}, and this Region has been slid into floating visibility, then this method slides - * this region back into its collapsed state. - */ - slideIn : function(cb){ - if(!this.isSlid || this.el.hasActiveFx()){ - Ext.callback(cb); - return; - } - this.isSlid = false; - if(this.animFloat !== false){ - this.beforeSlide(); - this.el.slideOut(this.getSlideAnchor(), { - callback: function(){ - this.el.hide(); - this.afterSlide(); - this.afterSlideIn(); - Ext.callback(cb); - }, - scope: this, - block: true - }); - }else{ - this.el.hide(); - this.afterSlideIn(); - } - }, - - // private - slideInIf : function(e){ - if(!e.within(this.el)){ - this.slideIn(); - } - }, - - // private - anchors : { - "west" : "left", - "east" : "right", - "north" : "top", - "south" : "bottom" - }, - - // private - sanchors : { - "west" : "l", - "east" : "r", - "north" : "t", - "south" : "b" - }, - - // private - canchors : { - "west" : "tl-tr", - "east" : "tr-tl", - "north" : "tl-bl", - "south" : "bl-tl" - }, - - // private - getAnchor : function(){ - return this.anchors[this.position]; - }, - - // private - getCollapseAnchor : function(){ - return this.canchors[this.position]; - }, - - // private - getSlideAnchor : function(){ - return this.sanchors[this.position]; - }, - - // private - getAlignAdj : function(){ - var cm = this.cmargins; - switch(this.position){ - case "west": - return [0, 0]; - break; - case "east": - return [0, 0]; - break; - case "north": - return [0, 0]; - break; - case "south": - return [0, 0]; - break; - } - }, - - // private - getExpandAdj : function(){ - var c = this.collapsedEl, cm = this.cmargins; - switch(this.position){ - case "west": - return [-(cm.right+c.getWidth()+cm.left), 0]; - break; - case "east": - return [cm.right+c.getWidth()+cm.left, 0]; - break; - case "north": - return [0, -(cm.top+cm.bottom+c.getHeight())]; - break; - case "south": - return [0, cm.top+cm.bottom+c.getHeight()]; - break; - } - }, - - destroy : function(){ - if (this.autoHideSlideTask && this.autoHideSlideTask.cancel){ - this.autoHideSlideTask.cancel(); - } - Ext.destroyMembers(this, 'miniCollapsedEl', 'collapsedEl', 'expandToolEl'); - } -}; - -/** - * @class Ext.layout.BorderLayout.SplitRegion - * @extends Ext.layout.BorderLayout.Region - *

      This is a specialized type of {@link Ext.layout.BorderLayout.Region BorderLayout region} that - * has a built-in {@link Ext.SplitBar} for user resizing of regions. The movement of the split bar - * is configurable to move either {@link #tickSize smooth or incrementally}.

      - * @constructor - * Create a new SplitRegion. - * @param {Layout} layout The {@link Ext.layout.BorderLayout BorderLayout} instance that is managing this Region. - * @param {Object} config The configuration options - * @param {String} position The region position. Valid values are: north, south, east, west and center. Every - * BorderLayout must have a center region for the primary content -- all other regions are optional. - */ -Ext.layout.BorderLayout.SplitRegion = function(layout, config, pos){ - Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this, layout, config, pos); - // prevent switch - this.applyLayout = this.applyFns[pos]; -}; - -Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, { - /** - * @cfg {Number} tickSize - * The increment, in pixels by which to move this Region's {@link Ext.SplitBar SplitBar}. - * By default, the {@link Ext.SplitBar SplitBar} moves smoothly. - */ - /** - * @cfg {String} splitTip - * The tooltip to display when the user hovers over a - * {@link Ext.layout.BorderLayout.Region#collapsible non-collapsible} region's split bar - * (defaults to "Drag to resize."). Only applies if - * {@link #useSplitTips} = true. - */ - splitTip : "Drag to resize.", - /** - * @cfg {String} collapsibleSplitTip - * The tooltip to display when the user hovers over a - * {@link Ext.layout.BorderLayout.Region#collapsible collapsible} region's split bar - * (defaults to "Drag to resize. Double click to hide."). Only applies if - * {@link #useSplitTips} = true. - */ - collapsibleSplitTip : "Drag to resize. Double click to hide.", - /** - * @cfg {Boolean} useSplitTips - * true to display a tooltip when the user hovers over a region's split bar - * (defaults to false). The tooltip text will be the value of either - * {@link #splitTip} or {@link #collapsibleSplitTip} as appropriate. - */ - useSplitTips : false, - - // private - splitSettings : { - north : { - orientation: Ext.SplitBar.VERTICAL, - placement: Ext.SplitBar.TOP, - maxFn : 'getVMaxSize', - minProp: 'minHeight', - maxProp: 'maxHeight' - }, - south : { - orientation: Ext.SplitBar.VERTICAL, - placement: Ext.SplitBar.BOTTOM, - maxFn : 'getVMaxSize', - minProp: 'minHeight', - maxProp: 'maxHeight' - }, - east : { - orientation: Ext.SplitBar.HORIZONTAL, - placement: Ext.SplitBar.RIGHT, - maxFn : 'getHMaxSize', - minProp: 'minWidth', - maxProp: 'maxWidth' - }, - west : { - orientation: Ext.SplitBar.HORIZONTAL, - placement: Ext.SplitBar.LEFT, - maxFn : 'getHMaxSize', - minProp: 'minWidth', - maxProp: 'maxWidth' - } - }, - - // private - applyFns : { - west : function(box){ - if(this.isCollapsed){ - return this.applyLayoutCollapsed(box); - } - var sd = this.splitEl.dom, s = sd.style; - this.panel.setPosition(box.x, box.y); - var sw = sd.offsetWidth; - s.left = (box.x+box.width-sw)+'px'; - s.top = (box.y)+'px'; - s.height = Math.max(0, box.height)+'px'; - this.panel.setSize(box.width-sw, box.height); - }, - east : function(box){ - if(this.isCollapsed){ - return this.applyLayoutCollapsed(box); - } - var sd = this.splitEl.dom, s = sd.style; - var sw = sd.offsetWidth; - this.panel.setPosition(box.x+sw, box.y); - s.left = (box.x)+'px'; - s.top = (box.y)+'px'; - s.height = Math.max(0, box.height)+'px'; - this.panel.setSize(box.width-sw, box.height); - }, - north : function(box){ - if(this.isCollapsed){ - return this.applyLayoutCollapsed(box); - } - var sd = this.splitEl.dom, s = sd.style; - var sh = sd.offsetHeight; - this.panel.setPosition(box.x, box.y); - s.left = (box.x)+'px'; - s.top = (box.y+box.height-sh)+'px'; - s.width = Math.max(0, box.width)+'px'; - this.panel.setSize(box.width, box.height-sh); - }, - south : function(box){ - if(this.isCollapsed){ - return this.applyLayoutCollapsed(box); - } - var sd = this.splitEl.dom, s = sd.style; - var sh = sd.offsetHeight; - this.panel.setPosition(box.x, box.y+sh); - s.left = (box.x)+'px'; - s.top = (box.y)+'px'; - s.width = Math.max(0, box.width)+'px'; - this.panel.setSize(box.width, box.height-sh); - } - }, - - // private - render : function(ct, p){ - Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, ct, p); - - var ps = this.position; - - this.splitEl = ct.createChild({ - cls: "x-layout-split x-layout-split-"+ps, html: " ", - id: this.panel.id + '-xsplit' - }); - - if(this.collapseMode == 'mini'){ - this.miniSplitEl = this.splitEl.createChild({ - cls: "x-layout-mini x-layout-mini-"+ps, html: " " - }); - this.miniSplitEl.addClassOnOver('x-layout-mini-over'); - this.miniSplitEl.on('click', this.onCollapseClick, this, {stopEvent:true}); - } - - var s = this.splitSettings[ps]; - - this.split = new Ext.SplitBar(this.splitEl.dom, p.el, s.orientation); - this.split.tickSize = this.tickSize; - this.split.placement = s.placement; - this.split.getMaximumSize = this[s.maxFn].createDelegate(this); - this.split.minSize = this.minSize || this[s.minProp]; - this.split.on("beforeapply", this.onSplitMove, this); - this.split.useShim = this.useShim === true; - this.maxSize = this.maxSize || this[s.maxProp]; - - if(p.hidden){ - this.splitEl.hide(); - } - - if(this.useSplitTips){ - this.splitEl.dom.title = this.collapsible ? this.collapsibleSplitTip : this.splitTip; - } - if(this.collapsible){ - this.splitEl.on("dblclick", this.onCollapseClick, this); - } - }, - - //docs inherit from superclass - getSize : function(){ - if(this.isCollapsed){ - return this.collapsedEl.getSize(); - } - var s = this.panel.getSize(); - if(this.position == 'north' || this.position == 'south'){ - s.height += this.splitEl.dom.offsetHeight; - }else{ - s.width += this.splitEl.dom.offsetWidth; - } - return s; - }, - - // private - getHMaxSize : function(){ - var cmax = this.maxSize || 10000; - var center = this.layout.center; - return Math.min(cmax, (this.el.getWidth()+center.el.getWidth())-center.getMinWidth()); - }, - - // private - getVMaxSize : function(){ - var cmax = this.maxSize || 10000; - var center = this.layout.center; - return Math.min(cmax, (this.el.getHeight()+center.el.getHeight())-center.getMinHeight()); - }, - - // private - onSplitMove : function(split, newSize){ - var s = this.panel.getSize(); - this.lastSplitSize = newSize; - if(this.position == 'north' || this.position == 'south'){ - this.panel.setSize(s.width, newSize); - this.state.height = newSize; - }else{ - this.panel.setSize(newSize, s.height); - this.state.width = newSize; - } - this.layout.layout(); - this.panel.saveState(); - return false; - }, - - /** - * Returns a reference to the split bar in use by this region. - * @return {Ext.SplitBar} The split bar - */ - getSplitBar : function(){ - return this.split; - }, - - // inherit docs - destroy : function() { - Ext.destroy(this.miniSplitEl, this.split, this.splitEl); - Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this); - } -}); - -Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout; -/** - * @class Ext.layout.FormLayout - * @extends Ext.layout.AnchorLayout - *

      This layout manager is specifically designed for rendering and managing child Components of - * {@link Ext.form.FormPanel forms}. It is responsible for rendering the labels of - * {@link Ext.form.Field Field}s.

      - * - *

      This layout manager is used when a Container is configured with the layout:'form' - * {@link Ext.Container#layout layout} config option, and should generally not need to be created directly - * via the new keyword. See {@link Ext.Container#layout} for additional details.

      - * - *

      In an application, it will usually be preferrable to use a {@link Ext.form.FormPanel FormPanel} - * (which is configured with FormLayout as its layout class by default) since it also provides built-in - * functionality for {@link Ext.form.BasicForm#doAction loading, validating and submitting} the form.

      - * - *

      A {@link Ext.Container Container} using the FormLayout layout manager (e.g. - * {@link Ext.form.FormPanel} or specifying layout:'form') can also accept the following - * layout-specific config properties:

        - *
      • {@link Ext.form.FormPanel#hideLabels hideLabels}
      • - *
      • {@link Ext.form.FormPanel#labelAlign labelAlign}
      • - *
      • {@link Ext.form.FormPanel#labelPad labelPad}
      • - *
      • {@link Ext.form.FormPanel#labelSeparator labelSeparator}
      • - *
      • {@link Ext.form.FormPanel#labelWidth labelWidth}
      • - *

      - * - *

      Any Component (including Fields) managed by FormLayout accepts the following as a config option: - *

        - *
      • {@link Ext.Component#anchor anchor}
      • - *

      - * - *

      Any Component managed by FormLayout may be rendered as a form field (with an associated label) by - * configuring it with a non-null {@link Ext.Component#fieldLabel fieldLabel}. Components configured - * in this way may be configured with the following options which affect the way the FormLayout renders them: - *

        - *
      • {@link Ext.Component#clearCls clearCls}
      • - *
      • {@link Ext.Component#fieldLabel fieldLabel}
      • - *
      • {@link Ext.Component#hideLabel hideLabel}
      • - *
      • {@link Ext.Component#itemCls itemCls}
      • - *
      • {@link Ext.Component#labelSeparator labelSeparator}
      • - *
      • {@link Ext.Component#labelStyle labelStyle}
      • - *

      - * - *

      Example usage:

      - *
      
      -// Required if showing validation messages
      -Ext.QuickTips.init();
      -
      -// While you can create a basic Panel with layout:'form', practically
      -// you should usually use a FormPanel to also get its form functionality
      -// since it already creates a FormLayout internally.
      -var form = new Ext.form.FormPanel({
      -    title: 'Form Layout',
      -    bodyStyle: 'padding:15px',
      -    width: 350,
      -    defaultType: 'textfield',
      -    defaults: {
      -        // applied to each contained item
      -        width: 230,
      -        msgTarget: 'side'
      -    },
      -    items: [{
      -            fieldLabel: 'First Name',
      -            name: 'first',
      -            allowBlank: false,
      -            {@link Ext.Component#labelSeparator labelSeparator}: ':' // override labelSeparator layout config
      -        },{
      -            fieldLabel: 'Last Name',
      -            name: 'last'
      -        },{
      -            fieldLabel: 'Email',
      -            name: 'email',
      -            vtype:'email'
      -        }, {
      -            xtype: 'textarea',
      -            hideLabel: true,     // override hideLabels layout config
      -            name: 'msg',
      -            anchor: '100% -53'
      -        }
      -    ],
      -    buttons: [
      -        {text: 'Save'},
      -        {text: 'Cancel'}
      -    ],
      -    layoutConfig: {
      -        {@link #labelSeparator}: '~' // superseded by assignment below
      -    },
      -    // config options applicable to container when layout='form':
      -    hideLabels: false,
      -    labelAlign: 'left',   // or 'right' or 'top'
      -    {@link Ext.form.FormPanel#labelSeparator labelSeparator}: '>>', // takes precedence over layoutConfig value
      -    labelWidth: 65,       // defaults to 100
      -    labelPad: 8           // defaults to 5, must specify labelWidth to be honored
      -});
      -
      - */ -Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { - - /** - * @cfg {String} labelSeparator - * See {@link Ext.form.FormPanel}.{@link Ext.form.FormPanel#labelSeparator labelSeparator}. Configuration - * of this property at the container level takes precedence. - */ - labelSeparator : ':', - - /** - * Read only. The CSS style specification string added to field labels in this layout if not - * otherwise {@link Ext.Component#labelStyle specified by each contained field}. - * @type String - * @property labelStyle - */ - - /** - * @cfg {Boolean} trackLabels - * True to show/hide the field label when the field is hidden. Defaults to true. - */ - trackLabels: true, - - type: 'form', - - onRemove: function(c){ - Ext.layout.FormLayout.superclass.onRemove.call(this, c); - if(this.trackLabels){ - c.un('show', this.onFieldShow, this); - c.un('hide', this.onFieldHide, this); - } - // check for itemCt, since we may be removing a fieldset or something similar - var el = c.getPositionEl(), - ct = c.getItemCt && c.getItemCt(); - if (c.rendered && ct) { - if (el && el.dom) { - el.insertAfter(ct); - } - Ext.destroy(ct); - Ext.destroyMembers(c, 'label', 'itemCt'); - if (c.customItemCt) { - Ext.destroyMembers(c, 'getItemCt', 'customItemCt'); - } - } - }, - - // private - setContainer : function(ct){ - Ext.layout.FormLayout.superclass.setContainer.call(this, ct); - if(ct.labelAlign){ - ct.addClass('x-form-label-'+ct.labelAlign); - } - - if(ct.hideLabels){ - Ext.apply(this, { - labelStyle: 'display:none', - elementStyle: 'padding-left:0;', - labelAdjust: 0 - }); - }else{ - this.labelSeparator = Ext.isDefined(ct.labelSeparator) ? ct.labelSeparator : this.labelSeparator; - ct.labelWidth = ct.labelWidth || 100; - if(Ext.isNumber(ct.labelWidth)){ - var pad = Ext.isNumber(ct.labelPad) ? ct.labelPad : 5; - Ext.apply(this, { - labelAdjust: ct.labelWidth + pad, - labelStyle: 'width:' + ct.labelWidth + 'px;', - elementStyle: 'padding-left:' + (ct.labelWidth + pad) + 'px' - }); - } - if(ct.labelAlign == 'top'){ - Ext.apply(this, { - labelStyle: 'width:auto;', - labelAdjust: 0, - elementStyle: 'padding-left:0;' - }); - } - } - }, - - // private - isHide: function(c){ - return c.hideLabel || this.container.hideLabels; - }, - - onFieldShow: function(c){ - c.getItemCt().removeClass('x-hide-' + c.hideMode); - - // Composite fields will need to layout after the container is made visible - if (c.isComposite) { - c.doLayout(); - } - }, - - onFieldHide: function(c){ - c.getItemCt().addClass('x-hide-' + c.hideMode); - }, - - //private - getLabelStyle: function(s){ - var ls = '', items = [this.labelStyle, s]; - for (var i = 0, len = items.length; i < len; ++i){ - if (items[i]){ - ls += items[i]; - if (ls.substr(-1, 1) != ';'){ - ls += ';'; - } - } - } - return ls; - }, - - /** - * @cfg {Ext.Template} fieldTpl - * A {@link Ext.Template#compile compile}d {@link Ext.Template} for rendering - * the fully wrapped, labeled and styled form Field. Defaults to:

      
      -new Ext.Template(
      -    '<div class="x-form-item {itemCls}" tabIndex="-1">',
      -        '<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>',
      -        '<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">',
      -        '</div><div class="{clearCls}"></div>',
      -    '</div>'
      -);
      -
      - *

      This may be specified to produce a different DOM structure when rendering form Fields.

      - *

      A description of the properties within the template follows:

        - *
      • itemCls : String
        The CSS class applied to the outermost div wrapper - * that contains this field label and field element (the default class is 'x-form-item' and itemCls - * will be added to that). If supplied, itemCls at the field level will override the default itemCls - * supplied at the container level.
      • - *
      • id : String
        The id of the Field
      • - *
      • {@link #labelStyle} : String
        - * A CSS style specification string to add to the field label for this field (defaults to '' or the - * {@link #labelStyle layout's value for labelStyle}).
      • - *
      • label : String
        The text to display as the label for this - * field (defaults to '')
      • - *
      • {@link #labelSeparator} : String
        The separator to display after - * the text of the label for this field (defaults to a colon ':' or the - * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.
      • - *
      • elementStyle : String
        The styles text for the input element's wrapper.
      • - *
      • clearCls : String
        The CSS class to apply to the special clearing div - * rendered directly after each form field wrapper (defaults to 'x-form-clear-left')
      • - *
      - *

      Also see {@link #getTemplateArgs}

      - */ - - /** - * @private - * - */ - renderItem : function(c, position, target){ - if(c && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){ - var args = this.getTemplateArgs(c); - if(Ext.isNumber(position)){ - position = target.dom.childNodes[position] || null; - } - if(position){ - c.itemCt = this.fieldTpl.insertBefore(position, args, true); - }else{ - c.itemCt = this.fieldTpl.append(target, args, true); - } - if(!c.getItemCt){ - // Non form fields don't have getItemCt, apply it here - // This will get cleaned up in onRemove - Ext.apply(c, { - getItemCt: function(){ - return c.itemCt; - }, - customItemCt: true - }); - } - c.label = c.getItemCt().child('label.x-form-item-label'); - if(!c.rendered){ - c.render('x-form-el-' + c.id); - }else if(!this.isValidParent(c, target)){ - Ext.fly('x-form-el-' + c.id).appendChild(c.getPositionEl()); - } - if(this.trackLabels){ - if(c.hidden){ - this.onFieldHide(c); - } - c.on({ - scope: this, - show: this.onFieldShow, - hide: this.onFieldHide - }); - } - this.configureItem(c); - }else { - Ext.layout.FormLayout.superclass.renderItem.apply(this, arguments); - } - }, - - /** - *

      Provides template arguments for rendering the fully wrapped, labeled and styled form Field.

      - *

      This method returns an object hash containing properties used by the layout's {@link #fieldTpl} - * to create a correctly wrapped, labeled and styled form Field. This may be overriden to - * create custom layouts. The properties which must be returned are:

        - *
      • itemCls : String
        The CSS class applied to the outermost div wrapper - * that contains this field label and field element (the default class is 'x-form-item' and itemCls - * will be added to that). If supplied, itemCls at the field level will override the default itemCls - * supplied at the container level.
      • - *
      • id : String
        The id of the Field
      • - *
      • {@link #labelStyle} : String
        - * A CSS style specification string to add to the field label for this field (defaults to '' or the - * {@link #labelStyle layout's value for labelStyle}).
      • - *
      • label : String
        The text to display as the label for this - * field (defaults to the field's configured fieldLabel property)
      • - *
      • {@link #labelSeparator} : String
        The separator to display after - * the text of the label for this field (defaults to a colon ':' or the - * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.
      • - *
      • elementStyle : String
        The styles text for the input element's wrapper.
      • - *
      • clearCls : String
        The CSS class to apply to the special clearing div - * rendered directly after each form field wrapper (defaults to 'x-form-clear-left')
      • - *
      - * @param (Ext.form.Field} field The {@link Ext.form.Field Field} being rendered. - * @return {Object} An object hash containing the properties required to render the Field. - */ - getTemplateArgs: function(field) { - var noLabelSep = !field.fieldLabel || field.hideLabel, - itemCls = (field.itemCls || this.container.itemCls || '') + (field.hideLabel ? ' x-hide-label' : ''); - - // IE9 quirks needs an extra, identifying class on wrappers of TextFields - if (Ext.isIE9 && Ext.isIEQuirks && field instanceof Ext.form.TextField) { - itemCls += ' x-input-wrapper'; - } - - return { - id : field.id, - label : field.fieldLabel, - itemCls : itemCls, - clearCls : field.clearCls || 'x-form-clear-left', - labelStyle : this.getLabelStyle(field.labelStyle), - elementStyle : this.elementStyle || '', - labelSeparator: noLabelSep ? '' : (Ext.isDefined(field.labelSeparator) ? field.labelSeparator : this.labelSeparator) - }; - }, - - // private - adjustWidthAnchor: function(value, c){ - if(c.label && !this.isHide(c) && (this.container.labelAlign != 'top')){ - var adjust = Ext.isIE6 || (Ext.isIE && !Ext.isStrict); - return value - this.labelAdjust + (adjust ? -3 : 0); - } - return value; - }, - - adjustHeightAnchor : function(value, c){ - if(c.label && !this.isHide(c) && (this.container.labelAlign == 'top')){ - return value - c.label.getHeight(); - } - return value; - }, - - // private - isValidParent : function(c, target){ - return target && this.container.getEl().contains(c.getPositionEl()); - } - - /** - * @property activeItem - * @hide - */ -}); - -Ext.Container.LAYOUTS['form'] = Ext.layout.FormLayout; -/** - * @class Ext.layout.AccordionLayout - * @extends Ext.layout.FitLayout - *

      This is a layout that manages multiple Panels in an expandable accordion style such that only - * one Panel can be expanded at any given time. Each Panel has built-in support for expanding and collapsing.

      - *

      Note: Only Ext.Panels and all subclasses of Ext.Panel may be used in an accordion layout Container.

      - *

      This class is intended to be extended or created via the {@link Ext.Container#layout layout} - * configuration property. See {@link Ext.Container#layout} for additional details.

      - *

      Example usage:

      - *
      
      -var accordion = new Ext.Panel({
      -    title: 'Accordion Layout',
      -    layout:'accordion',
      -    defaults: {
      -        // applied to each contained panel
      -        bodyStyle: 'padding:15px'
      -    },
      -    layoutConfig: {
      -        // layout-specific configs go here
      -        titleCollapse: false,
      -        animate: true,
      -        activeOnTop: true
      -    },
      -    items: [{
      -        title: 'Panel 1',
      -        html: '<p>Panel content!</p>'
      -    },{
      -        title: 'Panel 2',
      -        html: '<p>Panel content!</p>'
      -    },{
      -        title: 'Panel 3',
      -        html: '<p>Panel content!</p>'
      -    }]
      -});
      -
      - */ -Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, { - /** - * @cfg {Boolean} fill - * True to adjust the active item's height to fill the available space in the container, false to use the - * item's current height, or auto height if not explicitly set (defaults to true). - */ - fill : true, - /** - * @cfg {Boolean} autoWidth - * True to set each contained item's width to 'auto', false to use the item's current width (defaults to true). - * Note that some components, in particular the {@link Ext.grid.GridPanel grid}, will not function properly within - * layouts if they have auto width, so in such cases this config should be set to false. - */ - autoWidth : true, - /** - * @cfg {Boolean} titleCollapse - * True to allow expand/collapse of each contained panel by clicking anywhere on the title bar, false to allow - * expand/collapse only when the toggle tool button is clicked (defaults to true). When set to false, - * {@link #hideCollapseTool} should be false also. - */ - titleCollapse : true, - /** - * @cfg {Boolean} hideCollapseTool - * True to hide the contained panels' collapse/expand toggle buttons, false to display them (defaults to false). - * When set to true, {@link #titleCollapse} should be true also. - */ - hideCollapseTool : false, - /** - * @cfg {Boolean} collapseFirst - * True to make sure the collapse/expand toggle button always renders first (to the left of) any other tools - * in the contained panels' title bars, false to render it last (defaults to false). - */ - collapseFirst : false, - /** - * @cfg {Boolean} animate - * True to slide the contained panels open and closed during expand/collapse using animation, false to open and - * close directly with no animation (defaults to false). Note: to defer to the specific config setting of each - * contained panel for this property, set this to undefined at the layout level. - */ - animate : false, - /** - * @cfg {Boolean} sequence - * Experimental. If animate is set to true, this will result in each animation running in sequence. - */ - sequence : false, - /** - * @cfg {Boolean} activeOnTop - * True to swap the position of each panel as it is expanded so that it becomes the first item in the container, - * false to keep the panels in the rendered order. This is NOT compatible with "animate:true" (defaults to false). - */ - activeOnTop : false, - - type: 'accordion', - - renderItem : function(c){ - if(this.animate === false){ - c.animCollapse = false; - } - c.collapsible = true; - if(this.autoWidth){ - c.autoWidth = true; - } - if(this.titleCollapse){ - c.titleCollapse = true; - } - if(this.hideCollapseTool){ - c.hideCollapseTool = true; - } - if(this.collapseFirst !== undefined){ - c.collapseFirst = this.collapseFirst; - } - if(!this.activeItem && !c.collapsed){ - this.setActiveItem(c, true); - }else if(this.activeItem && this.activeItem != c){ - c.collapsed = true; - } - Ext.layout.AccordionLayout.superclass.renderItem.apply(this, arguments); - c.header.addClass('x-accordion-hd'); - c.on('beforeexpand', this.beforeExpand, this); - }, - - onRemove: function(c){ - Ext.layout.AccordionLayout.superclass.onRemove.call(this, c); - if(c.rendered){ - c.header.removeClass('x-accordion-hd'); - } - c.un('beforeexpand', this.beforeExpand, this); - }, - - // private - beforeExpand : function(p, anim){ - var ai = this.activeItem; - if(ai){ - if(this.sequence){ - delete this.activeItem; - if (!ai.collapsed){ - ai.collapse({callback:function(){ - p.expand(anim || true); - }, scope: this}); - return false; - } - }else{ - ai.collapse(this.animate); - } - } - this.setActive(p); - if(this.activeOnTop){ - p.el.dom.parentNode.insertBefore(p.el.dom, p.el.dom.parentNode.firstChild); - } - // Items have been hidden an possibly rearranged, we need to get the container size again. - this.layout(); - }, - - // private - setItemSize : function(item, size){ - if(this.fill && item){ - var hh = 0, i, ct = this.getRenderedItems(this.container), len = ct.length, p; - // Add up all the header heights - for (i = 0; i < len; i++) { - if((p = ct[i]) != item && !p.hidden){ - hh += p.header.getHeight(); - } - }; - // Subtract the header heights from the container size - size.height -= hh; - // Call setSize on the container to set the correct height. For Panels, deferedHeight - // will simply store this size for when the expansion is done. - item.setSize(size); - } - }, - - /** - * Sets the active (expanded) item in the layout. - * @param {String/Number} item The string component id or numeric index of the item to activate - */ - setActiveItem : function(item){ - this.setActive(item, true); - }, - - // private - setActive : function(item, expand){ - var ai = this.activeItem; - item = this.container.getComponent(item); - if(ai != item){ - if(item.rendered && item.collapsed && expand){ - item.expand(); - }else{ - if(ai){ - ai.fireEvent('deactivate', ai); - } - this.activeItem = item; - item.fireEvent('activate', item); - } - } - } -}); -Ext.Container.LAYOUTS.accordion = Ext.layout.AccordionLayout; - -//backwards compat -Ext.layout.Accordion = Ext.layout.AccordionLayout;/** - * @class Ext.layout.TableLayout - * @extends Ext.layout.ContainerLayout - *

      This layout allows you to easily render content into an HTML table. The total number of columns can be - * specified, and rowspan and colspan can be used to create complex layouts within the table. - * This class is intended to be extended or created via the layout:'table' {@link Ext.Container#layout} config, - * and should generally not need to be created directly via the new keyword.

      - *

      Note that when creating a layout via config, the layout-specific config properties must be passed in via - * the {@link Ext.Container#layoutConfig} object which will then be applied internally to the layout. In the - * case of TableLayout, the only valid layout config property is {@link #columns}. However, the items added to a - * TableLayout can supply the following table-specific config properties:

      - *
        - *
      • rowspan Applied to the table cell containing the item.
      • - *
      • colspan Applied to the table cell containing the item.
      • - *
      • cellId An id applied to the table cell containing the item.
      • - *
      • cellCls A CSS class name added to the table cell containing the item.
      • - *
      - *

      The basic concept of building up a TableLayout is conceptually very similar to building up a standard - * HTML table. You simply add each panel (or "cell") that you want to include along with any span attributes - * specified as the special config properties of rowspan and colspan which work exactly like their HTML counterparts. - * Rather than explicitly creating and nesting rows and columns as you would in HTML, you simply specify the - * total column count in the layoutConfig and start adding panels in their natural order from left to right, - * top to bottom. The layout will automatically figure out, based on the column count, rowspans and colspans, - * how to position each panel within the table. Just like with HTML tables, your rowspans and colspans must add - * up correctly in your overall layout or you'll end up with missing and/or extra cells! Example usage:

      - *
      
      -// This code will generate a layout table that is 3 columns by 2 rows
      -// with some spanning included.  The basic layout will be:
      -// +--------+-----------------+
      -// |   A    |   B             |
      -// |        |--------+--------|
      -// |        |   C    |   D    |
      -// +--------+--------+--------+
      -var table = new Ext.Panel({
      -    title: 'Table Layout',
      -    layout:'table',
      -    defaults: {
      -        // applied to each contained panel
      -        bodyStyle:'padding:20px'
      -    },
      -    layoutConfig: {
      -        // The total column count must be specified here
      -        columns: 3
      -    },
      -    items: [{
      -        html: '<p>Cell A content</p>',
      -        rowspan: 2
      -    },{
      -        html: '<p>Cell B content</p>',
      -        colspan: 2
      -    },{
      -        html: '<p>Cell C content</p>',
      -        cellCls: 'highlight'
      -    },{
      -        html: '<p>Cell D content</p>'
      -    }]
      -});
      -
      - */ -Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, { - /** - * @cfg {Number} columns - * The total number of columns to create in the table for this layout. If not specified, all Components added to - * this layout will be rendered into a single row using one column per Component. - */ - - // private - monitorResize:false, - - type: 'table', - - targetCls: 'x-table-layout-ct', - - /** - * @cfg {Object} tableAttrs - *

      An object containing properties which are added to the {@link Ext.DomHelper DomHelper} specification - * used to create the layout's <table> element. Example:

      
      -{
      -    xtype: 'panel',
      -    layout: 'table',
      -    layoutConfig: {
      -        tableAttrs: {
      -            style: {
      -                width: '100%'
      -            }
      -        },
      -        columns: 3
      -    }
      -}
      - */ - tableAttrs:null, - - // private - setContainer : function(ct){ - Ext.layout.TableLayout.superclass.setContainer.call(this, ct); - - this.currentRow = 0; - this.currentColumn = 0; - this.cells = []; - }, - - // private - onLayout : function(ct, target){ - var cs = ct.items.items, len = cs.length, c, i; - - if(!this.table){ - target.addClass('x-table-layout-ct'); - - this.table = target.createChild( - Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true); - } - this.renderAll(ct, target); - }, - - // private - getRow : function(index){ - var row = this.table.tBodies[0].childNodes[index]; - if(!row){ - row = document.createElement('tr'); - this.table.tBodies[0].appendChild(row); - } - return row; - }, - - // private - getNextCell : function(c){ - var cell = this.getNextNonSpan(this.currentColumn, this.currentRow); - var curCol = this.currentColumn = cell[0], curRow = this.currentRow = cell[1]; - for(var rowIndex = curRow; rowIndex < curRow + (c.rowspan || 1); rowIndex++){ - if(!this.cells[rowIndex]){ - this.cells[rowIndex] = []; - } - for(var colIndex = curCol; colIndex < curCol + (c.colspan || 1); colIndex++){ - this.cells[rowIndex][colIndex] = true; - } - } - var td = document.createElement('td'); - if(c.cellId){ - td.id = c.cellId; - } - var cls = 'x-table-layout-cell'; - if(c.cellCls){ - cls += ' ' + c.cellCls; - } - td.className = cls; - if(c.colspan){ - td.colSpan = c.colspan; - } - if(c.rowspan){ - td.rowSpan = c.rowspan; - } - this.getRow(curRow).appendChild(td); - return td; - }, - - // private - getNextNonSpan: function(colIndex, rowIndex){ - var cols = this.columns; - while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) { - if(cols && colIndex >= cols){ - rowIndex++; - colIndex = 0; - }else{ - colIndex++; - } - } - return [colIndex, rowIndex]; - }, - - // private - renderItem : function(c, position, target){ - // Ensure we have our inner table to get cells to render into. - if(!this.table){ - this.table = target.createChild( - Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true); - } - if(c && !c.rendered){ - c.render(this.getNextCell(c)); - this.configureItem(c); - }else if(c && !this.isValidParent(c, target)){ - var container = this.getNextCell(c); - container.insertBefore(c.getPositionEl().dom, null); - c.container = Ext.get(container); - this.configureItem(c); - } - }, - - // private - isValidParent : function(c, target){ - return c.getPositionEl().up('table', 5).dom.parentNode === (target.dom || target); - }, - - destroy: function(){ - delete this.table; - Ext.layout.TableLayout.superclass.destroy.call(this); - } - - /** - * @property activeItem - * @hide - */ -}); - -Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout;/** - * @class Ext.layout.AbsoluteLayout - * @extends Ext.layout.AnchorLayout - *

      This is a layout that inherits the anchoring of {@link Ext.layout.AnchorLayout} and adds the - * ability for x/y positioning using the standard x and y component config options.

      - *

      This class is intended to be extended or created via the {@link Ext.Container#layout layout} - * configuration property. See {@link Ext.Container#layout} for additional details.

      - *

      Example usage:

      - *
      
      -var form = new Ext.form.FormPanel({
      -    title: 'Absolute Layout',
      -    layout:'absolute',
      -    layoutConfig: {
      -        // layout-specific configs go here
      -        extraCls: 'x-abs-layout-item',
      -    },
      -    baseCls: 'x-plain',
      -    url:'save-form.php',
      -    defaultType: 'textfield',
      -    items: [{
      -        x: 0,
      -        y: 5,
      -        xtype:'label',
      -        text: 'Send To:'
      -    },{
      -        x: 60,
      -        y: 0,
      -        name: 'to',
      -        anchor:'100%'  // anchor width by percentage
      -    },{
      -        x: 0,
      -        y: 35,
      -        xtype:'label',
      -        text: 'Subject:'
      -    },{
      -        x: 60,
      -        y: 30,
      -        name: 'subject',
      -        anchor: '100%'  // anchor width by percentage
      -    },{
      -        x:0,
      -        y: 60,
      -        xtype: 'textarea',
      -        name: 'msg',
      -        anchor: '100% 100%'  // anchor width and height
      -    }]
      -});
      -
      - */ -Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, { - - extraCls: 'x-abs-layout-item', - - type: 'absolute', - - onLayout : function(ct, target){ - target.position(); - this.paddingLeft = target.getPadding('l'); - this.paddingTop = target.getPadding('t'); - Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target); - }, - - // private - adjustWidthAnchor : function(value, comp){ - return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value; - }, - - // private - adjustHeightAnchor : function(value, comp){ - return value ? value - comp.getPosition(true)[1] + this.paddingTop : value; - } - /** - * @property activeItem - * @hide - */ -}); -Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout; -/** - * @class Ext.layout.BoxLayout - * @extends Ext.layout.ContainerLayout - *

      Base Class for HBoxLayout and VBoxLayout Classes. Generally it should not need to be used directly.

      - */ -Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, { - /** - * @cfg {Object} defaultMargins - *

      If the individual contained items do not have a margins - * property specified, the default margins from this property will be - * applied to each item.

      - *

      This property may be specified as an object containing margins - * to apply in the format:

      
      -{
      -    top: (top margin),
      -    right: (right margin),
      -    bottom: (bottom margin),
      -    left: (left margin)
      -}
      - *

      This property may also be specified as a string containing - * space-separated, numeric margin values. The order of the sides associated - * with each value matches the way CSS processes margin values:

      - *
        - *
      • If there is only one value, it applies to all sides.
      • - *
      • If there are two values, the top and bottom borders are set to the - * first value and the right and left are set to the second.
      • - *
      • If there are three values, the top is set to the first value, the left - * and right are set to the second, and the bottom is set to the third.
      • - *
      • If there are four values, they apply to the top, right, bottom, and - * left, respectively.
      • - *
      - *

      Defaults to:

      
      -     * {top:0, right:0, bottom:0, left:0}
      -     * 
      - */ - defaultMargins : {left:0,top:0,right:0,bottom:0}, - /** - * @cfg {String} padding - *

      Sets the padding to be applied to all child items managed by this layout.

      - *

      This property must be specified as a string containing - * space-separated, numeric padding values. The order of the sides associated - * with each value matches the way CSS processes padding values:

      - *
        - *
      • If there is only one value, it applies to all sides.
      • - *
      • If there are two values, the top and bottom borders are set to the - * first value and the right and left are set to the second.
      • - *
      • If there are three values, the top is set to the first value, the left - * and right are set to the second, and the bottom is set to the third.
      • - *
      • If there are four values, they apply to the top, right, bottom, and - * left, respectively.
      • - *
      - *

      Defaults to: "0"

      - */ - padding : '0', - // documented in subclasses - pack : 'start', - - // private - monitorResize : true, - type: 'box', - scrollOffset : 0, - extraCls : 'x-box-item', - targetCls : 'x-box-layout-ct', - innerCls : 'x-box-inner', - - constructor : function(config){ - Ext.layout.BoxLayout.superclass.constructor.call(this, config); - - if (Ext.isString(this.defaultMargins)) { - this.defaultMargins = this.parseMargins(this.defaultMargins); - } - - var handler = this.overflowHandler; - - if (typeof handler == 'string') { - handler = { - type: handler - }; - } - - var handlerType = 'none'; - if (handler && handler.type != undefined) { - handlerType = handler.type; - } - - var constructor = Ext.layout.boxOverflow[handlerType]; - if (constructor[this.type]) { - constructor = constructor[this.type]; - } - - this.overflowHandler = new constructor(this, handler); - }, - - /** - * @private - * Runs the child box calculations and caches them in childBoxCache. Subclasses can used these cached values - * when laying out - */ - onLayout: function(container, target) { - Ext.layout.BoxLayout.superclass.onLayout.call(this, container, target); - - var tSize = this.getLayoutTargetSize(), - items = this.getVisibleItems(container), - calcs = this.calculateChildBoxes(items, tSize), - boxes = calcs.boxes, - meta = calcs.meta; - - //invoke the overflow handler, if one is configured - if (tSize.width > 0) { - var handler = this.overflowHandler, - method = meta.tooNarrow ? 'handleOverflow' : 'clearOverflow'; - - var results = handler[method](calcs, tSize); - - if (results) { - if (results.targetSize) { - tSize = results.targetSize; - } - - if (results.recalculate) { - items = this.getVisibleItems(container); - calcs = this.calculateChildBoxes(items, tSize); - boxes = calcs.boxes; - } - } - } - - /** - * @private - * @property layoutTargetLastSize - * @type Object - * Private cache of the last measured size of the layout target. This should never be used except by - * BoxLayout subclasses during their onLayout run. - */ - this.layoutTargetLastSize = tSize; - - /** - * @private - * @property childBoxCache - * @type Array - * Array of the last calculated height, width, top and left positions of each visible rendered component - * within the Box layout. - */ - this.childBoxCache = calcs; - - this.updateInnerCtSize(tSize, calcs); - this.updateChildBoxes(boxes); - - // Putting a box layout into an overflowed container is NOT correct and will make a second layout pass necessary. - this.handleTargetOverflow(tSize, container, target); - }, - - /** - * Resizes and repositions each child component - * @param {Array} boxes The box measurements - */ - updateChildBoxes: function(boxes) { - for (var i = 0, length = boxes.length; i < length; i++) { - var box = boxes[i], - comp = box.component; - - if (box.dirtySize) { - comp.setSize(box.width, box.height); - } - // Don't set positions to NaN - if (isNaN(box.left) || isNaN(box.top)) { - continue; - } - - comp.setPosition(box.left, box.top); - } - }, - - /** - * @private - * Called by onRender just before the child components are sized and positioned. This resizes the innerCt - * to make sure all child items fit within it. We call this before sizing the children because if our child - * items are larger than the previous innerCt size the browser will insert scrollbars and then remove them - * again immediately afterwards, giving a performance hit. - * Subclasses should provide an implementation. - * @param {Object} currentSize The current height and width of the innerCt - * @param {Array} calculations The new box calculations of all items to be laid out - */ - updateInnerCtSize: function(tSize, calcs) { - var align = this.align, - padding = this.padding, - width = tSize.width, - height = tSize.height; - - if (this.type == 'hbox') { - var innerCtWidth = width, - innerCtHeight = calcs.meta.maxHeight + padding.top + padding.bottom; - - if (align == 'stretch') { - innerCtHeight = height; - } else if (align == 'middle') { - innerCtHeight = Math.max(height, innerCtHeight); - } - } else { - var innerCtHeight = height, - innerCtWidth = calcs.meta.maxWidth + padding.left + padding.right; - - if (align == 'stretch') { - innerCtWidth = width; - } else if (align == 'center') { - innerCtWidth = Math.max(width, innerCtWidth); - } - } - - this.innerCt.setSize(innerCtWidth || undefined, innerCtHeight || undefined); - }, - - /** - * @private - * This should be called after onLayout of any BoxLayout subclass. If the target's overflow is not set to 'hidden', - * we need to lay out a second time because the scrollbars may have modified the height and width of the layout - * target. Having a Box layout inside such a target is therefore not recommended. - * @param {Object} previousTargetSize The size and height of the layout target before we just laid out - * @param {Ext.Container} container The container - * @param {Ext.Element} target The target element - */ - handleTargetOverflow: function(previousTargetSize, container, target) { - var overflow = target.getStyle('overflow'); - - if (overflow && overflow != 'hidden' &&!this.adjustmentPass) { - var newTargetSize = this.getLayoutTargetSize(); - if (newTargetSize.width != previousTargetSize.width || newTargetSize.height != previousTargetSize.height){ - this.adjustmentPass = true; - this.onLayout(container, target); - } - } - - delete this.adjustmentPass; - }, - - // private - isValidParent : function(c, target) { - return this.innerCt && c.getPositionEl().dom.parentNode == this.innerCt.dom; - }, - - /** - * @private - * Returns all items that are both rendered and visible - * @return {Array} All matching items - */ - getVisibleItems: function(ct) { - var ct = ct || this.container, - t = ct.getLayoutTarget(), - cti = ct.items.items, - len = cti.length, - - i, c, items = []; - - for (i = 0; i < len; i++) { - if((c = cti[i]).rendered && this.isValidParent(c, t) && c.hidden !== true && c.collapsed !== true && c.shouldLayout !== false){ - items.push(c); - } - } - - return items; - }, - - // private - renderAll : function(ct, target) { - if (!this.innerCt) { - // the innerCt prevents wrapping and shuffling while the container is resizing - this.innerCt = target.createChild({cls:this.innerCls}); - this.padding = this.parseMargins(this.padding); - } - Ext.layout.BoxLayout.superclass.renderAll.call(this, ct, this.innerCt); - }, - - getLayoutTargetSize : function() { - var target = this.container.getLayoutTarget(), ret; - - if (target) { - ret = target.getViewSize(); - - // IE in strict mode will return a width of 0 on the 1st pass of getViewSize. - // Use getStyleSize to verify the 0 width, the adjustment pass will then work properly - // with getViewSize - if (Ext.isIE && Ext.isStrict && ret.width == 0){ - ret = target.getStyleSize(); - } - - ret.width -= target.getPadding('lr'); - ret.height -= target.getPadding('tb'); - } - - return ret; - }, - - // private - renderItem : function(c) { - if(Ext.isString(c.margins)){ - c.margins = this.parseMargins(c.margins); - }else if(!c.margins){ - c.margins = this.defaultMargins; - } - Ext.layout.BoxLayout.superclass.renderItem.apply(this, arguments); - }, - - /** - * @private - */ - destroy: function() { - Ext.destroy(this.overflowHandler); - - Ext.layout.BoxLayout.superclass.destroy.apply(this, arguments); - } -}); - -/** - * @class Ext.layout.boxOverflow.None - * @extends Object - * Base class for Box Layout overflow handlers. These specialized classes are invoked when a Box Layout - * (either an HBox or a VBox) has child items that are either too wide (for HBox) or too tall (for VBox) - * for its container. - */ - -Ext.layout.boxOverflow.None = Ext.extend(Object, { - constructor: function(layout, config) { - this.layout = layout; - - Ext.apply(this, config || {}); - }, - - handleOverflow: Ext.emptyFn, - - clearOverflow: Ext.emptyFn -}); - - -Ext.layout.boxOverflow.none = Ext.layout.boxOverflow.None; -/** - * @class Ext.layout.boxOverflow.Menu - * @extends Ext.layout.boxOverflow.None - * Description - */ -Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, { - /** - * @cfg afterCls - * @type String - * CSS class added to the afterCt element. This is the element that holds any special items such as scrollers, - * which must always be present at the rightmost edge of the Container - */ - afterCls: 'x-strip-right', - - /** - * @property noItemsMenuText - * @type String - * HTML fragment to render into the toolbar overflow menu if there are no items to display - */ - noItemsMenuText : '
      (None)
      ', - - constructor: function(layout) { - Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this, arguments); - - /** - * @property menuItems - * @type Array - * Array of all items that are currently hidden and should go into the dropdown menu - */ - this.menuItems = []; - }, - - /** - * @private - * Creates the beforeCt, innerCt and afterCt elements if they have not already been created - * @param {Ext.Container} container The Container attached to this Layout instance - * @param {Ext.Element} target The target Element - */ - createInnerElements: function() { - if (!this.afterCt) { - this.afterCt = this.layout.innerCt.insertSibling({cls: this.afterCls}, 'before'); - } - }, - - /** - * @private - */ - clearOverflow: function(calculations, targetSize) { - var newWidth = targetSize.width + (this.afterCt ? this.afterCt.getWidth() : 0), - items = this.menuItems; - - this.hideTrigger(); - - for (var index = 0, length = items.length; index < length; index++) { - items.pop().component.show(); - } - - return { - targetSize: { - height: targetSize.height, - width : newWidth - } - }; - }, - - /** - * @private - */ - showTrigger: function() { - this.createMenu(); - this.menuTrigger.show(); - }, - - /** - * @private - */ - hideTrigger: function() { - if (this.menuTrigger != undefined) { - this.menuTrigger.hide(); - } - }, - - /** - * @private - * Called before the overflow menu is shown. This constructs the menu's items, caching them for as long as it can. - */ - beforeMenuShow: function(menu) { - var items = this.menuItems, - len = items.length, - item, - prev; - - var needsSep = function(group, item){ - return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator); - }; - - this.clearMenu(); - menu.removeAll(); - - for (var i = 0; i < len; i++) { - item = items[i].component; - - if (prev && (needsSep(item, prev) || needsSep(prev, item))) { - menu.add('-'); - } - - this.addComponentToMenu(menu, item); - prev = item; - } - - // put something so the menu isn't empty if no compatible items found - if (menu.items.length < 1) { - menu.add(this.noItemsMenuText); - } - }, - - /** - * @private - * Returns a menu config for a given component. This config is used to create a menu item - * to be added to the expander menu - * @param {Ext.Component} component The component to create the config for - * @param {Boolean} hideOnClick Passed through to the menu item - */ - createMenuConfig : function(component, hideOnClick){ - var config = Ext.apply({}, component.initialConfig), - group = component.toggleGroup; - - Ext.copyTo(config, component, [ - 'iconCls', 'icon', 'itemId', 'disabled', 'handler', 'scope', 'menu' - ]); - - Ext.apply(config, { - text : component.overflowText || component.text, - hideOnClick: hideOnClick - }); - - if (group || component.enableToggle) { - Ext.apply(config, { - group : group, - checked: component.pressed, - listeners: { - checkchange: function(item, checked){ - component.toggle(checked); - } - } - }); - } - - delete config.ownerCt; - delete config.xtype; - delete config.id; - - return config; - }, - - /** - * @private - * Adds the given Toolbar item to the given menu. Buttons inside a buttongroup are added individually. - * @param {Ext.menu.Menu} menu The menu to add to - * @param {Ext.Component} component The component to add - */ - addComponentToMenu : function(menu, component) { - if (component instanceof Ext.Toolbar.Separator) { - menu.add('-'); - - } else if (Ext.isFunction(component.isXType)) { - if (component.isXType('splitbutton')) { - menu.add(this.createMenuConfig(component, true)); - - } else if (component.isXType('button')) { - menu.add(this.createMenuConfig(component, !component.menu)); - - } else if (component.isXType('buttongroup')) { - component.items.each(function(item){ - this.addComponentToMenu(menu, item); - }, this); - } - } - }, - - /** - * @private - * Deletes the sub-menu of each item in the expander menu. Submenus are created for items such as - * splitbuttons and buttongroups, where the Toolbar item cannot be represented by a single menu item - */ - clearMenu : function(){ - var menu = this.moreMenu; - if (menu && menu.items) { - menu.items.each(function(item){ - delete item.menu; - }); - } - }, - - /** - * @private - * Creates the overflow trigger and menu used when enableOverflow is set to true and the items - * in the layout are too wide to fit in the space available - */ - createMenu: function() { - if (!this.menuTrigger) { - this.createInnerElements(); - - /** - * @private - * @property menu - * @type Ext.menu.Menu - * The expand menu - holds items for every item that cannot be shown - * because the container is currently not large enough. - */ - this.menu = new Ext.menu.Menu({ - ownerCt : this.layout.container, - listeners: { - scope: this, - beforeshow: this.beforeMenuShow - } - }); - - /** - * @private - * @property menuTrigger - * @type Ext.Button - * The expand button which triggers the overflow menu to be shown - */ - this.menuTrigger = new Ext.Button({ - iconCls : 'x-toolbar-more-icon', - cls : 'x-toolbar-more', - menu : this.menu, - renderTo: this.afterCt - }); - } - }, - - /** - * @private - */ - destroy: function() { - Ext.destroy(this.menu, this.menuTrigger); - } -}); - -Ext.layout.boxOverflow.menu = Ext.layout.boxOverflow.Menu; - - -/** - * @class Ext.layout.boxOverflow.HorizontalMenu - * @extends Ext.layout.boxOverflow.Menu - * Description - */ -Ext.layout.boxOverflow.HorizontalMenu = Ext.extend(Ext.layout.boxOverflow.Menu, { - - constructor: function() { - Ext.layout.boxOverflow.HorizontalMenu.superclass.constructor.apply(this, arguments); - - var me = this, - layout = me.layout, - origFunction = layout.calculateChildBoxes; - - layout.calculateChildBoxes = function(visibleItems, targetSize) { - var calcs = origFunction.apply(layout, arguments), - meta = calcs.meta, - items = me.menuItems; - - //calculate the width of the items currently hidden solely because there is not enough space - //to display them - var hiddenWidth = 0; - for (var index = 0, length = items.length; index < length; index++) { - hiddenWidth += items[index].width; - } - - meta.minimumWidth += hiddenWidth; - meta.tooNarrow = meta.minimumWidth > targetSize.width; - - return calcs; - }; - }, - - handleOverflow: function(calculations, targetSize) { - this.showTrigger(); - - var newWidth = targetSize.width - this.afterCt.getWidth(), - boxes = calculations.boxes, - usedWidth = 0, - recalculate = false; - - //calculate the width of all visible items and any spare width - for (var index = 0, length = boxes.length; index < length; index++) { - usedWidth += boxes[index].width; - } - - var spareWidth = newWidth - usedWidth, - showCount = 0; - - //see if we can re-show any of the hidden components - for (var index = 0, length = this.menuItems.length; index < length; index++) { - var hidden = this.menuItems[index], - comp = hidden.component, - width = hidden.width; - - if (width < spareWidth) { - comp.show(); - - spareWidth -= width; - showCount ++; - recalculate = true; - } else { - break; - } - } - - if (recalculate) { - this.menuItems = this.menuItems.slice(showCount); - } else { - for (var i = boxes.length - 1; i >= 0; i--) { - var item = boxes[i].component, - right = boxes[i].left + boxes[i].width; - - if (right >= newWidth) { - this.menuItems.unshift({ - component: item, - width : boxes[i].width - }); - - item.hide(); - } else { - break; - } - } - } - - if (this.menuItems.length == 0) { - this.hideTrigger(); - } - - return { - targetSize: { - height: targetSize.height, - width : newWidth - }, - recalculate: recalculate - }; - } -}); - -Ext.layout.boxOverflow.menu.hbox = Ext.layout.boxOverflow.HorizontalMenu;/** - * @class Ext.layout.boxOverflow.Scroller - * @extends Ext.layout.boxOverflow.None - * Description - */ -Ext.layout.boxOverflow.Scroller = Ext.extend(Ext.layout.boxOverflow.None, { - /** - * @cfg animateScroll - * @type Boolean - * True to animate the scrolling of items within the layout (defaults to true, ignored if enableScroll is false) - */ - animateScroll: true, - - /** - * @cfg scrollIncrement - * @type Number - * The number of pixels to scroll by on scroller click (defaults to 100) - */ - scrollIncrement: 100, - - /** - * @cfg wheelIncrement - * @type Number - * The number of pixels to increment on mouse wheel scrolling (defaults to 3). - */ - wheelIncrement: 3, - - /** - * @cfg scrollRepeatInterval - * @type Number - * Number of milliseconds between each scroll while a scroller button is held down (defaults to 400) - */ - scrollRepeatInterval: 400, - - /** - * @cfg scrollDuration - * @type Number - * Number of seconds that each scroll animation lasts (defaults to 0.4) - */ - scrollDuration: 0.4, - - /** - * @cfg beforeCls - * @type String - * CSS class added to the beforeCt element. This is the element that holds any special items such as scrollers, - * which must always be present at the leftmost edge of the Container - */ - beforeCls: 'x-strip-left', - - /** - * @cfg afterCls - * @type String - * CSS class added to the afterCt element. This is the element that holds any special items such as scrollers, - * which must always be present at the rightmost edge of the Container - */ - afterCls: 'x-strip-right', - - /** - * @cfg scrollerCls - * @type String - * CSS class added to both scroller elements if enableScroll is used - */ - scrollerCls: 'x-strip-scroller', - - /** - * @cfg beforeScrollerCls - * @type String - * CSS class added to the left scroller element if enableScroll is used - */ - beforeScrollerCls: 'x-strip-scroller-left', - - /** - * @cfg afterScrollerCls - * @type String - * CSS class added to the right scroller element if enableScroll is used - */ - afterScrollerCls: 'x-strip-scroller-right', - - /** - * @private - * Sets up an listener to scroll on the layout's innerCt mousewheel event - */ - createWheelListener: function() { - this.layout.innerCt.on({ - scope : this, - mousewheel: function(e) { - e.stopEvent(); - - this.scrollBy(e.getWheelDelta() * this.wheelIncrement * -1, false); - } - }); - }, - - /** - * @private - * Most of the heavy lifting is done in the subclasses - */ - handleOverflow: function(calculations, targetSize) { - this.createInnerElements(); - this.showScrollers(); - }, - - /** - * @private - */ - clearOverflow: function() { - this.hideScrollers(); - }, - - /** - * @private - * Shows the scroller elements in the beforeCt and afterCt. Creates the scrollers first if they are not already - * present. - */ - showScrollers: function() { - this.createScrollers(); - - this.beforeScroller.show(); - this.afterScroller.show(); - - this.updateScrollButtons(); - }, - - /** - * @private - * Hides the scroller elements in the beforeCt and afterCt - */ - hideScrollers: function() { - if (this.beforeScroller != undefined) { - this.beforeScroller.hide(); - this.afterScroller.hide(); - } - }, - - /** - * @private - * Creates the clickable scroller elements and places them into the beforeCt and afterCt - */ - createScrollers: function() { - if (!this.beforeScroller && !this.afterScroller) { - var before = this.beforeCt.createChild({ - cls: String.format("{0} {1} ", this.scrollerCls, this.beforeScrollerCls) - }); - - var after = this.afterCt.createChild({ - cls: String.format("{0} {1}", this.scrollerCls, this.afterScrollerCls) - }); - - before.addClassOnOver(this.beforeScrollerCls + '-hover'); - after.addClassOnOver(this.afterScrollerCls + '-hover'); - - before.setVisibilityMode(Ext.Element.DISPLAY); - after.setVisibilityMode(Ext.Element.DISPLAY); - - this.beforeRepeater = new Ext.util.ClickRepeater(before, { - interval: this.scrollRepeatInterval, - handler : this.scrollLeft, - scope : this - }); - - this.afterRepeater = new Ext.util.ClickRepeater(after, { - interval: this.scrollRepeatInterval, - handler : this.scrollRight, - scope : this - }); - - /** - * @property beforeScroller - * @type Ext.Element - * The left scroller element. Only created when needed. - */ - this.beforeScroller = before; - - /** - * @property afterScroller - * @type Ext.Element - * The left scroller element. Only created when needed. - */ - this.afterScroller = after; - } - }, - - /** - * @private - */ - destroy: function() { - Ext.destroy(this.beforeScroller, this.afterScroller, this.beforeRepeater, this.afterRepeater, this.beforeCt, this.afterCt); - }, - - /** - * @private - * Scrolls left or right by the number of pixels specified - * @param {Number} delta Number of pixels to scroll to the right by. Use a negative number to scroll left - */ - scrollBy: function(delta, animate) { - this.scrollTo(this.getScrollPosition() + delta, animate); - }, - - /** - * @private - * Normalizes an item reference, string id or numerical index into a reference to the item - * @param {Ext.Component|String|Number} item The item reference, id or index - * @return {Ext.Component} The item - */ - getItem: function(item) { - if (Ext.isString(item)) { - item = Ext.getCmp(item); - } else if (Ext.isNumber(item)) { - item = this.items[item]; - } - - return item; - }, - - /** - * @private - * @return {Object} Object passed to scrollTo when scrolling - */ - getScrollAnim: function() { - return { - duration: this.scrollDuration, - callback: this.updateScrollButtons, - scope : this - }; - }, - - /** - * @private - * Enables or disables each scroller button based on the current scroll position - */ - updateScrollButtons: function() { - if (this.beforeScroller == undefined || this.afterScroller == undefined) { - return; - } - - var beforeMeth = this.atExtremeBefore() ? 'addClass' : 'removeClass', - afterMeth = this.atExtremeAfter() ? 'addClass' : 'removeClass', - beforeCls = this.beforeScrollerCls + '-disabled', - afterCls = this.afterScrollerCls + '-disabled'; - - this.beforeScroller[beforeMeth](beforeCls); - this.afterScroller[afterMeth](afterCls); - this.scrolling = false; - }, - - /** - * @private - * Returns true if the innerCt scroll is already at its left-most point - * @return {Boolean} True if already at furthest left point - */ - atExtremeBefore: function() { - return this.getScrollPosition() === 0; - }, - - /** - * @private - * Scrolls to the left by the configured amount - */ - scrollLeft: function(animate) { - this.scrollBy(-this.scrollIncrement, animate); - }, - - /** - * @private - * Scrolls to the right by the configured amount - */ - scrollRight: function(animate) { - this.scrollBy(this.scrollIncrement, animate); - }, - - /** - * Scrolls to the given component. - * @param {String|Number|Ext.Component} item The item to scroll to. Can be a numerical index, component id - * or a reference to the component itself. - * @param {Boolean} animate True to animate the scrolling - */ - scrollToItem: function(item, animate) { - item = this.getItem(item); - - if (item != undefined) { - var visibility = this.getItemVisibility(item); - - if (!visibility.fullyVisible) { - var box = item.getBox(true, true), - newX = box.x; - - if (visibility.hiddenRight) { - newX -= (this.layout.innerCt.getWidth() - box.width); - } - - this.scrollTo(newX, animate); - } - } - }, - - /** - * @private - * For a given item in the container, return an object with information on whether the item is visible - * with the current innerCt scroll value. - * @param {Ext.Component} item The item - * @return {Object} Values for fullyVisible, hiddenLeft and hiddenRight - */ - getItemVisibility: function(item) { - var box = this.getItem(item).getBox(true, true), - itemLeft = box.x, - itemRight = box.x + box.width, - scrollLeft = this.getScrollPosition(), - scrollRight = this.layout.innerCt.getWidth() + scrollLeft; - - return { - hiddenLeft : itemLeft < scrollLeft, - hiddenRight : itemRight > scrollRight, - fullyVisible: itemLeft > scrollLeft && itemRight < scrollRight - }; - } -}); - -Ext.layout.boxOverflow.scroller = Ext.layout.boxOverflow.Scroller; - - -/** - * @class Ext.layout.boxOverflow.VerticalScroller - * @extends Ext.layout.boxOverflow.Scroller - * Description - */ -Ext.layout.boxOverflow.VerticalScroller = Ext.extend(Ext.layout.boxOverflow.Scroller, { - scrollIncrement: 75, - wheelIncrement : 2, - - handleOverflow: function(calculations, targetSize) { - Ext.layout.boxOverflow.VerticalScroller.superclass.handleOverflow.apply(this, arguments); - - return { - targetSize: { - height: targetSize.height - (this.beforeCt.getHeight() + this.afterCt.getHeight()), - width : targetSize.width - } - }; - }, - - /** - * @private - * Creates the beforeCt and afterCt elements if they have not already been created - */ - createInnerElements: function() { - var target = this.layout.innerCt; - - //normal items will be rendered to the innerCt. beforeCt and afterCt allow for fixed positioning of - //special items such as scrollers or dropdown menu triggers - if (!this.beforeCt) { - this.beforeCt = target.insertSibling({cls: this.beforeCls}, 'before'); - this.afterCt = target.insertSibling({cls: this.afterCls}, 'after'); - - this.createWheelListener(); - } - }, - - /** - * @private - * Scrolls to the given position. Performs bounds checking. - * @param {Number} position The position to scroll to. This is constrained. - * @param {Boolean} animate True to animate. If undefined, falls back to value of this.animateScroll - */ - scrollTo: function(position, animate) { - var oldPosition = this.getScrollPosition(), - newPosition = position.constrain(0, this.getMaxScrollBottom()); - - if (newPosition != oldPosition && !this.scrolling) { - if (animate == undefined) { - animate = this.animateScroll; - } - - this.layout.innerCt.scrollTo('top', newPosition, animate ? this.getScrollAnim() : false); - - if (animate) { - this.scrolling = true; - } else { - this.scrolling = false; - this.updateScrollButtons(); - } - } - }, - - /** - * Returns the current scroll position of the innerCt element - * @return {Number} The current scroll position - */ - getScrollPosition: function(){ - return parseInt(this.layout.innerCt.dom.scrollTop, 10) || 0; - }, - - /** - * @private - * Returns the maximum value we can scrollTo - * @return {Number} The max scroll value - */ - getMaxScrollBottom: function() { - return this.layout.innerCt.dom.scrollHeight - this.layout.innerCt.getHeight(); - }, - - /** - * @private - * Returns true if the innerCt scroll is already at its right-most point - * @return {Boolean} True if already at furthest right point - */ - atExtremeAfter: function() { - return this.getScrollPosition() >= this.getMaxScrollBottom(); - } -}); - -Ext.layout.boxOverflow.scroller.vbox = Ext.layout.boxOverflow.VerticalScroller; - - -/** - * @class Ext.layout.boxOverflow.HorizontalScroller - * @extends Ext.layout.boxOverflow.Scroller - * Description - */ -Ext.layout.boxOverflow.HorizontalScroller = Ext.extend(Ext.layout.boxOverflow.Scroller, { - handleOverflow: function(calculations, targetSize) { - Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this, arguments); - - return { - targetSize: { - height: targetSize.height, - width : targetSize.width - (this.beforeCt.getWidth() + this.afterCt.getWidth()) - } - }; - }, - - /** - * @private - * Creates the beforeCt and afterCt elements if they have not already been created - */ - createInnerElements: function() { - var target = this.layout.innerCt; - - //normal items will be rendered to the innerCt. beforeCt and afterCt allow for fixed positioning of - //special items such as scrollers or dropdown menu triggers - if (!this.beforeCt) { - this.afterCt = target.insertSibling({cls: this.afterCls}, 'before'); - this.beforeCt = target.insertSibling({cls: this.beforeCls}, 'before'); - - this.createWheelListener(); - } - }, - - /** - * @private - * Scrolls to the given position. Performs bounds checking. - * @param {Number} position The position to scroll to. This is constrained. - * @param {Boolean} animate True to animate. If undefined, falls back to value of this.animateScroll - */ - scrollTo: function(position, animate) { - var oldPosition = this.getScrollPosition(), - newPosition = position.constrain(0, this.getMaxScrollRight()); - - if (newPosition != oldPosition && !this.scrolling) { - if (animate == undefined) { - animate = this.animateScroll; - } - - this.layout.innerCt.scrollTo('left', newPosition, animate ? this.getScrollAnim() : false); - - if (animate) { - this.scrolling = true; - } else { - this.scrolling = false; - this.updateScrollButtons(); - } - } - }, - - /** - * Returns the current scroll position of the innerCt element - * @return {Number} The current scroll position - */ - getScrollPosition: function(){ - return parseInt(this.layout.innerCt.dom.scrollLeft, 10) || 0; - }, - - /** - * @private - * Returns the maximum value we can scrollTo - * @return {Number} The max scroll value - */ - getMaxScrollRight: function() { - return this.layout.innerCt.dom.scrollWidth - this.layout.innerCt.getWidth(); - }, - - /** - * @private - * Returns true if the innerCt scroll is already at its right-most point - * @return {Boolean} True if already at furthest right point - */ - atExtremeAfter: function() { - return this.getScrollPosition() >= this.getMaxScrollRight(); - } -}); - -Ext.layout.boxOverflow.scroller.hbox = Ext.layout.boxOverflow.HorizontalScroller;/** - * @class Ext.layout.HBoxLayout - * @extends Ext.layout.BoxLayout - *

      A layout that arranges items horizontally across a Container. This layout optionally divides available horizontal - * space between child items containing a numeric flex configuration.

      - * This layout may also be used to set the heights of child items by configuring it with the {@link #align} option. - */ -Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, { - /** - * @cfg {String} align - * Controls how the child items of the container are aligned. Acceptable configuration values for this - * property are: - *
        - *
      • top : Default
        child items are aligned vertically - * at the top of the container
      • - *
      • middle :
        child items are aligned vertically in the - * middle of the container
      • - *
      • stretch :
        child items are stretched vertically to fill - * the height of the container
      • - *
      • stretchmax :
        child items are stretched vertically to - * the height of the largest item.
      • - */ - align: 'top', // top, middle, stretch, strechmax - - type : 'hbox', - - /** - * @cfg {String} pack - * Controls how the child items of the container are packed together. Acceptable configuration values - * for this property are: - *
          - *
        • start : Default
          child items are packed together at - * left side of container
        • - *
        • center :
          child items are packed together at - * mid-width of container
        • - *
        • end :
          child items are packed together at right - * side of container
        • - *
        - */ - /** - * @cfg {Number} flex - * This configuation option is to be applied to child items of the container managed - * by this layout. Each child item with a flex property will be flexed horizontally - * according to each item's relative flex value compared to the sum of all items with - * a flex value specified. Any child items that have either a flex = 0 or - * flex = undefined will not be 'flexed' (the initial size will not be changed). - */ - - /** - * @private - * Calculates the size and positioning of each item in the HBox. This iterates over all of the rendered, - * visible items and returns a height, width, top and left for each, as well as a reference to each. Also - * returns meta data such as maxHeight which are useful when resizing layout wrappers such as this.innerCt. - * @param {Array} visibleItems The array of all rendered, visible items to be calculated for - * @param {Object} targetSize Object containing target size and height - * @return {Object} Object containing box measurements for each child, plus meta data - */ - calculateChildBoxes: function(visibleItems, targetSize) { - var visibleCount = visibleItems.length, - - padding = this.padding, - topOffset = padding.top, - leftOffset = padding.left, - paddingVert = topOffset + padding.bottom, - paddingHoriz = leftOffset + padding.right, - - width = targetSize.width - this.scrollOffset, - height = targetSize.height, - availHeight = Math.max(0, height - paddingVert), - - isStart = this.pack == 'start', - isCenter = this.pack == 'center', - isEnd = this.pack == 'end', - - nonFlexWidth = 0, - maxHeight = 0, - totalFlex = 0, - desiredWidth = 0, - minimumWidth = 0, - - //used to cache the calculated size and position values for each child item - boxes = [], - - //used in the for loops below, just declared here for brevity - child, childWidth, childHeight, childSize, childMargins, canLayout, i, calcs, flexedWidth, - horizMargins, vertMargins, stretchHeight; - - //gather the total flex of all flexed items and the width taken up by fixed width items - for (i = 0; i < visibleCount; i++) { - child = visibleItems[i]; - childHeight = child.height; - childWidth = child.width; - canLayout = !child.hasLayout && typeof child.doLayout == 'function'; - - // Static width (numeric) requires no calcs - if (typeof childWidth != 'number') { - - // flex and not 'auto' width - if (child.flex && !childWidth) { - totalFlex += child.flex; - - // Not flexed or 'auto' width or undefined width - } else { - //Render and layout sub-containers without a flex or width defined, as otherwise we - //don't know how wide the sub-container should be and cannot calculate flexed widths - if (!childWidth && canLayout) { - child.doLayout(); - } - - childSize = child.getSize(); - childWidth = childSize.width; - childHeight = childSize.height; - } - } - - childMargins = child.margins; - horizMargins = childMargins.left + childMargins.right; - - nonFlexWidth += horizMargins + (childWidth || 0); - desiredWidth += horizMargins + (child.flex ? child.minWidth || 0 : childWidth); - minimumWidth += horizMargins + (child.minWidth || childWidth || 0); - - // Max height for align - force layout of non-laid out subcontainers without a numeric height - if (typeof childHeight != 'number') { - if (canLayout) { - child.doLayout(); - } - childHeight = child.getHeight(); - } - - maxHeight = Math.max(maxHeight, childHeight + childMargins.top + childMargins.bottom); - - //cache the size of each child component. Don't set height or width to 0, keep undefined instead - boxes.push({ - component: child, - height : childHeight || undefined, - width : childWidth || undefined - }); - } - - var shortfall = desiredWidth - width, - tooNarrow = minimumWidth > width; - - //the width available to the flexed items - var availableWidth = Math.max(0, width - nonFlexWidth - paddingHoriz); - - if (tooNarrow) { - for (i = 0; i < visibleCount; i++) { - boxes[i].width = visibleItems[i].minWidth || visibleItems[i].width || boxes[i].width; - } - } else { - //all flexed items should be sized to their minimum width, other items should be shrunk down until - //the shortfall has been accounted for - if (shortfall > 0) { - var minWidths = []; - - /** - * When we have a shortfall but are not tooNarrow, we need to shrink the width of each non-flexed item. - * Flexed items are immediately reduced to their minWidth and anything already at minWidth is ignored. - * The remaining items are collected into the minWidths array, which is later used to distribute the shortfall. - */ - for (var index = 0, length = visibleCount; index < length; index++) { - var item = visibleItems[index], - minWidth = item.minWidth || 0; - - //shrink each non-flex tab by an equal amount to make them all fit. Flexed items are all - //shrunk to their minWidth because they're flexible and should be the first to lose width - if (item.flex) { - boxes[index].width = minWidth; - } else { - minWidths.push({ - minWidth : minWidth, - available: boxes[index].width - minWidth, - index : index - }); - } - } - - //sort by descending amount of width remaining before minWidth is reached - minWidths.sort(function(a, b) { - return a.available > b.available ? 1 : -1; - }); - - /* - * Distribute the shortfall (difference between total desired with of all items and actual width available) - * between the non-flexed items. We try to distribute the shortfall evenly, but apply it to items with the - * smallest difference between their width and minWidth first, so that if reducing the width by the average - * amount would make that item less than its minWidth, we carry the remainder over to the next item. - */ - for (var i = 0, length = minWidths.length; i < length; i++) { - var itemIndex = minWidths[i].index; - - if (itemIndex == undefined) { - continue; - } - - var item = visibleItems[itemIndex], - box = boxes[itemIndex], - oldWidth = box.width, - minWidth = item.minWidth, - newWidth = Math.max(minWidth, oldWidth - Math.ceil(shortfall / (length - i))), - reduction = oldWidth - newWidth; - - boxes[itemIndex].width = newWidth; - shortfall -= reduction; - } - } else { - //temporary variables used in the flex width calculations below - var remainingWidth = availableWidth, - remainingFlex = totalFlex; - - //calculate the widths of each flexed item - for (i = 0; i < visibleCount; i++) { - child = visibleItems[i]; - calcs = boxes[i]; - - childMargins = child.margins; - vertMargins = childMargins.top + childMargins.bottom; - - if (isStart && child.flex && !child.width) { - flexedWidth = Math.ceil((child.flex / remainingFlex) * remainingWidth); - remainingWidth -= flexedWidth; - remainingFlex -= child.flex; - - calcs.width = flexedWidth; - calcs.dirtySize = true; - } - } - } - } - - if (isCenter) { - leftOffset += availableWidth / 2; - } else if (isEnd) { - leftOffset += availableWidth; - } - - //finally, calculate the left and top position of each item - for (i = 0; i < visibleCount; i++) { - child = visibleItems[i]; - calcs = boxes[i]; - - childMargins = child.margins; - leftOffset += childMargins.left; - vertMargins = childMargins.top + childMargins.bottom; - - calcs.left = leftOffset; - calcs.top = topOffset + childMargins.top; - - switch (this.align) { - case 'stretch': - stretchHeight = availHeight - vertMargins; - calcs.height = stretchHeight.constrain(child.minHeight || 0, child.maxHeight || 1000000); - calcs.dirtySize = true; - break; - case 'stretchmax': - stretchHeight = maxHeight - vertMargins; - calcs.height = stretchHeight.constrain(child.minHeight || 0, child.maxHeight || 1000000); - calcs.dirtySize = true; - break; - case 'middle': - var diff = availHeight - calcs.height - vertMargins; - if (diff > 0) { - calcs.top = topOffset + vertMargins + (diff / 2); - } - } - - leftOffset += calcs.width + childMargins.right; - } - - return { - boxes: boxes, - meta : { - maxHeight : maxHeight, - nonFlexWidth: nonFlexWidth, - desiredWidth: desiredWidth, - minimumWidth: minimumWidth, - shortfall : desiredWidth - width, - tooNarrow : tooNarrow - } - }; - } -}); - -Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout;/** - * @class Ext.layout.VBoxLayout - * @extends Ext.layout.BoxLayout - *

        A layout that arranges items vertically down a Container. This layout optionally divides available vertical - * space between child items containing a numeric flex configuration.

        - * This layout may also be used to set the widths of child items by configuring it with the {@link #align} option. - */ -Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, { - /** - * @cfg {String} align - * Controls how the child items of the container are aligned. Acceptable configuration values for this - * property are: - *
          - *
        • left : Default
          child items are aligned horizontally - * at the left side of the container
        • - *
        • center :
          child items are aligned horizontally at the - * mid-width of the container
        • - *
        • stretch :
          child items are stretched horizontally to fill - * the width of the container
        • - *
        • stretchmax :
          child items are stretched horizontally to - * the size of the largest item.
        • - *
        - */ - align : 'left', // left, center, stretch, strechmax - type: 'vbox', - - /** - * @cfg {String} pack - * Controls how the child items of the container are packed together. Acceptable configuration values - * for this property are: - *
          - *
        • start : Default
          child items are packed together at - * top side of container
        • - *
        • center :
          child items are packed together at - * mid-height of container
        • - *
        • end :
          child items are packed together at bottom - * side of container
        • - *
        - */ - - /** - * @cfg {Number} flex - * This configuation option is to be applied to child items of the container managed - * by this layout. Each child item with a flex property will be flexed vertically - * according to each item's relative flex value compared to the sum of all items with - * a flex value specified. Any child items that have either a flex = 0 or - * flex = undefined will not be 'flexed' (the initial size will not be changed). - */ - - /** - * @private - * Calculates the size and positioning of each item in the VBox. This iterates over all of the rendered, - * visible items and returns a height, width, top and left for each, as well as a reference to each. Also - * returns meta data such as maxHeight which are useful when resizing layout wrappers such as this.innerCt. - * @param {Array} visibleItems The array of all rendered, visible items to be calculated for - * @param {Object} targetSize Object containing target size and height - * @return {Object} Object containing box measurements for each child, plus meta data - */ - calculateChildBoxes: function(visibleItems, targetSize) { - var visibleCount = visibleItems.length, - - padding = this.padding, - topOffset = padding.top, - leftOffset = padding.left, - paddingVert = topOffset + padding.bottom, - paddingHoriz = leftOffset + padding.right, - - width = targetSize.width - this.scrollOffset, - height = targetSize.height, - availWidth = Math.max(0, width - paddingHoriz), - - isStart = this.pack == 'start', - isCenter = this.pack == 'center', - isEnd = this.pack == 'end', - - nonFlexHeight= 0, - maxWidth = 0, - totalFlex = 0, - desiredHeight= 0, - minimumHeight= 0, - - //used to cache the calculated size and position values for each child item - boxes = [], - - //used in the for loops below, just declared here for brevity - child, childWidth, childHeight, childSize, childMargins, canLayout, i, calcs, flexedHeight, - horizMargins, vertMargins, stretchWidth, length; - - //gather the total flex of all flexed items and the width taken up by fixed width items - for (i = 0; i < visibleCount; i++) { - child = visibleItems[i]; - childHeight = child.height; - childWidth = child.width; - canLayout = !child.hasLayout && typeof child.doLayout == 'function'; - - // Static height (numeric) requires no calcs - if (typeof childHeight != 'number') { - - // flex and not 'auto' height - if (child.flex && !childHeight) { - totalFlex += child.flex; - - // Not flexed or 'auto' height or undefined height - } else { - //Render and layout sub-containers without a flex or width defined, as otherwise we - //don't know how wide the sub-container should be and cannot calculate flexed widths - if (!childHeight && canLayout) { - child.doLayout(); - } - - childSize = child.getSize(); - childWidth = childSize.width; - childHeight = childSize.height; - } - } - - childMargins = child.margins; - vertMargins = childMargins.top + childMargins.bottom; - - nonFlexHeight += vertMargins + (childHeight || 0); - desiredHeight += vertMargins + (child.flex ? child.minHeight || 0 : childHeight); - minimumHeight += vertMargins + (child.minHeight || childHeight || 0); - - // Max width for align - force layout of non-layed out subcontainers without a numeric width - if (typeof childWidth != 'number') { - if (canLayout) { - child.doLayout(); - } - childWidth = child.getWidth(); - } - - maxWidth = Math.max(maxWidth, childWidth + childMargins.left + childMargins.right); - - //cache the size of each child component - boxes.push({ - component: child, - height : childHeight || undefined, - width : childWidth || undefined - }); - } - - var shortfall = desiredHeight - height, - tooNarrow = minimumHeight > height; - - //the height available to the flexed items - var availableHeight = Math.max(0, (height - nonFlexHeight - paddingVert)); - - if (tooNarrow) { - for (i = 0, length = visibleCount; i < length; i++) { - boxes[i].height = visibleItems[i].minHeight || visibleItems[i].height || boxes[i].height; - } - } else { - //all flexed items should be sized to their minimum width, other items should be shrunk down until - //the shortfall has been accounted for - if (shortfall > 0) { - var minHeights = []; - - /** - * When we have a shortfall but are not tooNarrow, we need to shrink the height of each non-flexed item. - * Flexed items are immediately reduced to their minHeight and anything already at minHeight is ignored. - * The remaining items are collected into the minHeights array, which is later used to distribute the shortfall. - */ - for (var index = 0, length = visibleCount; index < length; index++) { - var item = visibleItems[index], - minHeight = item.minHeight || 0; - - //shrink each non-flex tab by an equal amount to make them all fit. Flexed items are all - //shrunk to their minHeight because they're flexible and should be the first to lose height - if (item.flex) { - boxes[index].height = minHeight; - } else { - minHeights.push({ - minHeight: minHeight, - available: boxes[index].height - minHeight, - index : index - }); - } - } - - //sort by descending minHeight value - minHeights.sort(function(a, b) { - return a.available > b.available ? 1 : -1; - }); - - /* - * Distribute the shortfall (difference between total desired with of all items and actual height available) - * between the non-flexed items. We try to distribute the shortfall evenly, but apply it to items with the - * smallest difference between their height and minHeight first, so that if reducing the height by the average - * amount would make that item less than its minHeight, we carry the remainder over to the next item. - */ - for (var i = 0, length = minHeights.length; i < length; i++) { - var itemIndex = minHeights[i].index; - - if (itemIndex == undefined) { - continue; - } - - var item = visibleItems[itemIndex], - box = boxes[itemIndex], - oldHeight = box.height, - minHeight = item.minHeight, - newHeight = Math.max(minHeight, oldHeight - Math.ceil(shortfall / (length - i))), - reduction = oldHeight - newHeight; - - boxes[itemIndex].height = newHeight; - shortfall -= reduction; - } - } else { - //temporary variables used in the flex height calculations below - var remainingHeight = availableHeight, - remainingFlex = totalFlex; - - //calculate the height of each flexed item - for (i = 0; i < visibleCount; i++) { - child = visibleItems[i]; - calcs = boxes[i]; - - childMargins = child.margins; - horizMargins = childMargins.left + childMargins.right; - - if (isStart && child.flex && !child.height) { - flexedHeight = Math.ceil((child.flex / remainingFlex) * remainingHeight); - remainingHeight -= flexedHeight; - remainingFlex -= child.flex; - - calcs.height = flexedHeight; - calcs.dirtySize = true; - } - } - } - } - - if (isCenter) { - topOffset += availableHeight / 2; - } else if (isEnd) { - topOffset += availableHeight; - } - - //finally, calculate the left and top position of each item - for (i = 0; i < visibleCount; i++) { - child = visibleItems[i]; - calcs = boxes[i]; - - childMargins = child.margins; - topOffset += childMargins.top; - horizMargins = childMargins.left + childMargins.right; - - - calcs.left = leftOffset + childMargins.left; - calcs.top = topOffset; - - switch (this.align) { - case 'stretch': - stretchWidth = availWidth - horizMargins; - calcs.width = stretchWidth.constrain(child.minWidth || 0, child.maxWidth || 1000000); - calcs.dirtySize = true; - break; - case 'stretchmax': - stretchWidth = maxWidth - horizMargins; - calcs.width = stretchWidth.constrain(child.minWidth || 0, child.maxWidth || 1000000); - calcs.dirtySize = true; - break; - case 'center': - var diff = availWidth - calcs.width - horizMargins; - if (diff > 0) { - calcs.left = leftOffset + horizMargins + (diff / 2); - } - } - - topOffset += calcs.height + childMargins.bottom; - } - - return { - boxes: boxes, - meta : { - maxWidth : maxWidth, - nonFlexHeight: nonFlexHeight, - desiredHeight: desiredHeight, - minimumHeight: minimumHeight, - shortfall : desiredHeight - height, - tooNarrow : tooNarrow - } - }; - } -}); - -Ext.Container.LAYOUTS.vbox = Ext.layout.VBoxLayout; -/** - * @class Ext.layout.ToolbarLayout - * @extends Ext.layout.ContainerLayout - * Layout manager used by Ext.Toolbar. This is highly specialised for use by Toolbars and would not - * usually be used by any other class. - */ -Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, { - monitorResize : true, - - type: 'toolbar', - - /** - * @property triggerWidth - * @type Number - * The width allocated for the menu trigger at the extreme right end of the Toolbar - */ - triggerWidth: 18, - - /** - * @property noItemsMenuText - * @type String - * HTML fragment to render into the toolbar overflow menu if there are no items to display - */ - noItemsMenuText : '
        (None)
        ', - - /** - * @private - * @property lastOverflow - * @type Boolean - * Used internally to record whether the last layout caused an overflow or not - */ - lastOverflow: false, - - /** - * @private - * @property tableHTML - * @type String - * String used to build the HTML injected to support the Toolbar's layout. The align property is - * injected into this string inside the td.x-toolbar-left element during onLayout. - */ - tableHTML: [ - '', - '', - '', - '', - '', - '', - '', - '
        ', - '', - '', - '', - '', - '
        ', - '
        ', - '', - '', - '', - '', - '', - '', - '', - '
        ', - '', - '', - '', - '', - '
        ', - '
        ', - '', - '', - '', - '', - '
        ', - '
        ', - '
        ' - ].join(""), - - /** - * @private - * Create the wrapping Toolbar HTML and render/move all the items into the correct places - */ - onLayout : function(ct, target) { - //render the Toolbar HTML if it's not already present - if (!this.leftTr) { - var align = ct.buttonAlign == 'center' ? 'center' : 'left'; - - target.addClass('x-toolbar-layout-ct'); - target.insertHtml('beforeEnd', String.format(this.tableHTML, align)); - - this.leftTr = target.child('tr.x-toolbar-left-row', true); - this.rightTr = target.child('tr.x-toolbar-right-row', true); - this.extrasTr = target.child('tr.x-toolbar-extras-row', true); - - if (this.hiddenItem == undefined) { - /** - * @property hiddenItems - * @type Array - * Holds all items that are currently hidden due to there not being enough space to render them - * These items will appear on the expand menu. - */ - this.hiddenItems = []; - } - } - - var side = ct.buttonAlign == 'right' ? this.rightTr : this.leftTr, - items = ct.items.items, - position = 0; - - //render each item if not already rendered, place it into the correct (left or right) target - for (var i = 0, len = items.length, c; i < len; i++, position++) { - c = items[i]; - - if (c.isFill) { - side = this.rightTr; - position = -1; - } else if (!c.rendered) { - c.render(this.insertCell(c, side, position)); - this.configureItem(c); - } else { - if (!c.xtbHidden && !this.isValidParent(c, side.childNodes[position])) { - var td = this.insertCell(c, side, position); - td.appendChild(c.getPositionEl().dom); - c.container = Ext.get(td); - } - } - } - - //strip extra empty cells - this.cleanup(this.leftTr); - this.cleanup(this.rightTr); - this.cleanup(this.extrasTr); - this.fitToSize(target); - }, - - /** - * @private - * Removes any empty nodes from the given element - * @param {Ext.Element} el The element to clean up - */ - cleanup : function(el) { - var cn = el.childNodes, i, c; - - for (i = cn.length-1; i >= 0 && (c = cn[i]); i--) { - if (!c.firstChild) { - el.removeChild(c); - } - } - }, - - /** - * @private - * Inserts the given Toolbar item into the given element - * @param {Ext.Component} c The component to add - * @param {Ext.Element} target The target to add the component to - * @param {Number} position The position to add the component at - */ - insertCell : function(c, target, position) { - var td = document.createElement('td'); - td.className = 'x-toolbar-cell'; - - target.insertBefore(td, target.childNodes[position] || null); - - return td; - }, - - /** - * @private - * Hides an item because it will not fit in the available width. The item will be unhidden again - * if the Toolbar is resized to be large enough to show it - * @param {Ext.Component} item The item to hide - */ - hideItem : function(item) { - this.hiddenItems.push(item); - - item.xtbHidden = true; - item.xtbWidth = item.getPositionEl().dom.parentNode.offsetWidth; - item.hide(); - }, - - /** - * @private - * Unhides an item that was previously hidden due to there not being enough space left on the Toolbar - * @param {Ext.Component} item The item to show - */ - unhideItem : function(item) { - item.show(); - item.xtbHidden = false; - this.hiddenItems.remove(item); - }, - - /** - * @private - * Returns the width of the given toolbar item. If the item is currently hidden because there - * is not enough room to render it, its previous width is returned - * @param {Ext.Component} c The component to measure - * @return {Number} The width of the item - */ - getItemWidth : function(c) { - return c.hidden ? (c.xtbWidth || 0) : c.getPositionEl().dom.parentNode.offsetWidth; - }, - - /** - * @private - * Called at the end of onLayout. At this point the Toolbar has already been resized, so we need - * to fit the items into the available width. We add up the width required by all of the items in - * the toolbar - if we don't have enough space we hide the extra items and render the expand menu - * trigger. - * @param {Ext.Element} target The Element the Toolbar is currently laid out within - */ - fitToSize : function(target) { - if (this.container.enableOverflow === false) { - return; - } - - var width = target.dom.clientWidth, - tableWidth = target.dom.firstChild.offsetWidth, - clipWidth = width - this.triggerWidth, - lastWidth = this.lastWidth || 0, - - hiddenItems = this.hiddenItems, - hasHiddens = hiddenItems.length != 0, - isLarger = width >= lastWidth; - - this.lastWidth = width; - - if (tableWidth > width || (hasHiddens && isLarger)) { - var items = this.container.items.items, - len = items.length, - loopWidth = 0, - item; - - for (var i = 0; i < len; i++) { - item = items[i]; - - if (!item.isFill) { - loopWidth += this.getItemWidth(item); - if (loopWidth > clipWidth) { - if (!(item.hidden || item.xtbHidden)) { - this.hideItem(item); - } - } else if (item.xtbHidden) { - this.unhideItem(item); - } - } - } - } - - //test for number of hidden items again here because they may have changed above - hasHiddens = hiddenItems.length != 0; - - if (hasHiddens) { - this.initMore(); - - if (!this.lastOverflow) { - this.container.fireEvent('overflowchange', this.container, true); - this.lastOverflow = true; - } - } else if (this.more) { - this.clearMenu(); - this.more.destroy(); - delete this.more; - - if (this.lastOverflow) { - this.container.fireEvent('overflowchange', this.container, false); - this.lastOverflow = false; - } - } - }, - - /** - * @private - * Returns a menu config for a given component. This config is used to create a menu item - * to be added to the expander menu - * @param {Ext.Component} component The component to create the config for - * @param {Boolean} hideOnClick Passed through to the menu item - */ - createMenuConfig : function(component, hideOnClick){ - var config = Ext.apply({}, component.initialConfig), - group = component.toggleGroup; - - Ext.copyTo(config, component, [ - 'iconCls', 'icon', 'itemId', 'disabled', 'handler', 'scope', 'menu' - ]); - - Ext.apply(config, { - text : component.overflowText || component.text, - hideOnClick: hideOnClick - }); - - if (group || component.enableToggle) { - Ext.apply(config, { - group : group, - checked: component.pressed, - listeners: { - checkchange: function(item, checked){ - component.toggle(checked); - } - } - }); - } - - delete config.ownerCt; - delete config.xtype; - delete config.id; - - return config; - }, - - /** - * @private - * Adds the given Toolbar item to the given menu. Buttons inside a buttongroup are added individually. - * @param {Ext.menu.Menu} menu The menu to add to - * @param {Ext.Component} component The component to add - */ - addComponentToMenu : function(menu, component) { - if (component instanceof Ext.Toolbar.Separator) { - menu.add('-'); - - } else if (Ext.isFunction(component.isXType)) { - if (component.isXType('splitbutton')) { - menu.add(this.createMenuConfig(component, true)); - - } else if (component.isXType('button')) { - menu.add(this.createMenuConfig(component, !component.menu)); - - } else if (component.isXType('buttongroup')) { - component.items.each(function(item){ - this.addComponentToMenu(menu, item); - }, this); - } - } - }, - - /** - * @private - * Deletes the sub-menu of each item in the expander menu. Submenus are created for items such as - * splitbuttons and buttongroups, where the Toolbar item cannot be represented by a single menu item - */ - clearMenu : function(){ - var menu = this.moreMenu; - if (menu && menu.items) { - menu.items.each(function(item){ - delete item.menu; - }); - } - }, - - /** - * @private - * Called before the expand menu is shown, this rebuilds the menu since it was last shown because - * it is possible that the items hidden due to space limitations on the Toolbar have changed since. - * @param {Ext.menu.Menu} m The menu - */ - beforeMoreShow : function(menu) { - var items = this.container.items.items, - len = items.length, - item, - prev; - - var needsSep = function(group, item){ - return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator); - }; - - this.clearMenu(); - menu.removeAll(); - for (var i = 0; i < len; i++) { - item = items[i]; - if (item.xtbHidden) { - if (prev && (needsSep(item, prev) || needsSep(prev, item))) { - menu.add('-'); - } - this.addComponentToMenu(menu, item); - prev = item; - } - } - - // put something so the menu isn't empty if no compatible items found - if (menu.items.length < 1) { - menu.add(this.noItemsMenuText); - } - }, - - /** - * @private - * Creates the expand trigger and menu, adding them to the at the extreme right of the - * Toolbar table - */ - initMore : function(){ - if (!this.more) { - /** - * @private - * @property moreMenu - * @type Ext.menu.Menu - * The expand menu - holds items for every Toolbar item that cannot be shown - * because the Toolbar is currently not wide enough. - */ - this.moreMenu = new Ext.menu.Menu({ - ownerCt : this.container, - listeners: { - beforeshow: this.beforeMoreShow, - scope: this - } - }); - - /** - * @private - * @property more - * @type Ext.Button - * The expand button which triggers the overflow menu to be shown - */ - this.more = new Ext.Button({ - iconCls: 'x-toolbar-more-icon', - cls : 'x-toolbar-more', - menu : this.moreMenu, - ownerCt: this.container - }); - - var td = this.insertCell(this.more, this.extrasTr, 100); - this.more.render(td); - } - }, - - destroy : function(){ - Ext.destroy(this.more, this.moreMenu); - delete this.leftTr; - delete this.rightTr; - delete this.extrasTr; - Ext.layout.ToolbarLayout.superclass.destroy.call(this); - } -}); - -Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout; -/** - * @class Ext.layout.MenuLayout - * @extends Ext.layout.ContainerLayout - *

        Layout manager used by {@link Ext.menu.Menu}. Generally this class should not need to be used directly.

        - */ - Ext.layout.MenuLayout = Ext.extend(Ext.layout.ContainerLayout, { - monitorResize : true, - - type: 'menu', - - setContainer : function(ct){ - this.monitorResize = !ct.floating; - // This event is only fired by the menu in IE, used so we don't couple - // the menu with the layout. - ct.on('autosize', this.doAutoSize, this); - Ext.layout.MenuLayout.superclass.setContainer.call(this, ct); - }, - - renderItem : function(c, position, target){ - if (!this.itemTpl) { - this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate( - '
      • ', - '', - '{altText}', - '', - '
      • ' - ); - } - - if(c && !c.rendered){ - if(Ext.isNumber(position)){ - position = target.dom.childNodes[position]; - } - var a = this.getItemArgs(c); - -// The Component's positionEl is the
      • it is rendered into - c.render(c.positionEl = position ? - this.itemTpl.insertBefore(position, a, true) : - this.itemTpl.append(target, a, true)); - -// Link the containing
      • to the item. - c.positionEl.menuItemId = c.getItemId(); - -// If rendering a regular Component, and it needs an icon, -// move the Component rightwards. - if (!a.isMenuItem && a.needsIcon) { - c.positionEl.addClass('x-menu-list-item-indent'); - } - this.configureItem(c); - }else if(c && !this.isValidParent(c, target)){ - if(Ext.isNumber(position)){ - position = target.dom.childNodes[position]; - } - target.dom.insertBefore(c.getActionEl().dom, position || null); - } - }, - - getItemArgs : function(c) { - var isMenuItem = c instanceof Ext.menu.Item, - canHaveIcon = !(isMenuItem || c instanceof Ext.menu.Separator); - - return { - isMenuItem: isMenuItem, - needsIcon: canHaveIcon && (c.icon || c.iconCls), - icon: c.icon || Ext.BLANK_IMAGE_URL, - iconCls: 'x-menu-item-icon ' + (c.iconCls || ''), - itemId: 'x-menu-el-' + c.id, - itemCls: 'x-menu-list-item ', - altText: c.altText || '' - }; - }, - - // Valid if the Component is in a
      • which is part of our target
          - isValidParent : function(c, target) { - return c.el.up('li.x-menu-list-item', 5).dom.parentNode === (target.dom || target); - }, - - onLayout : function(ct, target){ - Ext.layout.MenuLayout.superclass.onLayout.call(this, ct, target); - this.doAutoSize(); - }, - - doAutoSize : function(){ - var ct = this.container, w = ct.width; - if(ct.floating){ - if(w){ - ct.setWidth(w); - }else if(Ext.isIE){ - ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8 || Ext.isIE9) ? 'auto' : ct.minWidth); - var el = ct.getEl(), t = el.dom.offsetWidth; // force recalc - ct.setWidth(ct.getLayoutTarget().getWidth() + el.getFrameWidth('lr')); - } - } - } -}); -Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout; -/** - * @class Ext.Viewport - * @extends Ext.Container - *

          A specialized container representing the viewable application area (the browser viewport).

          - *

          The Viewport renders itself to the document body, and automatically sizes itself to the size of - * the browser viewport and manages window resizing. There may only be one Viewport created - * in a page. Inner layouts are available by virtue of the fact that all {@link Ext.Panel Panel}s - * added to the Viewport, either through its {@link #items}, or through the items, or the {@link #add} - * method of any of its child Panels may themselves have a layout.

          - *

          The Viewport does not provide scrolling, so child Panels within the Viewport should provide - * for scrolling if needed using the {@link #autoScroll} config.

          - *

          An example showing a classic application border layout:

          
          -new Ext.Viewport({
          -    layout: 'border',
          -    items: [{
          -        region: 'north',
          -        html: '<h1 class="x-panel-header">Page Title</h1>',
          -        autoHeight: true,
          -        border: false,
          -        margins: '0 0 5 0'
          -    }, {
          -        region: 'west',
          -        collapsible: true,
          -        title: 'Navigation',
          -        width: 200
          -        // the west region might typically utilize a {@link Ext.tree.TreePanel TreePanel} or a Panel with {@link Ext.layout.AccordionLayout Accordion layout}
          -    }, {
          -        region: 'south',
          -        title: 'Title for Panel',
          -        collapsible: true,
          -        html: 'Information goes here',
          -        split: true,
          -        height: 100,
          -        minHeight: 100
          -    }, {
          -        region: 'east',
          -        title: 'Title for the Grid Panel',
          -        collapsible: true,
          -        split: true,
          -        width: 200,
          -        xtype: 'grid',
          -        // remaining grid configuration not shown ...
          -        // notice that the GridPanel is added directly as the region
          -        // it is not "overnested" inside another Panel
          -    }, {
          -        region: 'center',
          -        xtype: 'tabpanel', // TabPanel itself has no title
          -        items: {
          -            title: 'Default Tab',
          -            html: 'The first tab\'s content. Others may be added dynamically'
          -        }
          -    }]
          -});
          -
          - * @constructor - * Create a new Viewport - * @param {Object} config The config object - * @xtype viewport - */ -Ext.Viewport = Ext.extend(Ext.Container, { - /* - * Privatize config options which, if used, would interfere with the - * correct operation of the Viewport as the sole manager of the - * layout of the document body. - */ - /** - * @cfg {Mixed} applyTo @hide - */ - /** - * @cfg {Boolean} allowDomMove @hide - */ - /** - * @cfg {Boolean} hideParent @hide - */ - /** - * @cfg {Mixed} renderTo @hide - */ - /** - * @cfg {Boolean} hideParent @hide - */ - /** - * @cfg {Number} height @hide - */ - /** - * @cfg {Number} width @hide - */ - /** - * @cfg {Boolean} autoHeight @hide - */ - /** - * @cfg {Boolean} autoWidth @hide - */ - /** - * @cfg {Boolean} deferHeight @hide - */ - /** - * @cfg {Boolean} monitorResize @hide - */ - - initComponent : function() { - Ext.Viewport.superclass.initComponent.call(this); - document.getElementsByTagName('html')[0].className += ' x-viewport'; - this.el = Ext.getBody(); - this.el.setHeight = Ext.emptyFn; - this.el.setWidth = Ext.emptyFn; - this.el.setSize = Ext.emptyFn; - this.el.dom.scroll = 'no'; - this.allowDomMove = false; - this.autoWidth = true; - this.autoHeight = true; - Ext.EventManager.onWindowResize(this.fireResize, this); - this.renderTo = this.el; - }, - - fireResize : function(w, h){ - this.fireEvent('resize', this, w, h, w, h); - } -}); -Ext.reg('viewport', Ext.Viewport); -/** - * @class Ext.Panel - * @extends Ext.Container - *

          Panel is a container that has specific functionality and structural components that make - * it the perfect building block for application-oriented user interfaces.

          - *

          Panels are, by virtue of their inheritance from {@link Ext.Container}, capable - * of being configured with a {@link Ext.Container#layout layout}, and containing child Components.

          - *

          When either specifying child {@link Ext.Component#items items} of a Panel, or dynamically {@link Ext.Container#add adding} Components - * to a Panel, remember to consider how you wish the Panel to arrange those child elements, and whether - * those child elements need to be sized using one of Ext's built-in {@link Ext.Container#layout layout} schemes. By - * default, Panels use the {@link Ext.layout.ContainerLayout ContainerLayout} scheme. This simply renders - * child components, appending them one after the other inside the Container, and does not apply any sizing - * at all.

          - *

          A Panel may also contain {@link #bbar bottom} and {@link #tbar top} toolbars, along with separate - * {@link #header}, {@link #footer} and {@link #body} sections (see {@link #frame} for additional - * information).

          - *

          Panel also provides built-in {@link #collapsible expandable and collapsible behavior}, along with - * a variety of {@link #tools prebuilt tool buttons} that can be wired up to provide other customized - * behavior. Panels can be easily dropped into any {@link Ext.Container Container} or layout, and the - * layout and rendering pipeline is {@link Ext.Container#add completely managed by the framework}.

          - * @constructor - * @param {Object} config The config object - * @xtype panel - */ -Ext.Panel = Ext.extend(Ext.Container, { - /** - * The Panel's header {@link Ext.Element Element}. Read-only. - *

          This Element is used to house the {@link #title} and {@link #tools}

          - *

          Note: see the Note for {@link Ext.Component#el el} also.

          - * @type Ext.Element - * @property header - */ - /** - * The Panel's body {@link Ext.Element Element} which may be used to contain HTML content. - * The content may be specified in the {@link #html} config, or it may be loaded using the - * {@link autoLoad} config, or through the Panel's {@link #getUpdater Updater}. Read-only. - *

          If this is used to load visible HTML elements in either way, then - * the Panel may not be used as a Layout for hosting nested Panels.

          - *

          If this Panel is intended to be used as the host of a Layout (See {@link #layout} - * then the body Element must not be loaded or changed - it is under the control - * of the Panel's Layout. - *

          Note: see the Note for {@link Ext.Component#el el} also.

          - * @type Ext.Element - * @property body - */ - /** - * The Panel's bwrap {@link Ext.Element Element} used to contain other Panel elements - * (tbar, body, bbar, footer). See {@link #bodyCfg}. Read-only. - * @type Ext.Element - * @property bwrap - */ - /** - * True if this panel is collapsed. Read-only. - * @type Boolean - * @property collapsed - */ - /** - * @cfg {Object} bodyCfg - *

          A {@link Ext.DomHelper DomHelper} element specification object may be specified for any - * Panel Element.

          - *

          By default, the Default element in the table below will be used for the html markup to - * create a child element with the commensurate Default class name (baseCls will be - * replaced by {@link #baseCls}):

          - *
          -     * Panel      Default  Default             Custom      Additional       Additional
          -     * Element    element  class               element     class            style
          -     * ========   ==========================   =========   ==============   ===========
          -     * {@link #header}     div      {@link #baseCls}+'-header'   {@link #headerCfg}   headerCssClass   headerStyle
          -     * {@link #bwrap}      div      {@link #baseCls}+'-bwrap'     {@link #bwrapCfg}    bwrapCssClass    bwrapStyle
          -     * + tbar     div      {@link #baseCls}+'-tbar'       {@link #tbarCfg}     tbarCssClass     tbarStyle
          -     * + {@link #body}     div      {@link #baseCls}+'-body'       {@link #bodyCfg}     {@link #bodyCssClass}     {@link #bodyStyle}
          -     * + bbar     div      {@link #baseCls}+'-bbar'       {@link #bbarCfg}     bbarCssClass     bbarStyle
          -     * + {@link #footer}   div      {@link #baseCls}+'-footer'   {@link #footerCfg}   footerCssClass   footerStyle
          -     * 
          - *

          Configuring a Custom element may be used, for example, to force the {@link #body} Element - * to use a different form of markup than is created by default. An example of this might be - * to {@link Ext.Element#createChild create a child} Panel containing a custom content, such as - * a header, or forcing centering of all Panel content by having the body be a <center> - * element:

          - *
          
          -new Ext.Panel({
          -    title: 'Message Title',
          -    renderTo: Ext.getBody(),
          -    width: 200, height: 130,
          -    bodyCfg: {
          -        tag: 'center',
          -        cls: 'x-panel-body',  // Default class not applied if Custom element specified
          -        html: 'Message'
          -    },
          -    footerCfg: {
          -        tag: 'h2',
          -        cls: 'x-panel-footer',        // same as the Default class
          -        html: 'footer html'
          -    },
          -    footerCssClass: 'custom-footer', // additional css class, see {@link Ext.element#addClass addClass}
          -    footerStyle:    'background-color:red' // see {@link #bodyStyle}
          -});
          -     * 
          - *

          The example above also explicitly creates a {@link #footer} with custom markup and - * styling applied.

          - */ - /** - * @cfg {Object} headerCfg - *

          A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure - * of this Panel's {@link #header} Element. See {@link #bodyCfg} also.

          - */ - /** - * @cfg {Object} bwrapCfg - *

          A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure - * of this Panel's {@link #bwrap} Element. See {@link #bodyCfg} also.

          - */ - /** - * @cfg {Object} tbarCfg - *

          A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure - * of this Panel's {@link #tbar} Element. See {@link #bodyCfg} also.

          - */ - /** - * @cfg {Object} bbarCfg - *

          A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure - * of this Panel's {@link #bbar} Element. See {@link #bodyCfg} also.

          - */ - /** - * @cfg {Object} footerCfg - *

          A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure - * of this Panel's {@link #footer} Element. See {@link #bodyCfg} also.

          - */ - /** - * @cfg {Boolean} closable - * Panels themselves do not directly support being closed, but some Panel subclasses do (like - * {@link Ext.Window}) or a Panel Class within an {@link Ext.TabPanel}. Specify true - * to enable closing in such situations. Defaults to false. - */ - /** - * The Panel's footer {@link Ext.Element Element}. Read-only. - *

          This Element is used to house the Panel's {@link #buttons} or {@link #fbar}.

          - *

          Note: see the Note for {@link Ext.Component#el el} also.

          - * @type Ext.Element - * @property footer - */ - /** - * @cfg {Mixed} applyTo - *

          The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in - * the document that specifies some panel-specific structural markup. When applyTo is used, - * constituent parts of the panel can be specified by CSS class name within the main element, and the panel - * will automatically create those components from that markup. Any required components not specified in the - * markup will be autogenerated if necessary.

          - *

          The following class names are supported (baseCls will be replaced by {@link #baseCls}):

          - *
          • baseCls + '-header'
          • - *
          • baseCls + '-header-text'
          • - *
          • baseCls + '-bwrap'
          • - *
          • baseCls + '-tbar'
          • - *
          • baseCls + '-body'
          • - *
          • baseCls + '-bbar'
          • - *
          • baseCls + '-footer'
          - *

          Using this config, a call to render() is not required. If applyTo is specified, any value passed for - * {@link #renderTo} will be ignored and the target element's parent node will automatically be used as the - * panel's container.

          - */ - /** - * @cfg {Object/Array} tbar - *

          The top toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of - * buttons/button configs to be added to the toolbar. Note that this is not available as a property after render. - * To access the top toolbar after render, use {@link #getTopToolbar}.

          - *

          Note: Although a Toolbar may contain Field components, these will not be updated by a load - * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and - * so are not scanned to collect form items. However, the values will be submitted because form - * submission parameters are collected from the DOM tree.

          - */ - /** - * @cfg {Object/Array} bbar - *

          The bottom toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of - * buttons/button configs to be added to the toolbar. Note that this is not available as a property after render. - * To access the bottom toolbar after render, use {@link #getBottomToolbar}.

          - *

          Note: Although a Toolbar may contain Field components, these will not be updated by a load - * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and - * so are not scanned to collect form items. However, the values will be submitted because form - * submission parameters are collected from the DOM tree.

          - */ - /** @cfg {Object/Array} fbar - *

          A {@link Ext.Toolbar Toolbar} object, a Toolbar config, or an array of - * {@link Ext.Button Button}s/{@link Ext.Button Button} configs, describing a {@link Ext.Toolbar Toolbar} to be rendered into this Panel's footer element.

          - *

          After render, the fbar property will be an {@link Ext.Toolbar Toolbar} instance.

          - *

          If {@link #buttons} are specified, they will supersede the fbar configuration property.

          - * The Panel's {@link #buttonAlign} configuration affects the layout of these items, for example: - *
          
          -var w = new Ext.Window({
          -    height: 250,
          -    width: 500,
          -    bbar: new Ext.Toolbar({
          -        items: [{
          -            text: 'bbar Left'
          -        },'->',{
          -            text: 'bbar Right'
          -        }]
          -    }),
          -    {@link #buttonAlign}: 'left', // anything but 'center' or 'right' and you can use '-', and '->'
          -                                  // to control the alignment of fbar items
          -    fbar: [{
          -        text: 'fbar Left'
          -    },'->',{
          -        text: 'fbar Right'
          -    }]
          -}).show();
          -     * 
          - *

          Note: Although a Toolbar may contain Field components, these will not be updated by a load - * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and - * so are not scanned to collect form items. However, the values will be submitted because form - * submission parameters are collected from the DOM tree.

          - */ - /** - * @cfg {Boolean} header - * true to create the Panel's header element explicitly, false to skip creating - * it. If a {@link #title} is set the header will be created automatically, otherwise it will not. - * If a {@link #title} is set but header is explicitly set to false, the header - * will not be rendered. - */ - /** - * @cfg {Boolean} footer - * true to create the footer element explicitly, false to skip creating it. The footer - * will be created automatically if {@link #buttons} or a {@link #fbar} have - * been configured. See {@link #bodyCfg} for an example. - */ - /** - * @cfg {String} title - * The title text to be used as innerHTML (html tags are accepted) to display in the panel - * {@link #header} (defaults to ''). When a title is specified the - * {@link #header} element will automatically be created and displayed unless - * {@link #header} is explicitly set to false. If you do not want to specify a - * title at config time, but you may want one later, you must either specify a non-empty - * title (a blank space ' ' will do) or header:true so that the container - * element will get created. - */ - /** - * @cfg {Array} buttons - * buttons will be used as {@link Ext.Container#items items} for the toolbar in - * the footer ({@link #fbar}). Typically the value of this configuration property will be - * an array of {@link Ext.Button}s or {@link Ext.Button} configuration objects. - * If an item is configured with minWidth or the Panel is configured with minButtonWidth, - * that width will be applied to the item. - */ - /** - * @cfg {Object/String/Function} autoLoad - * A valid url spec according to the Updater {@link Ext.Updater#update} method. - * If autoLoad is not null, the panel will attempt to load its contents - * immediately upon render.

          - * The URL will become the default URL for this panel's {@link #body} element, - * so it may be {@link Ext.Element#refresh refresh}ed at any time.

          - */ - /** - * @cfg {Boolean} frame - * false by default to render with plain 1px square borders. true to render with - * 9 elements, complete with custom rounded corners (also see {@link Ext.Element#boxWrap}). - *

          The template generated for each condition is depicted below:

          
          -     *
          -// frame = false
          -<div id="developer-specified-id-goes-here" class="x-panel">
          -
          -    <div class="x-panel-header"><span class="x-panel-header-text">Title: (frame:false)</span></div>
          -
          -    <div class="x-panel-bwrap">
          -        <div class="x-panel-body"><p>html value goes here</p></div>
          -    </div>
          -</div>
          -
          -// frame = true (create 9 elements)
          -<div id="developer-specified-id-goes-here" class="x-panel">
          -    <div class="x-panel-tl"><div class="x-panel-tr"><div class="x-panel-tc">
          -        <div class="x-panel-header"><span class="x-panel-header-text">Title: (frame:true)</span></div>
          -    </div></div></div>
          -
          -    <div class="x-panel-bwrap">
          -        <div class="x-panel-ml"><div class="x-panel-mr"><div class="x-panel-mc">
          -            <div class="x-panel-body"><p>html value goes here</p></div>
          -        </div></div></div>
          -
          -        <div class="x-panel-bl"><div class="x-panel-br"><div class="x-panel-bc"/>
          -        </div></div></div>
          -</div>
          -     * 
          - */ - /** - * @cfg {Boolean} border - * True to display the borders of the panel's body element, false to hide them (defaults to true). By default, - * the border is a 2px wide inset border, but this can be further altered by setting {@link #bodyBorder} to false. - */ - /** - * @cfg {Boolean} bodyBorder - * True to display an interior border on the body element of the panel, false to hide it (defaults to true). - * This only applies when {@link #border} == true. If border == true and bodyBorder == false, the border will display - * as a 1px wide inset border, giving the entire body element an inset appearance. - */ - /** - * @cfg {String/Object/Function} bodyCssClass - * Additional css class selector to be applied to the {@link #body} element in the format expected by - * {@link Ext.Element#addClass} (defaults to null). See {@link #bodyCfg}. - */ - /** - * @cfg {String/Object/Function} bodyStyle - * Custom CSS styles to be applied to the {@link #body} element in the format expected by - * {@link Ext.Element#applyStyles} (defaults to null). See {@link #bodyCfg}. - */ - /** - * @cfg {String} iconCls - * The CSS class selector that specifies a background image to be used as the header icon (defaults to ''). - *

          An example of specifying a custom icon class would be something like: - *

          
          -// specify the property in the config for the class:
          -     ...
          -     iconCls: 'my-icon'
          -
          -// css class that specifies background image to be used as the icon image:
          -.my-icon { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
          -
          - */ - /** - * @cfg {Boolean} collapsible - * True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into - * the header tool button area, false to keep the panel statically sized with no button (defaults to false). - */ - /** - * @cfg {Array} tools - * An array of tool button configs to be added to the header tool area. When rendered, each tool is - * stored as an {@link Ext.Element Element} referenced by a public property called tools.<tool-type> - *

          Each tool config may contain the following properties: - *

            - *
          • id : String
            Required. The type - * of tool to create. By default, this assigns a CSS class of the form x-tool-<tool-type> to the - * resulting tool Element. Ext provides CSS rules, and an icon sprite containing images for the tool types listed below. - * The developer may implement custom tools by supplying alternate CSS rules and background images: - *
              - *
              toggle (Created by default when {@link #collapsible} is true)
              - *
              close
              - *
              minimize
              - *
              maximize
              - *
              restore
              - *
              gear
              - *
              pin
              - *
              unpin
              - *
              right
              - *
              left
              - *
              up
              - *
              down
              - *
              refresh
              - *
              minus
              - *
              plus
              - *
              help
              - *
              search
              - *
              save
              - *
              print
              - *
          • - *
          • handler : Function
            Required. The function to - * call when clicked. Arguments passed are:
              - *
            • event : Ext.EventObject
              The click event.
            • - *
            • toolEl : Ext.Element
              The tool Element.
            • - *
            • panel : Ext.Panel
              The host Panel
            • - *
            • tc : Object
              The tool configuration object
            • - *
          • - *
          • stopEvent : Boolean
            Defaults to true. Specify as false to allow click event to propagate.
          • - *
          • scope : Object
            The scope in which to call the handler.
          • - *
          • qtip : String/Object
            A tip string, or - * a config argument to {@link Ext.QuickTip#register}
          • - *
          • hidden : Boolean
            True to initially render hidden.
          • - *
          • on : Object
            A listener config object specifiying - * event listeners in the format of an argument to {@link #addListener}
          • - *
          - *

          Note that, apart from the toggle tool which is provided when a panel is collapsible, these - * tools only provide the visual button. Any required functionality must be provided by adding - * handlers that implement the necessary behavior.

          - *

          Example usage:

          - *
          
          -tools:[{
          -    id:'refresh',
          -    qtip: 'Refresh form Data',
          -    // hidden:true,
          -    handler: function(event, toolEl, panel){
          -        // refresh logic
          -    }
          -},
          -{
          -    id:'help',
          -    qtip: 'Get Help',
          -    handler: function(event, toolEl, panel){
          -        // whatever
          -    }
          -}]
          -
          - *

          For the custom id of 'help' define two relevant css classes with a link to - * a 15x15 image:

          - *
          
          -.x-tool-help {background-image: url(images/help.png);}
          -.x-tool-help-over {background-image: url(images/help_over.png);}
          -// if using an image sprite:
          -.x-tool-help {background-image: url(images/help.png) no-repeat 0 0;}
          -.x-tool-help-over {background-position:-15px 0;}
          -
          - */ - /** - * @cfg {Ext.Template/Ext.XTemplate} toolTemplate - *

          A Template used to create {@link #tools} in the {@link #header} Element. Defaults to:

          
          -new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>')
          - *

          This may may be overridden to provide a custom DOM structure for tools based upon a more - * complex XTemplate. The template's data is a single tool configuration object (Not the entire Array) - * as specified in {@link #tools}. In the following example an <a> tag is used to provide a - * visual indication when hovering over the tool:

          
          -var win = new Ext.Window({
          -    tools: [{
          -        id: 'download',
          -        href: '/MyPdfDoc.pdf'
          -    }],
          -    toolTemplate: new Ext.XTemplate(
          -        '<tpl if="id==\'download\'">',
          -            '<a class="x-tool x-tool-pdf" href="{href}"></a>',
          -        '</tpl>',
          -        '<tpl if="id!=\'download\'">',
          -            '<div class="x-tool x-tool-{id}">&#160;</div>',
          -        '</tpl>'
          -    ),
          -    width:500,
          -    height:300,
          -    closeAction:'hide'
          -});
          - *

          Note that the CSS class 'x-tool-pdf' should have an associated style rule which provides an - * appropriate background image, something like:

          -
          
          -    a.x-tool-pdf {background-image: url(../shared/extjs/images/pdf.gif)!important;}
          -    
          - */ - /** - * @cfg {Boolean} hideCollapseTool - * true to hide the expand/collapse toggle button when {@link #collapsible} == true, - * false to display it (defaults to false). - */ - /** - * @cfg {Boolean} titleCollapse - * true to allow expanding and collapsing the panel (when {@link #collapsible} = true) - * by clicking anywhere in the header bar, false) to allow it only by clicking to tool button - * (defaults to false)). If this panel is a child item of a border layout also see the - * {@link Ext.layout.BorderLayout.Region BorderLayout.Region} - * {@link Ext.layout.BorderLayout.Region#floatable floatable} config option. - */ - - /** - * @cfg {Mixed} floating - *

          This property is used to configure the underlying {@link Ext.Layer}. Acceptable values for this - * configuration property are:

            - *
          • false : Default.
            Display the panel inline where it is - * rendered.
          • - *
          • true :
            Float the panel (absolute position it with automatic - * shimming and shadow).
              - *
              Setting floating to true will create an Ext.Layer for this panel and display the - * panel at negative offsets so that it is hidden.
              - *
              Since the panel will be absolute positioned, the position must be set explicitly - * after render (e.g., myPanel.setPosition(100,100);).
              - *
              Note: when floating a panel you should always assign a fixed width, - * otherwise it will be auto width and will expand to fill to the right edge of the viewport.
              - *
          • - *
          • {@link Ext.Layer object} :
            The specified object will be used - * as the configuration object for the {@link Ext.Layer} that will be created.
          • - *
          - */ - /** - * @cfg {Boolean/String} shadow - * true (or a valid Ext.Shadow {@link Ext.Shadow#mode} value) to display a shadow behind the - * panel, false to display no shadow (defaults to 'sides'). Note that this option - * only applies when {@link #floating} = true. - */ - /** - * @cfg {Number} shadowOffset - * The number of pixels to offset the shadow if displayed (defaults to 4). Note that this - * option only applies when {@link #floating} = true. - */ - /** - * @cfg {Boolean} shim - * false to disable the iframe shim in browsers which need one (defaults to true). - * Note that this option only applies when {@link #floating} = true. - */ - /** - * @cfg {Object/Array} keys - * A {@link Ext.KeyMap} config object (in the format expected by {@link Ext.KeyMap#addBinding} - * used to assign custom key handling to this panel (defaults to null). - */ - /** - * @cfg {Boolean/Object} draggable - *

          true to enable dragging of this Panel (defaults to false).

          - *

          For custom drag/drop implementations, an Ext.Panel.DD config could also be passed - * in this config instead of true. Ext.Panel.DD is an internal, undocumented class which - * moves a proxy Element around in place of the Panel's element, but provides no other behaviour - * during dragging or on drop. It is a subclass of {@link Ext.dd.DragSource}, so behaviour may be - * added by implementing the interface methods of {@link Ext.dd.DragDrop} e.g.: - *

          
          -new Ext.Panel({
          -    title: 'Drag me',
          -    x: 100,
          -    y: 100,
          -    renderTo: Ext.getBody(),
          -    floating: true,
          -    frame: true,
          -    width: 400,
          -    height: 200,
          -    draggable: {
          -//      Config option of Ext.Panel.DD class.
          -//      It's a floating Panel, so do not show a placeholder proxy in the original position.
          -        insertProxy: false,
          -
          -//      Called for each mousemove event while dragging the DD object.
          -        onDrag : function(e){
          -//          Record the x,y position of the drag proxy so that we can
          -//          position the Panel at end of drag.
          -            var pel = this.proxy.getEl();
          -            this.x = pel.getLeft(true);
          -            this.y = pel.getTop(true);
          -
          -//          Keep the Shadow aligned if there is one.
          -            var s = this.panel.getEl().shadow;
          -            if (s) {
          -                s.realign(this.x, this.y, pel.getWidth(), pel.getHeight());
          -            }
          -        },
          -
          -//      Called on the mouseup event.
          -        endDrag : function(e){
          -            this.panel.setPosition(this.x, this.y);
          -        }
          -    }
          -}).show();
          -
          - */ - /** - * @cfg {Boolean} disabled - * Render this panel disabled (default is false). An important note when using the disabled - * config on panels is that IE will often fail to initialize the disabled mask element correectly if - * the panel's layout has not yet completed by the time the Panel is disabled during the render process. - * If you experience this issue, you may need to instead use the {@link #afterlayout} event to initialize - * the disabled state: - *
          
          -new Ext.Panel({
          -    ...
          -    listeners: {
          -        'afterlayout': {
          -            fn: function(p){
          -                p.disable();
          -            },
          -            single: true // important, as many layouts can occur
          -        }
          -    }
          -});
          -
          - */ - /** - * @cfg {Boolean} autoHeight - * true to use height:'auto', false to use fixed height (defaults to false). - * Note: Setting autoHeight: true means that the browser will manage the panel's height - * based on its contents, and that Ext will not manage it at all. If the panel is within a layout that - * manages dimensions (fit, border, etc.) then setting autoHeight: true - * can cause issues with scrolling and will not generally work as expected since the panel will take - * on the height of its contents rather than the height required by the Ext layout. - */ - - - /** - * @cfg {String} baseCls - * The base CSS class to apply to this panel's element (defaults to 'x-panel'). - *

          Another option available by default is to specify 'x-plain' which strips all styling - * except for required attributes for Ext layouts to function (e.g. overflow:hidden). - * See {@link #unstyled} also.

          - */ - baseCls : 'x-panel', - /** - * @cfg {String} collapsedCls - * A CSS class to add to the panel's element after it has been collapsed (defaults to - * 'x-panel-collapsed'). - */ - collapsedCls : 'x-panel-collapsed', - /** - * @cfg {Boolean} maskDisabled - * true to mask the panel when it is {@link #disabled}, false to not mask it (defaults - * to true). Either way, the panel will always tell its contained elements to disable themselves - * when it is disabled, but masking the panel can provide an additional visual cue that the panel is - * disabled. - */ - maskDisabled : true, - /** - * @cfg {Boolean} animCollapse - * true to animate the transition when the panel is collapsed, false to skip the - * animation (defaults to true if the {@link Ext.Fx} class is available, otherwise false). - */ - animCollapse : Ext.enableFx, - /** - * @cfg {Boolean} headerAsText - * true to display the panel {@link #title} in the {@link #header}, - * false to hide it (defaults to true). - */ - headerAsText : true, - /** - * @cfg {String} buttonAlign - * The alignment of any {@link #buttons} added to this panel. Valid values are 'right', - * 'left' and 'center' (defaults to 'right'). - */ - buttonAlign : 'right', - /** - * @cfg {Boolean} collapsed - * true to render the panel collapsed, false to render it expanded (defaults to - * false). - */ - collapsed : false, - /** - * @cfg {Boolean} collapseFirst - * true to make sure the collapse/expand toggle button always renders first (to the left of) - * any other tools in the panel's title bar, false to render it last (defaults to true). - */ - collapseFirst : true, - /** - * @cfg {Number} minButtonWidth - * Minimum width in pixels of all {@link #buttons} in this panel (defaults to 75) - */ - minButtonWidth : 75, - /** - * @cfg {Boolean} unstyled - * Overrides the {@link #baseCls} setting to {@link #baseCls} = 'x-plain' which renders - * the panel unstyled except for required attributes for Ext layouts to function (e.g. overflow:hidden). - */ - /** - * @cfg {String} elements - * A comma-delimited list of panel elements to initialize when the panel is rendered. Normally, this list will be - * generated automatically based on the items added to the panel at config time, but sometimes it might be useful to - * make sure a structural element is rendered even if not specified at config time (for example, you may want - * to add a button or toolbar dynamically after the panel has been rendered). Adding those elements to this - * list will allocate the required placeholders in the panel when it is rendered. Valid values are
            - *
          • header
          • - *
          • tbar (top bar)
          • - *
          • body
          • - *
          • bbar (bottom bar)
          • - *
          • footer
          • - *
          - * Defaults to 'body'. - */ - elements : 'body', - /** - * @cfg {Boolean} preventBodyReset - * Defaults to false. When set to true, an extra css class 'x-panel-normal' - * will be added to the panel's element, effectively applying css styles suggested by the W3C - * (see http://www.w3.org/TR/CSS21/sample.html) to the Panel's body element (not the header, - * footer, etc.). - */ - preventBodyReset : false, - - /** - * @cfg {Number/String} padding - * A shortcut for setting a padding style on the body element. The value can either be - * a number to be applied to all sides, or a normal css string describing padding. - * Defaults to undefined. - * - */ - padding: undefined, - - /** @cfg {String} resizeEvent - * The event to listen to for resizing in layouts. Defaults to 'bodyresize'. - */ - resizeEvent: 'bodyresize', - - // protected - these could be used to customize the behavior of the window, - // but changing them would not be useful without further mofifications and - // could lead to unexpected or undesirable results. - toolTarget : 'header', - collapseEl : 'bwrap', - slideAnchor : 't', - disabledClass : '', - - // private, notify box this class will handle heights - deferHeight : true, - // private - expandDefaults: { - duration : 0.25 - }, - // private - collapseDefaults : { - duration : 0.25 - }, - - // private - initComponent : function(){ - Ext.Panel.superclass.initComponent.call(this); - - this.addEvents( - /** - * @event bodyresize - * Fires after the Panel has been resized. - * @param {Ext.Panel} p the Panel which has been resized. - * @param {Number} width The Panel body's new width. - * @param {Number} height The Panel body's new height. - */ - 'bodyresize', - /** - * @event titlechange - * Fires after the Panel title has been {@link #title set} or {@link #setTitle changed}. - * @param {Ext.Panel} p the Panel which has had its title changed. - * @param {String} The new title. - */ - 'titlechange', - /** - * @event iconchange - * Fires after the Panel icon class has been {@link #iconCls set} or {@link #setIconClass changed}. - * @param {Ext.Panel} p the Panel which has had its {@link #iconCls icon class} changed. - * @param {String} The new icon class. - * @param {String} The old icon class. - */ - 'iconchange', - /** - * @event collapse - * Fires after the Panel has been collapsed. - * @param {Ext.Panel} p the Panel that has been collapsed. - */ - 'collapse', - /** - * @event expand - * Fires after the Panel has been expanded. - * @param {Ext.Panel} p The Panel that has been expanded. - */ - 'expand', - /** - * @event beforecollapse - * Fires before the Panel is collapsed. A handler can return false to cancel the collapse. - * @param {Ext.Panel} p the Panel being collapsed. - * @param {Boolean} animate True if the collapse is animated, else false. - */ - 'beforecollapse', - /** - * @event beforeexpand - * Fires before the Panel is expanded. A handler can return false to cancel the expand. - * @param {Ext.Panel} p The Panel being expanded. - * @param {Boolean} animate True if the expand is animated, else false. - */ - 'beforeexpand', - /** - * @event beforeclose - * Fires before the Panel is closed. Note that Panels do not directly support being closed, but some - * Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel. This event only - * applies to such subclasses. - * A handler can return false to cancel the close. - * @param {Ext.Panel} p The Panel being closed. - */ - 'beforeclose', - /** - * @event close - * Fires after the Panel is closed. Note that Panels do not directly support being closed, but some - * Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel. - * @param {Ext.Panel} p The Panel that has been closed. - */ - 'close', - /** - * @event activate - * Fires after the Panel has been visually activated. - * Note that Panels do not directly support being activated, but some Panel subclasses - * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the - * activate and deactivate events under the control of the TabPanel. - * @param {Ext.Panel} p The Panel that has been activated. - */ - 'activate', - /** - * @event deactivate - * Fires after the Panel has been visually deactivated. - * Note that Panels do not directly support being deactivated, but some Panel subclasses - * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the - * activate and deactivate events under the control of the TabPanel. - * @param {Ext.Panel} p The Panel that has been deactivated. - */ - 'deactivate' - ); - - if(this.unstyled){ - this.baseCls = 'x-plain'; - } - - - this.toolbars = []; - // shortcuts - if(this.tbar){ - this.elements += ',tbar'; - this.topToolbar = this.createToolbar(this.tbar); - this.tbar = null; - - } - if(this.bbar){ - this.elements += ',bbar'; - this.bottomToolbar = this.createToolbar(this.bbar); - this.bbar = null; - } - - if(this.header === true){ - this.elements += ',header'; - this.header = null; - }else if(this.headerCfg || (this.title && this.header !== false)){ - this.elements += ',header'; - } - - if(this.footerCfg || this.footer === true){ - this.elements += ',footer'; - this.footer = null; - } - - if(this.buttons){ - this.fbar = this.buttons; - this.buttons = null; - } - if(this.fbar){ - this.createFbar(this.fbar); - } - if(this.autoLoad){ - this.on('render', this.doAutoLoad, this, {delay:10}); - } - }, - - // private - createFbar : function(fbar){ - var min = this.minButtonWidth; - this.elements += ',footer'; - this.fbar = this.createToolbar(fbar, { - buttonAlign: this.buttonAlign, - toolbarCls: 'x-panel-fbar', - enableOverflow: false, - defaults: function(c){ - return { - minWidth: c.minWidth || min - }; - } - }); - // @compat addButton and buttons could possibly be removed - // @target 4.0 - /** - * This Panel's Array of buttons as created from the {@link #buttons} - * config property. Read only. - * @type Array - * @property buttons - */ - this.fbar.items.each(function(c){ - c.minWidth = c.minWidth || this.minButtonWidth; - }, this); - this.buttons = this.fbar.items.items; - }, - - // private - createToolbar: function(tb, options){ - var result; - // Convert array to proper toolbar config - if(Ext.isArray(tb)){ - tb = { - items: tb - }; - } - result = tb.events ? Ext.apply(tb, options) : this.createComponent(Ext.apply({}, tb, options), 'toolbar'); - this.toolbars.push(result); - return result; - }, - - // private - createElement : function(name, pnode){ - if(this[name]){ - pnode.appendChild(this[name].dom); - return; - } - - if(name === 'bwrap' || this.elements.indexOf(name) != -1){ - if(this[name+'Cfg']){ - this[name] = Ext.fly(pnode).createChild(this[name+'Cfg']); - }else{ - var el = document.createElement('div'); - el.className = this[name+'Cls']; - this[name] = Ext.get(pnode.appendChild(el)); - } - if(this[name+'CssClass']){ - this[name].addClass(this[name+'CssClass']); - } - if(this[name+'Style']){ - this[name].applyStyles(this[name+'Style']); - } - } - }, - - // private - onRender : function(ct, position){ - Ext.Panel.superclass.onRender.call(this, ct, position); - this.createClasses(); - - var el = this.el, - d = el.dom, - bw, - ts; - - - if(this.collapsible && !this.hideCollapseTool){ - this.tools = this.tools ? this.tools.slice(0) : []; - this.tools[this.collapseFirst?'unshift':'push']({ - id: 'toggle', - handler : this.toggleCollapse, - scope: this - }); - } - - if(this.tools){ - ts = this.tools; - this.elements += (this.header !== false) ? ',header' : ''; - } - this.tools = {}; - - el.addClass(this.baseCls); - if(d.firstChild){ // existing markup - this.header = el.down('.'+this.headerCls); - this.bwrap = el.down('.'+this.bwrapCls); - var cp = this.bwrap ? this.bwrap : el; - this.tbar = cp.down('.'+this.tbarCls); - this.body = cp.down('.'+this.bodyCls); - this.bbar = cp.down('.'+this.bbarCls); - this.footer = cp.down('.'+this.footerCls); - this.fromMarkup = true; - } - if (this.preventBodyReset === true) { - el.addClass('x-panel-reset'); - } - if(this.cls){ - el.addClass(this.cls); - } - - if(this.buttons){ - this.elements += ',footer'; - } - - // This block allows for maximum flexibility and performance when using existing markup - - // framing requires special markup - if(this.frame){ - el.insertHtml('afterBegin', String.format(Ext.Element.boxMarkup, this.baseCls)); - - this.createElement('header', d.firstChild.firstChild.firstChild); - this.createElement('bwrap', d); - - // append the mid and bottom frame to the bwrap - bw = this.bwrap.dom; - var ml = d.childNodes[1], bl = d.childNodes[2]; - bw.appendChild(ml); - bw.appendChild(bl); - - var mc = bw.firstChild.firstChild.firstChild; - this.createElement('tbar', mc); - this.createElement('body', mc); - this.createElement('bbar', mc); - this.createElement('footer', bw.lastChild.firstChild.firstChild); - - if(!this.footer){ - this.bwrap.dom.lastChild.className += ' x-panel-nofooter'; - } - /* - * Store a reference to this element so: - * a) We aren't looking it up all the time - * b) The last element is reported incorrectly when using a loadmask - */ - this.ft = Ext.get(this.bwrap.dom.lastChild); - this.mc = Ext.get(mc); - }else{ - this.createElement('header', d); - this.createElement('bwrap', d); - - // append the mid and bottom frame to the bwrap - bw = this.bwrap.dom; - this.createElement('tbar', bw); - this.createElement('body', bw); - this.createElement('bbar', bw); - this.createElement('footer', bw); - - if(!this.header){ - this.body.addClass(this.bodyCls + '-noheader'); - if(this.tbar){ - this.tbar.addClass(this.tbarCls + '-noheader'); - } - } - } - - if(Ext.isDefined(this.padding)){ - this.body.setStyle('padding', this.body.addUnits(this.padding)); - } - - if(this.border === false){ - this.el.addClass(this.baseCls + '-noborder'); - this.body.addClass(this.bodyCls + '-noborder'); - if(this.header){ - this.header.addClass(this.headerCls + '-noborder'); - } - if(this.footer){ - this.footer.addClass(this.footerCls + '-noborder'); - } - if(this.tbar){ - this.tbar.addClass(this.tbarCls + '-noborder'); - } - if(this.bbar){ - this.bbar.addClass(this.bbarCls + '-noborder'); - } - } - - if(this.bodyBorder === false){ - this.body.addClass(this.bodyCls + '-noborder'); - } - - this.bwrap.enableDisplayMode('block'); - - if(this.header){ - this.header.unselectable(); - - // for tools, we need to wrap any existing header markup - if(this.headerAsText){ - this.header.dom.innerHTML = - ''+this.header.dom.innerHTML+''; - - if(this.iconCls){ - this.setIconClass(this.iconCls); - } - } - } - - if(this.floating){ - this.makeFloating(this.floating); - } - - if(this.collapsible && this.titleCollapse && this.header){ - this.mon(this.header, 'click', this.toggleCollapse, this); - this.header.setStyle('cursor', 'pointer'); - } - if(ts){ - this.addTool.apply(this, ts); - } - - // Render Toolbars. - if(this.fbar){ - this.footer.addClass('x-panel-btns'); - this.fbar.ownerCt = this; - this.fbar.render(this.footer); - this.footer.createChild({cls:'x-clear'}); - } - if(this.tbar && this.topToolbar){ - this.topToolbar.ownerCt = this; - this.topToolbar.render(this.tbar); - } - if(this.bbar && this.bottomToolbar){ - this.bottomToolbar.ownerCt = this; - this.bottomToolbar.render(this.bbar); - } - }, - - /** - * Sets the CSS class that provides the icon image for this panel. This method will replace any existing - * icon class if one has already been set and fire the {@link #iconchange} event after completion. - * @param {String} cls The new CSS class name - */ - setIconClass : function(cls){ - var old = this.iconCls; - this.iconCls = cls; - if(this.rendered && this.header){ - if(this.frame){ - this.header.addClass('x-panel-icon'); - this.header.replaceClass(old, this.iconCls); - }else{ - var hd = this.header, - img = hd.child('img.x-panel-inline-icon'); - if(img){ - Ext.fly(img).replaceClass(old, this.iconCls); - }else{ - var hdspan = hd.child('span.' + this.headerTextCls); - if (hdspan) { - Ext.DomHelper.insertBefore(hdspan.dom, { - tag:'img', alt: '', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls - }); - } - } - } - } - this.fireEvent('iconchange', this, cls, old); - }, - - // private - makeFloating : function(cfg){ - this.floating = true; - this.el = new Ext.Layer(Ext.apply({}, cfg, { - shadow: Ext.isDefined(this.shadow) ? this.shadow : 'sides', - shadowOffset: this.shadowOffset, - constrain:false, - shim: this.shim === false ? false : undefined - }), this.el); - }, - - /** - * Returns the {@link Ext.Toolbar toolbar} from the top ({@link #tbar}) section of the panel. - * @return {Ext.Toolbar} The toolbar - */ - getTopToolbar : function(){ - return this.topToolbar; - }, - - /** - * Returns the {@link Ext.Toolbar toolbar} from the bottom ({@link #bbar}) section of the panel. - * @return {Ext.Toolbar} The toolbar - */ - getBottomToolbar : function(){ - return this.bottomToolbar; - }, - - /** - * Returns the {@link Ext.Toolbar toolbar} from the footer ({@link #fbar}) section of the panel. - * @return {Ext.Toolbar} The toolbar - */ - getFooterToolbar : function() { - return this.fbar; - }, - - /** - * Adds a button to this panel. Note that this method must be called prior to rendering. The preferred - * approach is to add buttons via the {@link #buttons} config. - * @param {String/Object} config A valid {@link Ext.Button} config. A string will become the text for a default - * button config, an object will be treated as a button config object. - * @param {Function} handler The function to be called on button {@link Ext.Button#click} - * @param {Object} scope The scope (this reference) in which the button handler function is executed. Defaults to the Button. - * @return {Ext.Button} The button that was added - */ - addButton : function(config, handler, scope){ - if(!this.fbar){ - this.createFbar([]); - } - if(handler){ - if(Ext.isString(config)){ - config = {text: config}; - } - config = Ext.apply({ - handler: handler, - scope: scope - }, config); - } - return this.fbar.add(config); - }, - - // private - addTool : function(){ - if(!this.rendered){ - if(!this.tools){ - this.tools = []; - } - Ext.each(arguments, function(arg){ - this.tools.push(arg); - }, this); - return; - } - // nowhere to render tools! - if(!this[this.toolTarget]){ - return; - } - if(!this.toolTemplate){ - // initialize the global tool template on first use - var tt = new Ext.Template( - '
           
          ' - ); - tt.disableFormats = true; - tt.compile(); - Ext.Panel.prototype.toolTemplate = tt; - } - for(var i = 0, a = arguments, len = a.length; i < len; i++) { - var tc = a[i]; - if(!this.tools[tc.id]){ - var overCls = 'x-tool-'+tc.id+'-over'; - var t = this.toolTemplate.insertFirst(this[this.toolTarget], tc, true); - this.tools[tc.id] = t; - t.enableDisplayMode('block'); - this.mon(t, 'click', this.createToolHandler(t, tc, overCls, this)); - if(tc.on){ - this.mon(t, tc.on); - } - if(tc.hidden){ - t.hide(); - } - if(tc.qtip){ - if(Ext.isObject(tc.qtip)){ - Ext.QuickTips.register(Ext.apply({ - target: t.id - }, tc.qtip)); - } else { - t.dom.qtip = tc.qtip; - } - } - t.addClassOnOver(overCls); - } - } - }, - - onLayout : function(shallow, force){ - Ext.Panel.superclass.onLayout.apply(this, arguments); - if(this.hasLayout && this.toolbars.length > 0){ - Ext.each(this.toolbars, function(tb){ - tb.doLayout(undefined, force); - }); - this.syncHeight(); - } - }, - - syncHeight : function(){ - var h = this.toolbarHeight, - bd = this.body, - lsh = this.lastSize.height, - sz; - - if(this.autoHeight || !Ext.isDefined(lsh) || lsh == 'auto'){ - return; - } - - - if(h != this.getToolbarHeight()){ - h = Math.max(0, lsh - this.getFrameHeight()); - bd.setHeight(h); - sz = bd.getSize(); - this.toolbarHeight = this.getToolbarHeight(); - this.onBodyResize(sz.width, sz.height); - } - }, - - // private - onShow : function(){ - if(this.floating){ - return this.el.show(); - } - Ext.Panel.superclass.onShow.call(this); - }, - - // private - onHide : function(){ - if(this.floating){ - return this.el.hide(); - } - Ext.Panel.superclass.onHide.call(this); - }, - - // private - createToolHandler : function(t, tc, overCls, panel){ - return function(e){ - t.removeClass(overCls); - if(tc.stopEvent !== false){ - e.stopEvent(); - } - if(tc.handler){ - tc.handler.call(tc.scope || t, e, t, panel, tc); - } - }; - }, - - // private - afterRender : function(){ - if(this.floating && !this.hidden){ - this.el.show(); - } - if(this.title){ - this.setTitle(this.title); - } - Ext.Panel.superclass.afterRender.call(this); // do sizing calcs last - if (this.collapsed) { - this.collapsed = false; - this.collapse(false); - } - this.initEvents(); - }, - - // private - getKeyMap : function(){ - if(!this.keyMap){ - this.keyMap = new Ext.KeyMap(this.el, this.keys); - } - return this.keyMap; - }, - - // private - initEvents : function(){ - if(this.keys){ - this.getKeyMap(); - } - if(this.draggable){ - this.initDraggable(); - } - if(this.toolbars.length > 0){ - Ext.each(this.toolbars, function(tb){ - tb.doLayout(); - tb.on({ - scope: this, - afterlayout: this.syncHeight, - remove: this.syncHeight - }); - }, this); - this.syncHeight(); - } - - }, - - // private - initDraggable : function(){ - /** - *

          If this Panel is configured {@link #draggable}, this property will contain - * an instance of {@link Ext.dd.DragSource} which handles dragging the Panel.

          - * The developer must provide implementations of the abstract methods of {@link Ext.dd.DragSource} - * in order to supply behaviour for each stage of the drag/drop process. See {@link #draggable}. - * @type Ext.dd.DragSource. - * @property dd - */ - this.dd = new Ext.Panel.DD(this, Ext.isBoolean(this.draggable) ? null : this.draggable); - }, - - // private - beforeEffect : function(anim){ - if(this.floating){ - this.el.beforeAction(); - } - if(anim !== false){ - this.el.addClass('x-panel-animated'); - } - }, - - // private - afterEffect : function(anim){ - this.syncShadow(); - this.el.removeClass('x-panel-animated'); - }, - - // private - wraps up an animation param with internal callbacks - createEffect : function(a, cb, scope){ - var o = { - scope:scope, - block:true - }; - if(a === true){ - o.callback = cb; - return o; - }else if(!a.callback){ - o.callback = cb; - }else { // wrap it up - o.callback = function(){ - cb.call(scope); - Ext.callback(a.callback, a.scope); - }; - } - return Ext.applyIf(o, a); - }, - - /** - * Collapses the panel body so that it becomes hidden. Fires the {@link #beforecollapse} event which will - * cancel the collapse action if it returns false. - * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the - * {@link #animCollapse} panel config) - * @return {Ext.Panel} this - */ - collapse : function(animate){ - if(this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforecollapse', this, animate) === false){ - return; - } - var doAnim = animate === true || (animate !== false && this.animCollapse); - this.beforeEffect(doAnim); - this.onCollapse(doAnim, animate); - return this; - }, - - // private - onCollapse : function(doAnim, animArg){ - if(doAnim){ - this[this.collapseEl].slideOut(this.slideAnchor, - Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this), - this.collapseDefaults)); - }else{ - this[this.collapseEl].hide(this.hideMode); - this.afterCollapse(false); - } - }, - - // private - afterCollapse : function(anim){ - this.collapsed = true; - this.el.addClass(this.collapsedCls); - if(anim !== false){ - this[this.collapseEl].hide(this.hideMode); - } - this.afterEffect(anim); - - // Reset lastSize of all sub-components so they KNOW they are in a collapsed container - this.cascade(function(c) { - if (c.lastSize) { - c.lastSize = { width: undefined, height: undefined }; - } - }); - this.fireEvent('collapse', this); - }, - - /** - * Expands the panel body so that it becomes visible. Fires the {@link #beforeexpand} event which will - * cancel the expand action if it returns false. - * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the - * {@link #animCollapse} panel config) - * @return {Ext.Panel} this - */ - expand : function(animate){ - if(!this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforeexpand', this, animate) === false){ - return; - } - var doAnim = animate === true || (animate !== false && this.animCollapse); - this.el.removeClass(this.collapsedCls); - this.beforeEffect(doAnim); - this.onExpand(doAnim, animate); - return this; - }, - - // private - onExpand : function(doAnim, animArg){ - if(doAnim){ - this[this.collapseEl].slideIn(this.slideAnchor, - Ext.apply(this.createEffect(animArg||true, this.afterExpand, this), - this.expandDefaults)); - }else{ - this[this.collapseEl].show(this.hideMode); - this.afterExpand(false); - } - }, - - // private - afterExpand : function(anim){ - this.collapsed = false; - if(anim !== false){ - this[this.collapseEl].show(this.hideMode); - } - this.afterEffect(anim); - if (this.deferLayout) { - delete this.deferLayout; - this.doLayout(true); - } - this.fireEvent('expand', this); - }, - - /** - * Shortcut for performing an {@link #expand} or {@link #collapse} based on the current state of the panel. - * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the - * {@link #animCollapse} panel config) - * @return {Ext.Panel} this - */ - toggleCollapse : function(animate){ - this[this.collapsed ? 'expand' : 'collapse'](animate); - return this; - }, - - // private - onDisable : function(){ - if(this.rendered && this.maskDisabled){ - this.el.mask(); - } - Ext.Panel.superclass.onDisable.call(this); - }, - - // private - onEnable : function(){ - if(this.rendered && this.maskDisabled){ - this.el.unmask(); - } - Ext.Panel.superclass.onEnable.call(this); - }, - - // private - onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){ - var w = adjWidth, - h = adjHeight; - - if(Ext.isDefined(w) || Ext.isDefined(h)){ - if(!this.collapsed){ - // First, set the the Panel's body width. - // If we have auto-widthed it, get the resulting full offset width so we can size the Toolbars to match - // The Toolbars must not buffer this resize operation because we need to know their heights. - - if(Ext.isNumber(w)){ - this.body.setWidth(w = this.adjustBodyWidth(w - this.getFrameWidth())); - } else if (w == 'auto') { - w = this.body.setWidth('auto').dom.offsetWidth; - } else { - w = this.body.dom.offsetWidth; - } - - if(this.tbar){ - this.tbar.setWidth(w); - if(this.topToolbar){ - this.topToolbar.setSize(w); - } - } - if(this.bbar){ - this.bbar.setWidth(w); - if(this.bottomToolbar){ - this.bottomToolbar.setSize(w); - // The bbar does not move on resize without this. - if (Ext.isIE) { - this.bbar.setStyle('position', 'static'); - this.bbar.setStyle('position', ''); - } - } - } - if(this.footer){ - this.footer.setWidth(w); - if(this.fbar){ - this.fbar.setSize(Ext.isIE ? (w - this.footer.getFrameWidth('lr')) : 'auto'); - } - } - - // At this point, the Toolbars must be layed out for getFrameHeight to find a result. - if(Ext.isNumber(h)){ - h = Math.max(0, h - this.getFrameHeight()); - //h = Math.max(0, h - (this.getHeight() - this.body.getHeight())); - this.body.setHeight(h); - }else if(h == 'auto'){ - this.body.setHeight(h); - } - - if(this.disabled && this.el._mask){ - this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight()); - } - }else{ - // Adds an event to set the correct height afterExpand. This accounts for the deferHeight flag in panel - this.queuedBodySize = {width: w, height: h}; - if(!this.queuedExpand && this.allowQueuedExpand !== false){ - this.queuedExpand = true; - this.on('expand', function(){ - delete this.queuedExpand; - this.onResize(this.queuedBodySize.width, this.queuedBodySize.height); - }, this, {single:true}); - } - } - this.onBodyResize(w, h); - } - this.syncShadow(); - Ext.Panel.superclass.onResize.call(this, adjWidth, adjHeight, rawWidth, rawHeight); - - }, - - // private - onBodyResize: function(w, h){ - this.fireEvent('bodyresize', this, w, h); - }, - - // private - getToolbarHeight: function(){ - var h = 0; - if(this.rendered){ - Ext.each(this.toolbars, function(tb){ - h += tb.getHeight(); - }, this); - } - return h; - }, - - // deprecate - adjustBodyHeight : function(h){ - return h; - }, - - // private - adjustBodyWidth : function(w){ - return w; - }, - - // private - onPosition : function(){ - this.syncShadow(); - }, - - /** - * Returns the width in pixels of the framing elements of this panel (not including the body width). To - * retrieve the body width see {@link #getInnerWidth}. - * @return {Number} The frame width - */ - getFrameWidth : function(){ - var w = this.el.getFrameWidth('lr') + this.bwrap.getFrameWidth('lr'); - - if(this.frame){ - var l = this.bwrap.dom.firstChild; - w += (Ext.fly(l).getFrameWidth('l') + Ext.fly(l.firstChild).getFrameWidth('r')); - w += this.mc.getFrameWidth('lr'); - } - return w; - }, - - /** - * Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and - * header and footer elements, but not including the body height). To retrieve the body height see {@link #getInnerHeight}. - * @return {Number} The frame height - */ - getFrameHeight : function() { - var h = this.el.getFrameWidth('tb') + this.bwrap.getFrameWidth('tb'); - h += (this.tbar ? this.tbar.getHeight() : 0) + - (this.bbar ? this.bbar.getHeight() : 0); - - if(this.frame){ - h += this.el.dom.firstChild.offsetHeight + this.ft.dom.offsetHeight + this.mc.getFrameWidth('tb'); - }else{ - h += (this.header ? this.header.getHeight() : 0) + - (this.footer ? this.footer.getHeight() : 0); - } - return h; - }, - - /** - * Returns the width in pixels of the body element (not including the width of any framing elements). - * For the frame width see {@link #getFrameWidth}. - * @return {Number} The body width - */ - getInnerWidth : function(){ - return this.getSize().width - this.getFrameWidth(); - }, - - /** - * Returns the height in pixels of the body element (not including the height of any framing elements). - * For the frame height see {@link #getFrameHeight}. - * @return {Number} The body height - */ - getInnerHeight : function(){ - return this.body.getHeight(); - /* Deprecate - return this.getSize().height - this.getFrameHeight(); - */ - }, - - // private - syncShadow : function(){ - if(this.floating){ - this.el.sync(true); - } - }, - - // private - getLayoutTarget : function(){ - return this.body; - }, - - // private - getContentTarget : function(){ - return this.body; - }, - - /** - *

          Sets the title text for the panel and optionally the {@link #iconCls icon class}.

          - *

          In order to be able to set the title, a header element must have been created - * for the Panel. This is triggered either by configuring the Panel with a non-blank {@link #title}, - * or configuring it with {@link #header}: true.

          - * @param {String} title The title text to set - * @param {String} iconCls (optional) {@link #iconCls iconCls} A user-defined CSS class that provides the icon image for this panel - */ - setTitle : function(title, iconCls){ - this.title = title; - if(this.header && this.headerAsText){ - this.header.child('span').update(title); - } - if(iconCls){ - this.setIconClass(iconCls); - } - this.fireEvent('titlechange', this, title); - return this; - }, - - /** - * Get the {@link Ext.Updater} for this panel. Enables you to perform Ajax updates of this panel's body. - * @return {Ext.Updater} The Updater - */ - getUpdater : function(){ - return this.body.getUpdater(); - }, - - /** - * Loads this content panel immediately with content returned from an XHR call. - * @param {Object/String/Function} config A config object containing any of the following options: -
          
          -panel.load({
          -    url: 'your-url.php',
          -    params: {param1: 'foo', param2: 'bar'}, // or a URL encoded string
          -    callback: yourFunction,
          -    scope: yourObject, // optional scope for the callback
          -    discardUrl: false,
          -    nocache: false,
          -    text: 'Loading...',
          -    timeout: 30,
          -    scripts: false
          -});
          -
          - * The only required property is url. The optional properties nocache, text and scripts - * are shorthand for disableCaching, indicatorText and loadScripts and are used to set their - * associated property on this panel Updater instance. - * @return {Ext.Panel} this - */ - load : function(){ - var um = this.body.getUpdater(); - um.update.apply(um, arguments); - return this; - }, - - // private - beforeDestroy : function(){ - Ext.Panel.superclass.beforeDestroy.call(this); - if(this.header){ - this.header.removeAllListeners(); - } - if(this.tools){ - for(var k in this.tools){ - Ext.destroy(this.tools[k]); - } - } - if(this.toolbars.length > 0){ - Ext.each(this.toolbars, function(tb){ - tb.un('afterlayout', this.syncHeight, this); - tb.un('remove', this.syncHeight, this); - }, this); - } - if(Ext.isArray(this.buttons)){ - while(this.buttons.length) { - Ext.destroy(this.buttons[0]); - } - } - if(this.rendered){ - Ext.destroy( - this.ft, - this.header, - this.footer, - this.tbar, - this.bbar, - this.body, - this.mc, - this.bwrap, - this.dd - ); - if (this.fbar) { - Ext.destroy( - this.fbar, - this.fbar.el - ); - } - } - Ext.destroy(this.toolbars); - }, - - // private - createClasses : function(){ - this.headerCls = this.baseCls + '-header'; - this.headerTextCls = this.baseCls + '-header-text'; - this.bwrapCls = this.baseCls + '-bwrap'; - this.tbarCls = this.baseCls + '-tbar'; - this.bodyCls = this.baseCls + '-body'; - this.bbarCls = this.baseCls + '-bbar'; - this.footerCls = this.baseCls + '-footer'; - }, - - // private - createGhost : function(cls, useShim, appendTo){ - var el = document.createElement('div'); - el.className = 'x-panel-ghost ' + (cls ? cls : ''); - if(this.header){ - el.appendChild(this.el.dom.firstChild.cloneNode(true)); - } - Ext.fly(el.appendChild(document.createElement('ul'))).setHeight(this.bwrap.getHeight()); - el.style.width = this.el.dom.offsetWidth + 'px';; - if(!appendTo){ - this.container.dom.appendChild(el); - }else{ - Ext.getDom(appendTo).appendChild(el); - } - if(useShim !== false && this.el.useShim !== false){ - var layer = new Ext.Layer({shadow:false, useDisplay:true, constrain:false}, el); - layer.show(); - return layer; - }else{ - return new Ext.Element(el); - } - }, - - // private - doAutoLoad : function(){ - var u = this.body.getUpdater(); - if(this.renderer){ - u.setRenderer(this.renderer); - } - u.update(Ext.isObject(this.autoLoad) ? this.autoLoad : {url: this.autoLoad}); - }, - - /** - * Retrieve a tool by id. - * @param {String} id - * @return {Object} tool - */ - getTool : function(id) { - return this.tools[id]; - } - -/** - * @cfg {String} autoEl @hide - */ -}); -Ext.reg('panel', Ext.Panel); -/** - * @class Ext.Editor - * @extends Ext.Component - * A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic. - * @constructor - * Create a new Editor - * @param {Object} config The config object - * @xtype editor - */ -Ext.Editor = function(field, config){ - if(field.field){ - this.field = Ext.create(field.field, 'textfield'); - config = Ext.apply({}, field); // copy so we don't disturb original config - delete config.field; - }else{ - this.field = field; - } - Ext.Editor.superclass.constructor.call(this, config); -}; - -Ext.extend(Ext.Editor, Ext.Component, { - /** - * @cfg {Ext.form.Field} field - * The Field object (or descendant) or config object for field - */ - /** - * @cfg {Boolean} allowBlur - * True to {@link #completeEdit complete the editing process} if in edit mode when the - * field is blurred. Defaults to true. - */ - allowBlur: true, - /** - * @cfg {Boolean/String} autoSize - * True for the editor to automatically adopt the size of the underlying field, "width" to adopt the width only, - * or "height" to adopt the height only, "none" to always use the field dimensions. (defaults to false) - */ - /** - * @cfg {Boolean} revertInvalid - * True to automatically revert the field value and cancel the edit when the user completes an edit and the field - * validation fails (defaults to true) - */ - /** - * @cfg {Boolean} ignoreNoChange - * True to skip the edit completion process (no save, no events fired) if the user completes an edit and - * the value has not changed (defaults to false). Applies only to string values - edits for other data types - * will never be ignored. - */ - /** - * @cfg {Boolean} hideEl - * False to keep the bound element visible while the editor is displayed (defaults to true) - */ - /** - * @cfg {Mixed} value - * The data value of the underlying field (defaults to "") - */ - value : "", - /** - * @cfg {String} alignment - * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "c-c?"). - */ - alignment: "c-c?", - /** - * @cfg {Array} offsets - * The offsets to use when aligning (see {@link Ext.Element#alignTo} for more details. Defaults to [0, 0]. - */ - offsets: [0, 0], - /** - * @cfg {Boolean/String} shadow "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop" - * for bottom-right shadow (defaults to "frame") - */ - shadow : "frame", - /** - * @cfg {Boolean} constrain True to constrain the editor to the viewport - */ - constrain : false, - /** - * @cfg {Boolean} swallowKeys Handle the keydown/keypress events so they don't propagate (defaults to true) - */ - swallowKeys : true, - /** - * @cfg {Boolean} completeOnEnter True to complete the edit when the enter key is pressed. Defaults to true. - */ - completeOnEnter : true, - /** - * @cfg {Boolean} cancelOnEsc True to cancel the edit when the escape key is pressed. Defaults to true. - */ - cancelOnEsc : true, - /** - * @cfg {Boolean} updateEl True to update the innerHTML of the bound element when the update completes (defaults to false) - */ - updateEl : false, - - initComponent : function(){ - Ext.Editor.superclass.initComponent.call(this); - this.addEvents( - /** - * @event beforestartedit - * Fires when editing is initiated, but before the value changes. Editing can be canceled by returning - * false from the handler of this event. - * @param {Editor} this - * @param {Ext.Element} boundEl The underlying element bound to this editor - * @param {Mixed} value The field value being set - */ - "beforestartedit", - /** - * @event startedit - * Fires when this editor is displayed - * @param {Ext.Element} boundEl The underlying element bound to this editor - * @param {Mixed} value The starting field value - */ - "startedit", - /** - * @event beforecomplete - * Fires after a change has been made to the field, but before the change is reflected in the underlying - * field. Saving the change to the field can be canceled by returning false from the handler of this event. - * Note that if the value has not changed and ignoreNoChange = true, the editing will still end but this - * event will not fire since no edit actually occurred. - * @param {Editor} this - * @param {Mixed} value The current field value - * @param {Mixed} startValue The original field value - */ - "beforecomplete", - /** - * @event complete - * Fires after editing is complete and any changed value has been written to the underlying field. - * @param {Editor} this - * @param {Mixed} value The current field value - * @param {Mixed} startValue The original field value - */ - "complete", - /** - * @event canceledit - * Fires after editing has been canceled and the editor's value has been reset. - * @param {Editor} this - * @param {Mixed} value The user-entered field value that was discarded - * @param {Mixed} startValue The original field value that was set back into the editor after cancel - */ - "canceledit", - /** - * @event specialkey - * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. You can check - * {@link Ext.EventObject#getKey} to determine which key was pressed. - * @param {Ext.form.Field} this - * @param {Ext.EventObject} e The event object - */ - "specialkey" - ); - }, - - // private - onRender : function(ct, position){ - this.el = new Ext.Layer({ - shadow: this.shadow, - cls: "x-editor", - parentEl : ct, - shim : this.shim, - shadowOffset: this.shadowOffset || 4, - id: this.id, - constrain: this.constrain - }); - if(this.zIndex){ - this.el.setZIndex(this.zIndex); - } - this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden"); - if(this.field.msgTarget != 'title'){ - this.field.msgTarget = 'qtip'; - } - this.field.inEditor = true; - this.mon(this.field, { - scope: this, - blur: this.onBlur, - specialkey: this.onSpecialKey - }); - if(this.field.grow){ - this.mon(this.field, "autosize", this.el.sync, this.el, {delay:1}); - } - this.field.render(this.el).show(); - this.field.getEl().dom.name = ''; - if(this.swallowKeys){ - this.field.el.swallowEvent([ - 'keypress', // *** Opera - 'keydown' // *** all other browsers - ]); - } - }, - - // private - onSpecialKey : function(field, e){ - var key = e.getKey(), - complete = this.completeOnEnter && key == e.ENTER, - cancel = this.cancelOnEsc && key == e.ESC; - if(complete || cancel){ - e.stopEvent(); - if(complete){ - this.completeEdit(); - }else{ - this.cancelEdit(); - } - if(field.triggerBlur){ - field.triggerBlur(); - } - } - this.fireEvent('specialkey', field, e); - }, - - /** - * Starts the editing process and shows the editor. - * @param {Mixed} el The element to edit - * @param {String} value (optional) A value to initialize the editor with. If a value is not provided, it defaults - * to the innerHTML of el. - */ - startEdit : function(el, value){ - if(this.editing){ - this.completeEdit(); - } - this.boundEl = Ext.get(el); - var v = value !== undefined ? value : this.boundEl.dom.innerHTML; - if(!this.rendered){ - this.render(this.parentEl || document.body); - } - if(this.fireEvent("beforestartedit", this, this.boundEl, v) !== false){ - this.startValue = v; - this.field.reset(); - this.field.setValue(v); - this.realign(true); - this.editing = true; - this.show(); - } - }, - - // private - doAutoSize : function(){ - if(this.autoSize){ - var sz = this.boundEl.getSize(), - fs = this.field.getSize(); - - switch(this.autoSize){ - case "width": - this.setSize(sz.width, fs.height); - break; - case "height": - this.setSize(fs.width, sz.height); - break; - case "none": - this.setSize(fs.width, fs.height); - break; - default: - this.setSize(sz.width, sz.height); - } - } - }, - - /** - * Sets the height and width of this editor. - * @param {Number} width The new width - * @param {Number} height The new height - */ - setSize : function(w, h){ - delete this.field.lastSize; - this.field.setSize(w, h); - if(this.el){ - // IE7 in strict mode doesn't size properly. - if(Ext.isGecko2 || Ext.isOpera || (Ext.isIE7 && Ext.isStrict)){ - // prevent layer scrollbars - this.el.setSize(w, h); - } - this.el.sync(); - } - }, - - /** - * Realigns the editor to the bound field based on the current alignment config value. - * @param {Boolean} autoSize (optional) True to size the field to the dimensions of the bound element. - */ - realign : function(autoSize){ - if(autoSize === true){ - this.doAutoSize(); - } - this.el.alignTo(this.boundEl, this.alignment, this.offsets); - }, - - /** - * Ends the editing process, persists the changed value to the underlying field, and hides the editor. - * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after edit (defaults to false) - */ - completeEdit : function(remainVisible){ - if(!this.editing){ - return; - } - // Assert combo values first - if (this.field.assertValue) { - this.field.assertValue(); - } - var v = this.getValue(); - if(!this.field.isValid()){ - if(this.revertInvalid !== false){ - this.cancelEdit(remainVisible); - } - return; - } - if(String(v) === String(this.startValue) && this.ignoreNoChange){ - this.hideEdit(remainVisible); - return; - } - if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false){ - v = this.getValue(); - if(this.updateEl && this.boundEl){ - this.boundEl.update(v); - } - this.hideEdit(remainVisible); - this.fireEvent("complete", this, v, this.startValue); - } - }, - - // private - onShow : function(){ - this.el.show(); - if(this.hideEl !== false){ - this.boundEl.hide(); - } - this.field.show().focus(false, true); - this.fireEvent("startedit", this.boundEl, this.startValue); - }, - - /** - * Cancels the editing process and hides the editor without persisting any changes. The field value will be - * reverted to the original starting value. - * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after - * cancel (defaults to false) - */ - cancelEdit : function(remainVisible){ - if(this.editing){ - var v = this.getValue(); - this.setValue(this.startValue); - this.hideEdit(remainVisible); - this.fireEvent("canceledit", this, v, this.startValue); - } - }, - - // private - hideEdit: function(remainVisible){ - if(remainVisible !== true){ - this.editing = false; - this.hide(); - } - }, - - // private - onBlur : function(){ - // selectSameEditor flag allows the same editor to be started without onBlur firing on itself - if(this.allowBlur === true && this.editing && this.selectSameEditor !== true){ - this.completeEdit(); - } - }, - - // private - onHide : function(){ - if(this.editing){ - this.completeEdit(); - return; - } - this.field.blur(); - if(this.field.collapse){ - this.field.collapse(); - } - this.el.hide(); - if(this.hideEl !== false){ - this.boundEl.show(); - } - }, - - /** - * Sets the data value of the editor - * @param {Mixed} value Any valid value supported by the underlying field - */ - setValue : function(v){ - this.field.setValue(v); - }, - - /** - * Gets the data value of the editor - * @return {Mixed} The data value - */ - getValue : function(){ - return this.field.getValue(); - }, - - beforeDestroy : function(){ - Ext.destroyMembers(this, 'field'); - - delete this.parentEl; - delete this.boundEl; - } -}); -Ext.reg('editor', Ext.Editor); -/** - * @class Ext.ColorPalette - * @extends Ext.Component - * Simple color palette class for choosing colors. The palette can be rendered to any container.
          - * Here's an example of typical usage: - *
          
          -var cp = new Ext.ColorPalette({value:'993300'});  // initial selected color
          -cp.render('my-div');
          -
          -cp.on('select', function(palette, selColor){
          -    // do something with selColor
          -});
          -
          - * @constructor - * Create a new ColorPalette - * @param {Object} config The config object - * @xtype colorpalette - */ -Ext.ColorPalette = Ext.extend(Ext.Component, { - /** - * @cfg {String} tpl An existing XTemplate instance to be used in place of the default template for rendering the component. - */ - /** - * @cfg {String} itemCls - * The CSS class to apply to the containing element (defaults to 'x-color-palette') - */ - itemCls : 'x-color-palette', - /** - * @cfg {String} value - * The initial color to highlight (should be a valid 6-digit color hex code without the # symbol). Note that - * the hex codes are case-sensitive. - */ - value : null, - /** - * @cfg {String} clickEvent - * The DOM event that will cause a color to be selected. This can be any valid event name (dblclick, contextmenu). - * Defaults to 'click'. - */ - clickEvent :'click', - // private - ctype : 'Ext.ColorPalette', - - /** - * @cfg {Boolean} allowReselect If set to true then reselecting a color that is already selected fires the {@link #select} event - */ - allowReselect : false, - - /** - *

          An array of 6-digit color hex code strings (without the # symbol). This array can contain any number - * of colors, and each hex code should be unique. The width of the palette is controlled via CSS by adjusting - * the width property of the 'x-color-palette' class (or assigning a custom class), so you can balance the number - * of colors with the width setting until the box is symmetrical.

          - *

          You can override individual colors if needed:

          - *
          
          -var cp = new Ext.ColorPalette();
          -cp.colors[0] = 'FF0000';  // change the first box to red
          -
          - -Or you can provide a custom array of your own for complete control: -
          
          -var cp = new Ext.ColorPalette();
          -cp.colors = ['000000', '993300', '333300'];
          -
          - * @type Array - */ - colors : [ - '000000', '993300', '333300', '003300', '003366', '000080', '333399', '333333', - '800000', 'FF6600', '808000', '008000', '008080', '0000FF', '666699', '808080', - 'FF0000', 'FF9900', '99CC00', '339966', '33CCCC', '3366FF', '800080', '969696', - 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF', '993366', 'C0C0C0', - 'FF99CC', 'FFCC99', 'FFFF99', 'CCFFCC', 'CCFFFF', '99CCFF', 'CC99FF', 'FFFFFF' - ], - - /** - * @cfg {Function} handler - * Optional. A function that will handle the select event of this palette. - * The handler is passed the following parameters:
            - *
          • palette : ColorPalette
            The {@link #palette Ext.ColorPalette}.
          • - *
          • color : String
            The 6-digit color hex code (without the # symbol).
          • - *
          - */ - /** - * @cfg {Object} scope - * The scope (this reference) in which the {@link #handler} - * function will be called. Defaults to this ColorPalette instance. - */ - - // private - initComponent : function(){ - Ext.ColorPalette.superclass.initComponent.call(this); - this.addEvents( - /** - * @event select - * Fires when a color is selected - * @param {ColorPalette} this - * @param {String} color The 6-digit color hex code (without the # symbol) - */ - 'select' - ); - - if(this.handler){ - this.on('select', this.handler, this.scope, true); - } - }, - - // private - onRender : function(container, position){ - this.autoEl = { - tag: 'div', - cls: this.itemCls - }; - Ext.ColorPalette.superclass.onRender.call(this, container, position); - var t = this.tpl || new Ext.XTemplate( - ' ' - ); - t.overwrite(this.el, this.colors); - this.mon(this.el, this.clickEvent, this.handleClick, this, {delegate: 'a'}); - if(this.clickEvent != 'click'){ - this.mon(this.el, 'click', Ext.emptyFn, this, {delegate: 'a', preventDefault: true}); - } - }, - - // private - afterRender : function(){ - Ext.ColorPalette.superclass.afterRender.call(this); - if(this.value){ - var s = this.value; - this.value = null; - this.select(s, true); - } - }, - - // private - handleClick : function(e, t){ - e.preventDefault(); - if(!this.disabled){ - var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1]; - this.select(c.toUpperCase()); - } - }, - - /** - * Selects the specified color in the palette (fires the {@link #select} event) - * @param {String} color A valid 6-digit color hex code (# will be stripped if included) - * @param {Boolean} suppressEvent (optional) True to stop the select event from firing. Defaults to false. - */ - select : function(color, suppressEvent){ - color = color.replace('#', ''); - if(color != this.value || this.allowReselect){ - var el = this.el; - if(this.value){ - el.child('a.color-'+this.value).removeClass('x-color-palette-sel'); - } - el.child('a.color-'+color).addClass('x-color-palette-sel'); - this.value = color; - if(suppressEvent !== true){ - this.fireEvent('select', this, color); - } - } - } - - /** - * @cfg {String} autoEl @hide - */ -}); -Ext.reg('colorpalette', Ext.ColorPalette);/** - * @class Ext.DatePicker - * @extends Ext.Component - *

          A popup date picker. This class is used by the {@link Ext.form.DateField DateField} class - * to allow browsing and selection of valid dates.

          - *

          All the string values documented below may be overridden by including an Ext locale file in - * your page.

          - * @constructor - * Create a new DatePicker - * @param {Object} config The config object - * @xtype datepicker - */ -Ext.DatePicker = Ext.extend(Ext.BoxComponent, { - /** - * @cfg {String} todayText - * The text to display on the button that selects the current date (defaults to 'Today') - */ - todayText : 'Today', - /** - * @cfg {String} okText - * The text to display on the ok button (defaults to ' OK ' to give the user extra clicking room) - */ - okText : ' OK ', - /** - * @cfg {String} cancelText - * The text to display on the cancel button (defaults to 'Cancel') - */ - cancelText : 'Cancel', - /** - * @cfg {Function} handler - * Optional. A function that will handle the select event of this picker. - * The handler is passed the following parameters:
            - *
          • picker : DatePicker
            This DatePicker.
          • - *
          • date : Date
            The selected date.
          • - *
          - */ - /** - * @cfg {Object} scope - * The scope (this reference) in which the {@link #handler} - * function will be called. Defaults to this DatePicker instance. - */ - /** - * @cfg {String} todayTip - * A string used to format the message for displaying in a tooltip over the button that - * selects the current date. Defaults to '{0} (Spacebar)' where - * the {0} token is replaced by today's date. - */ - todayTip : '{0} (Spacebar)', - /** - * @cfg {String} minText - * The error text to display if the minDate validation fails (defaults to 'This date is before the minimum date') - */ - minText : 'This date is before the minimum date', - /** - * @cfg {String} maxText - * The error text to display if the maxDate validation fails (defaults to 'This date is after the maximum date') - */ - maxText : 'This date is after the maximum date', - /** - * @cfg {String} format - * The default date format string which can be overriden for localization support. The format must be - * valid according to {@link Date#parseDate} (defaults to 'm/d/y'). - */ - format : 'm/d/y', - /** - * @cfg {String} disabledDaysText - * The tooltip to display when the date falls on a disabled day (defaults to 'Disabled') - */ - disabledDaysText : 'Disabled', - /** - * @cfg {String} disabledDatesText - * The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled') - */ - disabledDatesText : 'Disabled', - /** - * @cfg {Array} monthNames - * An array of textual month names which can be overriden for localization support (defaults to Date.monthNames) - */ - monthNames : Date.monthNames, - /** - * @cfg {Array} dayNames - * An array of textual day names which can be overriden for localization support (defaults to Date.dayNames) - */ - dayNames : Date.dayNames, - /** - * @cfg {String} nextText - * The next month navigation button tooltip (defaults to 'Next Month (Control+Right)') - */ - nextText : 'Next Month (Control+Right)', - /** - * @cfg {String} prevText - * The previous month navigation button tooltip (defaults to 'Previous Month (Control+Left)') - */ - prevText : 'Previous Month (Control+Left)', - /** - * @cfg {String} monthYearText - * The header month selector tooltip (defaults to 'Choose a month (Control+Up/Down to move years)') - */ - monthYearText : 'Choose a month (Control+Up/Down to move years)', - /** - * @cfg {Number} startDay - * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday) - */ - startDay : 0, - /** - * @cfg {Boolean} showToday - * False to hide the footer area containing the Today button and disable the keyboard handler for spacebar - * that selects the current date (defaults to true). - */ - showToday : true, - /** - * @cfg {Date} minDate - * Minimum allowable date (JavaScript date object, defaults to null) - */ - /** - * @cfg {Date} maxDate - * Maximum allowable date (JavaScript date object, defaults to null) - */ - /** - * @cfg {Array} disabledDays - * An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null). - */ - /** - * @cfg {RegExp} disabledDatesRE - * JavaScript regular expression used to disable a pattern of dates (defaults to null). The {@link #disabledDates} - * config will generate this regex internally, but if you specify disabledDatesRE it will take precedence over the - * disabledDates value. - */ - /** - * @cfg {Array} disabledDates - * An array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular - * expression so they are very powerful. Some examples: - *
            - *
          • ['03/08/2003', '09/16/2003'] would disable those exact dates
          • - *
          • ['03/08', '09/16'] would disable those days for every year
          • - *
          • ['^03/08'] would only match the beginning (useful if you are using short years)
          • - *
          • ['03/../2006'] would disable every day in March 2006
          • - *
          • ['^03'] would disable every day in every March
          • - *
          - * Note that the format of the dates included in the array should exactly match the {@link #format} config. - * In order to support regular expressions, if you are using a date format that has '.' in it, you will have to - * escape the dot when restricting dates. For example: ['03\\.08\\.03']. - */ - - // private - // Set by other components to stop the picker focus being updated when the value changes. - focusOnSelect: true, - - // default value used to initialise each date in the DatePicker - // (note: 12 noon was chosen because it steers well clear of all DST timezone changes) - initHour: 12, // 24-hour format - - // private - initComponent : function(){ - Ext.DatePicker.superclass.initComponent.call(this); - - this.value = this.value ? - this.value.clearTime(true) : new Date().clearTime(); - - this.addEvents( - /** - * @event select - * Fires when a date is selected - * @param {DatePicker} this DatePicker - * @param {Date} date The selected date - */ - 'select' - ); - - if(this.handler){ - this.on('select', this.handler, this.scope || this); - } - - this.initDisabledDays(); - }, - - // private - initDisabledDays : function(){ - if(!this.disabledDatesRE && this.disabledDates){ - var dd = this.disabledDates, - len = dd.length - 1, - re = '(?:'; - - Ext.each(dd, function(d, i){ - re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i]; - if(i != len){ - re += '|'; - } - }, this); - this.disabledDatesRE = new RegExp(re + ')'); - } - }, - - /** - * Replaces any existing disabled dates with new values and refreshes the DatePicker. - * @param {Array/RegExp} disabledDates An array of date strings (see the {@link #disabledDates} config - * for details on supported values), or a JavaScript regular expression used to disable a pattern of dates. - */ - setDisabledDates : function(dd){ - if(Ext.isArray(dd)){ - this.disabledDates = dd; - this.disabledDatesRE = null; - }else{ - this.disabledDatesRE = dd; - } - this.initDisabledDays(); - this.update(this.value, true); - }, - - /** - * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker. - * @param {Array} disabledDays An array of disabled day indexes. See the {@link #disabledDays} config - * for details on supported values. - */ - setDisabledDays : function(dd){ - this.disabledDays = dd; - this.update(this.value, true); - }, - - /** - * Replaces any existing {@link #minDate} with the new value and refreshes the DatePicker. - * @param {Date} value The minimum date that can be selected - */ - setMinDate : function(dt){ - this.minDate = dt; - this.update(this.value, true); - }, - - /** - * Replaces any existing {@link #maxDate} with the new value and refreshes the DatePicker. - * @param {Date} value The maximum date that can be selected - */ - setMaxDate : function(dt){ - this.maxDate = dt; - this.update(this.value, true); - }, - - /** - * Sets the value of the date field - * @param {Date} value The date to set - */ - setValue : function(value){ - this.value = value.clearTime(true); - this.update(this.value); - }, - - /** - * Gets the current selected value of the date field - * @return {Date} The selected date - */ - getValue : function(){ - return this.value; - }, - - // private - focus : function(){ - this.update(this.activeDate); - }, - - // private - onEnable: function(initial){ - Ext.DatePicker.superclass.onEnable.call(this); - this.doDisabled(false); - this.update(initial ? this.value : this.activeDate); - if(Ext.isIE){ - this.el.repaint(); - } - - }, - - // private - onDisable : function(){ - Ext.DatePicker.superclass.onDisable.call(this); - this.doDisabled(true); - if(Ext.isIE && !Ext.isIE8){ - /* Really strange problem in IE6/7, when disabled, have to explicitly - * repaint each of the nodes to get them to display correctly, simply - * calling repaint on the main element doesn't appear to be enough. - */ - Ext.each([].concat(this.textNodes, this.el.query('th span')), function(el){ - Ext.fly(el).repaint(); - }); - } - }, - - // private - doDisabled : function(disabled){ - this.keyNav.setDisabled(disabled); - this.prevRepeater.setDisabled(disabled); - this.nextRepeater.setDisabled(disabled); - if(this.showToday){ - this.todayKeyListener.setDisabled(disabled); - this.todayBtn.setDisabled(disabled); - } - }, - - // private - onRender : function(container, position){ - var m = [ - '
      • ', - '', - '', - this.showToday ? '' : '', - '
          
        '], - dn = this.dayNames, - i; - for(i = 0; i < 7; i++){ - var d = this.startDay+i; - if(d > 6){ - d = d-7; - } - m.push(''); - } - m[m.length] = ''; - for(i = 0; i < 42; i++) { - if(i % 7 === 0 && i !== 0){ - m[m.length] = ''; - } - m[m.length] = ''; - } - m.push('
        ', dn[d].substr(0,1), '
        '); - - var el = document.createElement('div'); - el.className = 'x-date-picker'; - el.innerHTML = m.join(''); - - container.dom.insertBefore(el, position); - - this.el = Ext.get(el); - this.eventEl = Ext.get(el.firstChild); - - this.prevRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-left a'), { - handler: this.showPrevMonth, - scope: this, - preventDefault:true, - stopDefault:true - }); - - this.nextRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-right a'), { - handler: this.showNextMonth, - scope: this, - preventDefault:true, - stopDefault:true - }); - - this.monthPicker = this.el.down('div.x-date-mp'); - this.monthPicker.enableDisplayMode('block'); - - this.keyNav = new Ext.KeyNav(this.eventEl, { - 'left' : function(e){ - if(e.ctrlKey){ - this.showPrevMonth(); - }else{ - this.update(this.activeDate.add('d', -1)); - } - }, - - 'right' : function(e){ - if(e.ctrlKey){ - this.showNextMonth(); - }else{ - this.update(this.activeDate.add('d', 1)); - } - }, - - 'up' : function(e){ - if(e.ctrlKey){ - this.showNextYear(); - }else{ - this.update(this.activeDate.add('d', -7)); - } - }, - - 'down' : function(e){ - if(e.ctrlKey){ - this.showPrevYear(); - }else{ - this.update(this.activeDate.add('d', 7)); - } - }, - - 'pageUp' : function(e){ - this.showNextMonth(); - }, - - 'pageDown' : function(e){ - this.showPrevMonth(); - }, - - 'enter' : function(e){ - e.stopPropagation(); - return true; - }, - - scope : this - }); - - this.el.unselectable(); - - this.cells = this.el.select('table.x-date-inner tbody td'); - this.textNodes = this.el.query('table.x-date-inner tbody span'); - - this.mbtn = new Ext.Button({ - text: ' ', - tooltip: this.monthYearText, - renderTo: this.el.child('td.x-date-middle', true) - }); - this.mbtn.el.child('em').addClass('x-btn-arrow'); - - if(this.showToday){ - this.todayKeyListener = this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday, this); - var today = (new Date()).dateFormat(this.format); - this.todayBtn = new Ext.Button({ - renderTo: this.el.child('td.x-date-bottom', true), - text: String.format(this.todayText, today), - tooltip: String.format(this.todayTip, today), - handler: this.selectToday, - scope: this - }); - } - this.mon(this.eventEl, 'mousewheel', this.handleMouseWheel, this); - this.mon(this.eventEl, 'click', this.handleDateClick, this, {delegate: 'a.x-date-date'}); - this.mon(this.mbtn, 'click', this.showMonthPicker, this); - this.onEnable(true); - }, - - // private - createMonthPicker : function(){ - if(!this.monthPicker.dom.firstChild){ - var buf = ['']; - for(var i = 0; i < 6; i++){ - buf.push( - '', - '', - i === 0 ? - '' : - '' - ); - } - buf.push( - '', - '
        ', Date.getShortMonthName(i), '', Date.getShortMonthName(i + 6), '
        ' - ); - this.monthPicker.update(buf.join('')); - - this.mon(this.monthPicker, 'click', this.onMonthClick, this); - this.mon(this.monthPicker, 'dblclick', this.onMonthDblClick, this); - - this.mpMonths = this.monthPicker.select('td.x-date-mp-month'); - this.mpYears = this.monthPicker.select('td.x-date-mp-year'); - - this.mpMonths.each(function(m, a, i){ - i += 1; - if((i%2) === 0){ - m.dom.xmonth = 5 + Math.round(i * 0.5); - }else{ - m.dom.xmonth = Math.round((i-1) * 0.5); - } - }); - } - }, - - // private - showMonthPicker : function(){ - if(!this.disabled){ - this.createMonthPicker(); - var size = this.el.getSize(); - this.monthPicker.setSize(size); - this.monthPicker.child('table').setSize(size); - - this.mpSelMonth = (this.activeDate || this.value).getMonth(); - this.updateMPMonth(this.mpSelMonth); - this.mpSelYear = (this.activeDate || this.value).getFullYear(); - this.updateMPYear(this.mpSelYear); - - this.monthPicker.slideIn('t', {duration:0.2}); - } - }, - - // private - updateMPYear : function(y){ - this.mpyear = y; - var ys = this.mpYears.elements; - for(var i = 1; i <= 10; i++){ - var td = ys[i-1], y2; - if((i%2) === 0){ - y2 = y + Math.round(i * 0.5); - td.firstChild.innerHTML = y2; - td.xyear = y2; - }else{ - y2 = y - (5-Math.round(i * 0.5)); - td.firstChild.innerHTML = y2; - td.xyear = y2; - } - this.mpYears.item(i-1)[y2 == this.mpSelYear ? 'addClass' : 'removeClass']('x-date-mp-sel'); - } - }, - - // private - updateMPMonth : function(sm){ - this.mpMonths.each(function(m, a, i){ - m[m.dom.xmonth == sm ? 'addClass' : 'removeClass']('x-date-mp-sel'); - }); - }, - - // private - selectMPMonth : function(m){ - - }, - - // private - onMonthClick : function(e, t){ - e.stopEvent(); - var el = new Ext.Element(t), pn; - if(el.is('button.x-date-mp-cancel')){ - this.hideMonthPicker(); - } - else if(el.is('button.x-date-mp-ok')){ - var d = new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate()); - if(d.getMonth() != this.mpSelMonth){ - // 'fix' the JS rolling date conversion if needed - d = new Date(this.mpSelYear, this.mpSelMonth, 1).getLastDateOfMonth(); - } - this.update(d); - this.hideMonthPicker(); - } - else if((pn = el.up('td.x-date-mp-month', 2))){ - this.mpMonths.removeClass('x-date-mp-sel'); - pn.addClass('x-date-mp-sel'); - this.mpSelMonth = pn.dom.xmonth; - } - else if((pn = el.up('td.x-date-mp-year', 2))){ - this.mpYears.removeClass('x-date-mp-sel'); - pn.addClass('x-date-mp-sel'); - this.mpSelYear = pn.dom.xyear; - } - else if(el.is('a.x-date-mp-prev')){ - this.updateMPYear(this.mpyear-10); - } - else if(el.is('a.x-date-mp-next')){ - this.updateMPYear(this.mpyear+10); - } - }, - - // private - onMonthDblClick : function(e, t){ - e.stopEvent(); - var el = new Ext.Element(t), pn; - if((pn = el.up('td.x-date-mp-month', 2))){ - this.update(new Date(this.mpSelYear, pn.dom.xmonth, (this.activeDate || this.value).getDate())); - this.hideMonthPicker(); - } - else if((pn = el.up('td.x-date-mp-year', 2))){ - this.update(new Date(pn.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate())); - this.hideMonthPicker(); - } - }, - - // private - hideMonthPicker : function(disableAnim){ - if(this.monthPicker){ - if(disableAnim === true){ - this.monthPicker.hide(); - }else{ - this.monthPicker.slideOut('t', {duration:0.2}); - } - } - }, - - // private - showPrevMonth : function(e){ - this.update(this.activeDate.add('mo', -1)); - }, - - // private - showNextMonth : function(e){ - this.update(this.activeDate.add('mo', 1)); - }, - - // private - showPrevYear : function(){ - this.update(this.activeDate.add('y', -1)); - }, - - // private - showNextYear : function(){ - this.update(this.activeDate.add('y', 1)); - }, - - // private - handleMouseWheel : function(e){ - e.stopEvent(); - if(!this.disabled){ - var delta = e.getWheelDelta(); - if(delta > 0){ - this.showPrevMonth(); - } else if(delta < 0){ - this.showNextMonth(); - } - } - }, - - // private - handleDateClick : function(e, t){ - e.stopEvent(); - if(!this.disabled && t.dateValue && !Ext.fly(t.parentNode).hasClass('x-date-disabled')){ - this.cancelFocus = this.focusOnSelect === false; - this.setValue(new Date(t.dateValue)); - delete this.cancelFocus; - this.fireEvent('select', this, this.value); - } - }, - - // private - selectToday : function(){ - if(this.todayBtn && !this.todayBtn.disabled){ - this.setValue(new Date().clearTime()); - this.fireEvent('select', this, this.value); - } - }, - - // private - update : function(date, forceRefresh){ - if(this.rendered){ - var vd = this.activeDate, vis = this.isVisible(); - this.activeDate = date; - if(!forceRefresh && vd && this.el){ - var t = date.getTime(); - if(vd.getMonth() == date.getMonth() && vd.getFullYear() == date.getFullYear()){ - this.cells.removeClass('x-date-selected'); - this.cells.each(function(c){ - if(c.dom.firstChild.dateValue == t){ - c.addClass('x-date-selected'); - if(vis && !this.cancelFocus){ - Ext.fly(c.dom.firstChild).focus(50); - } - return false; - } - }, this); - return; - } - } - var days = date.getDaysInMonth(), - firstOfMonth = date.getFirstDateOfMonth(), - startingPos = firstOfMonth.getDay()-this.startDay; - - if(startingPos < 0){ - startingPos += 7; - } - days += startingPos; - - var pm = date.add('mo', -1), - prevStart = pm.getDaysInMonth()-startingPos, - cells = this.cells.elements, - textEls = this.textNodes, - // convert everything to numbers so it's fast - d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart, this.initHour)), - today = new Date().clearTime().getTime(), - sel = date.clearTime(true).getTime(), - min = this.minDate ? this.minDate.clearTime(true) : Number.NEGATIVE_INFINITY, - max = this.maxDate ? this.maxDate.clearTime(true) : Number.POSITIVE_INFINITY, - ddMatch = this.disabledDatesRE, - ddText = this.disabledDatesText, - ddays = this.disabledDays ? this.disabledDays.join('') : false, - ddaysText = this.disabledDaysText, - format = this.format; - - if(this.showToday){ - var td = new Date().clearTime(), - disable = (td < min || td > max || - (ddMatch && format && ddMatch.test(td.dateFormat(format))) || - (ddays && ddays.indexOf(td.getDay()) != -1)); - - if(!this.disabled){ - this.todayBtn.setDisabled(disable); - this.todayKeyListener[disable ? 'disable' : 'enable'](); - } - } - - var setCellClass = function(cal, cell){ - cell.title = ''; - var t = d.clearTime(true).getTime(); - cell.firstChild.dateValue = t; - if(t == today){ - cell.className += ' x-date-today'; - cell.title = cal.todayText; - } - if(t == sel){ - cell.className += ' x-date-selected'; - if(vis){ - Ext.fly(cell.firstChild).focus(50); - } - } - // disabling - if(t < min) { - cell.className = ' x-date-disabled'; - cell.title = cal.minText; - return; - } - if(t > max) { - cell.className = ' x-date-disabled'; - cell.title = cal.maxText; - return; - } - if(ddays){ - if(ddays.indexOf(d.getDay()) != -1){ - cell.title = ddaysText; - cell.className = ' x-date-disabled'; - } - } - if(ddMatch && format){ - var fvalue = d.dateFormat(format); - if(ddMatch.test(fvalue)){ - cell.title = ddText.replace('%0', fvalue); - cell.className = ' x-date-disabled'; - } - } - }; - - var i = 0; - for(; i < startingPos; i++) { - textEls[i].innerHTML = (++prevStart); - d.setDate(d.getDate()+1); - cells[i].className = 'x-date-prevday'; - setCellClass(this, cells[i]); - } - for(; i < days; i++){ - var intDay = i - startingPos + 1; - textEls[i].innerHTML = (intDay); - d.setDate(d.getDate()+1); - cells[i].className = 'x-date-active'; - setCellClass(this, cells[i]); - } - var extraDays = 0; - for(; i < 42; i++) { - textEls[i].innerHTML = (++extraDays); - d.setDate(d.getDate()+1); - cells[i].className = 'x-date-nextday'; - setCellClass(this, cells[i]); - } - - this.mbtn.setText(this.monthNames[date.getMonth()] + ' ' + date.getFullYear()); - - if(!this.internalRender){ - var main = this.el.dom.firstChild, - w = main.offsetWidth; - this.el.setWidth(w + this.el.getBorderWidth('lr')); - Ext.fly(main).setWidth(w); - this.internalRender = true; - // opera does not respect the auto grow header center column - // then, after it gets a width opera refuses to recalculate - // without a second pass - if(Ext.isOpera && !this.secondPass){ - main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + 'px'; - this.secondPass = true; - this.update.defer(10, this, [date]); - } - } - } - }, - - // private - beforeDestroy : function() { - if(this.rendered){ - Ext.destroy( - this.keyNav, - this.monthPicker, - this.eventEl, - this.mbtn, - this.nextRepeater, - this.prevRepeater, - this.cells.el, - this.todayBtn - ); - delete this.textNodes; - delete this.cells.elements; - } - } - - /** - * @cfg {String} autoEl @hide - */ -}); - -Ext.reg('datepicker', Ext.DatePicker); -/** - * @class Ext.LoadMask - * A simple utility class for generically masking elements while loading data. If the {@link #store} - * config option is specified, the masking will be automatically synchronized with the store's loading - * process and the mask element will be cached for reuse. For all other elements, this mask will replace the - * element's Updater load indicator and will be destroyed after the initial load. - *

        Example usage:

        - *
        
        -// Basic mask:
        -var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
        -myMask.show();
        -
        - * @constructor - * Create a new LoadMask - * @param {Mixed} el The element or DOM node, or its id - * @param {Object} config The config object - */ -Ext.LoadMask = function(el, config){ - this.el = Ext.get(el); - Ext.apply(this, config); - if(this.store){ - this.store.on({ - scope: this, - beforeload: this.onBeforeLoad, - load: this.onLoad, - exception: this.onLoad - }); - this.removeMask = Ext.value(this.removeMask, false); - }else{ - var um = this.el.getUpdater(); - um.showLoadIndicator = false; // disable the default indicator - um.on({ - scope: this, - beforeupdate: this.onBeforeLoad, - update: this.onLoad, - failure: this.onLoad - }); - this.removeMask = Ext.value(this.removeMask, true); - } -}; - -Ext.LoadMask.prototype = { - /** - * @cfg {Ext.data.Store} store - * Optional Store to which the mask is bound. The mask is displayed when a load request is issued, and - * hidden on either load sucess, or load fail. - */ - /** - * @cfg {Boolean} removeMask - * True to create a single-use mask that is automatically destroyed after loading (useful for page loads), - * False to persist the mask element reference for multiple uses (e.g., for paged data widgets). Defaults to false. - */ - /** - * @cfg {String} msg - * The text to display in a centered loading message box (defaults to 'Loading...') - */ - msg : 'Loading...', - /** - * @cfg {String} msgCls - * The CSS class to apply to the loading message element (defaults to "x-mask-loading") - */ - msgCls : 'x-mask-loading', - - /** - * Read-only. True if the mask is currently disabled so that it will not be displayed (defaults to false) - * @type Boolean - */ - disabled: false, - - /** - * Disables the mask to prevent it from being displayed - */ - disable : function(){ - this.disabled = true; - }, - - /** - * Enables the mask so that it can be displayed - */ - enable : function(){ - this.disabled = false; - }, - - // private - onLoad : function(){ - this.el.unmask(this.removeMask); - }, - - // private - onBeforeLoad : function(){ - if(!this.disabled){ - this.el.mask(this.msg, this.msgCls); - } - }, - - /** - * Show this LoadMask over the configured Element. - */ - show: function(){ - this.onBeforeLoad(); - }, - - /** - * Hide this LoadMask. - */ - hide: function(){ - this.onLoad(); - }, - - // private - destroy : function(){ - if(this.store){ - this.store.un('beforeload', this.onBeforeLoad, this); - this.store.un('load', this.onLoad, this); - this.store.un('exception', this.onLoad, this); - }else{ - var um = this.el.getUpdater(); - um.un('beforeupdate', this.onBeforeLoad, this); - um.un('update', this.onLoad, this); - um.un('failure', this.onLoad, this); - } - } -};/** - * @class Ext.slider.Thumb - * @extends Object - * Represents a single thumb element on a Slider. This would not usually be created manually and would instead - * be created internally by an {@link Ext.slider.MultiSlider Ext.Slider}. - */ -Ext.slider.Thumb = Ext.extend(Object, { - - /** - * True while the thumb is in a drag operation - * @type Boolean - */ - dragging: false, - - /** - * @constructor - * @cfg {Ext.slider.MultiSlider} slider The Slider to render to (required) - */ - constructor: function(config) { - /** - * @property slider - * @type Ext.slider.MultiSlider - * The slider this thumb is contained within - */ - Ext.apply(this, config || {}, { - cls: 'x-slider-thumb', - - /** - * @cfg {Boolean} constrain True to constrain the thumb so that it cannot overlap its siblings - */ - constrain: false - }); - - Ext.slider.Thumb.superclass.constructor.call(this, config); - - if (this.slider.vertical) { - Ext.apply(this, Ext.slider.Thumb.Vertical); - } - }, - - /** - * Renders the thumb into a slider - */ - render: function() { - this.el = this.slider.innerEl.insertFirst({cls: this.cls}); - - this.initEvents(); - }, - - /** - * Enables the thumb if it is currently disabled - */ - enable: function() { - this.disabled = false; - this.el.removeClass(this.slider.disabledClass); - }, - - /** - * Disables the thumb if it is currently enabled - */ - disable: function() { - this.disabled = true; - this.el.addClass(this.slider.disabledClass); - }, - - /** - * Sets up an Ext.dd.DragTracker for this thumb - */ - initEvents: function() { - var el = this.el; - - el.addClassOnOver('x-slider-thumb-over'); - - this.tracker = new Ext.dd.DragTracker({ - onBeforeStart: this.onBeforeDragStart.createDelegate(this), - onStart : this.onDragStart.createDelegate(this), - onDrag : this.onDrag.createDelegate(this), - onEnd : this.onDragEnd.createDelegate(this), - tolerance : 3, - autoStart : 300 - }); - - this.tracker.initEl(el); - }, - - /** - * @private - * This is tied into the internal Ext.dd.DragTracker. If the slider is currently disabled, - * this returns false to disable the DragTracker too. - * @return {Boolean} False if the slider is currently disabled - */ - onBeforeDragStart : function(e) { - if (this.disabled) { - return false; - } else { - this.slider.promoteThumb(this); - return true; - } - }, - - /** - * @private - * This is tied into the internal Ext.dd.DragTracker's onStart template method. Adds the drag CSS class - * to the thumb and fires the 'dragstart' event - */ - onDragStart: function(e){ - this.el.addClass('x-slider-thumb-drag'); - this.dragging = true; - this.dragStartValue = this.value; - - this.slider.fireEvent('dragstart', this.slider, e, this); - }, - - /** - * @private - * This is tied into the internal Ext.dd.DragTracker's onDrag template method. This is called every time - * the DragTracker detects a drag movement. It updates the Slider's value using the position of the drag - */ - onDrag: function(e) { - var slider = this.slider, - index = this.index, - newValue = this.getNewValue(); - - if (this.constrain) { - var above = slider.thumbs[index + 1], - below = slider.thumbs[index - 1]; - - if (below != undefined && newValue <= below.value) newValue = below.value; - if (above != undefined && newValue >= above.value) newValue = above.value; - } - - slider.setValue(index, newValue, false); - slider.fireEvent('drag', slider, e, this); - }, - - getNewValue: function() { - var slider = this.slider, - pos = slider.innerEl.translatePoints(this.tracker.getXY()); - - return Ext.util.Format.round(slider.reverseValue(pos.left), slider.decimalPrecision); - }, - - /** - * @private - * This is tied to the internal Ext.dd.DragTracker's onEnd template method. Removes the drag CSS class and - * fires the 'changecomplete' event with the new value - */ - onDragEnd: function(e) { - var slider = this.slider, - value = this.value; - - this.el.removeClass('x-slider-thumb-drag'); - - this.dragging = false; - slider.fireEvent('dragend', slider, e); - - if (this.dragStartValue != value) { - slider.fireEvent('changecomplete', slider, value, this); - } - }, - - /** - * @private - * Destroys the thumb - */ - destroy: function(){ - Ext.destroyMembers(this, 'tracker', 'el'); - } -}); - -/** - * @class Ext.slider.MultiSlider - * @extends Ext.BoxComponent - * Slider which supports vertical or horizontal orientation, keyboard adjustments, configurable snapping, axis clicking and animation. Can be added as an item to any container. Example usage: -
        -new Ext.Slider({
        -    renderTo: Ext.getBody(),
        -    width: 200,
        -    value: 50,
        -    increment: 10,
        -    minValue: 0,
        -    maxValue: 100
        -});
        -
        - * Sliders can be created with more than one thumb handle by passing an array of values instead of a single one: -
        -new Ext.Slider({
        -    renderTo: Ext.getBody(),
        -    width: 200,
        -    values: [25, 50, 75],
        -    minValue: 0,
        -    maxValue: 100,
        -
        -    //this defaults to true, setting to false allows the thumbs to pass each other
        -    {@link #constrainThumbs}: false
        -});
        -
        - */ -Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, { - /** - * @cfg {Number} value The value to initialize the slider with. Defaults to minValue. - */ - /** - * @cfg {Boolean} vertical Orient the Slider vertically rather than horizontally, defaults to false. - */ - vertical: false, - /** - * @cfg {Number} minValue The minimum value for the Slider. Defaults to 0. - */ - minValue: 0, - /** - * @cfg {Number} maxValue The maximum value for the Slider. Defaults to 100. - */ - maxValue: 100, - /** - * @cfg {Number/Boolean} decimalPrecision. - *

        The number of decimal places to which to round the Slider's value. Defaults to 0.

        - *

        To disable rounding, configure as false.

        - */ - decimalPrecision: 0, - /** - * @cfg {Number} keyIncrement How many units to change the Slider when adjusting with keyboard navigation. Defaults to 1. If the increment config is larger, it will be used instead. - */ - keyIncrement: 1, - /** - * @cfg {Number} increment How many units to change the slider when adjusting by drag and drop. Use this option to enable 'snapping'. - */ - increment: 0, - - /** - * @private - * @property clickRange - * @type Array - * Determines whether or not a click to the slider component is considered to be a user request to change the value. Specified as an array of [top, bottom], - * the click event's 'top' property is compared to these numbers and the click only considered a change request if it falls within them. e.g. if the 'top' - * value of the click event is 4 or 16, the click is not considered a change request as it falls outside of the [5, 15] range - */ - clickRange: [5,15], - - /** - * @cfg {Boolean} clickToChange Determines whether or not clicking on the Slider axis will change the slider. Defaults to true - */ - clickToChange : true, - /** - * @cfg {Boolean} animate Turn on or off animation. Defaults to true - */ - animate: true, - /** - * @cfg {Boolean} constrainThumbs True to disallow thumbs from overlapping one another. Defaults to true - */ - constrainThumbs: true, - - /** - * @private - * @property topThumbZIndex - * @type Number - * The number used internally to set the z index of the top thumb (see promoteThumb for details) - */ - topThumbZIndex: 10000, - - // private override - initComponent : function(){ - if(!Ext.isDefined(this.value)){ - this.value = this.minValue; - } - - /** - * @property thumbs - * @type Array - * Array containing references to each thumb - */ - this.thumbs = []; - - Ext.slider.MultiSlider.superclass.initComponent.call(this); - - this.keyIncrement = Math.max(this.increment, this.keyIncrement); - this.addEvents( - /** - * @event beforechange - * Fires before the slider value is changed. By returning false from an event handler, - * you can cancel the event and prevent the slider from changing. - * @param {Ext.slider.MultiSlider} slider The slider - * @param {Number} newValue The new value which the slider is being changed to. - * @param {Number} oldValue The old value which the slider was previously. - */ - 'beforechange', - - /** - * @event change - * Fires when the slider value is changed. - * @param {Ext.slider.MultiSlider} slider The slider - * @param {Number} newValue The new value which the slider has been changed to. - * @param {Ext.slider.Thumb} thumb The thumb that was changed - */ - 'change', - - /** - * @event changecomplete - * Fires when the slider value is changed by the user and any drag operations have completed. - * @param {Ext.slider.MultiSlider} slider The slider - * @param {Number} newValue The new value which the slider has been changed to. - * @param {Ext.slider.Thumb} thumb The thumb that was changed - */ - 'changecomplete', - - /** - * @event dragstart - * Fires after a drag operation has started. - * @param {Ext.slider.MultiSlider} slider The slider - * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker - */ - 'dragstart', - - /** - * @event drag - * Fires continuously during the drag operation while the mouse is moving. - * @param {Ext.slider.MultiSlider} slider The slider - * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker - */ - 'drag', - - /** - * @event dragend - * Fires after the drag operation has completed. - * @param {Ext.slider.MultiSlider} slider The slider - * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker - */ - 'dragend' - ); - - /** - * @property values - * @type Array - * Array of values to initalize the thumbs with - */ - if (this.values == undefined || Ext.isEmpty(this.values)) this.values = [0]; - - var values = this.values; - - for (var i=0; i < values.length; i++) { - this.addThumb(values[i]); - } - - if(this.vertical){ - Ext.apply(this, Ext.slider.Vertical); - } - }, - - /** - * Creates a new thumb and adds it to the slider - * @param {Number} value The initial value to set on the thumb. Defaults to 0 - */ - addThumb: function(value) { - var thumb = new Ext.slider.Thumb({ - value : value, - slider : this, - index : this.thumbs.length, - constrain: this.constrainThumbs - }); - this.thumbs.push(thumb); - - //render the thumb now if needed - if (this.rendered) thumb.render(); - }, - - /** - * @private - * Moves the given thumb above all other by increasing its z-index. This is called when as drag - * any thumb, so that the thumb that was just dragged is always at the highest z-index. This is - * required when the thumbs are stacked on top of each other at one of the ends of the slider's - * range, which can result in the user not being able to move any of them. - * @param {Ext.slider.Thumb} topThumb The thumb to move to the top - */ - promoteThumb: function(topThumb) { - var thumbs = this.thumbs, - zIndex, thumb; - - for (var i = 0, j = thumbs.length; i < j; i++) { - thumb = thumbs[i]; - - if (thumb == topThumb) { - zIndex = this.topThumbZIndex; - } else { - zIndex = ''; - } - - thumb.el.setStyle('zIndex', zIndex); - } - }, - - // private override - onRender : function() { - this.autoEl = { - cls: 'x-slider ' + (this.vertical ? 'x-slider-vert' : 'x-slider-horz'), - cn : { - cls: 'x-slider-end', - cn : { - cls:'x-slider-inner', - cn : [{tag:'a', cls:'x-slider-focus', href:"#", tabIndex: '-1', hidefocus:'on'}] - } - } - }; - - Ext.slider.MultiSlider.superclass.onRender.apply(this, arguments); - - this.endEl = this.el.first(); - this.innerEl = this.endEl.first(); - this.focusEl = this.innerEl.child('.x-slider-focus'); - - //render each thumb - for (var i=0; i < this.thumbs.length; i++) { - this.thumbs[i].render(); - } - - //calculate the size of half a thumb - var thumb = this.innerEl.child('.x-slider-thumb'); - this.halfThumb = (this.vertical ? thumb.getHeight() : thumb.getWidth()) / 2; - - this.initEvents(); - }, - - /** - * @private - * Adds keyboard and mouse listeners on this.el. Ignores click events on the internal focus element. - * Creates a new DragTracker which is used to control what happens when the user drags the thumb around. - */ - initEvents : function(){ - this.mon(this.el, { - scope : this, - mousedown: this.onMouseDown, - keydown : this.onKeyDown - }); - - this.focusEl.swallowEvent("click", true); - }, - - /** - * @private - * Mousedown handler for the slider. If the clickToChange is enabled and the click was not on the draggable 'thumb', - * this calculates the new value of the slider and tells the implementation (Horizontal or Vertical) to move the thumb - * @param {Ext.EventObject} e The click event - */ - onMouseDown : function(e){ - if(this.disabled){ - return; - } - - //see if the click was on any of the thumbs - var thumbClicked = false; - for (var i=0; i < this.thumbs.length; i++) { - thumbClicked = thumbClicked || e.target == this.thumbs[i].el.dom; - } - - if (this.clickToChange && !thumbClicked) { - var local = this.innerEl.translatePoints(e.getXY()); - this.onClickChange(local); - } - this.focus(); - }, - - /** - * @private - * Moves the thumb to the indicated position. Note that a Vertical implementation is provided in Ext.slider.Vertical. - * Only changes the value if the click was within this.clickRange. - * @param {Object} local Object containing top and left values for the click event. - */ - onClickChange : function(local) { - if (local.top > this.clickRange[0] && local.top < this.clickRange[1]) { - //find the nearest thumb to the click event - var thumb = this.getNearest(local, 'left'), - index = thumb.index; - - this.setValue(index, Ext.util.Format.round(this.reverseValue(local.left), this.decimalPrecision), undefined, true); - } - }, - - /** - * @private - * Returns the nearest thumb to a click event, along with its distance - * @param {Object} local Object containing top and left values from a click event - * @param {String} prop The property of local to compare on. Use 'left' for horizontal sliders, 'top' for vertical ones - * @return {Object} The closest thumb object and its distance from the click event - */ - getNearest: function(local, prop) { - var localValue = prop == 'top' ? this.innerEl.getHeight() - local[prop] : local[prop], - clickValue = this.reverseValue(localValue), - nearestDistance = (this.maxValue - this.minValue) + 5, //add a small fudge for the end of the slider - index = 0, - nearest = null; - - for (var i=0; i < this.thumbs.length; i++) { - var thumb = this.thumbs[i], - value = thumb.value, - dist = Math.abs(value - clickValue); - - if (Math.abs(dist <= nearestDistance)) { - nearest = thumb; - index = i; - nearestDistance = dist; - } - } - return nearest; - }, - - /** - * @private - * Handler for any keypresses captured by the slider. If the key is UP or RIGHT, the thumb is moved along to the right - * by this.keyIncrement. If DOWN or LEFT it is moved left. Pressing CTRL moves the slider to the end in either direction - * @param {Ext.EventObject} e The Event object - */ - onKeyDown : function(e){ - /* - * The behaviour for keyboard handling with multiple thumbs is currently undefined. - * There's no real sane default for it, so leave it like this until we come up - * with a better way of doing it. - */ - if(this.disabled || this.thumbs.length !== 1){ - e.preventDefault(); - return; - } - var k = e.getKey(), - val; - switch(k){ - case e.UP: - case e.RIGHT: - e.stopEvent(); - val = e.ctrlKey ? this.maxValue : this.getValue(0) + this.keyIncrement; - this.setValue(0, val, undefined, true); - break; - case e.DOWN: - case e.LEFT: - e.stopEvent(); - val = e.ctrlKey ? this.minValue : this.getValue(0) - this.keyIncrement; - this.setValue(0, val, undefined, true); - break; - default: - e.preventDefault(); - } - }, - - /** - * @private - * If using snapping, this takes a desired new value and returns the closest snapped - * value to it - * @param {Number} value The unsnapped value - * @return {Number} The value of the nearest snap target - */ - doSnap : function(value){ - if (!(this.increment && value)) { - return value; - } - var newValue = value, - inc = this.increment, - m = value % inc; - if (m != 0) { - newValue -= m; - if (m * 2 >= inc) { - newValue += inc; - } else if (m * 2 < -inc) { - newValue -= inc; - } - } - return newValue.constrain(this.minValue, this.maxValue); - }, - - // private - afterRender : function(){ - Ext.slider.MultiSlider.superclass.afterRender.apply(this, arguments); - - for (var i=0; i < this.thumbs.length; i++) { - var thumb = this.thumbs[i]; - - if (thumb.value !== undefined) { - var v = this.normalizeValue(thumb.value); - - if (v !== thumb.value) { - // delete this.value; - this.setValue(i, v, false); - } else { - this.moveThumb(i, this.translateValue(v), false); - } - } - }; - }, - - /** - * @private - * Returns the ratio of pixels to mapped values. e.g. if the slider is 200px wide and maxValue - minValue is 100, - * the ratio is 2 - * @return {Number} The ratio of pixels to mapped values - */ - getRatio : function(){ - var w = this.innerEl.getWidth(), - v = this.maxValue - this.minValue; - return v == 0 ? w : (w/v); - }, - - /** - * @private - * Returns a snapped, constrained value when given a desired value - * @param {Number} value Raw number value - * @return {Number} The raw value rounded to the correct d.p. and constrained within the set max and min values - */ - normalizeValue : function(v){ - v = this.doSnap(v); - v = Ext.util.Format.round(v, this.decimalPrecision); - v = v.constrain(this.minValue, this.maxValue); - return v; - }, - - /** - * Sets the minimum value for the slider instance. If the current value is less than the - * minimum value, the current value will be changed. - * @param {Number} val The new minimum value - */ - setMinValue : function(val){ - this.minValue = val; - var i = 0, - thumbs = this.thumbs, - len = thumbs.length, - t; - - for(; i < len; ++i){ - t = thumbs[i]; - t.value = t.value < val ? val : t.value; - } - this.syncThumb(); - }, - - /** - * Sets the maximum value for the slider instance. If the current value is more than the - * maximum value, the current value will be changed. - * @param {Number} val The new maximum value - */ - setMaxValue : function(val){ - this.maxValue = val; - var i = 0, - thumbs = this.thumbs, - len = thumbs.length, - t; - - for(; i < len; ++i){ - t = thumbs[i]; - t.value = t.value > val ? val : t.value; - } - this.syncThumb(); - }, - - /** - * Programmatically sets the value of the Slider. Ensures that the value is constrained within - * the minValue and maxValue. - * @param {Number} index Index of the thumb to move - * @param {Number} value The value to set the slider to. (This will be constrained within minValue and maxValue) - * @param {Boolean} animate Turn on or off animation, defaults to true - */ - setValue : function(index, v, animate, changeComplete) { - var thumb = this.thumbs[index], - el = thumb.el; - - v = this.normalizeValue(v); - - if (v !== thumb.value && this.fireEvent('beforechange', this, v, thumb.value, thumb) !== false) { - thumb.value = v; - if(this.rendered){ - this.moveThumb(index, this.translateValue(v), animate !== false); - this.fireEvent('change', this, v, thumb); - if(changeComplete){ - this.fireEvent('changecomplete', this, v, thumb); - } - } - } - }, - - /** - * @private - */ - translateValue : function(v) { - var ratio = this.getRatio(); - return (v * ratio) - (this.minValue * ratio) - this.halfThumb; - }, - - /** - * @private - * Given a pixel location along the slider, returns the mapped slider value for that pixel. - * E.g. if we have a slider 200px wide with minValue = 100 and maxValue = 500, reverseValue(50) - * returns 200 - * @param {Number} pos The position along the slider to return a mapped value for - * @return {Number} The mapped value for the given position - */ - reverseValue : function(pos){ - var ratio = this.getRatio(); - return (pos + (this.minValue * ratio)) / ratio; - }, - - /** - * @private - * @param {Number} index Index of the thumb to move - */ - moveThumb: function(index, v, animate){ - var thumb = this.thumbs[index].el; - - if(!animate || this.animate === false){ - thumb.setLeft(v); - }else{ - thumb.shift({left: v, stopFx: true, duration:.35}); - } - }, - - // private - focus : function(){ - this.focusEl.focus(10); - }, - - // private - onResize : function(w, h){ - var thumbs = this.thumbs, - len = thumbs.length, - i = 0; - - /* - * If we happen to be animating during a resize, the position of the thumb will likely be off - * when the animation stops. As such, just stop any animations before syncing the thumbs. - */ - for(; i < len; ++i){ - thumbs[i].el.stopFx(); - } - // check to see if we're using an auto width - if(Ext.isNumber(w)){ - this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r'))); - } - this.syncThumb(); - Ext.slider.MultiSlider.superclass.onResize.apply(this, arguments); - }, - - //private - onDisable: function(){ - Ext.slider.MultiSlider.superclass.onDisable.call(this); - - for (var i=0; i < this.thumbs.length; i++) { - var thumb = this.thumbs[i], - el = thumb.el; - - thumb.disable(); - - if(Ext.isIE){ - //IE breaks when using overflow visible and opacity other than 1. - //Create a place holder for the thumb and display it. - var xy = el.getXY(); - el.hide(); - - this.innerEl.addClass(this.disabledClass).dom.disabled = true; - - if (!this.thumbHolder) { - this.thumbHolder = this.endEl.createChild({cls: 'x-slider-thumb ' + this.disabledClass}); - } - - this.thumbHolder.show().setXY(xy); - } - } - }, - - //private - onEnable: function(){ - Ext.slider.MultiSlider.superclass.onEnable.call(this); - - for (var i=0; i < this.thumbs.length; i++) { - var thumb = this.thumbs[i], - el = thumb.el; - - thumb.enable(); - - if (Ext.isIE) { - this.innerEl.removeClass(this.disabledClass).dom.disabled = false; - - if (this.thumbHolder) this.thumbHolder.hide(); - - el.show(); - this.syncThumb(); - } - } - }, - - /** - * Synchronizes the thumb position to the proper proportion of the total component width based - * on the current slider {@link #value}. This will be called automatically when the Slider - * is resized by a layout, but if it is rendered auto width, this method can be called from - * another resize handler to sync the Slider if necessary. - */ - syncThumb : function() { - if (this.rendered) { - for (var i=0; i < this.thumbs.length; i++) { - this.moveThumb(i, this.translateValue(this.thumbs[i].value)); - } - } - }, - - /** - * Returns the current value of the slider - * @param {Number} index The index of the thumb to return a value for - * @return {Number} The current value of the slider - */ - getValue : function(index) { - return this.thumbs[index].value; - }, - - /** - * Returns an array of values - one for the location of each thumb - * @return {Array} The set of thumb values - */ - getValues: function() { - var values = []; - - for (var i=0; i < this.thumbs.length; i++) { - values.push(this.thumbs[i].value); - } - - return values; - }, - - // private - beforeDestroy : function(){ - var thumbs = this.thumbs; - for(var i = 0, len = thumbs.length; i < len; ++i){ - thumbs[i].destroy(); - thumbs[i] = null; - } - Ext.destroyMembers(this, 'endEl', 'innerEl', 'focusEl', 'thumbHolder'); - Ext.slider.MultiSlider.superclass.beforeDestroy.call(this); - } -}); - -Ext.reg('multislider', Ext.slider.MultiSlider); - -/** - * @class Ext.slider.SingleSlider - * @extends Ext.slider.MultiSlider - * Slider which supports vertical or horizontal orientation, keyboard adjustments, - * configurable snapping, axis clicking and animation. Can be added as an item to - * any container. Example usage: -
        
        -new Ext.slider.SingleSlider({
        -    renderTo: Ext.getBody(),
        -    width: 200,
        -    value: 50,
        -    increment: 10,
        -    minValue: 0,
        -    maxValue: 100
        -});
        -
        - * The class Ext.slider.SingleSlider is aliased to Ext.Slider for backwards compatibility. - */ -Ext.slider.SingleSlider = Ext.extend(Ext.slider.MultiSlider, { - constructor: function(config) { - config = config || {}; - - Ext.applyIf(config, { - values: [config.value || 0] - }); - - Ext.slider.SingleSlider.superclass.constructor.call(this, config); - }, - - /** - * Returns the current value of the slider - * @return {Number} The current value of the slider - */ - getValue: function() { - //just returns the value of the first thumb, which should be the only one in a single slider - return Ext.slider.SingleSlider.superclass.getValue.call(this, 0); - }, - - /** - * Programmatically sets the value of the Slider. Ensures that the value is constrained within - * the minValue and maxValue. - * @param {Number} value The value to set the slider to. (This will be constrained within minValue and maxValue) - * @param {Boolean} animate Turn on or off animation, defaults to true - */ - setValue: function(value, animate) { - var args = Ext.toArray(arguments), - len = args.length; - - //this is to maintain backwards compatiblity for sliders with only one thunb. Usually you must pass the thumb - //index to setValue, but if we only have one thumb we inject the index here first if given the multi-slider - //signature without the required index. The index will always be 0 for a single slider - if (len == 1 || (len <= 3 && typeof arguments[1] != 'number')) { - args.unshift(0); - } - - return Ext.slider.SingleSlider.superclass.setValue.apply(this, args); - }, - - /** - * Synchronizes the thumb position to the proper proportion of the total component width based - * on the current slider {@link #value}. This will be called automatically when the Slider - * is resized by a layout, but if it is rendered auto width, this method can be called from - * another resize handler to sync the Slider if necessary. - */ - syncThumb : function() { - return Ext.slider.SingleSlider.superclass.syncThumb.apply(this, [0].concat(arguments)); - }, - - // private - getNearest : function(){ - // Since there's only 1 thumb, it's always the nearest - return this.thumbs[0]; - } -}); - -//backwards compatibility -Ext.Slider = Ext.slider.SingleSlider; - -Ext.reg('slider', Ext.slider.SingleSlider); - -// private class to support vertical sliders -Ext.slider.Vertical = { - onResize : function(w, h){ - this.innerEl.setHeight(h - (this.el.getPadding('t') + this.endEl.getPadding('b'))); - this.syncThumb(); - }, - - getRatio : function(){ - var h = this.innerEl.getHeight(), - v = this.maxValue - this.minValue; - return h/v; - }, - - moveThumb: function(index, v, animate) { - var thumb = this.thumbs[index], - el = thumb.el; - - if (!animate || this.animate === false) { - el.setBottom(v); - } else { - el.shift({bottom: v, stopFx: true, duration:.35}); - } - }, - - onClickChange : function(local) { - if (local.left > this.clickRange[0] && local.left < this.clickRange[1]) { - var thumb = this.getNearest(local, 'top'), - index = thumb.index, - value = this.minValue + this.reverseValue(this.innerEl.getHeight() - local.top); - - this.setValue(index, Ext.util.Format.round(value, this.decimalPrecision), undefined, true); - } - } -}; - -//private class to support vertical dragging of thumbs within a slider -Ext.slider.Thumb.Vertical = { - getNewValue: function() { - var slider = this.slider, - innerEl = slider.innerEl, - pos = innerEl.translatePoints(this.tracker.getXY()), - bottom = innerEl.getHeight() - pos.top; - - return slider.minValue + Ext.util.Format.round(bottom / slider.getRatio(), slider.decimalPrecision); - } -}; -/** - * @class Ext.ProgressBar - * @extends Ext.BoxComponent - *

        An updateable progress bar component. The progress bar supports two different modes: manual and automatic.

        - *

        In manual mode, you are responsible for showing, updating (via {@link #updateProgress}) and clearing the - * progress bar as needed from your own code. This method is most appropriate when you want to show progress - * throughout an operation that has predictable points of interest at which you can update the control.

        - *

        In automatic mode, you simply call {@link #wait} and let the progress bar run indefinitely, only clearing it - * once the operation is complete. You can optionally have the progress bar wait for a specific amount of time - * and then clear itself. Automatic mode is most appropriate for timed operations or asynchronous operations in - * which you have no need for indicating intermediate progress.

        - * @cfg {Float} value A floating point value between 0 and 1 (e.g., .5, defaults to 0) - * @cfg {String} text The progress bar text (defaults to '') - * @cfg {Mixed} textEl The element to render the progress text to (defaults to the progress - * bar's internal text element) - * @cfg {String} id The progress bar element's id (defaults to an auto-generated id) - * @xtype progress - */ -Ext.ProgressBar = Ext.extend(Ext.BoxComponent, { - /** - * @cfg {String} baseCls - * The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress') - */ - baseCls : 'x-progress', - - /** - * @cfg {Boolean} animate - * True to animate the progress bar during transitions (defaults to false) - */ - animate : false, - - // private - waitTimer : null, - - // private - initComponent : function(){ - Ext.ProgressBar.superclass.initComponent.call(this); - this.addEvents( - /** - * @event update - * Fires after each update interval - * @param {Ext.ProgressBar} this - * @param {Number} The current progress value - * @param {String} The current progress text - */ - "update" - ); - }, - - // private - onRender : function(ct, position){ - var tpl = new Ext.Template( - '
        ', - '
        ', - '
        ', - '
        ', - '
         
        ', - '
        ', - '
        ', - '
        ', - '
         
        ', - '
        ', - '
        ', - '
        ' - ); - - this.el = position ? tpl.insertBefore(position, {cls: this.baseCls}, true) - : tpl.append(ct, {cls: this.baseCls}, true); - - if(this.id){ - this.el.dom.id = this.id; - } - var inner = this.el.dom.firstChild; - this.progressBar = Ext.get(inner.firstChild); - - if(this.textEl){ - //use an external text el - this.textEl = Ext.get(this.textEl); - delete this.textTopEl; - }else{ - //setup our internal layered text els - this.textTopEl = Ext.get(this.progressBar.dom.firstChild); - var textBackEl = Ext.get(inner.childNodes[1]); - this.textTopEl.setStyle("z-index", 99).addClass('x-hidden'); - this.textEl = new Ext.CompositeElement([this.textTopEl.dom.firstChild, textBackEl.dom.firstChild]); - this.textEl.setWidth(inner.offsetWidth); - } - this.progressBar.setHeight(inner.offsetHeight); - }, - - // private - afterRender : function(){ - Ext.ProgressBar.superclass.afterRender.call(this); - if(this.value){ - this.updateProgress(this.value, this.text); - }else{ - this.updateText(this.text); - } - }, - - /** - * Updates the progress bar value, and optionally its text. If the text argument is not specified, - * any existing text value will be unchanged. To blank out existing text, pass ''. Note that even - * if the progress bar value exceeds 1, it will never automatically reset -- you are responsible for - * determining when the progress is complete and calling {@link #reset} to clear and/or hide the control. - * @param {Float} value (optional) A floating point value between 0 and 1 (e.g., .5, defaults to 0) - * @param {String} text (optional) The string to display in the progress text element (defaults to '') - * @param {Boolean} animate (optional) Whether to animate the transition of the progress bar. If this value is - * not specified, the default for the class is used (default to false) - * @return {Ext.ProgressBar} this - */ - updateProgress : function(value, text, animate){ - this.value = value || 0; - if(text){ - this.updateText(text); - } - if(this.rendered && !this.isDestroyed){ - var w = Math.floor(value*this.el.dom.firstChild.offsetWidth); - this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate)); - if(this.textTopEl){ - //textTopEl should be the same width as the bar so overflow will clip as the bar moves - this.textTopEl.removeClass('x-hidden').setWidth(w); - } - } - this.fireEvent('update', this, value, text); - return this; - }, - - /** - * Initiates an auto-updating progress bar. A duration can be specified, in which case the progress - * bar will automatically reset after a fixed amount of time and optionally call a callback function - * if specified. If no duration is passed in, then the progress bar will run indefinitely and must - * be manually cleared by calling {@link #reset}. The wait method accepts a config object with - * the following properties: - *
        -Property   Type          Description
        ----------- ------------  ----------------------------------------------------------------------
        -duration   Number        The length of time in milliseconds that the progress bar should
        -                         run before resetting itself (defaults to undefined, in which case it
        -                         will run indefinitely until reset is called)
        -interval   Number        The length of time in milliseconds between each progress update
        -                         (defaults to 1000 ms)
        -animate    Boolean       Whether to animate the transition of the progress bar. If this value is
        -                         not specified, the default for the class is used.                                                   
        -increment  Number        The number of progress update segments to display within the progress
        -                         bar (defaults to 10).  If the bar reaches the end and is still
        -                         updating, it will automatically wrap back to the beginning.
        -text       String        Optional text to display in the progress bar element (defaults to '').
        -fn         Function      A callback function to execute after the progress bar finishes auto-
        -                         updating.  The function will be called with no arguments.  This function
        -                         will be ignored if duration is not specified since in that case the
        -                         progress bar can only be stopped programmatically, so any required function
        -                         should be called by the same code after it resets the progress bar.
        -scope      Object        The scope that is passed to the callback function (only applies when
        -                         duration and fn are both passed).
        -
        - * - * Example usage: - *
        
        -var p = new Ext.ProgressBar({
        -   renderTo: 'my-el'
        -});
        -
        -//Wait for 5 seconds, then update the status el (progress bar will auto-reset)
        -p.wait({
        -   interval: 100, //bar will move fast!
        -   duration: 5000,
        -   increment: 15,
        -   text: 'Updating...',
        -   scope: this,
        -   fn: function(){
        -      Ext.fly('status').update('Done!');
        -   }
        -});
        -
        -//Or update indefinitely until some async action completes, then reset manually
        -p.wait();
        -myAction.on('complete', function(){
        -    p.reset();
        -    Ext.fly('status').update('Done!');
        -});
        -
        - * @param {Object} config (optional) Configuration options - * @return {Ext.ProgressBar} this - */ - wait : function(o){ - if(!this.waitTimer){ - var scope = this; - o = o || {}; - this.updateText(o.text); - this.waitTimer = Ext.TaskMgr.start({ - run: function(i){ - var inc = o.increment || 10; - i -= 1; - this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01, null, o.animate); - }, - interval: o.interval || 1000, - duration: o.duration, - onStop: function(){ - if(o.fn){ - o.fn.apply(o.scope || this); - } - this.reset(); - }, - scope: scope - }); - } - return this; - }, - - /** - * Returns true if the progress bar is currently in a {@link #wait} operation - * @return {Boolean} True if waiting, else false - */ - isWaiting : function(){ - return this.waitTimer !== null; - }, - - /** - * Updates the progress bar text. If specified, textEl will be updated, otherwise the progress - * bar itself will display the updated text. - * @param {String} text (optional) The string to display in the progress text element (defaults to '') - * @return {Ext.ProgressBar} this - */ - updateText : function(text){ - this.text = text || ' '; - if(this.rendered){ - this.textEl.update(this.text); - } - return this; - }, - - /** - * Synchronizes the inner bar width to the proper proportion of the total componet width based - * on the current progress {@link #value}. This will be called automatically when the ProgressBar - * is resized by a layout, but if it is rendered auto width, this method can be called from - * another resize handler to sync the ProgressBar if necessary. - */ - syncProgressBar : function(){ - if(this.value){ - this.updateProgress(this.value, this.text); - } - return this; - }, - - /** - * Sets the size of the progress bar. - * @param {Number} width The new width in pixels - * @param {Number} height The new height in pixels - * @return {Ext.ProgressBar} this - */ - setSize : function(w, h){ - Ext.ProgressBar.superclass.setSize.call(this, w, h); - if(this.textTopEl){ - var inner = this.el.dom.firstChild; - this.textEl.setSize(inner.offsetWidth, inner.offsetHeight); - } - this.syncProgressBar(); - return this; - }, - - /** - * Resets the progress bar value to 0 and text to empty string. If hide = true, the progress - * bar will also be hidden (using the {@link #hideMode} property internally). - * @param {Boolean} hide (optional) True to hide the progress bar (defaults to false) - * @return {Ext.ProgressBar} this - */ - reset : function(hide){ - this.updateProgress(0); - if(this.textTopEl){ - this.textTopEl.addClass('x-hidden'); - } - this.clearTimer(); - if(hide === true){ - this.hide(); - } - return this; - }, - - // private - clearTimer : function(){ - if(this.waitTimer){ - this.waitTimer.onStop = null; //prevent recursion - Ext.TaskMgr.stop(this.waitTimer); - this.waitTimer = null; - } - }, - - onDestroy: function(){ - this.clearTimer(); - if(this.rendered){ - if(this.textEl.isComposite){ - this.textEl.clear(); - } - Ext.destroyMembers(this, 'textEl', 'progressBar', 'textTopEl'); - } - Ext.ProgressBar.superclass.onDestroy.call(this); - } -}); -Ext.reg('progress', Ext.ProgressBar); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/cmp-foundation.js b/web-client/src/main/resources/apps/js/ext/pkgs/cmp-foundation.js deleted file mode 100644 index 8460fd407e3..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/cmp-foundation.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.ComponentMgr=function(){var c=new Ext.util.MixedCollection();var b={};var a={};return{register:function(d){c.add(d)},unregister:function(d){c.remove(d)},get:function(d){return c.get(d)},onAvailable:function(f,e,d){c.on("add",function(g,h){if(h.id==f){e.call(d||h,h);c.un("add",e,d)}})},all:c,types:b,ptypes:a,isRegistered:function(d){return b[d]!==undefined},isPluginRegistered:function(d){return a[d]!==undefined},registerType:function(e,d){b[e]=d;d.xtype=e},create:function(d,e){return d.render?d:new b[d.xtype||e](d)},registerPlugin:function(e,d){a[e]=d;d.ptype=e},createPlugin:function(e,f){var d=a[e.ptype||f];if(d.init){return d}else{return new d(e)}}}}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin;Ext.create=Ext.ComponentMgr.create;Ext.Component=function(b){b=b||{};if(b.initialConfig){if(b.isAction){this.baseAction=b}b=b.initialConfig}else{if(b.tagName||b.dom||Ext.isString(b)){b={applyTo:b,id:b.id||b}}}this.initialConfig=b;Ext.apply(this,b);this.addEvents("added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave");this.getId();Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);if(this.baseAction){this.baseAction.addComponent(this)}this.initComponent();if(this.plugins){if(Ext.isArray(this.plugins)){for(var c=0,a=this.plugins.length;c0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=Ext.extend(Object,{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;ci+n.left){j=i-k-c;f=true}if((g+e)>d+n.top){g=d-e-c;f=true}if(j=l){g=l-e-5}}m=[j,g];this.storeXY(m);a.setXY.call(this,m);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){a.setXY.call(this,this.lastXY)}else{if(this.lastLT){a.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(h,g,j,k,i){if(h){this.showAction()}if(g&&h){var f=function(){this.sync(true);if(k){k()}}.createDelegate(this);a.setVisible.call(this,true,true,j,f,i)}else{if(!h){this.hideUnders(true)}var f=k;if(g){f=function(){this.hideAction();if(k){k()}}.createDelegate(this)}a.setVisible.call(this,h,g,j,f,i);if(h){this.sync(true)}else{if(!g){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(i,g,j,k,h){this.fixDisplay();this.beforeAction();this.storeXY(i);var f=this.createCB(k);a.setXY.call(this,i,g,j,f,h);if(!g){f()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(f,g,i,j,h){this.setXY([f,this.getY()],g,i,j,h);return this},setY:function(j,f,h,i,g){this.setXY([this.getX(),j],f,h,i,g);return this},setSize:function(i,j,g,l,m,k){this.beforeAction();var f=this.createCB(m);a.setSize.call(this,i,j,g,l,f,k);if(!g){f()}return this},setWidth:function(h,g,j,k,i){this.beforeAction();var f=this.createCB(k);a.setWidth.call(this,h,g,j,f,i);if(!g){f()}return this},setHeight:function(i,g,k,l,j){this.beforeAction();var f=this.createCB(l);a.setHeight.call(this,i,g,k,f,j);if(!g){f()}return this},setBounds:function(n,l,o,g,m,j,k,i){this.beforeAction();var f=this.createCB(k);if(!m){this.storeXY([n,l]);a.setXY.call(this,[n,l]);a.setSize.call(this,o,g,m,j,f,i);f()}else{a.setBounds.call(this,n,l,o,g,m,j,f,i)}return this},setZIndex:function(c){this.zindex=c;this.setStyle("z-index",c+2);if(this.shadow){this.shadow.setZIndex(c+1)}if(this.shim){this.shim.setStyle("z-index",c)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=this.offset,c={h:0},b=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":c.w=0;c.l=c.t=e;c.t-=1;if(Ext.isIE){c.l-=this.offset+b;c.t-=this.offset+b;c.w-=b;c.h-=b;c.t+=1}break;case"sides":c.w=(e*2);c.l=-e;c.t=e-1;if(Ext.isIE){c.l-=(this.offset-b);c.t-=this.offset+b;c.l+=1;c.w-=(this.offset-b)*2;c.w-=b+1;c.h-=1}break;case"frame":c.w=c.h=(e*2);c.l=c.t=-e;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(this.offset-b);c.t-=(this.offset-b);c.l+=1;c.w-=(this.offset+b+1);c.h-=(this.offset+b);c.h+=1}break}this.adjusts=c};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(a){a=Ext.get(a);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=a.dom){this.el.insertBefore(a)}}this.el.setStyle("z-index",this.zIndex||parseInt(a.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(a.getLeft(true),a.getTop(true),a.getWidth(),a.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,q,p,f){if(!this.el){return}var m=this.adjusts,j=this.el.dom,r=j.style,g=0,o=(p+m.w),e=(f+m.h),i=o+"px",n=e+"px",k,c;r.left=(b+m.l)+"px";r.top=(q+m.t)+"px";if(r.width!=i||r.height!=n){r.width=i;r.height=n;if(!Ext.isIE){k=j.childNodes;c=Math.max(0,(o-12))+"px";k[0].childNodes[1].style.width=c;k[1].childNodes[1].style.width=c;k[2].childNodes[1].style.width=c;k[1].style.height=Math.max(0,(e-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}}};Ext.Shadow.Pool=function(){var b=[],a=Ext.isIE?'
        ':'
        ';return{pull:function(){var c=b.shift();if(!c){c=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,a));c.autoBoxAdjust=false}return c},push:function(c){b.push(c)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(b,d){if(typeof b=="object"){d=b.height;b=b.width}if(Ext.isDefined(b)&&Ext.isDefined(this.boxMinWidth)&&(bthis.boxMaxWidth)){b=this.boxMaxWidth}if(Ext.isDefined(d)&&Ext.isDefined(this.boxMaxHeight)&&(d>this.boxMaxHeight)){d=this.boxMaxHeight}if(!this.boxReady){this.width=b;this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d),f=c.width,a=c.height,e;if(f!==undefined||a!==undefined){e=this.getResizeEl();if(!this.deferHeight&&f!==undefined&&a!==undefined){e.setSize(f,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(f!==undefined){e.setWidth(f)}}}this.onResize(f,a,b,d);this.fireEvent("resize",this,f,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getResizeEl:function(){return this.resizeEl||this.el},setAutoScroll:function(a){if(this.rendered){this.getContentTarget().setOverflow(a?"auto":"")}this.autoScroll=a;return this},setPosition:function(a,f){if(a&&typeof a[1]=="number"){f=a[1];a=a[0]}this.x=a;this.y=f;if(!this.boxReady){return this}var b=this.adjustPosition(a,f);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().translatePoints(a,c);this.setPosition(b.left,b.top);return this},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}this.boxReady=true;Ext.isDefined(this.autoScroll)&&this.setAutoScroll(this.autoScroll);this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);delete this.overlay}var a;if(this.orientation==Ext.SplitBar.HORIZONTAL){a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?b[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-b[0])}else{a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?b[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-b[1])}a=Math.min(Math.max(a,this.activeMinSize),this.activeMaxSize);if(a!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,a)!==false){this.adapter.setElementSize(this,a);this.fireEvent("moved",this,a);this.fireEvent("resize",this,a)}}},getAdapter:function(){return this.adapter},setAdapter:function(a){this.adapter=a;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(a){this.minSize=a},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(a){this.maxSize=a},setCurrentSize:function(b){var a=this.animate;this.animate=false;this.adapter.setElementSize(this,b);this.animate=a},destroy:function(a){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});Ext.SplitBar.createProxy=function(b){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.unselectable();var a="x-splitbar-proxy";c.addClass(a+" "+(b==Ext.SplitBar.HORIZONTAL?a+"-h":a+"-v"));return c.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(a){},getElementSize:function(a){if(a.orientation==Ext.SplitBar.HORIZONTAL){return a.resizingEl.getWidth()}else{return a.resizingEl.getHeight()}},setElementSize:function(b,a,c){if(b.orientation==Ext.SplitBar.HORIZONTAL){if(!b.animate){b.resizingEl.setWidth(a);if(c){c(b,a)}}else{b.resizingEl.setWidth(a,true,0.1,c,"easeOut")}}else{if(!b.animate){b.resizingEl.setHeight(a);if(c){c(b,a)}}else{b.resizingEl.setHeight(a,true,0.1,c,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(a){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(a)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(a){this.basic.init(a)},getElementSize:function(a){return this.basic.getElementSize(a)},setElementSize:function(b,a,c){this.basic.setElementSize(b,a,this.moveSplitter.createDelegate(this,[b]))},moveSplitter:function(a){var b=Ext.SplitBar;switch(a.placement){case b.LEFT:a.el.setX(a.resizingEl.getRight());break;case b.RIGHT:a.el.setStyle("right",(this.container.getWidth()-a.resizingEl.getLeft())+"px");break;case b.TOP:a.el.setY(a.resizingEl.getBottom());break;case b.BOTTOM:a.el.setY(a.resizingEl.getTop()-a.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;Ext.Container=Ext.extend(Ext.BoxComponent,{bufferResize:50,autoDestroy:true,forceLayout:false,defaultType:"panel",resizeEvent:"resize",bubbleEvents:["add","remove"],initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var a=this.items;if(a){delete this.items;this.add(a)}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(a){if(this.layout&&this.layout!=a){this.layout.setContainer(null)}this.layout=a;this.initItems();a.setContainer(this)},afterRender:function(){Ext.Container.superclass.afterRender.call(this);if(!this.layout){this.layout="auto"}if(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}if(Ext.isString(this.layout)){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined&&this.layout.setActiveItem){var a=this.activeItem;delete this.activeItem;this.layout.setActiveItem(a)}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(b){this.initItems();var e=arguments.length>1;if(e||Ext.isArray(b)){var a=[];Ext.each(e?arguments:b,function(g){a.push(this.add(g))},this);return a}var f=this.lookupComponent(this.applyDefaults(b));var d=this.items.length;if(this.fireEvent("beforeadd",this,f,d)!==false&&this.onBeforeAdd(f)!==false){this.items.add(f);f.onAdded(this,d);this.onAdd(f);this.fireEvent("add",this,f,d)}return f},onAdd:function(a){},onAdded:function(a,b){this.ownerCt=a;this.initRef();this.cascade(function(d){d.initRef()});this.fireEvent("added",this,a,b)},insert:function(e,b){var d=arguments,g=d.length,a=[],f,h;this.initItems();if(g>2){for(f=g-1;f>=1;--f){a.push(this.insert(e,d[f]))}return a}h=this.lookupComponent(this.applyDefaults(b));e=Math.min(e,this.items.length);if(this.fireEvent("beforeadd",this,h,e)!==false&&this.onBeforeAdd(h)!==false){if(h.ownerCt==this){this.items.remove(h)}this.items.insert(e,h);h.onAdded(this,e);this.onAdd(h);this.fireEvent("add",this,h,e)}return h},applyDefaults:function(b){var a=this.defaults;if(a){if(Ext.isFunction(a)){a=a.call(this,b)}if(Ext.isString(b)){b=Ext.ComponentMgr.get(b);Ext.apply(b,a)}else{if(!b.events){Ext.applyIf(b.isAction?b.initialConfig:b,a)}else{Ext.apply(b,a)}}}return b},onBeforeAdd:function(a){if(a.ownerCt){a.ownerCt.remove(a,false)}if(this.hideBorders===true){a.border=(a.border===true)}},remove:function(a,b){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.doRemove(d,b);this.fireEvent("remove",this,d)}return d},onRemove:function(a){},doRemove:function(e,d){var b=this.layout,a=b&&this.rendered;if(a){b.onRemove(e)}this.items.remove(e);e.onRemoved();this.onRemove(e);if(d===true||(d!==false&&this.autoDestroy)){e.destroy()}if(a){b.afterRemove(e)}},removeAll:function(c){this.initItems();var e,f=[],b=[];this.items.each(function(g){f.push(g)});for(var d=0,a=f.length;d','','
        ','
        ',"
      ");a.disableFormats=true;return a.compile()})(),destroy:function(){if(this.resizeTask&&this.resizeTask.cancel){this.resizeTask.cancel()}if(this.container){this.container.un(this.container.resizeEvent,this.onResize,this)}if(!Ext.isEmpty(this.targetCls)){var a=this.container.getLayoutTarget();if(a){a.removeClass(this.targetCls)}}}});Ext.layout.AutoLayout=Ext.extend(Ext.layout.ContainerLayout,{type:"auto",monitorResize:true,onLayout:function(d,f){Ext.layout.AutoLayout.superclass.onLayout.call(this,d,f);var e=this.getRenderedItems(d),a=e.length,b,g;for(b=0;b0){b.setSize(a)}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,layoutOnCardChange:false,renderHidden:true,type:"card",setActiveItem:function(d){var a=this.activeItem,b=this.container;d=b.getComponent(d);if(d&&a!=d){if(a){a.hide();if(a.hidden!==true){return false}a.fireEvent("deactivate",a)}var c=d.doLayout&&(this.layoutOnCardChange||!d.rendered);this.activeItem=d;delete d.deferLayout;d.show();this.layout();if(c){d.doLayout()}d.fireEvent("activate",d)}},renderAll:function(a,b){if(this.deferredRender){this.renderItem(this.activeItem,undefined,b)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,a,b)}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,getLayoutTargetSize:function(){var b=this.container.getLayoutTarget(),a={};if(b){a=b.getViewSize();if(Ext.isIE&&Ext.isStrict&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},onLayout:function(l,v){Ext.layout.AnchorLayout.superclass.onLayout.call(this,l,v);var o=this.getLayoutTargetSize(),j=o.width,n=o.height,p=v.getStyle("overflow"),m=this.getRenderedItems(l),s=m.length,f=[],h,a,u,k,g,c,e,d,t=0,r,b;if(j<20&&n<20){return}if(l.anchorSize){if(typeof l.anchorSize=="number"){a=l.anchorSize}else{a=l.anchorSize.width;u=l.anchorSize.height}}else{a=l.initialConfig.width;u=l.initialConfig.height}for(r=0;r 
      ');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){var a=this.expandToolEl=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);a.addClassOnOver("x-tool-expand-"+this.position+"-over");a.on("click",this.onExpandClick,this,{stopEvent:true})}if(this.floatable!==false||this.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this)}}}return this.collapsedEl},onExpandClick:function(a){if(this.isSlid){this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(a){this.panel.collapse()},beforeCollapse:function(c,a){this.lastAnim=a;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();var b=this.panel.getEl();this.originalZIndex=b.getStyle("z-index");b.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(a){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(a){if(this.isSlid){this.afterSlideIn()}var b=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,b.getHeight())}else{this.panel.setSize(b.getWidth(),undefined)}b.hide();b.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",this.floatingZIndex)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",this.originalZIndex);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(a){if(this.isSlid){a.stopPropagation();this.slideIn()}else{a.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(a){this.panel=a},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(a){var b=this.getCollapsedEl();b.setLeftTop(a.x,a.y);b.setSize(a.width,a.height)},applyLayout:function(a){if(this.isCollapsed){this.applyLayoutCollapsed(a)}else{this.panel.setPosition(a.x,a.y);this.panel.setSize(a.width,a.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){this.autoHideSlideTask=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(a){if(!a.within(this.el,true)){this.autoHideSlideTask.delay(500)}},mouseover:function(a){this.autoHideSlideTask.cancel()},scope:this}}this.el.on(this.autoHideHd);this.collapsedEl.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover);this.collapsedEl.un("mouseout",this.autoHideHd.mouseout);this.collapsedEl.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return}this.isSlid=true;var b=this.panel.tools,c,a;if(b&&b.toggle){b.toggle.hide()}this.el.show();a=this.panel.collapsed;this.panel.collapsed=false;if(this.position=="east"||this.position=="west"){c=this.panel.deferHeight;this.panel.deferHeight=false;this.panel.setSize(undefined,this.collapsedEl.getHeight());this.panel.deferHeight=c}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.panel.collapsed=a;this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}},destroy:function(){if(this.autoHideSlideTask&&this.autoHideSlideTask.cancel){this.autoHideSlideTask.cancel()}Ext.destroyMembers(this,"miniCollapsedEl","collapsedEl","expandToolEl")}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:" ",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;this.split.placement=b.placement;this.split.getMaximumSize=this[b.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[b.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[b.maxProp];if(c.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var a=this.panel.getSize();if(this.position=="north"||this.position=="south"){a.height+=this.splitEl.dom.offsetHeight}else{a.width+=this.splitEl.dom.offsetWidth}return a},getHMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getWidth()+a.el.getWidth())-a.getMinWidth())},getVMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getHeight()+a.el.getHeight())-a.getMinHeight())},onSplitMove:function(b,a){var c=this.panel.getSize();this.lastSplitSize=a;if(this.position=="north"||this.position=="south"){this.panel.setSize(c.width,a);this.state.height=a}else{this.panel.setSize(a,c.height);this.state.width=a}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",trackLabels:true,type:"form",onRemove:function(d){Ext.layout.FormLayout.superclass.onRemove.call(this,d);if(this.trackLabels){d.un("show",this.onFieldShow,this);d.un("hide",this.onFieldHide,this)}var b=d.getPositionEl(),a=d.getItemCt&&d.getItemCt();if(d.rendered&&a){if(b&&b.dom){b.insertAfter(a)}Ext.destroy(a);Ext.destroyMembers(d,"label","itemCt");if(d.customItemCt){Ext.destroyMembers(d,"getItemCt","customItemCt")}}},setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){Ext.apply(this,{labelStyle:"display:none",elementStyle:"padding-left:0;",labelAdjust:0})}else{this.labelSeparator=Ext.isDefined(a.labelSeparator)?a.labelSeparator:this.labelSeparator;a.labelWidth=a.labelWidth||100;if(Ext.isNumber(a.labelWidth)){var b=Ext.isNumber(a.labelPad)?a.labelPad:5;Ext.apply(this,{labelAdjust:a.labelWidth+b,labelStyle:"width:"+a.labelWidth+"px;",elementStyle:"padding-left:"+(a.labelWidth+b)+"px"})}if(a.labelAlign=="top"){Ext.apply(this,{labelStyle:"width:auto;",labelAdjust:0,elementStyle:"padding-left:0;"})}}},isHide:function(a){return a.hideLabel||this.container.hideLabels},onFieldShow:function(a){a.getItemCt().removeClass("x-hide-"+a.hideMode);if(a.isComposite){a.doLayout()}},onFieldHide:function(a){a.getItemCt().addClass("x-hide-"+a.hideMode)},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d=b)||(this.cells[c]&&this.cells[c][a])){if(b&&a>=b){c++;a=0}else{a++}}return[a,c]},renderItem:function(e,a,d){if(!this.table){this.table=d.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}if(e&&!e.rendered){e.render(this.getNextCell(e));this.configureItem(e)}else{if(e&&!this.isValidParent(e,d)){var b=this.getNextCell(e);b.insertBefore(e.getPositionEl().dom,null);e.container=Ext.get(b);this.configureItem(e)}}},isValidParent:function(b,a){return b.getPositionEl().up("table",5).dom.parentNode===(a.dom||a)},destroy:function(){delete this.table;Ext.layout.TableLayout.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",type:"absolute",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,type:"box",scrollOffset:0,extraCls:"x-box-item",targetCls:"x-box-layout-ct",innerCls:"x-box-inner",constructor:function(a){Ext.layout.BoxLayout.superclass.constructor.call(this,a);if(Ext.isString(this.defaultMargins)){this.defaultMargins=this.parseMargins(this.defaultMargins)}var d=this.overflowHandler;if(typeof d=="string"){d={type:d}}var c="none";if(d&&d.type!=undefined){c=d.type}var b=Ext.layout.boxOverflow[c];if(b[this.type]){b=b[this.type]}this.overflowHandler=new b(this,d)},onLayout:function(b,g){Ext.layout.BoxLayout.superclass.onLayout.call(this,b,g);var d=this.getLayoutTargetSize(),h=this.getVisibleItems(b),c=this.calculateChildBoxes(h,d),f=c.boxes,i=c.meta;if(d.width>0){var j=this.overflowHandler,a=i.tooNarrow?"handleOverflow":"clearOverflow";var e=j[a](c,d);if(e){if(e.targetSize){d=e.targetSize}if(e.recalculate){h=this.getVisibleItems(b);c=this.calculateChildBoxes(h,d);f=c.boxes}}}this.layoutTargetLastSize=d;this.childBoxCache=c;this.updateInnerCtSize(d,c);this.updateChildBoxes(f);this.handleTargetOverflow(d,b,g)},updateChildBoxes:function(c){for(var b=0,e=c.length;b(None)',constructor:function(a){Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this,arguments);this.menuItems=[]},createInnerElements:function(){if(!this.afterCt){this.afterCt=this.layout.innerCt.insertSibling({cls:this.afterCls},"before")}},clearOverflow:function(a,f){var e=f.width+(this.afterCt?this.afterCt.getWidth():0),b=this.menuItems;this.hideTrigger();for(var c=0,d=b.length;ch.width;return k}},handleOverflow:function(d,g){this.showTrigger();var j=g.width-this.afterCt.getWidth(),k=d.boxes,e=0,q=false;for(var n=0,c=k.length;n=0;h--){var p=k[h].component,o=k[h].left+k[h].width;if(o>=j){this.menuItems.unshift({component:p,width:k[h].width});p.hide()}else{break}}}if(this.menuItems.length==0){this.hideTrigger()}return{targetSize:{height:g.height,width:j},recalculate:q}}});Ext.layout.boxOverflow.menu.hbox=Ext.layout.boxOverflow.HorizontalMenu;Ext.layout.boxOverflow.Scroller=Ext.extend(Ext.layout.boxOverflow.None,{animateScroll:true,scrollIncrement:100,wheelIncrement:3,scrollRepeatInterval:400,scrollDuration:0.4,beforeCls:"x-strip-left",afterCls:"x-strip-right",scrollerCls:"x-strip-scroller",beforeScrollerCls:"x-strip-scroller-left",afterScrollerCls:"x-strip-scroller-right",createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},handleOverflow:function(a,b){this.createInnerElements();this.showScrollers()},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons()},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide()}},createScrollers:function(){if(!this.beforeScroller&&!this.afterScroller){var a=this.beforeCt.createChild({cls:String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)});a.addClassOnOver(this.beforeScrollerCls+"-hover");b.addClassOnOver(this.afterScrollerCls+"-hover");a.setVisibilityMode(Ext.Element.DISPLAY);b.setVisibilityMode(Ext.Element.DISPLAY);this.beforeRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeScroller,this.afterScroller,this.beforeRepeater,this.afterRepeater,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getItem:function(a){if(Ext.isString(a)){a=Ext.getCmp(a)}else{if(Ext.isNumber(a)){a=this.items[a]}}return a},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?"addClass":"removeClass",c=this.atExtremeAfter()?"addClass":"removeClass",a=this.beforeScrollerCls+"-disabled",b=this.afterScrollerCls+"-disabled";this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(a){this.scrollBy(-this.scrollIncrement,a)},scrollRight:function(a){this.scrollBy(this.scrollIncrement,a)},scrollToItem:function(d,b){d=this.getItem(d);if(d!=undefined){var a=this.getItemVisibility(d);if(!a.fullyVisible){var c=d.getBox(true,true),e=c.x;if(a.hiddenRight){e-=(this.layout.innerCt.getWidth()-c.width)}this.scrollTo(e,b)}}},getItemVisibility:function(e){var d=this.getItem(e).getBox(true,true),a=d.x,c=d.x+d.width,f=this.getScrollPosition(),b=this.layout.innerCt.getWidth()+f;return{hiddenLeft:ab,fullyVisible:a>f&&c=this.getMaxScrollBottom()}});Ext.layout.boxOverflow.scroller.vbox=Ext.layout.boxOverflow.VerticalScroller;Ext.layout.boxOverflow.HorizontalScroller=Ext.extend(Ext.layout.boxOverflow.Scroller,{handleOverflow:function(a,b){Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this,arguments);return{targetSize:{height:b.height,width:b.width-(this.beforeCt.getWidth()+this.afterCt.getWidth())}}},createInnerElements:function(){var a=this.layout.innerCt;if(!this.beforeCt){this.afterCt=a.insertSibling({cls:this.afterCls},"before");this.beforeCt=a.insertSibling({cls:this.beforeCls},"before");this.createWheelListener()}},scrollTo:function(a,b){var d=this.getScrollPosition(),c=a.constrain(0,this.getMaxScrollRight());if(c!=d&&!this.scrolling){if(b==undefined){b=this.animateScroll}this.layout.innerCt.scrollTo("left",c,b?this.getScrollAnim():false);if(b){this.scrolling=true}else{this.scrolling=false;this.updateScrollButtons()}}},getScrollPosition:function(){return parseInt(this.layout.innerCt.dom.scrollLeft,10)||0},getMaxScrollRight:function(){return this.layout.innerCt.dom.scrollWidth-this.layout.innerCt.getWidth()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollRight()}});Ext.layout.boxOverflow.scroller.hbox=Ext.layout.boxOverflow.HorizontalScroller;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",type:"hbox",calculateChildBoxes:function(q,b){var E=q.length,Q=this.padding,C=Q.top,T=Q.left,x=C+Q.bottom,N=T+Q.right,a=b.width-this.scrollOffset,e=b.height,n=Math.max(0,e-x),O=this.pack=="start",V=this.pack=="center",z=this.pack=="end",K=0,P=0,S=0,k=0,W=0,G=[],j,I,L,U,v,h,R,H,c,w,p,M;for(R=0;Ra;var m=Math.max(0,a-K-N);if(o){for(R=0;R0){var B=[];for(var D=0,u=E;Di.available?1:-1});for(var R=0,u=B.length;R0){H.top=C+p+(y/2)}}T+=H.width+v.right}return{boxes:G,meta:{maxHeight:P,nonFlexWidth:K,desiredWidth:k,minimumWidth:W,shortfall:k-a,tooNarrow:o}}}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",type:"vbox",calculateChildBoxes:function(n,b){var D=n.length,Q=this.padding,B=Q.top,U=Q.left,w=B+Q.bottom,N=U+Q.right,a=b.width-this.scrollOffset,c=b.height,J=Math.max(0,a-N),O=this.pack=="start",W=this.pack=="center",y=this.pack=="end",j=0,t=0,T=0,K=0,l=0,F=[],g,H,M,V,s,f,S,G,R,v,m,d,q;for(S=0;Sc;var p=Math.max(0,(c-j-w));if(k){for(S=0,q=D;S0){var I=[];for(var C=0,q=D;Ci.available?1:-1});for(var S=0,q=I.length;S0){G.left=U+v+(x/2)}}B+=G.height+s.bottom}return{boxes:F,meta:{maxWidth:t,nonFlexHeight:j,desiredHeight:K,minimumHeight:l,shortfall:K-c,tooNarrow:k}}}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"toolbar",triggerWidth:18,noItemsMenuText:'
      (None)
      ',lastOverflow:false,tableHTML:['',"","",'",'","","","
      ','',"",'',"","
      ","
      ','',"","","","","","","
      ",'',"",'',"","
      ","
      ",'',"",'',"","
      ","
      ","
      "].join(""),onLayout:function(e,h){if(!this.leftTr){var g=e.buttonAlign=="center"?"center":"left";h.addClass("x-toolbar-layout-ct");h.insertHtml("beforeEnd",String.format(this.tableHTML,g));this.leftTr=h.child("tr.x-toolbar-left-row",true);this.rightTr=h.child("tr.x-toolbar-right-row",true);this.extrasTr=h.child("tr.x-toolbar-extras-row",true);if(this.hiddenItem==undefined){this.hiddenItems=[]}}var j=e.buttonAlign=="right"?this.rightTr:this.leftTr,k=e.items.items,d=0;for(var b=0,f=k.length,l;b=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,b,a){var d=document.createElement("td");d.className="x-toolbar-cell";b.insertBefore(d,b.childNodes[a]||null);return d},hideItem:function(a){this.hiddenItems.push(a);a.xtbHidden=true;a.xtbWidth=a.getPositionEl().dom.parentNode.offsetWidth;a.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddenItems.remove(a)},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getPositionEl().dom.parentNode.offsetWidth},fitToSize:function(j){if(this.container.enableOverflow===false){return}var b=j.dom.clientWidth,h=j.dom.firstChild.offsetWidth,l=b-this.triggerWidth,a=this.lastWidth||0,c=this.hiddenItems,e=c.length!=0,m=b>=a;this.lastWidth=b;if(h>b||(e&&m)){var k=this.container.items.items,g=k.length,d=0,n;for(var f=0;fl){if(!(n.hidden||n.xtbHidden)){this.hideItem(n)}}else{if(n.xtbHidden){this.unhideItem(n)}}}}}e=c.length!=0;if(e){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(f,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(b,a){if(a instanceof Ext.Toolbar.Separator){b.add("-")}else{if(Ext.isFunction(a.isXType)){if(a.isXType("splitbutton")){b.add(this.createMenuConfig(a,true))}else{if(a.isXType("button")){b.add(this.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(c){this.addComponentToMenu(b,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){delete b.menu})}},beforeMoreShow:function(g){var b=this.container.items.items,a=b.length,f,e;var c=function(i,h){return i.isXType("buttongroup")&&!(h instanceof Ext.Toolbar.Separator)};this.clearMenu();g.removeAll();for(var d=0;d','','{altText}',"","")}if(f&&!f.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(f);f.render(f.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));f.positionEl.menuItemId=f.getItemId();if(!d.isMenuItem&&d.needsIcon){f.positionEl.addClass("x-menu-list-item-indent")}this.configureItem(f)}else{if(f&&!this.isValidParent(f,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(f.getActionEl().dom,b||null)}}},getItemArgs:function(d){var a=d instanceof Ext.menu.Item,b=!(a||d instanceof Ext.menu.Separator);return{isMenuItem:a,needsIcon:b&&(d.icon||d.iconCls),icon:d.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(d.iconCls||""),itemId:"x-menu-el-"+d.id,itemCls:"x-menu-list-item ",altText:d.altText||""}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){Ext.layout.MenuLayout.superclass.onLayout.call(this,a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8||Ext.isIE9)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(a,b){this.fireEvent("resize",this,a,b,a,b)}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",preventBodyReset:false,padding:undefined,resizeEvent:"bodyresize",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}this.toolbars=[];if(this.tbar){this.elements+=",tbar";this.topToolbar=this.createToolbar(this.tbar);this.tbar=null}if(this.bbar){this.elements+=",bbar";this.bottomToolbar=this.createToolbar(this.bbar);this.bbar=null}if(this.header===true){this.elements+=",header";this.header=null}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";this.footer=null}if(this.buttons){this.fbar=this.buttons;this.buttons=null}if(this.fbar){this.createFbar(this.fbar)}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createFbar:function(b){var a=this.minButtonWidth;this.elements+=",footer";this.fbar=this.createToolbar(b,{buttonAlign:this.buttonAlign,toolbarCls:"x-panel-fbar",enableOverflow:false,defaults:function(d){return{minWidth:d.minWidth||a}}});this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this);this.buttons=this.fbar.items.items},createToolbar:function(b,c){var a;if(Ext.isArray(b)){b={items:b}}a=b.events?Ext.apply(b,c):this.createComponent(Ext.apply({},b,c),"toolbar");this.toolbars.push(a);return a},createElement:function(a,c){if(this[a]){c.appendChild(this[a].dom);return}if(a==="bwrap"||this.elements.indexOf(a)!=-1){if(this[a+"Cfg"]){this[a]=Ext.fly(c).createChild(this[a+"Cfg"])}else{var b=document.createElement("div");b.className=this[a+"Cls"];this[a]=Ext.get(c.appendChild(b))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(f,e){Ext.Panel.superclass.onRender.call(this,f,e);this.createClasses();var a=this.el,g=a.dom,j,h;if(this.collapsible&&!this.hideCollapseTool){this.tools=this.tools?this.tools.slice(0):[];this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.tools){h=this.tools;this.elements+=(this.header!==false)?",header":""}this.tools={};a.addClass(this.baseCls);if(g.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var i=this.bwrap?this.bwrap:a;this.tbar=i.down("."+this.tbarCls);this.body=i.down("."+this.bodyCls);this.bbar=i.down("."+this.bbarCls);this.footer=i.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){a.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",g.firstChild.firstChild.firstChild);this.createElement("bwrap",g);j=this.bwrap.dom;var c=g.childNodes[1],b=g.childNodes[2];j.appendChild(c);j.appendChild(b);var k=j.firstChild.firstChild.firstChild;this.createElement("tbar",k);this.createElement("body",k);this.createElement("bbar",k);this.createElement("footer",j.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}this.ft=Ext.get(this.bwrap.dom.lastChild);this.mc=Ext.get(k)}else{this.createElement("header",g);this.createElement("bwrap",g);j=this.bwrap.dom;this.createElement("tbar",j);this.createElement("body",j);this.createElement("bbar",j);this.createElement("footer",j);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(Ext.isDefined(this.padding)){this.body.setStyle("padding",this.body.addUnits(this.padding))}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML=''+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible&&this.titleCollapse&&this.header){this.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}if(h){this.addTool.apply(this,h)}if(this.fbar){this.footer.addClass("x-panel-btns");this.fbar.ownerCt=this;this.fbar.render(this.footer);this.footer.createChild({cls:"x-clear"})}if(this.tbar&&this.topToolbar){this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar)}},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var e=this.header,c=e.child("img.x-panel-inline-icon");if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{var d=e.child("span."+this.headerTextCls);if(d){Ext.DomHelper.insertBefore(d.dom,{tag:"img",alt:"",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.apply({},a,{shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined}),this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},getFooterToolbar:function(){return this.fbar},addButton:function(a,c,b){if(!this.fbar){this.createFbar([])}if(c){if(Ext.isString(a)){a={text:a}}a=Ext.apply({handler:c,scope:b},a)}return this.fbar.add(a)},addTool:function(){if(!this.rendered){if(!this.tools){this.tools=[]}Ext.each(arguments,function(a){this.tools.push(a)},this);return}if(!this[this.toolTarget]){return}if(!this.toolTemplate){var g=new Ext.Template('
       
      ');g.disableFormats=true;g.compile();Ext.Panel.prototype.toolTemplate=g}for(var f=0,d=arguments,c=d.length;f0){Ext.each(this.toolbars,function(c){c.doLayout(undefined,a)});this.syncHeight()}},syncHeight:function(){var b=this.toolbarHeight,c=this.body,a=this.lastSize.height,d;if(this.autoHeight||!Ext.isDefined(a)||a=="auto"){return}if(b!=this.getToolbarHeight()){b=Math.max(0,a-this.getFrameHeight());c.setHeight(b);d=c.getSize();this.toolbarHeight=this.getToolbarHeight();this.onBodyResize(d.width,d.height)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(f){c.removeClass(d);if(a.stopEvent!==false){f.stopEvent()}if(a.handler){a.handler.call(a.scope||c,f,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}Ext.Panel.superclass.afterRender.call(this);if(this.collapsed){this.collapsed=false;this.collapse(false)}this.initEvents()},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}if(this.toolbars.length>0){Ext.each(this.toolbars,function(a){a.doLayout();a.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this);this.syncHeight()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},beforeEffect:function(a){if(this.floating){this.el.beforeAction()}if(a!==false){this.el.addClass("x-panel-animated")}},afterEffect:function(a){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(c,b,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,c)},collapse:function(b){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.beforeEffect(a);this.onCollapse(a,b);return this},onCollapse:function(a,b){if(a){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide(this.hideMode);this.afterCollapse(false)}},afterCollapse:function(a){this.collapsed=true;this.el.addClass(this.collapsedCls);if(a!==false){this[this.collapseEl].hide(this.hideMode)}this.afterEffect(a);this.cascade(function(b){if(b.lastSize){b.lastSize={width:undefined,height:undefined}}});this.fireEvent("collapse",this)},expand:function(b){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect(a);this.onExpand(a,b);return this},onExpand:function(a,b){if(a){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show(this.hideMode);this.afterExpand(false)}},afterExpand:function(a){this.collapsed=false;if(a!==false){this[this.collapseEl].show(this.hideMode)}this.afterEffect(a);if(this.deferLayout){delete this.deferLayout;this.doLayout(true)}this.fireEvent("expand",this)},toggleCollapse:function(a){this[this.collapsed?"expand":"collapse"](a);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(f,d,c,e){var a=f,b=d;if(Ext.isDefined(a)||Ext.isDefined(b)){if(!this.collapsed){if(Ext.isNumber(a)){this.body.setWidth(a=this.adjustBodyWidth(a-this.getFrameWidth()))}else{if(a=="auto"){a=this.body.setWidth("auto").dom.offsetWidth}else{a=this.body.dom.offsetWidth}}if(this.tbar){this.tbar.setWidth(a);if(this.topToolbar){this.topToolbar.setSize(a)}}if(this.bbar){this.bbar.setWidth(a);if(this.bottomToolbar){this.bottomToolbar.setSize(a);if(Ext.isIE){this.bbar.setStyle("position","static");this.bbar.setStyle("position","")}}}if(this.footer){this.footer.setWidth(a);if(this.fbar){this.fbar.setSize(Ext.isIE?(a-this.footer.getFrameWidth("lr")):"auto")}}if(Ext.isNumber(b)){b=Math.max(0,b-this.getFrameHeight());this.body.setHeight(b)}else{if(b=="auto"){this.body.setHeight(b)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:a,height:b};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height)},this,{single:true})}}this.onBodyResize(a,b)}this.syncShadow();Ext.Panel.superclass.onResize.call(this,f,d,c,e)},onBodyResize:function(a,b){this.fireEvent("bodyresize",this,a,b)},getToolbarHeight:function(){var a=0;if(this.rendered){Ext.each(this.toolbars,function(b){a+=b.getHeight()},this)}return a},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");if(this.frame){var a=this.bwrap.dom.firstChild;b+=(Ext.fly(a).getFrameWidth("l")+Ext.fly(a.firstChild).getFrameWidth("r"));b+=this.mc.getFrameWidth("lr")}return b},getFrameHeight:function(){var a=this.el.getFrameWidth("tb")+this.bwrap.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){a+=this.el.dom.firstChild.offsetHeight+this.ft.dom.offsetHeight+this.mc.getFrameWidth("tb")}else{a+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.body.getHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},getContentTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){Ext.Panel.superclass.beforeDestroy.call(this);if(this.header){this.header.removeAllListeners()}if(this.tools){for(var a in this.tools){Ext.destroy(this.tools[a])}}if(this.toolbars.length>0){Ext.each(this.toolbars,function(b){b.un("afterlayout",this.syncHeight,this);b.un("remove",this.syncHeight,this)},this)}if(Ext.isArray(this.buttons)){while(this.buttons.length){Ext.destroy(this.buttons[0])}}if(this.rendered){Ext.destroy(this.ft,this.header,this.footer,this.tbar,this.bbar,this.body,this.mc,this.bwrap,this.dd);if(this.fbar){Ext.destroy(this.fbar,this.fbar.el)}}Ext.destroy(this.toolbars)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{this.field=b}Ext.Editor.superclass.constructor.call(this,a)};Ext.extend(Ext.Editor,Ext.Component,{allowBlur:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(b,a){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:b,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.inEditor=true;this.mon(this.field,{scope:this,blur:this.onBlur,specialkey:this.onSpecialKey});if(this.field.grow){this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1})}this.field.render(this.el).show();this.field.getEl().dom.name="";if(this.swallowKeys){this.field.el.swallowEvent(["keypress","keydown"])}},onSpecialKey:function(f,d){var b=d.getKey(),a=this.completeOnEnter&&b==d.ENTER,c=this.cancelOnEsc&&b==d.ESC;if(a||c){d.stopEvent();if(a){this.completeEdit()}else{this.cancelEdit()}if(f.triggerBlur){f.triggerBlur()}}this.fireEvent("specialkey",f,d)},startEdit:function(b,c){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(b);var a=c!==undefined?c:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,a)!==false){this.startValue=a;this.field.reset();this.field.setValue(a);this.realign(true);this.editing=true;this.show()}},doAutoSize:function(){if(this.autoSize){var b=this.boundEl.getSize(),a=this.field.getSize();switch(this.autoSize){case"width":this.setSize(b.width,a.height);break;case"height":this.setSize(a.width,b.height);break;case"none":this.setSize(a.width,a.height);break;default:this.setSize(b.width,b.height)}}},setSize:function(a,b){delete this.field.lastSize;this.field.setSize(a,b);if(this.el){if(Ext.isGecko2||Ext.isOpera||(Ext.isIE7&&Ext.isStrict)){this.el.setSize(a,b)}this.el.sync()}},realign:function(a){if(a===true){this.doAutoSize()}this.el.alignTo(this.boundEl,this.alignment,this.offsets)},completeEdit:function(a){if(!this.editing){return}if(this.field.assertValue){this.field.assertValue()}var b=this.getValue();if(!this.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);this.fireEvent("complete",this,b,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show().focus(false,true);this.fireEvent("startedit",this.boundEl,this.startValue)},cancelEdit:function(a){if(this.editing){var b=this.getValue();this.setValue(this.startValue);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){if(this.allowBlur===true&&this.editing&&this.selectSameEditor!==true){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return}this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){Ext.destroyMembers(this,"field");delete this.parentEl;delete this.boundEl}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=Ext.extend(Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],initComponent:function(){Ext.ColorPalette.superclass.initComponent.call(this);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}},onRender:function(b,a){this.autoEl={tag:"div",cls:this.itemCls};Ext.ColorPalette.superclass.onRender.call(this,b,a);var c=this.tpl||new Ext.XTemplate(' ');c.overwrite(this.el,this.colors);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var a=this.value;this.value=null;this.select(a,true)}},handleClick:function(b,a){b.preventDefault();if(!this.disabled){var d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.toUpperCase())}},select:function(b,a){b=b.replace("#","");if(b!=this.value||this.allowReselect){var c=this.el;if(this.value){c.child("a.color-"+this.value).removeClass("x-color-palette-sel")}c.child("a.color-"+b).addClass("x-color-palette-sel");this.value=b;if(a!==true){this.fireEvent("select",this,b)}}}});Ext.reg("colorpalette",Ext.ColorPalette);Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,focusOnSelect:true,initHour:12,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime(true):new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(f,e){c+=Ext.isDate(f)?"^"+Ext.escapeRe(f.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){if(Ext.isArray(a)){this.disabledDates=a;this.disabledDatesRE=null}else{this.disabledDatesRE=a}this.initDisabledDays();this.update(this.value,true)},setDisabledDays:function(a){this.disabledDays=a;this.update(this.value,true)},setMinDate:function(a){this.minDate=a;this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;this.update(this.value,true)},setValue:function(a){this.value=a.clearTime(true);this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['','','",this.showToday?'':"",'
        
      '],c=this.dayNames,g;for(g=0;g<7;g++){var j=this.startDay+g;if(j>6){j=j-7}a.push("")}a[a.length]="";for(g=0;g<42;g++){if(g%7===0&&g!==0){a[a.length]=""}a[a.length]=''}a.push("
      ",c[j].substr(0,1),"
      ');var h=document.createElement("div");h.className="x-date-picker";h.innerHTML=a.join("");e.dom.insertBefore(h,b);this.el=Ext.get(h);this.eventEl=Ext.get(h.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var f=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,f),tooltip:String.format(this.todayTip,f),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var a=[''];for(var b=0;b<6;b++){a.push('",'",b===0?'':'')}a.push('","
      ',Date.getShortMonthName(b),"',Date.getShortMonthName(b+6),"
      ");this.monthPicker.update(a.join(""));this.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(f,b){f.stopEvent();var c=new Ext.Element(b),a;if(c.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(c.is("button.x-date-mp-ok")){var g=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(g.getMonth()!=this.mpSelMonth){g=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(g);this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelMonth=a.dom.xmonth}else{if((a=c.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelYear=a.dom.xyear}else{if(c.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(c.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasClass("x-date-disabled")){this.cancelFocus=this.focusOnSelect===false;this.setValue(new Date(a.dateValue));delete this.cancelFocus;this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)}},update:function(F,z){if(this.rendered){var a=this.activeDate,o=this.isVisible();this.activeDate=F;if(!z&&a&&this.el){var n=F.getTime();if(a.getMonth()==F.getMonth()&&a.getFullYear()==F.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==n){d.addClass("x-date-selected");if(o&&!this.cancelFocus){Ext.fly(d.dom.firstChild).focus(50)}return false}},this);return}}var j=F.getDaysInMonth(),p=F.getFirstDateOfMonth(),f=p.getDay()-this.startDay;if(f<0){f+=7}j+=f;var A=F.add("mo",-1),g=A.getDaysInMonth()-f,e=this.cells.elements,q=this.textNodes,C=(new Date(A.getFullYear(),A.getMonth(),g,this.initHour)),B=new Date().clearTime().getTime(),u=F.clearTime(true).getTime(),s=this.minDate?this.minDate.clearTime(true):Number.NEGATIVE_INFINITY,x=this.maxDate?this.maxDate.clearTime(true):Number.POSITIVE_INFINITY,E=this.disabledDatesRE,r=this.disabledDatesText,H=this.disabledDays?this.disabledDays.join(""):false,D=this.disabledDaysText,y=this.format;if(this.showToday){var l=new Date().clearTime(),c=(lx||(E&&y&&E.test(l.dateFormat(y)))||(H&&H.indexOf(l.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var k=function(I,d){d.title="";var i=C.clearTime(true).getTime();d.firstChild.dateValue=i;if(i==B){d.className+=" x-date-today";d.title=I.todayText}if(i==u){d.className+=" x-date-selected";if(o){Ext.fly(d.firstChild).focus(50)}}if(ix){d.className=" x-date-disabled";d.title=I.maxText;return}if(H){if(H.indexOf(C.getDay())!=-1){d.title=D;d.className=" x-date-disabled"}}if(E&&y){var w=C.dateFormat(y);if(E.test(w)){d.title=r.replace("%0",w);d.className=" x-date-disabled"}}};var v=0;for(;v=a.value){d=a.value}}c.setValue(b,d,false);c.fireEvent("drag",c,f,this)},getNewValue:function(){var a=this.slider,b=a.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(a.reverseValue(b.left),a.decimalPrecision)},onDragEnd:function(c){var a=this.slider,b=this.value;this.el.removeClass("x-slider-thumb-drag");this.dragging=false;a.fireEvent("dragend",a,c);if(this.dragStartValue!=b){a.fireEvent("changecomplete",a,b,this)}},destroy:function(){Ext.destroyMembers(this,"tracker","el")}});Ext.slider.MultiSlider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,constrainThumbs:true,topThumbZIndex:10000,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue}this.thumbs=[];Ext.slider.MultiSlider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.values==undefined||Ext.isEmpty(this.values)){this.values=[0]}var a=this.values;for(var b=0;bthis.clickRange[0]&&c.top=c){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.slider.MultiSlider.superclass.afterRender.apply(this,arguments);for(var c=0;ce?e:c.value}this.syncThumb()},setValue:function(d,c,b,f){var a=this.thumbs[d],e=a.el;c=this.normalizeValue(c);if(c!==a.value&&this.fireEvent("beforechange",this,c,a.value,a)!==false){a.value=c;if(this.rendered){this.moveThumb(d,this.translateValue(c),b!==false);this.fireEvent("change",this,c,a);if(f){this.fireEvent("changecomplete",this,c,a)}}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},moveThumb:function(d,c,b){var a=this.thumbs[d].el;if(!b||this.animate===false){a.setLeft(c)}else{a.shift({left:c,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onResize:function(c,e){var b=this.thumbs,a=b.length,d=0;for(;dthis.clickRange[0]&&c.left','
      ','
      ','
      ',"
       
      ","
      ","
      ",'
      ',"
       
      ","
      ","
      ","");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered&&!this.isDestroyed){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;c-=1;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}this.clearTimer();if(a===true){this.hide()}return this},clearTimer:function(){if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}},onDestroy:function(){this.clearTimer();if(this.rendered){if(this.textEl.isComposite){this.textEl.clear()}Ext.destroyMembers(this,"textEl","progressBar","textTopEl")}Ext.ProgressBar.superclass.onDestroy.call(this)}});Ext.reg("progress",Ext.ProgressBar); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/data-foundation-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/data-foundation-debug.js deleted file mode 100644 index 3bf7e4aef52..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/data-foundation-debug.js +++ /dev/null @@ -1,4809 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ - -/** - * @class Ext.data.Api - * @extends Object - * Ext.data.Api is a singleton designed to manage the data API including methods - * for validating a developer's DataProxy API. Defines variables for CRUD actions - * create, read, update and destroy in addition to a mapping of RESTful HTTP methods - * GET, POST, PUT and DELETE to CRUD actions. - * @singleton - */ -Ext.data.Api = (function() { - - // private validActions. validActions is essentially an inverted hash of Ext.data.Api.actions, where value becomes the key. - // Some methods in this singleton (e.g.: getActions, getVerb) will loop through actions with the code for (var verb in this.actions) - // For efficiency, some methods will first check this hash for a match. Those methods which do acces validActions will cache their result here. - // We cannot pre-define this hash since the developer may over-ride the actions at runtime. - var validActions = {}; - - return { - /** - * Defined actions corresponding to remote actions: - *
      
      -actions: {
      -    create  : 'create',  // Text representing the remote-action to create records on server.
      -    read    : 'read',    // Text representing the remote-action to read/load data from server.
      -    update  : 'update',  // Text representing the remote-action to update records on server.
      -    destroy : 'destroy'  // Text representing the remote-action to destroy records on server.
      -}
      -         * 
      - * @property actions - * @type Object - */ - actions : { - create : 'create', - read : 'read', - update : 'update', - destroy : 'destroy' - }, - - /** - * Defined {CRUD action}:{HTTP method} pairs to associate HTTP methods with the - * corresponding actions for {@link Ext.data.DataProxy#restful RESTful proxies}. - * Defaults to: - *
      
      -restActions : {
      -    create  : 'POST',
      -    read    : 'GET',
      -    update  : 'PUT',
      -    destroy : 'DELETE'
      -},
      -         * 
      - */ - restActions : { - create : 'POST', - read : 'GET', - update : 'PUT', - destroy : 'DELETE' - }, - - /** - * Returns true if supplied action-name is a valid API action defined in {@link #actions} constants - * @param {String} action Action to test for availability. - * @return {Boolean} - */ - isAction : function(action) { - return (Ext.data.Api.actions[action]) ? true : false; - }, - - /** - * Returns the actual CRUD action KEY "create", "read", "update" or "destroy" from the supplied action-name. This method is used internally and shouldn't generally - * need to be used directly. The key/value pair of Ext.data.Api.actions will often be identical but this is not necessarily true. A developer can override this naming - * convention if desired. However, the framework internally calls methods based upon the KEY so a way of retreiving the the words "create", "read", "update" and "destroy" is - * required. This method will cache discovered KEYS into the private validActions hash. - * @param {String} name The runtime name of the action. - * @return {String||null} returns the action-key, or verb of the user-action or null if invalid. - * @nodoc - */ - getVerb : function(name) { - if (validActions[name]) { - return validActions[name]; // <-- found in cache. return immediately. - } - for (var verb in this.actions) { - if (this.actions[verb] === name) { - validActions[name] = verb; - break; - } - } - return (validActions[name] !== undefined) ? validActions[name] : null; - }, - - /** - * Returns true if the supplied API is valid; that is, check that all keys match defined actions - * otherwise returns an array of mistakes. - * @return {String[]|true} - */ - isValid : function(api){ - var invalid = []; - var crud = this.actions; // <-- cache a copy of the actions. - for (var action in api) { - if (!(action in crud)) { - invalid.push(action); - } - } - return (!invalid.length) ? true : invalid; - }, - - /** - * Returns true if the supplied verb upon the supplied proxy points to a unique url in that none of the other api-actions - * point to the same url. The question is important for deciding whether to insert the "xaction" HTTP parameter within an - * Ajax request. This method is used internally and shouldn't generally need to be called directly. - * @param {Ext.data.DataProxy} proxy - * @param {String} verb - * @return {Boolean} - */ - hasUniqueUrl : function(proxy, verb) { - var url = (proxy.api[verb]) ? proxy.api[verb].url : null; - var unique = true; - for (var action in proxy.api) { - if ((unique = (action === verb) ? true : (proxy.api[action].url != url) ? true : false) === false) { - break; - } - } - return unique; - }, - - /** - * This method is used internally by {@link Ext.data.DataProxy DataProxy} and should not generally need to be used directly. - * Each action of a DataProxy api can be initially defined as either a String or an Object. When specified as an object, - * one can explicitly define the HTTP method (GET|POST) to use for each CRUD action. This method will prepare the supplied API, setting - * each action to the Object form. If your API-actions do not explicitly define the HTTP method, the "method" configuration-parameter will - * be used. If the method configuration parameter is not specified, POST will be used. -
      
      -new Ext.data.HttpProxy({
      -    method: "POST",     // <-- default HTTP method when not specified.
      -    api: {
      -        create: 'create.php',
      -        load: 'read.php',
      -        save: 'save.php',
      -        destroy: 'destroy.php'
      -    }
      -});
      -
      -// Alternatively, one can use the object-form to specify the API
      -new Ext.data.HttpProxy({
      -    api: {
      -        load: {url: 'read.php', method: 'GET'},
      -        create: 'create.php',
      -        destroy: 'destroy.php',
      -        save: 'update.php'
      -    }
      -});
      -        
      - * - * @param {Ext.data.DataProxy} proxy - */ - prepare : function(proxy) { - if (!proxy.api) { - proxy.api = {}; // <-- No api? create a blank one. - } - for (var verb in this.actions) { - var action = this.actions[verb]; - proxy.api[action] = proxy.api[action] || proxy.url || proxy.directFn; - if (typeof(proxy.api[action]) == 'string') { - proxy.api[action] = { - url: proxy.api[action], - method: (proxy.restful === true) ? Ext.data.Api.restActions[action] : undefined - }; - } - } - }, - - /** - * Prepares a supplied Proxy to be RESTful. Sets the HTTP method for each api-action to be one of - * GET, POST, PUT, DELETE according to the defined {@link #restActions}. - * @param {Ext.data.DataProxy} proxy - */ - restify : function(proxy) { - proxy.restful = true; - for (var verb in this.restActions) { - proxy.api[this.actions[verb]].method || - (proxy.api[this.actions[verb]].method = this.restActions[verb]); - } - // TODO: perhaps move this interceptor elsewhere? like into DataProxy, perhaps? Placed here - // to satisfy initial 3.0 final release of REST features. - proxy.onWrite = proxy.onWrite.createInterceptor(function(action, o, response, rs) { - var reader = o.reader; - var res = new Ext.data.Response({ - action: action, - raw: response - }); - - switch (response.status) { - case 200: // standard 200 response, send control back to HttpProxy#onWrite by returning true from this intercepted #onWrite - return true; - break; - case 201: // entity created but no response returned - if (Ext.isEmpty(res.raw.responseText)) { - res.success = true; - } else { - //if the response contains data, treat it like a 200 - return true; - } - break; - case 204: // no-content. Create a fake response. - res.success = true; - res.data = null; - break; - default: - return true; - break; - } - if (res.success === true) { - this.fireEvent("write", this, action, res.data, res, rs, o.request.arg); - } else { - this.fireEvent('exception', this, 'remote', action, o, res, rs); - } - o.request.callback.call(o.request.scope, res.data, res, res.success); - - return false; // <-- false to prevent intercepted function from running. - }, proxy); - } - }; -})(); - -/** - * Ext.data.Response - * Experimental. Do not use directly. - */ -Ext.data.Response = function(params, response) { - Ext.apply(this, params, { - raw: response - }); -}; -Ext.data.Response.prototype = { - message : null, - success : false, - status : null, - root : null, - raw : null, - - getMessage : function() { - return this.message; - }, - getSuccess : function() { - return this.success; - }, - getStatus : function() { - return this.status; - }, - getRoot : function() { - return this.root; - }, - getRawResponse : function() { - return this.raw; - } -}; - -/** - * @class Ext.data.Api.Error - * @extends Ext.Error - * Error class for Ext.data.Api errors - */ -Ext.data.Api.Error = Ext.extend(Ext.Error, { - constructor : function(message, arg) { - this.arg = arg; - Ext.Error.call(this, message); - }, - name: 'Ext.data.Api' -}); -Ext.apply(Ext.data.Api.Error.prototype, { - lang: { - 'action-url-undefined': 'No fallback url defined for this action. When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.', - 'invalid': 'received an invalid API-configuration. Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions', - 'invalid-url': 'Invalid url. Please review your proxy configuration.', - 'execute': 'Attempted to execute an unknown action. Valid API actions are defined in Ext.data.Api.actions"' - } -}); - - - -/** - * @class Ext.data.SortTypes - * @singleton - * Defines the default sorting (casting?) comparison functions used when sorting data. - */ -Ext.data.SortTypes = { - /** - * Default sort that does nothing - * @param {Mixed} s The value being converted - * @return {Mixed} The comparison value - */ - none : function(s){ - return s; - }, - - /** - * The regular expression used to strip tags - * @type {RegExp} - * @property - */ - stripTagsRE : /<\/?[^>]+>/gi, - - /** - * Strips all HTML tags to sort on text only - * @param {Mixed} s The value being converted - * @return {String} The comparison value - */ - asText : function(s){ - return String(s).replace(this.stripTagsRE, ""); - }, - - /** - * Strips all HTML tags to sort on text only - Case insensitive - * @param {Mixed} s The value being converted - * @return {String} The comparison value - */ - asUCText : function(s){ - return String(s).toUpperCase().replace(this.stripTagsRE, ""); - }, - - /** - * Case insensitive string - * @param {Mixed} s The value being converted - * @return {String} The comparison value - */ - asUCString : function(s) { - return String(s).toUpperCase(); - }, - - /** - * Date sorting - * @param {Mixed} s The value being converted - * @return {Number} The comparison value - */ - asDate : function(s) { - if(!s){ - return 0; - } - if(Ext.isDate(s)){ - return s.getTime(); - } - return Date.parse(String(s)); - }, - - /** - * Float sorting - * @param {Mixed} s The value being converted - * @return {Float} The comparison value - */ - asFloat : function(s) { - var val = parseFloat(String(s).replace(/,/g, "")); - return isNaN(val) ? 0 : val; - }, - - /** - * Integer sorting - * @param {Mixed} s The value being converted - * @return {Number} The comparison value - */ - asInt : function(s) { - var val = parseInt(String(s).replace(/,/g, ""), 10); - return isNaN(val) ? 0 : val; - } -};/** - * @class Ext.data.Record - *

      Instances of this class encapsulate both Record definition information, and Record - * value information for use in {@link Ext.data.Store} objects, or any code which needs - * to access Records cached in an {@link Ext.data.Store} object.

      - *

      Constructors for this class are generated by passing an Array of field definition objects to {@link #create}. - * Instances are usually only created by {@link Ext.data.Reader} implementations when processing unformatted data - * objects.

      - *

      Note that an instance of a Record class may only belong to one {@link Ext.data.Store Store} at a time. - * In order to copy data from one Store to another, use the {@link #copy} method to create an exact - * copy of the Record, and insert the new instance into the other Store.

      - *

      When serializing a Record for submission to the server, be aware that it contains many private - * properties, and also a reference to its owning Store which in turn holds references to its Records. - * This means that a whole Record may not be encoded using {@link Ext.util.JSON.encode}. Instead, use the - * {@link #data} and {@link #id} properties.

      - *

      Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below.

      - * @constructor - *

      This constructor should not be used to create Record objects. Instead, use {@link #create} to - * generate a subclass of Ext.data.Record configured with information about its constituent fields.

      - *

      The generated constructor has the same signature as this constructor.

      - * @param {Object} data (Optional) An object, the properties of which provide values for the new Record's - * fields. If not specified the {@link Ext.data.Field#defaultValue defaultValue} - * for each field will be assigned. - * @param {Object} id (Optional) The id of the Record. The id is used by the - * {@link Ext.data.Store} object which owns the Record to index its collection - * of Records (therefore this id should be unique within each store). If an - * id is not specified a {@link #phantom} - * Record will be created with an {@link #Record.id automatically generated id}. - */ -Ext.data.Record = function(data, id){ - // if no id, call the auto id method - this.id = (id || id === 0) ? id : Ext.data.Record.id(this); - this.data = data || {}; -}; - -/** - * Generate a constructor for a specific Record layout. - * @param {Array} o An Array of {@link Ext.data.Field Field} definition objects. - * The constructor generated by this method may be used to create new Record instances. The data - * object must contain properties named after the {@link Ext.data.Field field} - * {@link Ext.data.Field#name}s. Example usage:
      
      -// create a Record constructor from a description of the fields
      -var TopicRecord = Ext.data.Record.create([ // creates a subclass of Ext.data.Record
      -    {{@link Ext.data.Field#name name}: 'title', {@link Ext.data.Field#mapping mapping}: 'topic_title'},
      -    {name: 'author', mapping: 'username', allowBlank: false},
      -    {name: 'totalPosts', mapping: 'topic_replies', type: 'int'},
      -    {name: 'lastPost', mapping: 'post_time', type: 'date'},
      -    {name: 'lastPoster', mapping: 'user2'},
      -    {name: 'excerpt', mapping: 'post_text', allowBlank: false},
      -    // In the simplest case, if no properties other than name are required,
      -    // a field definition may consist of just a String for the field name.
      -    'signature'
      -]);
      -
      -// create Record instance
      -var myNewRecord = new TopicRecord(
      -    {
      -        title: 'Do my job please',
      -        author: 'noobie',
      -        totalPosts: 1,
      -        lastPost: new Date(),
      -        lastPoster: 'Animal',
      -        excerpt: 'No way dude!',
      -        signature: ''
      -    },
      -    id // optionally specify the id of the record otherwise {@link #Record.id one is auto-assigned}
      -);
      -myStore.{@link Ext.data.Store#add add}(myNewRecord);
      -
      - * @method create - * @return {Function} A constructor which is used to create new Records according - * to the definition. The constructor has the same signature as {@link #Record}. - * @static - */ -Ext.data.Record.create = function(o){ - var f = Ext.extend(Ext.data.Record, {}); - var p = f.prototype; - p.fields = new Ext.util.MixedCollection(false, function(field){ - return field.name; - }); - for(var i = 0, len = o.length; i < len; i++){ - p.fields.add(new Ext.data.Field(o[i])); - } - f.getField = function(name){ - return p.fields.get(name); - }; - return f; -}; - -Ext.data.Record.PREFIX = 'ext-record'; -Ext.data.Record.AUTO_ID = 1; -Ext.data.Record.EDIT = 'edit'; -Ext.data.Record.REJECT = 'reject'; -Ext.data.Record.COMMIT = 'commit'; - - -/** - * Generates a sequential id. This method is typically called when a record is {@link #create}d - * and {@link #Record no id has been specified}. The returned id takes the form: - * {PREFIX}-{AUTO_ID}.
        - *
      • PREFIX : String

        Ext.data.Record.PREFIX - * (defaults to 'ext-record')

      • - *
      • AUTO_ID : String

        Ext.data.Record.AUTO_ID - * (defaults to 1 initially)

      • - *
      - * @param {Record} rec The record being created. The record does not exist, it's a {@link #phantom}. - * @return {String} auto-generated string id, "ext-record-i++'; - */ -Ext.data.Record.id = function(rec) { - rec.phantom = true; - return [Ext.data.Record.PREFIX, '-', Ext.data.Record.AUTO_ID++].join(''); -}; - -Ext.data.Record.prototype = { - /** - *

      This property is stored in the Record definition's prototype

      - * A MixedCollection containing the defined {@link Ext.data.Field Field}s for this Record. Read-only. - * @property fields - * @type Ext.util.MixedCollection - */ - /** - * An object hash representing the data for this Record. Every field name in the Record definition - * is represented by a property of that name in this object. Note that unless you specified a field - * with {@link Ext.data.Field#name name} "id" in the Record definition, this will not contain - * an id property. - * @property data - * @type {Object} - */ - /** - * The unique ID of the Record {@link #Record as specified at construction time}. - * @property id - * @type {Object} - */ - /** - *

      Only present if this Record was created by an {@link Ext.data.XmlReader XmlReader}.

      - *

      The XML element which was the source of the data for this Record.

      - * @property node - * @type {XMLElement} - */ - /** - *

      Only present if this Record was created by an {@link Ext.data.ArrayReader ArrayReader} or a {@link Ext.data.JsonReader JsonReader}.

      - *

      The Array or object which was the source of the data for this Record.

      - * @property json - * @type {Array|Object} - */ - /** - * Readonly flag - true if this Record has been modified. - * @type Boolean - */ - dirty : false, - editing : false, - error : null, - /** - * This object contains a key and value storing the original values of all modified - * fields or is null if no fields have been modified. - * @property modified - * @type {Object} - */ - modified : null, - /** - * true when the record does not yet exist in a server-side database (see - * {@link #markDirty}). Any record which has a real database pk set as its id property - * is NOT a phantom -- it's real. - * @property phantom - * @type {Boolean} - */ - phantom : false, - - // private - join : function(store){ - /** - * The {@link Ext.data.Store} to which this Record belongs. - * @property store - * @type {Ext.data.Store} - */ - this.store = store; - }, - - /** - * Set the {@link Ext.data.Field#name named field} to the specified value. For example: - *
      
      -// record has a field named 'firstname'
      -var Employee = Ext.data.Record.{@link #create}([
      -    {name: 'firstname'},
      -    ...
      -]);
      -
      -// update the 2nd record in the store:
      -var rec = myStore.{@link Ext.data.Store#getAt getAt}(1);
      -
      -// set the value (shows dirty flag):
      -rec.set('firstname', 'Betty');
      -
      -// commit the change (removes dirty flag):
      -rec.{@link #commit}();
      -
      -// update the record in the store, bypass setting dirty flag,
      -// and do not store the change in the {@link Ext.data.Store#getModifiedRecords modified records}
      -rec.{@link #data}['firstname'] = 'Wilma'; // updates record, but not the view
      -rec.{@link #commit}(); // updates the view
      -     * 
      - * Notes:
        - *
      • If the store has a writer and autoSave=true, each set() - * will execute an XHR to the server.
      • - *
      • Use {@link #beginEdit} to prevent the store's update - * event firing while using set().
      • - *
      • Use {@link #endEdit} to have the store's update - * event fire.
      • - *
      - * @param {String} name The {@link Ext.data.Field#name name of the field} to set. - * @param {String/Object/Array} value The value to set the field to. - */ - set : function(name, value){ - var encode = Ext.isPrimitive(value) ? String : Ext.encode; - if(encode(this.data[name]) == encode(value)) { - return; - } - this.dirty = true; - if(!this.modified){ - this.modified = {}; - } - if(this.modified[name] === undefined){ - this.modified[name] = this.data[name]; - } - this.data[name] = value; - if(!this.editing){ - this.afterEdit(); - } - }, - - // private - afterEdit : function(){ - if (this.store != undefined && typeof this.store.afterEdit == "function") { - this.store.afterEdit(this); - } - }, - - // private - afterReject : function(){ - if(this.store){ - this.store.afterReject(this); - } - }, - - // private - afterCommit : function(){ - if(this.store){ - this.store.afterCommit(this); - } - }, - - /** - * Get the value of the {@link Ext.data.Field#name named field}. - * @param {String} name The {@link Ext.data.Field#name name of the field} to get the value of. - * @return {Object} The value of the field. - */ - get : function(name){ - return this.data[name]; - }, - - /** - * Begin an edit. While in edit mode, no events (e.g.. the update event) - * are relayed to the containing store. - * See also: {@link #endEdit} and {@link #cancelEdit}. - */ - beginEdit : function(){ - this.editing = true; - this.modified = this.modified || {}; - }, - - /** - * Cancels all changes made in the current edit operation. - */ - cancelEdit : function(){ - this.editing = false; - delete this.modified; - }, - - /** - * End an edit. If any data was modified, the containing store is notified - * (ie, the store's update event will fire). - */ - endEdit : function(){ - this.editing = false; - if(this.dirty){ - this.afterEdit(); - } - }, - - /** - * Usually called by the {@link Ext.data.Store} which owns the Record. - * Rejects all changes made to the Record since either creation, or the last commit operation. - * Modified fields are reverted to their original values. - *

      Developers should subscribe to the {@link Ext.data.Store#update} event - * to have their code notified of reject operations.

      - * @param {Boolean} silent (optional) True to skip notification of the owning - * store of the change (defaults to false) - */ - reject : function(silent){ - var m = this.modified; - for(var n in m){ - if(typeof m[n] != "function"){ - this.data[n] = m[n]; - } - } - this.dirty = false; - delete this.modified; - this.editing = false; - if(silent !== true){ - this.afterReject(); - } - }, - - /** - * Usually called by the {@link Ext.data.Store} which owns the Record. - * Commits all changes made to the Record since either creation, or the last commit operation. - *

      Developers should subscribe to the {@link Ext.data.Store#update} event - * to have their code notified of commit operations.

      - * @param {Boolean} silent (optional) True to skip notification of the owning - * store of the change (defaults to false) - */ - commit : function(silent){ - this.dirty = false; - delete this.modified; - this.editing = false; - if(silent !== true){ - this.afterCommit(); - } - }, - - /** - * Gets a hash of only the fields that have been modified since this Record was created or commited. - * @return Object - */ - getChanges : function(){ - var m = this.modified, cs = {}; - for(var n in m){ - if(m.hasOwnProperty(n)){ - cs[n] = this.data[n]; - } - } - return cs; - }, - - // private - hasError : function(){ - return this.error !== null; - }, - - // private - clearError : function(){ - this.error = null; - }, - - /** - * Creates a copy (clone) of this Record. - * @param {String} id (optional) A new Record id, defaults to the id - * of the record being copied. See {@link #id}. - * To generate a phantom record with a new id use:
      
      -var rec = record.copy(); // clone the record
      -Ext.data.Record.id(rec); // automatically generate a unique sequential id
      -     * 
      - * @return {Record} - */ - copy : function(newId) { - return new this.constructor(Ext.apply({}, this.data), newId || this.id); - }, - - /** - * Returns true if the passed field name has been {@link #modified} - * since the load or last commit. - * @param {String} fieldName {@link Ext.data.Field.{@link Ext.data.Field#name} - * @return {Boolean} - */ - isModified : function(fieldName){ - return !!(this.modified && this.modified.hasOwnProperty(fieldName)); - }, - - /** - * By default returns false if any {@link Ext.data.Field field} within the - * record configured with {@link Ext.data.Field#allowBlank} = false returns - * true from an {@link Ext}.{@link Ext#isEmpty isempty} test. - * @return {Boolean} - */ - isValid : function() { - return this.fields.find(function(f) { - return (f.allowBlank === false && Ext.isEmpty(this.data[f.name])) ? true : false; - },this) ? false : true; - }, - - /** - *

      Marks this Record as {@link #dirty}. This method - * is used interally when adding {@link #phantom} records to a - * {@link Ext.data.Store#writer writer enabled store}.

      - *

      Marking a record {@link #dirty} causes the phantom to - * be returned by {@link Ext.data.Store#getModifiedRecords} where it will - * have a create action composed for it during {@link Ext.data.Store#save store save} - * operations.

      - */ - markDirty : function(){ - this.dirty = true; - if(!this.modified){ - this.modified = {}; - } - this.fields.each(function(f) { - this.modified[f.name] = this.data[f.name]; - },this); - } -}; -/** - * @class Ext.StoreMgr - * @extends Ext.util.MixedCollection - * The default global group of stores. - * @singleton - */ -Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), { - /** - * @cfg {Object} listeners @hide - */ - - /** - * Registers one or more Stores with the StoreMgr. You do not normally need to register stores - * manually. Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered. - * @param {Ext.data.Store} store1 A Store instance - * @param {Ext.data.Store} store2 (optional) - * @param {Ext.data.Store} etc... (optional) - */ - register : function(){ - for(var i = 0, s; (s = arguments[i]); i++){ - this.add(s); - } - }, - - /** - * Unregisters one or more Stores with the StoreMgr - * @param {String/Object} id1 The id of the Store, or a Store instance - * @param {String/Object} id2 (optional) - * @param {String/Object} etc... (optional) - */ - unregister : function(){ - for(var i = 0, s; (s = arguments[i]); i++){ - this.remove(this.lookup(s)); - } - }, - - /** - * Gets a registered Store by id - * @param {String/Object} id The id of the Store, or a Store instance - * @return {Ext.data.Store} - */ - lookup : function(id){ - if(Ext.isArray(id)){ - var fields = ['field1'], expand = !Ext.isArray(id[0]); - if(!expand){ - for(var i = 2, len = id[0].length; i <= len; ++i){ - fields.push('field' + i); - } - } - return new Ext.data.ArrayStore({ - fields: fields, - data: id, - expandData: expand, - autoDestroy: true, - autoCreated: true - - }); - } - return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id); - }, - - // getKey implementation for MixedCollection - getKey : function(o){ - return o.storeId; - } -});/** - * @class Ext.data.Store - * @extends Ext.util.Observable - *

      The Store class encapsulates a client side cache of {@link Ext.data.Record Record} - * objects which provide input data for Components such as the {@link Ext.grid.GridPanel GridPanel}, - * the {@link Ext.form.ComboBox ComboBox}, or the {@link Ext.DataView DataView}.

      - *

      Retrieving Data

      - *

      A Store object may access a data object using:

        - *
      • {@link #proxy configured implementation} of {@link Ext.data.DataProxy DataProxy}
      • - *
      • {@link #data} to automatically pass in data
      • - *
      • {@link #loadData} to manually pass in data
      • - *

      - *

      Reading Data

      - *

      A Store object has no inherent knowledge of the format of the data object (it could be - * an Array, XML, or JSON). A Store object uses an appropriate {@link #reader configured implementation} - * of a {@link Ext.data.DataReader DataReader} to create {@link Ext.data.Record Record} instances from the data - * object.

      - *

      Store Types

      - *

      There are several implementations of Store available which are customized for use with - * a specific DataReader implementation. Here is an example using an ArrayStore which implicitly - * creates a reader commensurate to an Array data object.

      - *
      
      -var myStore = new Ext.data.ArrayStore({
      -    fields: ['fullname', 'first'],
      -    idIndex: 0 // id for each record will be the first element
      -});
      - * 
      - *

      For custom implementations create a basic {@link Ext.data.Store} configured as needed:

      - *
      
      -// create a {@link Ext.data.Record Record} constructor:
      -var rt = Ext.data.Record.create([
      -    {name: 'fullname'},
      -    {name: 'first'}
      -]);
      -var myStore = new Ext.data.Store({
      -    // explicitly create reader
      -    reader: new Ext.data.ArrayReader(
      -        {
      -            idIndex: 0  // id for each record will be the first element
      -        },
      -        rt // recordType
      -    )
      -});
      - * 
      - *

      Load some data into store (note the data object is an array which corresponds to the reader):

      - *
      
      -var myData = [
      -    [1, 'Fred Flintstone', 'Fred'],  // note that id for the record is the first element
      -    [2, 'Barney Rubble', 'Barney']
      -];
      -myStore.loadData(myData);
      - * 
      - *

      Records are cached and made available through accessor functions. An example of adding - * a record to the store:

      - *
      
      -var defaultData = {
      -    fullname: 'Full Name',
      -    first: 'First Name'
      -};
      -var recId = 100; // provide unique id for the record
      -var r = new myStore.recordType(defaultData, ++recId); // create new record
      -myStore.{@link #insert}(0, r); // insert a new record into the store (also see {@link #add})
      - * 
      - *

      Writing Data

      - *

      And new in Ext version 3, use the new {@link Ext.data.DataWriter DataWriter} to create an automated, Writable Store - * along with RESTful features. - * @constructor - * Creates a new Store. - * @param {Object} config A config object containing the objects needed for the Store to access data, - * and read the data into Records. - * @xtype store - */ -Ext.data.Store = Ext.extend(Ext.util.Observable, { - /** - * @cfg {String} storeId If passed, the id to use to register with the {@link Ext.StoreMgr StoreMgr}. - *

      Note: if a (deprecated) {@link #id} is specified it will supersede the storeId - * assignment.

      - */ - /** - * @cfg {String} url If a {@link #proxy} is not specified the url will be used to - * implicitly configure a {@link Ext.data.HttpProxy HttpProxy} if an url is specified. - * Typically this option, or the {@link #data} option will be specified. - */ - /** - * @cfg {Boolean/Object} autoLoad If {@link #data} is not specified, and if autoLoad - * is true or an Object, this store's {@link #load} method is automatically called - * after creation. If the value of autoLoad is an Object, this Object will - * be passed to the store's {@link #load} method. - */ - /** - * @cfg {Ext.data.DataProxy} proxy The {@link Ext.data.DataProxy DataProxy} object which provides - * access to a data object. See {@link #url}. - */ - /** - * @cfg {Array} data An inline data object readable by the {@link #reader}. - * Typically this option, or the {@link #url} option will be specified. - */ - /** - * @cfg {Ext.data.DataReader} reader The {@link Ext.data.DataReader Reader} object which processes the - * data object and returns an Array of {@link Ext.data.Record} objects which are cached keyed by their - * {@link Ext.data.Record#id id} property. - */ - /** - * @cfg {Ext.data.DataWriter} writer - *

      The {@link Ext.data.DataWriter Writer} object which processes a record object for being written - * to the server-side database.

      - *

      When a writer is installed into a Store the {@link #add}, {@link #remove}, and {@link #update} - * events on the store are monitored in order to remotely {@link #createRecords create records}, - * {@link #destroyRecord destroy records}, or {@link #updateRecord update records}.

      - *

      The proxy for this store will relay any {@link #writexception} events to this store.

      - *

      Sample implementation: - *

      
      -var writer = new {@link Ext.data.JsonWriter}({
      -    encode: true,
      -    writeAllFields: true // write all fields, not just those that changed
      -});
      -
      -// Typical Store collecting the Proxy, Reader and Writer together.
      -var store = new Ext.data.Store({
      -    storeId: 'user',
      -    root: 'records',
      -    proxy: proxy,
      -    reader: reader,
      -    writer: writer,     // <-- plug a DataWriter into the store just as you would a Reader
      -    paramsAsHash: true,
      -    autoSave: false    // <-- false to delay executing create, update, destroy requests
      -                        //     until specifically told to do so.
      -});
      -     * 

      - */ - writer : undefined, - /** - * @cfg {Object} baseParams - *

      An object containing properties which are to be sent as parameters - * for every HTTP request.

      - *

      Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.

      - *

      Note: baseParams may be superseded by any params - * specified in a {@link #load} request, see {@link #load} - * for more details.

      - * This property may be modified after creation using the {@link #setBaseParam} - * method. - * @property - */ - /** - * @cfg {Object} sortInfo A config object to specify the sort order in the request of a Store's - * {@link #load} operation. Note that for local sorting, the direction property is - * case-sensitive. See also {@link #remoteSort} and {@link #paramNames}. - * For example:
      
      -sortInfo: {
      -    field: 'fieldName',
      -    direction: 'ASC' // or 'DESC' (case sensitive for local sorting)
      -}
      -
      - */ - /** - * @cfg {boolean} remoteSort true if sorting is to be handled by requesting the {@link #proxy Proxy} - * to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache - * in place (defaults to false). - *

      If remoteSort is true, then clicking on a {@link Ext.grid.Column Grid Column}'s - * {@link Ext.grid.Column#header header} causes the current page to be requested from the server appending - * the following two parameters to the {@link #load params}:

        - *
      • sort : String

        The name (as specified in the Record's - * {@link Ext.data.Field Field definition}) of the field to sort on.

      • - *
      • dir : String

        The direction of the sort, 'ASC' or 'DESC' (case-sensitive).

      • - *

      - */ - remoteSort : false, - - /** - * @cfg {Boolean} autoDestroy true to destroy the store when the component the store is bound - * to is destroyed (defaults to false). - *

      Note: this should be set to true when using stores that are bound to only 1 component.

      - */ - autoDestroy : false, - - /** - * @cfg {Boolean} pruneModifiedRecords true to clear all modified record information each time - * the store is loaded or when a record is removed (defaults to false). See {@link #getModifiedRecords} - * for the accessor method to retrieve the modified records. - */ - pruneModifiedRecords : false, - - /** - * Contains the last options object used as the parameter to the {@link #load} method. See {@link #load} - * for the details of what this may contain. This may be useful for accessing any params which were used - * to load the current Record cache. - * @property - */ - lastOptions : null, - - /** - * @cfg {Boolean} autoSave - *

      Defaults to true causing the store to automatically {@link #save} records to - * the server when a record is modified (ie: becomes 'dirty'). Specify false to manually call {@link #save} - * to send all modifiedRecords to the server.

      - *

      Note: each CRUD action will be sent as a separate request.

      - */ - autoSave : true, - - /** - * @cfg {Boolean} batch - *

      Defaults to true (unless {@link #restful}:true). Multiple - * requests for each CRUD action (CREATE, READ, UPDATE and DESTROY) will be combined - * and sent as one transaction. Only applies when {@link #autoSave} is set - * to false.

      - *

      If Store is RESTful, the DataProxy is also RESTful, and a unique transaction is - * generated for each record.

      - */ - batch : true, - - /** - * @cfg {Boolean} restful - * Defaults to false. Set to true to have the Store and the set - * Proxy operate in a RESTful manner. The store will automatically generate GET, POST, - * PUT and DELETE requests to the server. The HTTP method used for any given CRUD - * action is described in {@link Ext.data.Api#restActions}. For additional information - * see {@link Ext.data.DataProxy#restful}. - *

      Note: if {@link #restful}:true batch will - * internally be set to false.

      - */ - restful: false, - - /** - * @cfg {Object} paramNames - *

      An object containing properties which specify the names of the paging and - * sorting parameters passed to remote servers when loading blocks of data. By default, this - * object takes the following form:

      
      -{
      -    start : 'start',  // The parameter name which specifies the start row
      -    limit : 'limit',  // The parameter name which specifies number of rows to return
      -    sort : 'sort',    // The parameter name which specifies the column to sort on
      -    dir : 'dir'       // The parameter name which specifies the sort direction
      -}
      -
      - *

      The server must produce the requested data block upon receipt of these parameter names. - * If different parameter names are required, this property can be overriden using a configuration - * property.

      - *

      A {@link Ext.PagingToolbar PagingToolbar} bound to this Store uses this property to determine - * the parameter names to use in its {@link #load requests}. - */ - paramNames : undefined, - - /** - * @cfg {Object} defaultParamNames - * Provides the default values for the {@link #paramNames} property. To globally modify the parameters - * for all stores, this object should be changed on the store prototype. - */ - defaultParamNames : { - start : 'start', - limit : 'limit', - sort : 'sort', - dir : 'dir' - }, - - isDestroyed: false, - hasMultiSort: false, - - // private - batchKey : '_ext_batch_', - - constructor : function(config){ - /** - * @property multiSort - * @type Boolean - * True if this store is currently sorted by more than one field/direction combination. - */ - - /** - * @property isDestroyed - * @type Boolean - * True if the store has been destroyed already. Read only - */ - - this.data = new Ext.util.MixedCollection(false); - this.data.getKey = function(o){ - return o.id; - }; - - - // temporary removed-records cache - this.removed = []; - - if(config && config.data){ - this.inlineData = config.data; - delete config.data; - } - - Ext.apply(this, config); - - /** - * See the {@link #baseParams corresponding configuration option} - * for a description of this property. - * To modify this property see {@link #setBaseParam}. - * @property - */ - this.baseParams = Ext.isObject(this.baseParams) ? this.baseParams : {}; - - this.paramNames = Ext.applyIf(this.paramNames || {}, this.defaultParamNames); - - if((this.url || this.api) && !this.proxy){ - this.proxy = new Ext.data.HttpProxy({url: this.url, api: this.api}); - } - // If Store is RESTful, so too is the DataProxy - if (this.restful === true && this.proxy) { - // When operating RESTfully, a unique transaction is generated for each record. - // TODO might want to allow implemention of faux REST where batch is possible using RESTful routes only. - this.batch = false; - Ext.data.Api.restify(this.proxy); - } - - if(this.reader){ // reader passed - if(!this.recordType){ - this.recordType = this.reader.recordType; - } - if(this.reader.onMetaChange){ - this.reader.onMetaChange = this.reader.onMetaChange.createSequence(this.onMetaChange, this); - } - if (this.writer) { // writer passed - if (this.writer instanceof(Ext.data.DataWriter) === false) { // <-- config-object instead of instance. - this.writer = this.buildWriter(this.writer); - } - this.writer.meta = this.reader.meta; - this.pruneModifiedRecords = true; - } - } - - /** - * The {@link Ext.data.Record Record} constructor as supplied to (or created by) the - * {@link Ext.data.DataReader Reader}. Read-only. - *

      If the Reader was constructed by passing in an Array of {@link Ext.data.Field} definition objects, - * instead of a Record constructor, it will implicitly create a Record constructor from that Array (see - * {@link Ext.data.Record}.{@link Ext.data.Record#create create} for additional details).

      - *

      This property may be used to create new Records of the type held in this Store, for example:

      
      -    // create the data store
      -    var store = new Ext.data.ArrayStore({
      -        autoDestroy: true,
      -        fields: [
      -           {name: 'company'},
      -           {name: 'price', type: 'float'},
      -           {name: 'change', type: 'float'},
      -           {name: 'pctChange', type: 'float'},
      -           {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
      -        ]
      -    });
      -    store.loadData(myData);
      -
      -    // create the Grid
      -    var grid = new Ext.grid.EditorGridPanel({
      -        store: store,
      -        colModel: new Ext.grid.ColumnModel({
      -            columns: [
      -                {id:'company', header: 'Company', width: 160, dataIndex: 'company'},
      -                {header: 'Price', renderer: 'usMoney', dataIndex: 'price'},
      -                {header: 'Change', renderer: change, dataIndex: 'change'},
      -                {header: '% Change', renderer: pctChange, dataIndex: 'pctChange'},
      -                {header: 'Last Updated', width: 85,
      -                    renderer: Ext.util.Format.dateRenderer('m/d/Y'),
      -                    dataIndex: 'lastChange'}
      -            ],
      -            defaults: {
      -                sortable: true,
      -                width: 75
      -            }
      -        }),
      -        autoExpandColumn: 'company', // match the id specified in the column model
      -        height:350,
      -        width:600,
      -        title:'Array Grid',
      -        tbar: [{
      -            text: 'Add Record',
      -            handler : function(){
      -                var defaultData = {
      -                    change: 0,
      -                    company: 'New Company',
      -                    lastChange: (new Date()).clearTime(),
      -                    pctChange: 0,
      -                    price: 10
      -                };
      -                var recId = 3; // provide unique id
      -                var p = new store.recordType(defaultData, recId); // create new record
      -                grid.stopEditing();
      -                store.{@link #insert}(0, p); // insert a new record into the store (also see {@link #add})
      -                grid.startEditing(0, 0);
      -            }
      -        }]
      -    });
      -         * 
      - * @property recordType - * @type Function - */ - - if(this.recordType){ - /** - * A {@link Ext.util.MixedCollection MixedCollection} containing the defined {@link Ext.data.Field Field}s - * for the {@link Ext.data.Record Records} stored in this Store. Read-only. - * @property fields - * @type Ext.util.MixedCollection - */ - this.fields = this.recordType.prototype.fields; - } - this.modified = []; - - this.addEvents( - /** - * @event datachanged - * Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a - * widget that is using this Store as a Record cache should refresh its view. - * @param {Store} this - */ - 'datachanged', - /** - * @event metachange - * Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders. - * @param {Store} this - * @param {Object} meta The JSON metadata - */ - 'metachange', - /** - * @event add - * Fires when Records have been {@link #add}ed to the Store - * @param {Store} this - * @param {Ext.data.Record[]} records The array of Records added - * @param {Number} index The index at which the record(s) were added - */ - 'add', - /** - * @event remove - * Fires when a Record has been {@link #remove}d from the Store - * @param {Store} this - * @param {Ext.data.Record} record The Record that was removed - * @param {Number} index The index at which the record was removed - */ - 'remove', - /** - * @event update - * Fires when a Record has been updated - * @param {Store} this - * @param {Ext.data.Record} record The Record that was updated - * @param {String} operation The update operation being performed. Value may be one of: - *
      
      -     Ext.data.Record.EDIT
      -     Ext.data.Record.REJECT
      -     Ext.data.Record.COMMIT
      -             * 
      - */ - 'update', - /** - * @event clear - * Fires when the data cache has been cleared. - * @param {Store} this - * @param {Record[]} records The records that were cleared. - */ - 'clear', - /** - * @event exception - *

      Fires if an exception occurs in the Proxy during a remote request. - * This event is relayed through the corresponding {@link Ext.data.DataProxy}. - * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception} - * for additional details. - * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception} - * for description. - */ - 'exception', - /** - * @event beforeload - * Fires before a request is made for a new data object. If the beforeload handler returns - * false the {@link #load} action will be canceled. - * @param {Store} this - * @param {Object} options The loading options that were specified (see {@link #load} for details) - */ - 'beforeload', - /** - * @event load - * Fires after a new set of Records has been loaded. - * @param {Store} this - * @param {Ext.data.Record[]} records The Records that were loaded - * @param {Object} options The loading options that were specified (see {@link #load} for details) - */ - 'load', - /** - * @event loadexception - *

      This event is deprecated in favor of the catch-all {@link #exception} - * event instead.

      - *

      This event is relayed through the corresponding {@link Ext.data.DataProxy}. - * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception} - * for additional details. - * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception} - * for description. - */ - 'loadexception', - /** - * @event beforewrite - * @param {Ext.data.Store} store - * @param {String} action [Ext.data.Api.actions.create|update|destroy] - * @param {Record/Record[]} rs The Record(s) being written. - * @param {Object} options The loading options that were specified. Edit options.params to add Http parameters to the request. (see {@link #save} for details) - * @param {Object} arg The callback's arg object passed to the {@link #request} function - */ - 'beforewrite', - /** - * @event write - * Fires if the server returns 200 after an Ext.data.Api.actions CRUD action. - * Success of the action is determined in the result['successProperty']property (NOTE for RESTful stores, - * a simple 20x response is sufficient for the actions "destroy" and "update". The "create" action should should return 200 along with a database pk). - * @param {Ext.data.Store} store - * @param {String} action [Ext.data.Api.actions.create|update|destroy] - * @param {Object} result The 'data' picked-out out of the response for convenience. - * @param {Ext.Direct.Transaction} res - * @param {Record/Record[]} rs Store's records, the subject(s) of the write-action - */ - 'write', - /** - * @event beforesave - * Fires before a save action is called. A save encompasses destroying records, updating records and creating records. - * @param {Ext.data.Store} store - * @param {Object} data An object containing the data that is to be saved. The object will contain a key for each appropriate action, - * with an array of records for each action. - */ - 'beforesave', - /** - * @event save - * Fires after a save is completed. A save encompasses destroying records, updating records and creating records. - * @param {Ext.data.Store} store - * @param {Number} batch The identifier for the batch that was saved. - * @param {Object} data An object containing the data that is to be saved. The object will contain a key for each appropriate action, - * with an array of records for each action. - */ - 'save' - - ); - - if(this.proxy){ - // TODO remove deprecated loadexception with ext-3.0.1 - this.relayEvents(this.proxy, ['loadexception', 'exception']); - } - // With a writer set for the Store, we want to listen to add/remove events to remotely create/destroy records. - if (this.writer) { - this.on({ - scope: this, - add: this.createRecords, - remove: this.destroyRecord, - update: this.updateRecord, - clear: this.onClear - }); - } - - this.sortToggle = {}; - if(this.sortField){ - this.setDefaultSort(this.sortField, this.sortDir); - }else if(this.sortInfo){ - this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction); - } - - Ext.data.Store.superclass.constructor.call(this); - - if(this.id){ - this.storeId = this.id; - delete this.id; - } - if(this.storeId){ - Ext.StoreMgr.register(this); - } - if(this.inlineData){ - this.loadData(this.inlineData); - delete this.inlineData; - }else if(this.autoLoad){ - this.load.defer(10, this, [ - typeof this.autoLoad == 'object' ? - this.autoLoad : undefined]); - } - // used internally to uniquely identify a batch - this.batchCounter = 0; - this.batches = {}; - }, - - /** - * builds a DataWriter instance when Store constructor is provided with a writer config-object instead of an instace. - * @param {Object} config Writer configuration - * @return {Ext.data.DataWriter} - * @private - */ - buildWriter : function(config) { - var klass = undefined, - type = (config.format || 'json').toLowerCase(); - switch (type) { - case 'json': - klass = Ext.data.JsonWriter; - break; - case 'xml': - klass = Ext.data.XmlWriter; - break; - default: - klass = Ext.data.JsonWriter; - } - return new klass(config); - }, - - /** - * Destroys the store. - */ - destroy : function(){ - if(!this.isDestroyed){ - if(this.storeId){ - Ext.StoreMgr.unregister(this); - } - this.clearData(); - this.data = null; - Ext.destroy(this.proxy); - this.reader = this.writer = null; - this.purgeListeners(); - this.isDestroyed = true; - } - }, - - /** - * Add Records to the Store and fires the {@link #add} event. To add Records - * to the store from a remote source use {@link #load}({add:true}). - * See also {@link #recordType} and {@link #insert}. - * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects - * to add to the cache. See {@link #recordType}. - */ - add : function(records) { - var i, len, record, index; - - records = [].concat(records); - if (records.length < 1) { - return; - } - - for (i = 0, len = records.length; i < len; i++) { - record = records[i]; - - record.join(this); - - if (record.dirty || record.phantom) { - this.modified.push(record); - } - } - - index = this.data.length; - this.data.addAll(records); - - if (this.snapshot) { - this.snapshot.addAll(records); - } - - this.fireEvent('add', this, records, index); - }, - - /** - * (Local sort only) Inserts the passed Record into the Store at the index where it - * should go based on the current sort information. - * @param {Ext.data.Record} record - */ - addSorted : function(record){ - var index = this.findInsertIndex(record); - this.insert(index, record); - }, - - /** - * @private - * Update a record within the store with a new reference - */ - doUpdate: function(rec){ - var id = rec.id; - // unjoin the old record - this.getById(id).join(null); - - this.data.replace(id, rec); - if (this.snapshot) { - this.snapshot.replace(id, rec); - } - rec.join(this); - this.fireEvent('update', this, rec, Ext.data.Record.COMMIT); - }, - - /** - * Remove Records from the Store and fires the {@link #remove} event. - * @param {Ext.data.Record/Ext.data.Record[]} record The record object or array of records to remove from the cache. - */ - remove : function(record){ - if(Ext.isArray(record)){ - Ext.each(record, function(r){ - this.remove(r); - }, this); - return; - } - var index = this.data.indexOf(record); - if(index > -1){ - record.join(null); - this.data.removeAt(index); - } - if(this.pruneModifiedRecords){ - this.modified.remove(record); - } - if(this.snapshot){ - this.snapshot.remove(record); - } - if(index > -1){ - this.fireEvent('remove', this, record, index); - } - }, - - /** - * Remove a Record from the Store at the specified index. Fires the {@link #remove} event. - * @param {Number} index The index of the record to remove. - */ - removeAt : function(index){ - this.remove(this.getAt(index)); - }, - - /** - * Remove all Records from the Store and fires the {@link #clear} event. - * @param {Boolean} silent [false] Defaults to false. Set true to not fire clear event. - */ - removeAll : function(silent){ - var items = []; - this.each(function(rec){ - items.push(rec); - }); - this.clearData(); - if(this.snapshot){ - this.snapshot.clear(); - } - if(this.pruneModifiedRecords){ - this.modified = []; - } - if (silent !== true) { // <-- prevents write-actions when we just want to clear a store. - this.fireEvent('clear', this, items); - } - }, - - // private - onClear: function(store, records){ - Ext.each(records, function(rec, index){ - this.destroyRecord(this, rec, index); - }, this); - }, - - /** - * Inserts Records into the Store at the given index and fires the {@link #add} event. - * See also {@link #add} and {@link #addSorted}. - * @param {Number} index The start index at which to insert the passed Records. - * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects to add to the cache. - */ - insert : function(index, records) { - var i, len, record; - - records = [].concat(records); - for (i = 0, len = records.length; i < len; i++) { - record = records[i]; - - this.data.insert(index + i, record); - record.join(this); - - if (record.dirty || record.phantom) { - this.modified.push(record); - } - } - - if (this.snapshot) { - this.snapshot.addAll(records); - } - - this.fireEvent('add', this, records, index); - }, - - /** - * Get the index within the cache of the passed Record. - * @param {Ext.data.Record} record The Ext.data.Record object to find. - * @return {Number} The index of the passed Record. Returns -1 if not found. - */ - indexOf : function(record){ - return this.data.indexOf(record); - }, - - /** - * Get the index within the cache of the Record with the passed id. - * @param {String} id The id of the Record to find. - * @return {Number} The index of the Record. Returns -1 if not found. - */ - indexOfId : function(id){ - return this.data.indexOfKey(id); - }, - - /** - * Get the Record with the specified id. - * @param {String} id The id of the Record to find. - * @return {Ext.data.Record} The Record with the passed id. Returns undefined if not found. - */ - getById : function(id){ - return (this.snapshot || this.data).key(id); - }, - - /** - * Get the Record at the specified index. - * @param {Number} index The index of the Record to find. - * @return {Ext.data.Record} The Record at the passed index. Returns undefined if not found. - */ - getAt : function(index){ - return this.data.itemAt(index); - }, - - /** - * Returns a range of Records between specified indices. - * @param {Number} startIndex (optional) The starting index (defaults to 0) - * @param {Number} endIndex (optional) The ending index (defaults to the last Record in the Store) - * @return {Ext.data.Record[]} An array of Records - */ - getRange : function(start, end){ - return this.data.getRange(start, end); - }, - - // private - storeOptions : function(o){ - o = Ext.apply({}, o); - delete o.callback; - delete o.scope; - this.lastOptions = o; - }, - - // private - clearData: function(){ - this.data.each(function(rec) { - rec.join(null); - }); - this.data.clear(); - }, - - /** - *

      Loads the Record cache from the configured {@link #proxy} using the configured {@link #reader}.

      - *

      Notes:

        - *
      • Important: loading is asynchronous! This call will return before the new data has been - * loaded. To perform any post-processing where information from the load call is required, specify - * the callback function to be called, or use a {@link Ext.util.Observable#listeners a 'load' event handler}.
      • - *
      • If using {@link Ext.PagingToolbar remote paging}, the first load call must specify the start and limit - * properties in the options.params property to establish the initial position within the - * dataset, and the number of Records to cache on each read from the Proxy.
      • - *
      • If using {@link #remoteSort remote sorting}, the configured {@link #sortInfo} - * will be automatically included with the posted parameters according to the specified - * {@link #paramNames}.
      • - *
      - * @param {Object} options An object containing properties which control loading options:
        - *
      • params :Object

        An object containing properties to pass as HTTP - * parameters to a remote data source. Note: params will override any - * {@link #baseParams} of the same name.

        - *

        Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.

      • - *
      • callback : Function

        A function to be called after the Records - * have been loaded. The callback is called after the load event is fired, and is passed the following arguments:

          - *
        • r : Ext.data.Record[] An Array of Records loaded.
        • - *
        • options : Options object from the load call.
        • - *
        • success : Boolean success indicator.

      • - *
      • scope : Object

        Scope with which to call the callback (defaults - * to the Store object)

      • - *
      • add : Boolean

        Indicator to append loaded records rather than - * replace the current cache. Note: see note for {@link #loadData}

      • - *
      - * @return {Boolean} If the developer provided {@link #beforeload} event handler returns - * false, the load call will abort and will return false; otherwise will return true. - */ - load : function(options) { - options = Ext.apply({}, options); - this.storeOptions(options); - if(this.sortInfo && this.remoteSort){ - var pn = this.paramNames; - options.params = Ext.apply({}, options.params); - options.params[pn.sort] = this.sortInfo.field; - options.params[pn.dir] = this.sortInfo.direction; - } - try { - return this.execute('read', null, options); // <-- null represents rs. No rs for load actions. - } catch(e) { - this.handleException(e); - return false; - } - }, - - /** - * updateRecord Should not be used directly. This method will be called automatically if a Writer is set. - * Listens to 'update' event. - * @param {Object} store - * @param {Object} record - * @param {Object} action - * @private - */ - updateRecord : function(store, record, action) { - if (action == Ext.data.Record.EDIT && this.autoSave === true && (!record.phantom || (record.phantom && record.isValid()))) { - this.save(); - } - }, - - /** - * @private - * Should not be used directly. Store#add will call this automatically if a Writer is set - * @param {Object} store - * @param {Object} records - * @param {Object} index - */ - createRecords : function(store, records, index) { - var modified = this.modified, - length = records.length, - record, i; - - for (i = 0; i < length; i++) { - record = records[i]; - - if (record.phantom && record.isValid()) { - record.markDirty(); // <-- Mark new records dirty (Ed: why?) - - if (modified.indexOf(record) == -1) { - modified.push(record); - } - } - } - if (this.autoSave === true) { - this.save(); - } - }, - - /** - * Destroys a Record. Should not be used directly. It's called by Store#remove if a Writer is set. - * @param {Store} store this - * @param {Ext.data.Record} record - * @param {Number} index - * @private - */ - destroyRecord : function(store, record, index) { - if (this.modified.indexOf(record) != -1) { // <-- handled already if @cfg pruneModifiedRecords == true - this.modified.remove(record); - } - if (!record.phantom) { - this.removed.push(record); - - // since the record has already been removed from the store but the server request has not yet been executed, - // must keep track of the last known index this record existed. If a server error occurs, the record can be - // put back into the store. @see Store#createCallback where the record is returned when response status === false - record.lastIndex = index; - - if (this.autoSave === true) { - this.save(); - } - } - }, - - /** - * This method should generally not be used directly. This method is called internally - * by {@link #load}, or if a Writer is set will be called automatically when {@link #add}, - * {@link #remove}, or {@link #update} events fire. - * @param {String} action Action name ('read', 'create', 'update', or 'destroy') - * @param {Record/Record[]} rs - * @param {Object} options - * @throws Error - * @private - */ - execute : function(action, rs, options, /* private */ batch) { - // blow up if action not Ext.data.CREATE, READ, UPDATE, DESTROY - if (!Ext.data.Api.isAction(action)) { - throw new Ext.data.Api.Error('execute', action); - } - // make sure options has a fresh, new params hash - options = Ext.applyIf(options||{}, { - params: {} - }); - if(batch !== undefined){ - this.addToBatch(batch); - } - // have to separate before-events since load has a different signature than create,destroy and save events since load does not - // include the rs (record resultset) parameter. Capture return values from the beforeaction into doRequest flag. - var doRequest = true; - - if (action === 'read') { - doRequest = this.fireEvent('beforeload', this, options); - Ext.applyIf(options.params, this.baseParams); - } - else { - // if Writer is configured as listful, force single-record rs to be [{}] instead of {} - // TODO Move listful rendering into DataWriter where the @cfg is defined. Should be easy now. - if (this.writer.listful === true && this.restful !== true) { - rs = (Ext.isArray(rs)) ? rs : [rs]; - } - // if rs has just a single record, shift it off so that Writer writes data as '{}' rather than '[{}]' - else if (Ext.isArray(rs) && rs.length == 1) { - rs = rs.shift(); - } - // Write the action to options.params - if ((doRequest = this.fireEvent('beforewrite', this, action, rs, options)) !== false) { - this.writer.apply(options.params, this.baseParams, action, rs); - } - } - if (doRequest !== false) { - // Send request to proxy. - if (this.writer && this.proxy.url && !this.proxy.restful && !Ext.data.Api.hasUniqueUrl(this.proxy, action)) { - options.params.xaction = action; // <-- really old, probaby unecessary. - } - // Note: Up until this point we've been dealing with 'action' as a key from Ext.data.Api.actions. - // We'll flip it now and send the value into DataProxy#request, since it's the value which maps to - // the user's configured DataProxy#api - // TODO Refactor all Proxies to accept an instance of Ext.data.Request (not yet defined) instead of this looooooong list - // of params. This method is an artifact from Ext2. - this.proxy.request(Ext.data.Api.actions[action], rs, options.params, this.reader, this.createCallback(action, rs, batch), this, options); - } - return doRequest; - }, - - /** - * Saves all pending changes to the store. If the commensurate Ext.data.Api.actions action is not configured, then - * the configured {@link #url} will be used. - *
      -     * change            url
      -     * ---------------   --------------------
      -     * removed records   Ext.data.Api.actions.destroy
      -     * phantom records   Ext.data.Api.actions.create
      -     * {@link #getModifiedRecords modified records}  Ext.data.Api.actions.update
      -     * 
      - * @TODO: Create extensions of Error class and send associated Record with thrown exceptions. - * e.g.: Ext.data.DataReader.Error or Ext.data.Error or Ext.data.DataProxy.Error, etc. - * @return {Number} batch Returns a number to uniquely identify the "batch" of saves occurring. -1 will be returned - * if there are no items to save or the save was cancelled. - */ - save : function() { - if (!this.writer) { - throw new Ext.data.Store.Error('writer-undefined'); - } - - var queue = [], - len, - trans, - batch, - data = {}, - i; - // DESTROY: First check for removed records. Records in this.removed are guaranteed non-phantoms. @see Store#remove - if(this.removed.length){ - queue.push(['destroy', this.removed]); - } - - // Check for modified records. Use a copy so Store#rejectChanges will work if server returns error. - var rs = [].concat(this.getModifiedRecords()); - if(rs.length){ - // CREATE: Next check for phantoms within rs. splice-off and execute create. - var phantoms = []; - for(i = rs.length-1; i >= 0; i--){ - if(rs[i].phantom === true){ - var rec = rs.splice(i, 1).shift(); - if(rec.isValid()){ - phantoms.push(rec); - } - }else if(!rs[i].isValid()){ // <-- while we're here, splice-off any !isValid real records - rs.splice(i,1); - } - } - // If we have valid phantoms, create them... - if(phantoms.length){ - queue.push(['create', phantoms]); - } - - // UPDATE: And finally, if we're still here after splicing-off phantoms and !isValid real records, update the rest... - if(rs.length){ - queue.push(['update', rs]); - } - } - len = queue.length; - if(len){ - batch = ++this.batchCounter; - for(i = 0; i < len; ++i){ - trans = queue[i]; - data[trans[0]] = trans[1]; - } - if(this.fireEvent('beforesave', this, data) !== false){ - for(i = 0; i < len; ++i){ - trans = queue[i]; - this.doTransaction(trans[0], trans[1], batch); - } - return batch; - } - } - return -1; - }, - - // private. Simply wraps call to Store#execute in try/catch. Defers to Store#handleException on error. Loops if batch: false - doTransaction : function(action, rs, batch) { - function transaction(records) { - try{ - this.execute(action, records, undefined, batch); - }catch (e){ - this.handleException(e); - } - } - if(this.batch === false){ - for(var i = 0, len = rs.length; i < len; i++){ - transaction.call(this, rs[i]); - } - }else{ - transaction.call(this, rs); - } - }, - - // private - addToBatch : function(batch){ - var b = this.batches, - key = this.batchKey + batch, - o = b[key]; - - if(!o){ - b[key] = o = { - id: batch, - count: 0, - data: {} - }; - } - ++o.count; - }, - - removeFromBatch : function(batch, action, data){ - var b = this.batches, - key = this.batchKey + batch, - o = b[key], - arr; - - - if(o){ - arr = o.data[action] || []; - o.data[action] = arr.concat(data); - if(o.count === 1){ - data = o.data; - delete b[key]; - this.fireEvent('save', this, batch, data); - }else{ - --o.count; - } - } - }, - - // @private callback-handler for remote CRUD actions - // Do not override -- override loadRecords, onCreateRecords, onDestroyRecords and onUpdateRecords instead. - createCallback : function(action, rs, batch) { - var actions = Ext.data.Api.actions; - return (action == 'read') ? this.loadRecords : function(data, response, success) { - // calls: onCreateRecords | onUpdateRecords | onDestroyRecords - this['on' + Ext.util.Format.capitalize(action) + 'Records'](success, rs, [].concat(data)); - // If success === false here, exception will have been called in DataProxy - if (success === true) { - this.fireEvent('write', this, action, data, response, rs); - } - this.removeFromBatch(batch, action, data); - }; - }, - - // Clears records from modified array after an exception event. - // NOTE: records are left marked dirty. Do we want to commit them even though they were not updated/realized? - // TODO remove this method? - clearModified : function(rs) { - if (Ext.isArray(rs)) { - for (var n=rs.length-1;n>=0;n--) { - this.modified.splice(this.modified.indexOf(rs[n]), 1); - } - } else { - this.modified.splice(this.modified.indexOf(rs), 1); - } - }, - - // remap record ids in MixedCollection after records have been realized. @see Store#onCreateRecords, @see DataReader#realize - reMap : function(record) { - if (Ext.isArray(record)) { - for (var i = 0, len = record.length; i < len; i++) { - this.reMap(record[i]); - } - } else { - delete this.data.map[record._phid]; - this.data.map[record.id] = record; - var index = this.data.keys.indexOf(record._phid); - this.data.keys.splice(index, 1, record.id); - delete record._phid; - } - }, - - // @protected onCreateRecord proxy callback for create action - onCreateRecords : function(success, rs, data) { - if (success === true) { - try { - this.reader.realize(rs, data); - } - catch (e) { - this.handleException(e); - if (Ext.isArray(rs)) { - // Recurse to run back into the try {}. DataReader#realize splices-off the rs until empty. - this.onCreateRecords(success, rs, data); - } - } - } - }, - - // @protected, onUpdateRecords proxy callback for update action - onUpdateRecords : function(success, rs, data) { - if (success === true) { - try { - this.reader.update(rs, data); - } catch (e) { - this.handleException(e); - if (Ext.isArray(rs)) { - // Recurse to run back into the try {}. DataReader#update splices-off the rs until empty. - this.onUpdateRecords(success, rs, data); - } - } - } - }, - - // @protected onDestroyRecords proxy callback for destroy action - onDestroyRecords : function(success, rs, data) { - // splice each rec out of this.removed - rs = (rs instanceof Ext.data.Record) ? [rs] : [].concat(rs); - for (var i=0,len=rs.length;i=0;i--) { - this.insert(rs[i].lastIndex, rs[i]); // <-- lastIndex set in Store#destroyRecord - } - } - }, - - // protected handleException. Possibly temporary until Ext framework has an exception-handler. - handleException : function(e) { - // @see core/Error.js - Ext.handleError(e); - }, - - /** - *

      Reloads the Record cache from the configured Proxy using the configured - * {@link Ext.data.Reader Reader} and the options from the last load operation - * performed.

      - *

      Note: see the Important note in {@link #load}.

      - * @param {Object} options

      (optional) An Object containing - * {@link #load loading options} which may override the {@link #lastOptions options} - * used in the last {@link #load} operation. See {@link #load} for details - * (defaults to null, in which case the {@link #lastOptions} are - * used).

      - *

      To add new params to the existing params:

      
      -lastOptions = myStore.lastOptions;
      -Ext.apply(lastOptions.params, {
      -    myNewParam: true
      -});
      -myStore.reload(lastOptions);
      -     * 
      - */ - reload : function(options){ - this.load(Ext.applyIf(options||{}, this.lastOptions)); - }, - - // private - // Called as a callback by the Reader during a load operation. - loadRecords : function(o, options, success){ - var i, len; - - if (this.isDestroyed === true) { - return; - } - if(!o || success === false){ - if(success !== false){ - this.fireEvent('load', this, [], options); - } - if(options.callback){ - options.callback.call(options.scope || this, [], options, false, o); - } - return; - } - var r = o.records, t = o.totalRecords || r.length; - if(!options || options.add !== true){ - if(this.pruneModifiedRecords){ - this.modified = []; - } - for(i = 0, len = r.length; i < len; i++){ - r[i].join(this); - } - if(this.snapshot){ - this.data = this.snapshot; - delete this.snapshot; - } - this.clearData(); - this.data.addAll(r); - this.totalLength = t; - this.applySort(); - this.fireEvent('datachanged', this); - }else{ - var toAdd = [], - rec, - cnt = 0; - for(i = 0, len = r.length; i < len; ++i){ - rec = r[i]; - if(this.indexOfId(rec.id) > -1){ - this.doUpdate(rec); - }else{ - toAdd.push(rec); - ++cnt; - } - } - this.totalLength = Math.max(t, this.data.length + cnt); - this.add(toAdd); - } - this.fireEvent('load', this, r, options); - if(options.callback){ - options.callback.call(options.scope || this, r, options, true); - } - }, - - /** - * Loads data from a passed data block and fires the {@link #load} event. A {@link Ext.data.Reader Reader} - * which understands the format of the data must have been configured in the constructor. - * @param {Object} data The data block from which to read the Records. The format of the data expected - * is dependent on the type of {@link Ext.data.Reader Reader} that is configured and should correspond to - * that {@link Ext.data.Reader Reader}'s {@link Ext.data.Reader#readRecords} parameter. - * @param {Boolean} append (Optional) true to append the new Records rather the default to replace - * the existing cache. - * Note: that Records in a Store are keyed by their {@link Ext.data.Record#id id}, so added Records - * with ids which are already present in the Store will replace existing Records. Only Records with - * new, unique ids will be added. - */ - loadData : function(o, append){ - var r = this.reader.readRecords(o); - this.loadRecords(r, {add: append}, true); - }, - - /** - * Gets the number of cached records. - *

      If using paging, this may not be the total size of the dataset. If the data object - * used by the Reader contains the dataset size, then the {@link #getTotalCount} function returns - * the dataset size. Note: see the Important note in {@link #load}.

      - * @return {Number} The number of Records in the Store's cache. - */ - getCount : function(){ - return this.data.length || 0; - }, - - /** - * Gets the total number of records in the dataset as returned by the server. - *

      If using paging, for this to be accurate, the data object used by the {@link #reader Reader} - * must contain the dataset size. For remote data sources, the value for this property - * (totalProperty for {@link Ext.data.JsonReader JsonReader}, - * totalRecords for {@link Ext.data.XmlReader XmlReader}) shall be returned by a query on the server. - * Note: see the Important note in {@link #load}.

      - * @return {Number} The number of Records as specified in the data object passed to the Reader - * by the Proxy. - *

      Note: this value is not updated when changing the contents of the Store locally.

      - */ - getTotalCount : function(){ - return this.totalLength || 0; - }, - - /** - * Returns an object describing the current sort state of this Store. - * @return {Object} The sort state of the Store. An object with two properties:
        - *
      • field : String

        The name of the field by which the Records are sorted.

      • - *
      • direction : String

        The sort order, 'ASC' or 'DESC' (case-sensitive).

      • - *
      - * See {@link #sortInfo} for additional details. - */ - getSortState : function(){ - return this.sortInfo; - }, - - /** - * @private - * Invokes sortData if we have sortInfo to sort on and are not sorting remotely - */ - applySort : function(){ - if ((this.sortInfo || this.multiSortInfo) && !this.remoteSort) { - this.sortData(); - } - }, - - /** - * @private - * Performs the actual sorting of data. This checks to see if we currently have a multi sort or not. It applies - * each sorter field/direction pair in turn by building an OR'ed master sorting function and running it against - * the full dataset - */ - sortData : function() { - var sortInfo = this.hasMultiSort ? this.multiSortInfo : this.sortInfo, - direction = sortInfo.direction || "ASC", - sorters = sortInfo.sorters, - sortFns = []; - - //if we just have a single sorter, pretend it's the first in an array - if (!this.hasMultiSort) { - sorters = [{direction: direction, field: sortInfo.field}]; - } - - //create a sorter function for each sorter field/direction combo - for (var i=0, j = sorters.length; i < j; i++) { - sortFns.push(this.createSortFunction(sorters[i].field, sorters[i].direction)); - } - - if (sortFns.length == 0) { - return; - } - - //the direction modifier is multiplied with the result of the sorting functions to provide overall sort direction - //(as opposed to direction per field) - var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1; - - //create a function which ORs each sorter together to enable multi-sort - var fn = function(r1, r2) { - var result = sortFns[0].call(this, r1, r2); - - //if we have more than one sorter, OR any additional sorter functions together - if (sortFns.length > 1) { - for (var i=1, j = sortFns.length; i < j; i++) { - result = result || sortFns[i].call(this, r1, r2); - } - } - - return directionModifier * result; - }; - - //sort the data - this.data.sort(direction, fn); - if (this.snapshot && this.snapshot != this.data) { - this.snapshot.sort(direction, fn); - } - }, - - /** - * @private - * Creates and returns a function which sorts an array by the given field and direction - * @param {String} field The field to create the sorter for - * @param {String} direction The direction to sort by (defaults to "ASC") - * @return {Function} A function which sorts by the field/direction combination provided - */ - createSortFunction: function(field, direction) { - direction = direction || "ASC"; - var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1; - - var sortType = this.fields.get(field).sortType; - - //create a comparison function. Takes 2 records, returns 1 if record 1 is greater, - //-1 if record 2 is greater or 0 if they are equal - return function(r1, r2) { - var v1 = sortType(r1.data[field]), - v2 = sortType(r2.data[field]); - - return directionModifier * (v1 > v2 ? 1 : (v1 < v2 ? -1 : 0)); - }; - }, - - /** - * Sets the default sort column and order to be used by the next {@link #load} operation. - * @param {String} fieldName The name of the field to sort by. - * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to 'ASC') - */ - setDefaultSort : function(field, dir) { - dir = dir ? dir.toUpperCase() : 'ASC'; - this.sortInfo = {field: field, direction: dir}; - this.sortToggle[field] = dir; - }, - - /** - * Sort the Records. - * If remote sorting is used, the sort is performed on the server, and the cache is reloaded. If local - * sorting is used, the cache is sorted internally. See also {@link #remoteSort} and {@link #paramNames}. - * This function accepts two call signatures - pass in a field name as the first argument to sort on a single - * field, or pass in an array of sort configuration objects to sort by multiple fields. - * Single sort example: - * store.sort('name', 'ASC'); - * Multi sort example: - * store.sort([ - * { - * field : 'name', - * direction: 'ASC' - * }, - * { - * field : 'salary', - * direction: 'DESC' - * } - * ], 'ASC'); - * In this second form, the sort configs are applied in order, with later sorters sorting within earlier sorters' results. - * For example, if two records with the same name are present they will also be sorted by salary if given the sort configs - * above. Any number of sort configs can be added. - * @param {String/Array} fieldName The name of the field to sort by, or an array of ordered sort configs - * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to 'ASC') - */ - sort : function(fieldName, dir) { - if (Ext.isArray(arguments[0])) { - return this.multiSort.call(this, fieldName, dir); - } else { - return this.singleSort(fieldName, dir); - } - }, - - /** - * Sorts the store contents by a single field and direction. This is called internally by {@link sort} and would - * not usually be called manually - * @param {String} fieldName The name of the field to sort by. - * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to 'ASC') - */ - singleSort: function(fieldName, dir) { - var field = this.fields.get(fieldName); - if (!field) { - return false; - } - - var name = field.name, - sortInfo = this.sortInfo || null, - sortToggle = this.sortToggle ? this.sortToggle[name] : null; - - if (!dir) { - if (sortInfo && sortInfo.field == name) { // toggle sort dir - dir = (this.sortToggle[name] || 'ASC').toggle('ASC', 'DESC'); - } else { - dir = field.sortDir; - } - } - - this.sortToggle[name] = dir; - this.sortInfo = {field: name, direction: dir}; - this.hasMultiSort = false; - - if (this.remoteSort) { - if (!this.load(this.lastOptions)) { - if (sortToggle) { - this.sortToggle[name] = sortToggle; - } - if (sortInfo) { - this.sortInfo = sortInfo; - } - } - } else { - this.applySort(); - this.fireEvent('datachanged', this); - } - return true; - }, - - /** - * Sorts the contents of this store by multiple field/direction sorters. This is called internally by {@link sort} - * and would not usually be called manually. - * Multi sorting only currently applies to local datasets - multiple sort data is not currently sent to a proxy - * if remoteSort is used. - * @param {Array} sorters Array of sorter objects (field and direction) - * @param {String} direction Overall direction to sort the ordered results by (defaults to "ASC") - */ - multiSort: function(sorters, direction) { - this.hasMultiSort = true; - direction = direction || "ASC"; - - //toggle sort direction - if (this.multiSortInfo && direction == this.multiSortInfo.direction) { - direction = direction.toggle("ASC", "DESC"); - } - - /** - * Object containing overall sort direction and an ordered array of sorter configs used when sorting on multiple fields - * @property multiSortInfo - * @type Object - */ - this.multiSortInfo = { - sorters : sorters, - direction: direction - }; - - if (this.remoteSort) { - this.singleSort(sorters[0].field, sorters[0].direction); - - } else { - this.applySort(); - this.fireEvent('datachanged', this); - } - }, - - /** - * Calls the specified function for each of the {@link Ext.data.Record Records} in the cache. - * @param {Function} fn The function to call. The {@link Ext.data.Record Record} is passed as the first parameter. - * Returning false aborts and exits the iteration. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. - * Defaults to the current {@link Ext.data.Record Record} in the iteration. - */ - each : function(fn, scope){ - this.data.each(fn, scope); - }, - - /** - * Gets all {@link Ext.data.Record records} modified since the last commit. Modified records are - * persisted across load operations (e.g., during paging). Note: deleted records are not - * included. See also {@link #pruneModifiedRecords} and - * {@link Ext.data.Record}{@link Ext.data.Record#markDirty markDirty}.. - * @return {Ext.data.Record[]} An array of {@link Ext.data.Record Records} containing outstanding - * modifications. To obtain modified fields within a modified record see - *{@link Ext.data.Record}{@link Ext.data.Record#modified modified}.. - */ - getModifiedRecords : function(){ - return this.modified; - }, - - /** - * Sums the value of property for each {@link Ext.data.Record record} between start - * and end and returns the result. - * @param {String} property A field in each record - * @param {Number} start (optional) The record index to start at (defaults to 0) - * @param {Number} end (optional) The last record index to include (defaults to length - 1) - * @return {Number} The sum - */ - sum : function(property, start, end){ - var rs = this.data.items, v = 0; - start = start || 0; - end = (end || end === 0) ? end : rs.length-1; - - for(var i = start; i <= end; i++){ - v += (rs[i].data[property] || 0); - } - return v; - }, - - /** - * @private - * Returns a filter function used to test a the given property's value. Defers most of the work to - * Ext.util.MixedCollection's createValueMatcher function - * @param {String} property The property to create the filter function for - * @param {String/RegExp} value The string/regex to compare the property value to - * @param {Boolean} anyMatch True if we don't care if the filter value is not the full value (defaults to false) - * @param {Boolean} caseSensitive True to create a case-sensitive regex (defaults to false) - * @param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true. - */ - createFilterFn : function(property, value, anyMatch, caseSensitive, exactMatch){ - if(Ext.isEmpty(value, false)){ - return false; - } - value = this.data.createValueMatcher(value, anyMatch, caseSensitive, exactMatch); - return function(r) { - return value.test(r.data[property]); - }; - }, - - /** - * @private - * Given an array of filter functions (each with optional scope), constructs and returns a single function that returns - * the result of all of the filters ANDed together - * @param {Array} filters The array of filter objects (each object should contain an 'fn' and optional scope) - * @return {Function} The multiple filter function - */ - createMultipleFilterFn: function(filters) { - return function(record) { - var isMatch = true; - - for (var i=0, j = filters.length; i < j; i++) { - var filter = filters[i], - fn = filter.fn, - scope = filter.scope; - - isMatch = isMatch && fn.call(scope, record); - } - - return isMatch; - }; - }, - - /** - * Filter the {@link Ext.data.Record records} by a specified property. Alternatively, pass an array of filter - * options to filter by more than one property. - * Single filter example: - * store.filter('name', 'Ed', true, true); //finds all records containing the substring 'Ed' - * Multiple filter example: - *
      
      -     * store.filter([
      -     *   {
      -     *     property     : 'name',
      -     *     value        : 'Ed',
      -     *     anyMatch     : true, //optional, defaults to true
      -     *     caseSensitive: true  //optional, defaults to true
      -     *   },
      -     *
      -     *   //filter functions can also be passed
      -     *   {
      -     *     fn   : function(record) {
      -     *       return record.get('age') == 24
      -     *     },
      -     *     scope: this
      -     *   }
      -     * ]);
      -     * 
      - * @param {String|Array} field A field on your records, or an array containing multiple filter options - * @param {String/RegExp} value Either a string that the field should begin with, or a RegExp to test - * against the field. - * @param {Boolean} anyMatch (optional) true to match any part not just the beginning - * @param {Boolean} caseSensitive (optional) true for case sensitive comparison - * @param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true. - */ - filter : function(property, value, anyMatch, caseSensitive, exactMatch){ - var fn; - //we can accept an array of filter objects, or a single filter object - normalize them here - if (Ext.isObject(property)) { - property = [property]; - } - - if (Ext.isArray(property)) { - var filters = []; - - //normalize the filters passed into an array of filter functions - for (var i=0, j = property.length; i < j; i++) { - var filter = property[i], - func = filter.fn, - scope = filter.scope || this; - - //if we weren't given a filter function, construct one now - if (!Ext.isFunction(func)) { - func = this.createFilterFn(filter.property, filter.value, filter.anyMatch, filter.caseSensitive, filter.exactMatch); - } - - filters.push({fn: func, scope: scope}); - } - - fn = this.createMultipleFilterFn(filters); - } else { - //classic single property filter - fn = this.createFilterFn(property, value, anyMatch, caseSensitive, exactMatch); - } - - return fn ? this.filterBy(fn) : this.clearFilter(); - }, - - /** - * Filter by a function. The specified function will be called for each - * Record in this Store. If the function returns true the Record is included, - * otherwise it is filtered out. - * @param {Function} fn The function to be called. It will be passed the following parameters:
        - *
      • record : Ext.data.Record

        The {@link Ext.data.Record record} - * to test for filtering. Access field values using {@link Ext.data.Record#get}.

      • - *
      • id : Object

        The ID of the Record passed.

      • - *
      - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to this Store. - */ - filterBy : function(fn, scope){ - this.snapshot = this.snapshot || this.data; - this.data = this.queryBy(fn, scope || this); - this.fireEvent('datachanged', this); - }, - - /** - * Revert to a view of the Record cache with no filtering applied. - * @param {Boolean} suppressEvent If true the filter is cleared silently without firing the - * {@link #datachanged} event. - */ - clearFilter : function(suppressEvent){ - if(this.isFiltered()){ - this.data = this.snapshot; - delete this.snapshot; - if(suppressEvent !== true){ - this.fireEvent('datachanged', this); - } - } - }, - - /** - * Returns true if this store is currently filtered - * @return {Boolean} - */ - isFiltered : function(){ - return !!this.snapshot && this.snapshot != this.data; - }, - - /** - * Query the records by a specified property. - * @param {String} field A field on your records - * @param {String/RegExp} value Either a string that the field - * should begin with, or a RegExp to test against the field. - * @param {Boolean} anyMatch (optional) True to match any part not just the beginning - * @param {Boolean} caseSensitive (optional) True for case sensitive comparison - * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records - */ - query : function(property, value, anyMatch, caseSensitive){ - var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); - return fn ? this.queryBy(fn) : this.data.clone(); - }, - - /** - * Query the cached records in this Store using a filtering function. The specified function - * will be called with each record in this Store. If the function returns true the record is - * included in the results. - * @param {Function} fn The function to be called. It will be passed the following parameters:
        - *
      • record : Ext.data.Record

        The {@link Ext.data.Record record} - * to test for filtering. Access field values using {@link Ext.data.Record#get}.

      • - *
      • id : Object

        The ID of the Record passed.

      • - *
      - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to this Store. - * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records - **/ - queryBy : function(fn, scope){ - var data = this.snapshot || this.data; - return data.filterBy(fn, scope||this); - }, - - /** - * Finds the index of the first matching Record in this store by a specific field value. - * @param {String} fieldName The name of the Record field to test. - * @param {String/RegExp} value Either a string that the field value - * should begin with, or a RegExp to test against the field. - * @param {Number} startIndex (optional) The index to start searching at - * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning - * @param {Boolean} caseSensitive (optional) True for case sensitive comparison - * @return {Number} The matched index or -1 - */ - find : function(property, value, start, anyMatch, caseSensitive){ - var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); - return fn ? this.data.findIndexBy(fn, null, start) : -1; - }, - - /** - * Finds the index of the first matching Record in this store by a specific field value. - * @param {String} fieldName The name of the Record field to test. - * @param {Mixed} value The value to match the field against. - * @param {Number} startIndex (optional) The index to start searching at - * @return {Number} The matched index or -1 - */ - findExact: function(property, value, start){ - return this.data.findIndexBy(function(rec){ - return rec.get(property) === value; - }, this, start); - }, - - /** - * Find the index of the first matching Record in this Store by a function. - * If the function returns true it is considered a match. - * @param {Function} fn The function to be called. It will be passed the following parameters:
        - *
      • record : Ext.data.Record

        The {@link Ext.data.Record record} - * to test for filtering. Access field values using {@link Ext.data.Record#get}.

      • - *
      • id : Object

        The ID of the Record passed.

      • - *
      - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to this Store. - * @param {Number} startIndex (optional) The index to start searching at - * @return {Number} The matched index or -1 - */ - findBy : function(fn, scope, start){ - return this.data.findIndexBy(fn, scope, start); - }, - - /** - * Collects unique values for a particular dataIndex from this store. - * @param {String} dataIndex The property to collect - * @param {Boolean} allowNull (optional) Pass true to allow null, undefined or empty string values - * @param {Boolean} bypassFilter (optional) Pass true to collect from all records, even ones which are filtered - * @return {Array} An array of the unique values - **/ - collect : function(dataIndex, allowNull, bypassFilter){ - var d = (bypassFilter === true && this.snapshot) ? - this.snapshot.items : this.data.items; - var v, sv, r = [], l = {}; - for(var i = 0, len = d.length; i < len; i++){ - v = d[i].data[dataIndex]; - sv = String(v); - if((allowNull || !Ext.isEmpty(v)) && !l[sv]){ - l[sv] = true; - r[r.length] = v; - } - } - return r; - }, - - // private - afterEdit : function(record){ - if(this.modified.indexOf(record) == -1){ - this.modified.push(record); - } - this.fireEvent('update', this, record, Ext.data.Record.EDIT); - }, - - // private - afterReject : function(record){ - this.modified.remove(record); - this.fireEvent('update', this, record, Ext.data.Record.REJECT); - }, - - // private - afterCommit : function(record){ - this.modified.remove(record); - this.fireEvent('update', this, record, Ext.data.Record.COMMIT); - }, - - /** - * Commit all Records with {@link #getModifiedRecords outstanding changes}. To handle updates for changes, - * subscribe to the Store's {@link #update update event}, and perform updating when the third parameter is - * Ext.data.Record.COMMIT. - */ - commitChanges : function(){ - var modified = this.modified.slice(0), - length = modified.length, - i; - - for (i = 0; i < length; i++){ - modified[i].commit(); - } - - this.modified = []; - this.removed = []; - }, - - /** - * {@link Ext.data.Record#reject Reject} outstanding changes on all {@link #getModifiedRecords modified records}. - */ - rejectChanges : function() { - var modified = this.modified.slice(0), - removed = this.removed.slice(0).reverse(), - mLength = modified.length, - rLength = removed.length, - i; - - for (i = 0; i < mLength; i++) { - modified[i].reject(); - } - - for (i = 0; i < rLength; i++) { - this.insert(removed[i].lastIndex || 0, removed[i]); - removed[i].reject(); - } - - this.modified = []; - this.removed = []; - }, - - // private - onMetaChange : function(meta){ - this.recordType = this.reader.recordType; - this.fields = this.recordType.prototype.fields; - delete this.snapshot; - if(this.reader.meta.sortInfo){ - this.sortInfo = this.reader.meta.sortInfo; - }else if(this.sortInfo && !this.fields.get(this.sortInfo.field)){ - delete this.sortInfo; - } - if(this.writer){ - this.writer.meta = this.reader.meta; - } - this.modified = []; - this.fireEvent('metachange', this, this.reader.meta); - }, - - // private - findInsertIndex : function(record){ - this.suspendEvents(); - var data = this.data.clone(); - this.data.add(record); - this.applySort(); - var index = this.data.indexOf(record); - this.data = data; - this.resumeEvents(); - return index; - }, - - /** - * Set the value for a property name in this store's {@link #baseParams}. Usage:

      
      -myStore.setBaseParam('foo', {bar:3});
      -
      - * @param {String} name Name of the property to assign - * @param {Mixed} value Value to assign the named property - **/ - setBaseParam : function (name, value){ - this.baseParams = this.baseParams || {}; - this.baseParams[name] = value; - } -}); - -Ext.reg('store', Ext.data.Store); - -/** - * @class Ext.data.Store.Error - * @extends Ext.Error - * Store Error extension. - * @param {String} name - */ -Ext.data.Store.Error = Ext.extend(Ext.Error, { - name: 'Ext.data.Store' -}); -Ext.apply(Ext.data.Store.Error.prototype, { - lang: { - 'writer-undefined' : 'Attempted to execute a write-action without a DataWriter installed.' - } -}); -/** - * @class Ext.data.Field - *

      This class encapsulates the field definition information specified in the field definition objects - * passed to {@link Ext.data.Record#create}.

      - *

      Developers do not need to instantiate this class. Instances are created by {@link Ext.data.Record.create} - * and cached in the {@link Ext.data.Record#fields fields} property of the created Record constructor's prototype.

      - */ -Ext.data.Field = Ext.extend(Object, { - - constructor : function(config){ - if(Ext.isString(config)){ - config = {name: config}; - } - Ext.apply(this, config); - - var types = Ext.data.Types, - st = this.sortType, - t; - - if(this.type){ - if(Ext.isString(this.type)){ - this.type = Ext.data.Types[this.type.toUpperCase()] || types.AUTO; - } - }else{ - this.type = types.AUTO; - } - - // named sortTypes are supported, here we look them up - if(Ext.isString(st)){ - this.sortType = Ext.data.SortTypes[st]; - }else if(Ext.isEmpty(st)){ - this.sortType = this.type.sortType; - } - - if(!this.convert){ - this.convert = this.type.convert; - } - }, - - /** - * @cfg {String} name - * The name by which the field is referenced within the Record. This is referenced by, for example, - * the dataIndex property in column definition objects passed to {@link Ext.grid.ColumnModel}. - *

      Note: In the simplest case, if no properties other than name are required, a field - * definition may consist of just a String for the field name.

      - */ - /** - * @cfg {Mixed} type - * (Optional) The data type for automatic conversion from received data to the stored value if {@link Ext.data.Field#convert convert} - * has not been specified. This may be specified as a string value. Possible values are - *
        - *
      • auto (Default, implies no conversion)
      • - *
      • string
      • - *
      • int
      • - *
      • float
      • - *
      • boolean
      • - *
      • date
      - *

      This may also be specified by referencing a member of the {@link Ext.data.Types} class.

      - *

      Developers may create their own application-specific data types by defining new members of the - * {@link Ext.data.Types} class.

      - */ - /** - * @cfg {Function} convert - * (Optional) A function which converts the value provided by the Reader into an object that will be stored - * in the Record. It is passed the following parameters:
        - *
      • v : Mixed
        The data value as read by the Reader, if undefined will use - * the configured {@link Ext.data.Field#defaultValue defaultValue}.
      • - *
      • rec : Mixed
        The data object containing the row as read by the Reader. - * Depending on the Reader type, this could be an Array ({@link Ext.data.ArrayReader ArrayReader}), an object - * ({@link Ext.data.JsonReader JsonReader}), or an XML element ({@link Ext.data.XMLReader XMLReader}).
      • - *
      - *
      
      -// example of convert function
      -function fullName(v, record){
      -    return record.name.last + ', ' + record.name.first;
      -}
      -
      -function location(v, record){
      -    return !record.city ? '' : (record.city + ', ' + record.state);
      -}
      -
      -var Dude = Ext.data.Record.create([
      -    {name: 'fullname',  convert: fullName},
      -    {name: 'firstname', mapping: 'name.first'},
      -    {name: 'lastname',  mapping: 'name.last'},
      -    {name: 'city', defaultValue: 'homeless'},
      -    'state',
      -    {name: 'location',  convert: location}
      -]);
      -
      -// create the data store
      -var store = new Ext.data.Store({
      -    reader: new Ext.data.JsonReader(
      -        {
      -            idProperty: 'key',
      -            root: 'daRoot',
      -            totalProperty: 'total'
      -        },
      -        Dude  // recordType
      -    )
      -});
      -
      -var myData = [
      -    { key: 1,
      -      name: { first: 'Fat',    last:  'Albert' }
      -      // notice no city, state provided in data object
      -    },
      -    { key: 2,
      -      name: { first: 'Barney', last:  'Rubble' },
      -      city: 'Bedrock', state: 'Stoneridge'
      -    },
      -    { key: 3,
      -      name: { first: 'Cliff',  last:  'Claven' },
      -      city: 'Boston',  state: 'MA'
      -    }
      -];
      -     * 
      - */ - /** - * @cfg {String} dateFormat - *

      (Optional) Used when converting received data into a Date when the {@link #type} is specified as "date".

      - *

      A format string for the {@link Date#parseDate Date.parseDate} function, or "timestamp" if the - * value provided by the Reader is a UNIX timestamp, or "time" if the value provided by the Reader is a - * javascript millisecond timestamp. See {@link Date}

      - */ - dateFormat: null, - - /** - * @cfg {Boolean} useNull - *

      (Optional) Use when converting received data into a Number type (either int or float). If the value cannot be parsed, - * null will be used if useNull is true, otherwise the value will be 0. Defaults to false - */ - useNull: false, - - /** - * @cfg {Mixed} defaultValue - * (Optional) The default value used when a Record is being created by a {@link Ext.data.Reader Reader} - * when the item referenced by the {@link Ext.data.Field#mapping mapping} does not exist in the data - * object (i.e. undefined). (defaults to "") - */ - defaultValue: "", - /** - * @cfg {String/Number} mapping - *

      (Optional) A path expression for use by the {@link Ext.data.DataReader} implementation - * that is creating the {@link Ext.data.Record Record} to extract the Field value from the data object. - * If the path expression is the same as the field name, the mapping may be omitted.

      - *

      The form of the mapping expression depends on the Reader being used.

      - *
        - *
      • {@link Ext.data.JsonReader}
        The mapping is a string containing the javascript - * expression to reference the data from an element of the data item's {@link Ext.data.JsonReader#root root} Array. Defaults to the field name.
      • - *
      • {@link Ext.data.XmlReader}
        The mapping is an {@link Ext.DomQuery} path to the data - * item relative to the DOM element that represents the {@link Ext.data.XmlReader#record record}. Defaults to the field name.
      • - *
      • {@link Ext.data.ArrayReader}
        The mapping is a number indicating the Array index - * of the field's value. Defaults to the field specification's Array position.
      • - *
      - *

      If a more complex value extraction strategy is required, then configure the Field with a {@link #convert} - * function. This is passed the whole row object, and may interrogate it in whatever way is necessary in order to - * return the desired data.

      - */ - mapping: null, - /** - * @cfg {Function} sortType - * (Optional) A function which converts a Field's value to a comparable value in order to ensure - * correct sort ordering. Predefined functions are provided in {@link Ext.data.SortTypes}. A custom - * sort example:
      
      -// current sort     after sort we want
      -// +-+------+          +-+------+
      -// |1|First |          |1|First |
      -// |2|Last  |          |3|Second|
      -// |3|Second|          |2|Last  |
      -// +-+------+          +-+------+
      -
      -sortType: function(value) {
      -   switch (value.toLowerCase()) // native toLowerCase():
      -   {
      -      case 'first': return 1;
      -      case 'second': return 2;
      -      default: return 3;
      -   }
      -}
      -     * 
      - */ - sortType : null, - /** - * @cfg {String} sortDir - * (Optional) Initial direction to sort ("ASC" or "DESC"). Defaults to - * "ASC". - */ - sortDir : "ASC", - /** - * @cfg {Boolean} allowBlank - * (Optional) Used for validating a {@link Ext.data.Record record}, defaults to true. - * An empty value here will cause {@link Ext.data.Record}.{@link Ext.data.Record#isValid isValid} - * to evaluate to false. - */ - allowBlank : true -}); -/** - * @class Ext.data.DataReader - * Abstract base class for reading structured data from a data source and converting - * it into an object containing {@link Ext.data.Record} objects and metadata for use - * by an {@link Ext.data.Store}. This class is intended to be extended and should not - * be created directly. For existing implementations, see {@link Ext.data.ArrayReader}, - * {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader}. - * @constructor Create a new DataReader - * @param {Object} meta Metadata configuration options (implementation-specific). - * @param {Array/Object} recordType - *

      Either an Array of {@link Ext.data.Field Field} definition objects (which - * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record} - * constructor created using {@link Ext.data.Record#create}.

      - */ -Ext.data.DataReader = function(meta, recordType){ - /** - * This DataReader's configured metadata as passed to the constructor. - * @type Mixed - * @property meta - */ - this.meta = meta; - /** - * @cfg {Array/Object} fields - *

      Either an Array of {@link Ext.data.Field Field} definition objects (which - * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record} - * constructor created from {@link Ext.data.Record#create}.

      - */ - this.recordType = Ext.isArray(recordType) ? - Ext.data.Record.create(recordType) : recordType; - - // if recordType defined make sure extraction functions are defined - if (this.recordType){ - this.buildExtractors(); - } -}; - -Ext.data.DataReader.prototype = { - /** - * @cfg {String} messageProperty [undefined] Optional name of a property within a server-response that represents a user-feedback message. - */ - /** - * Abstract method created in extension's buildExtractors impl. - */ - getTotal: Ext.emptyFn, - /** - * Abstract method created in extension's buildExtractors impl. - */ - getRoot: Ext.emptyFn, - /** - * Abstract method created in extension's buildExtractors impl. - */ - getMessage: Ext.emptyFn, - /** - * Abstract method created in extension's buildExtractors impl. - */ - getSuccess: Ext.emptyFn, - /** - * Abstract method created in extension's buildExtractors impl. - */ - getId: Ext.emptyFn, - /** - * Abstract method, overridden in DataReader extensions such as {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader} - */ - buildExtractors : Ext.emptyFn, - /** - * Abstract method overridden in DataReader extensions such as {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader} - */ - extractValues : Ext.emptyFn, - - /** - * Used for un-phantoming a record after a successful database insert. Sets the records pk along with new data from server. - * You must return at least the database pk using the idProperty defined in your DataReader configuration. The incoming - * data from server will be merged with the data in the local record. - * In addition, you must return record-data from the server in the same order received. - * Will perform a commit as well, un-marking dirty-fields. Store's "update" event will be suppressed. - * @param {Record/Record[]} record The phantom record to be realized. - * @param {Object/Object[]} data The new record data to apply. Must include the primary-key from database defined in idProperty field. - */ - realize: function(rs, data){ - if (Ext.isArray(rs)) { - for (var i = rs.length - 1; i >= 0; i--) { - // recurse - if (Ext.isArray(data)) { - this.realize(rs.splice(i,1).shift(), data.splice(i,1).shift()); - } - else { - // weird...rs is an array but data isn't?? recurse but just send in the whole invalid data object. - // the else clause below will detect !this.isData and throw exception. - this.realize(rs.splice(i,1).shift(), data); - } - } - } - else { - // If rs is NOT an array but data IS, see if data contains just 1 record. If so extract it and carry on. - if (Ext.isArray(data) && data.length == 1) { - data = data.shift(); - } - if (!this.isData(data)) { - // TODO: Let exception-handler choose to commit or not rather than blindly rs.commit() here. - //rs.commit(); - throw new Ext.data.DataReader.Error('realize', rs); - } - rs.phantom = false; // <-- That's what it's all about - rs._phid = rs.id; // <-- copy phantom-id -> _phid, so we can remap in Store#onCreateRecords - rs.id = this.getId(data); - rs.data = data; - - rs.commit(); - rs.store.reMap(rs); - } - }, - - /** - * Used for updating a non-phantom or "real" record's data with fresh data from server after remote-save. - * If returning data from multiple-records after a batch-update, you must return record-data from the server in - * the same order received. Will perform a commit as well, un-marking dirty-fields. Store's "update" event will be - * suppressed as the record receives fresh new data-hash - * @param {Record/Record[]} rs - * @param {Object/Object[]} data - */ - update : function(rs, data) { - if (Ext.isArray(rs)) { - for (var i=rs.length-1; i >= 0; i--) { - if (Ext.isArray(data)) { - this.update(rs.splice(i,1).shift(), data.splice(i,1).shift()); - } - else { - // weird...rs is an array but data isn't?? recurse but just send in the whole data object. - // the else clause below will detect !this.isData and throw exception. - this.update(rs.splice(i,1).shift(), data); - } - } - } - else { - // If rs is NOT an array but data IS, see if data contains just 1 record. If so extract it and carry on. - if (Ext.isArray(data) && data.length == 1) { - data = data.shift(); - } - if (this.isData(data)) { - rs.data = Ext.apply(rs.data, data); - } - rs.commit(); - } - }, - - /** - * returns extracted, type-cast rows of data. Iterates to call #extractValues for each row - * @param {Object[]/Object} data-root from server response - * @param {Boolean} returnRecords [false] Set true to return instances of Ext.data.Record - * @private - */ - extractData : function(root, returnRecords) { - // A bit ugly this, too bad the Record's raw data couldn't be saved in a common property named "raw" or something. - var rawName = (this instanceof Ext.data.JsonReader) ? 'json' : 'node'; - - var rs = []; - - // Had to add Check for XmlReader, #isData returns true if root is an Xml-object. Want to check in order to re-factor - // #extractData into DataReader base, since the implementations are almost identical for JsonReader, XmlReader - if (this.isData(root) && !(this instanceof Ext.data.XmlReader)) { - root = [root]; - } - var f = this.recordType.prototype.fields, - fi = f.items, - fl = f.length, - rs = []; - if (returnRecords === true) { - var Record = this.recordType; - for (var i = 0; i < root.length; i++) { - var n = root[i]; - var record = new Record(this.extractValues(n, fi, fl), this.getId(n)); - record[rawName] = n; // <-- There's implementation of ugly bit, setting the raw record-data. - rs.push(record); - } - } - else { - for (var i = 0; i < root.length; i++) { - var data = this.extractValues(root[i], fi, fl); - data[this.meta.idProperty] = this.getId(root[i]); - rs.push(data); - } - } - return rs; - }, - - /** - * Returns true if the supplied data-hash looks and quacks like data. Checks to see if it has a key - * corresponding to idProperty defined in your DataReader config containing non-empty pk. - * @param {Object} data - * @return {Boolean} - */ - isData : function(data) { - return (data && Ext.isObject(data) && !Ext.isEmpty(this.getId(data))) ? true : false; - }, - - // private function a store will createSequence upon - onMetaChange : function(meta){ - delete this.ef; - this.meta = meta; - this.recordType = Ext.data.Record.create(meta.fields); - this.buildExtractors(); - } -}; - -/** - * @class Ext.data.DataReader.Error - * @extends Ext.Error - * General error class for Ext.data.DataReader - */ -Ext.data.DataReader.Error = Ext.extend(Ext.Error, { - constructor : function(message, arg) { - this.arg = arg; - Ext.Error.call(this, message); - }, - name: 'Ext.data.DataReader' -}); -Ext.apply(Ext.data.DataReader.Error.prototype, { - lang : { - 'update': "#update received invalid data from server. Please see docs for DataReader#update and review your DataReader configuration.", - 'realize': "#realize was called with invalid remote-data. Please see the docs for DataReader#realize and review your DataReader configuration.", - 'invalid-response': "#readResponse received an invalid response from the server." - } -}); -/** - * @class Ext.data.DataWriter - *

      Ext.data.DataWriter facilitates create, update, and destroy actions between - * an Ext.data.Store and a server-side framework. A Writer enabled Store will - * automatically manage the Ajax requests to perform CRUD actions on a Store.

      - *

      Ext.data.DataWriter is an abstract base class which is intended to be extended - * and should not be created directly. For existing implementations, see - * {@link Ext.data.JsonWriter}.

      - *

      Creating a writer is simple:

      - *
      
      -var writer = new Ext.data.JsonWriter({
      -    encode: false   // <--- false causes data to be printed to jsonData config-property of Ext.Ajax#reqeust
      -});
      - * 
      - * *

      Same old JsonReader as Ext-2.x:

      - *
      
      -var reader = new Ext.data.JsonReader({idProperty: 'id'}, [{name: 'first'}, {name: 'last'}, {name: 'email'}]);
      - * 
      - * - *

      The proxy for a writer enabled store can be configured with a simple url:

      - *
      
      -// Create a standard HttpProxy instance.
      -var proxy = new Ext.data.HttpProxy({
      -    url: 'app.php/users'    // <--- Supports "provides"-type urls, such as '/users.json', '/products.xml' (Hello Rails/Merb)
      -});
      - * 
      - *

      For finer grained control, the proxy may also be configured with an API:

      - *
      
      -// Maximum flexibility with the API-configuration
      -var proxy = new Ext.data.HttpProxy({
      -    api: {
      -        read    : 'app.php/users/read',
      -        create  : 'app.php/users/create',
      -        update  : 'app.php/users/update',
      -        destroy : {  // <--- Supports object-syntax as well
      -            url: 'app.php/users/destroy',
      -            method: "DELETE"
      -        }
      -    }
      -});
      - * 
      - *

      Pulling it all together into a Writer-enabled Store:

      - *
      
      -var store = new Ext.data.Store({
      -    proxy: proxy,
      -    reader: reader,
      -    writer: writer,
      -    autoLoad: true,
      -    autoSave: true  // -- Cell-level updates.
      -});
      - * 
      - *

      Initiating write-actions automatically, using the existing Ext2.0 Store/Record API:

      - *
      
      -var rec = store.getAt(0);
      -rec.set('email', 'foo@bar.com');  // <--- Immediately initiates an UPDATE action through configured proxy.
      -
      -store.remove(rec);  // <---- Immediately initiates a DESTROY action through configured proxy.
      - * 
      - *

      For record/batch updates, use the Store-configuration {@link Ext.data.Store#autoSave autoSave:false}

      - *
      
      -var store = new Ext.data.Store({
      -    proxy: proxy,
      -    reader: reader,
      -    writer: writer,
      -    autoLoad: true,
      -    autoSave: false  // -- disable cell-updates
      -});
      -
      -var urec = store.getAt(0);
      -urec.set('email', 'foo@bar.com');
      -
      -var drec = store.getAt(1);
      -store.remove(drec);
      -
      -// Push the button!
      -store.save();
      - * 
      - * @constructor Create a new DataWriter - * @param {Object} meta Metadata configuration options (implementation-specific) - * @param {Object} recordType Either an Array of field definition objects as specified - * in {@link Ext.data.Record#create}, or an {@link Ext.data.Record} object created - * using {@link Ext.data.Record#create}. - */ -Ext.data.DataWriter = function(config){ - Ext.apply(this, config); -}; -Ext.data.DataWriter.prototype = { - - /** - * @cfg {Boolean} writeAllFields - * false by default. Set true to have DataWriter return ALL fields of a modified - * record -- not just those that changed. - * false to have DataWriter only request modified fields from a record. - */ - writeAllFields : false, - /** - * @cfg {Boolean} listful - * false by default. Set true to have the DataWriter always write HTTP params as a list, - * even when acting upon a single record. - */ - listful : false, // <-- listful is actually not used internally here in DataWriter. @see Ext.data.Store#execute. - - /** - * Compiles a Store recordset into a data-format defined by an extension such as {@link Ext.data.JsonWriter} or {@link Ext.data.XmlWriter} in preparation for a {@link Ext.data.Api#actions server-write action}. The first two params are similar similar in nature to {@link Ext#apply}, - * Where the first parameter is the receiver of paramaters and the second, baseParams, the source. - * @param {Object} params The request-params receiver. - * @param {Object} baseParams as defined by {@link Ext.data.Store#baseParams}. The baseParms must be encoded by the extending class, eg: {@link Ext.data.JsonWriter}, {@link Ext.data.XmlWriter}. - * @param {String} action [{@link Ext.data.Api#actions create|update|destroy}] - * @param {Record/Record[]} rs The recordset to write, the subject(s) of the write action. - */ - apply : function(params, baseParams, action, rs) { - var data = [], - renderer = action + 'Record'; - // TODO implement @cfg listful here - if (Ext.isArray(rs)) { - Ext.each(rs, function(rec){ - data.push(this[renderer](rec)); - }, this); - } - else if (rs instanceof Ext.data.Record) { - data = this[renderer](rs); - } - this.render(params, baseParams, data); - }, - - /** - * abstract method meant to be overridden by all DataWriter extensions. It's the extension's job to apply the "data" to the "params". - * The data-object provided to render is populated with data according to the meta-info defined in the user's DataReader config, - * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] - * @param {Record[]} rs Store recordset - * @param {Object} params Http params to be sent to server. - * @param {Object} data object populated according to DataReader meta-data. - */ - render : Ext.emptyFn, - - /** - * @cfg {Function} updateRecord Abstract method that should be implemented in all subclasses - * (e.g.: {@link Ext.data.JsonWriter#updateRecord JsonWriter.updateRecord} - */ - updateRecord : Ext.emptyFn, - - /** - * @cfg {Function} createRecord Abstract method that should be implemented in all subclasses - * (e.g.: {@link Ext.data.JsonWriter#createRecord JsonWriter.createRecord}) - */ - createRecord : Ext.emptyFn, - - /** - * @cfg {Function} destroyRecord Abstract method that should be implemented in all subclasses - * (e.g.: {@link Ext.data.JsonWriter#destroyRecord JsonWriter.destroyRecord}) - */ - destroyRecord : Ext.emptyFn, - - /** - * Converts a Record to a hash, taking into account the state of the Ext.data.Record along with configuration properties - * related to its rendering, such as {@link #writeAllFields}, {@link Ext.data.Record#phantom phantom}, {@link Ext.data.Record#getChanges getChanges} and - * {@link Ext.data.DataReader#idProperty idProperty} - * @param {Ext.data.Record} rec The Record from which to create a hash. - * @param {Object} config NOT YET IMPLEMENTED. Will implement an exlude/only configuration for fine-control over which fields do/don't get rendered. - * @return {Object} - * @protected - * TODO Implement excludes/only configuration with 2nd param? - */ - toHash : function(rec, config) { - var map = rec.fields.map, - data = {}, - raw = (this.writeAllFields === false && rec.phantom === false) ? rec.getChanges() : rec.data, - m; - Ext.iterate(raw, function(prop, value){ - if((m = map[prop])){ - data[m.mapping ? m.mapping : m.name] = value; - } - }); - // we don't want to write Ext auto-generated id to hash. Careful not to remove it on Models not having auto-increment pk though. - // We can tell its not auto-increment if the user defined a DataReader field for it *and* that field's value is non-empty. - // we could also do a RegExp here for the Ext.data.Record AUTO_ID prefix. - if (rec.phantom) { - if (rec.fields.containsKey(this.meta.idProperty) && Ext.isEmpty(rec.data[this.meta.idProperty])) { - delete data[this.meta.idProperty]; - } - } else { - data[this.meta.idProperty] = rec.id; - } - return data; - }, - - /** - * Converts a {@link Ext.data.DataWriter#toHash Hashed} {@link Ext.data.Record} to fields-array array suitable - * for encoding to xml via XTemplate, eg: -
      <tpl for="."><{name}>{value}</{name}</tpl>
      - * eg, non-phantom: -
      {id: 1, first: 'foo', last: 'bar'} --> [{name: 'id', value: 1}, {name: 'first', value: 'foo'}, {name: 'last', value: 'bar'}]
      - * {@link Ext.data.Record#phantom Phantom} records will have had their idProperty omitted in {@link #toHash} if determined to be auto-generated. - * Non AUTOINCREMENT pks should have been protected. - * @param {Hash} data Hashed by Ext.data.DataWriter#toHash - * @return {[Object]} Array of attribute-objects. - * @protected - */ - toArray : function(data) { - var fields = []; - Ext.iterate(data, function(k, v) {fields.push({name: k, value: v});},this); - return fields; - } -};/** - * @class Ext.data.DataProxy - * @extends Ext.util.Observable - *

      Abstract base class for implementations which provide retrieval of unformatted data objects. - * This class is intended to be extended and should not be created directly. For existing implementations, - * see {@link Ext.data.DirectProxy}, {@link Ext.data.HttpProxy}, {@link Ext.data.ScriptTagProxy} and - * {@link Ext.data.MemoryProxy}.

      - *

      DataProxy implementations are usually used in conjunction with an implementation of {@link Ext.data.DataReader} - * (of the appropriate type which knows how to parse the data object) to provide a block of - * {@link Ext.data.Records} to an {@link Ext.data.Store}.

      - *

      The parameter to a DataProxy constructor may be an {@link Ext.data.Connection} or can also be the - * config object to an {@link Ext.data.Connection}.

      - *

      Custom implementations must implement either the doRequest method (preferred) or the - * load method (deprecated). See - * {@link Ext.data.HttpProxy}.{@link Ext.data.HttpProxy#doRequest doRequest} or - * {@link Ext.data.HttpProxy}.{@link Ext.data.HttpProxy#load load} for additional details.

      - *

      Example 1

      - *
      
      -proxy: new Ext.data.ScriptTagProxy({
      -    {@link Ext.data.Connection#url url}: 'http://extjs.com/forum/topics-remote.php'
      -}),
      - * 
      - *

      Example 2

      - *
      
      -proxy : new Ext.data.HttpProxy({
      -    {@link Ext.data.Connection#method method}: 'GET',
      -    {@link Ext.data.HttpProxy#prettyUrls prettyUrls}: false,
      -    {@link Ext.data.Connection#url url}: 'local/default.php', // see options parameter for {@link Ext.Ajax#request}
      -    {@link #api}: {
      -        // all actions except the following will use above url
      -        create  : 'local/new.php',
      -        update  : 'local/update.php'
      -    }
      -}),
      - * 
      - *

      And new in Ext version 3, attach centralized event-listeners upon the DataProxy class itself! This is a great place - * to implement a messaging system to centralize your application's user-feedback and error-handling.

      - *
      
      -// Listen to all "beforewrite" event fired by all proxies.
      -Ext.data.DataProxy.on('beforewrite', function(proxy, action) {
      -    console.log('beforewrite: ', action);
      -});
      -
      -// Listen to "write" event fired by all proxies
      -Ext.data.DataProxy.on('write', function(proxy, action, data, res, rs) {
      -    console.info('write: ', action);
      -});
      -
      -// Listen to "exception" event fired by all proxies
      -Ext.data.DataProxy.on('exception', function(proxy, type, action, exception) {
      -    console.error(type + action + ' exception);
      -});
      - * 
      - * Note: These three events are all fired with the signature of the corresponding DataProxy instance event {@link #beforewrite beforewrite}, {@link #write write} and {@link #exception exception}. - */ -Ext.data.DataProxy = function(conn){ - // make sure we have a config object here to support ux proxies. - // All proxies should now send config into superclass constructor. - conn = conn || {}; - - // This line caused a bug when people use custom Connection object having its own request method. - // http://extjs.com/forum/showthread.php?t=67194. Have to set DataProxy config - //Ext.applyIf(this, conn); - - this.api = conn.api; - this.url = conn.url; - this.restful = conn.restful; - this.listeners = conn.listeners; - - // deprecated - this.prettyUrls = conn.prettyUrls; - - /** - * @cfg {Object} api - * Specific urls to call on CRUD action methods "read", "create", "update" and "destroy". - * Defaults to:
      
      -api: {
      -    read    : undefined,
      -    create  : undefined,
      -    update  : undefined,
      -    destroy : undefined
      -}
      -     * 
      - *

      The url is built based upon the action being executed [load|create|save|destroy] - * using the commensurate {@link #api} property, or if undefined default to the - * configured {@link Ext.data.Store}.{@link Ext.data.Store#url url}.


      - *

      For example:

      - *
      
      -api: {
      -    load :    '/controller/load',
      -    create :  '/controller/new',  // Server MUST return idProperty of new record
      -    save :    '/controller/update',
      -    destroy : '/controller/destroy_action'
      -}
      -
      -// Alternatively, one can use the object-form to specify each API-action
      -api: {
      -    load: {url: 'read.php', method: 'GET'},
      -    create: 'create.php',
      -    destroy: 'destroy.php',
      -    save: 'update.php'
      -}
      -     * 
      - *

      If the specific URL for a given CRUD action is undefined, the CRUD action request - * will be directed to the configured {@link Ext.data.Connection#url url}.

      - *

      Note: To modify the URL for an action dynamically the appropriate API - * property should be modified before the action is requested using the corresponding before - * action event. For example to modify the URL associated with the load action: - *

      
      -// modify the url for the action
      -myStore.on({
      -    beforeload: {
      -        fn: function (store, options) {
      -            // use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
      -            store.proxy.setUrl('changed1.php');
      -
      -            // set optional second parameter to true to make this URL change
      -            // permanent, applying this URL for all subsequent requests.
      -            store.proxy.setUrl('changed1.php', true);
      -
      -            // Altering the proxy API should be done using the public
      -            // method {@link Ext.data.DataProxy#setApi setApi}.
      -            store.proxy.setApi('read', 'changed2.php');
      -
      -            // Or set the entire API with a config-object.
      -            // When using the config-object option, you must redefine the entire
      -            // API -- not just a specific action of it.
      -            store.proxy.setApi({
      -                read    : 'changed_read.php',
      -                create  : 'changed_create.php',
      -                update  : 'changed_update.php',
      -                destroy : 'changed_destroy.php'
      -            });
      -        }
      -    }
      -});
      -     * 
      - *

      - */ - - this.addEvents( - /** - * @event exception - *

      Fires if an exception occurs in the Proxy during a remote request. This event is relayed - * through a corresponding {@link Ext.data.Store}.{@link Ext.data.Store#exception exception}, - * so any Store instance may observe this event.

      - *

      In addition to being fired through the DataProxy instance that raised the event, this event is also fired - * through the Ext.data.DataProxy class to allow for centralized processing of exception events from all - * DataProxies by attaching a listener to the Ext.data.DataProxy class itself.

      - *

      This event can be fired for one of two reasons:

      - *
        - *
      • remote-request failed :
        - * The server did not return status === 200. - *
      • - *
      • remote-request succeeded :
        - * The remote-request succeeded but the reader could not read the response. - * This means the server returned data, but the configured Reader threw an - * error while reading the response. In this case, this event will be - * raised and the caught error will be passed along into this event. - *
      • - *
      - *

      This event fires with two different contexts based upon the 2nd - * parameter type [remote|response]. The first four parameters - * are identical between the two contexts -- only the final two parameters - * differ.

      - * @param {DataProxy} this The proxy that sent the request - * @param {String} type - *

      The value of this parameter will be either 'response' or 'remote'.

      - *
        - *
      • 'response' :
        - *

        An invalid response from the server was returned: either 404, - * 500 or the response meta-data does not match that defined in the DataReader - * (e.g.: root, idProperty, successProperty).

        - *
      • - *
      • 'remote' :
        - *

        A valid response was returned from the server having - * successProperty === false. This response might contain an error-message - * sent from the server. For example, the user may have failed - * authentication/authorization or a database validation error occurred.

        - *
      • - *
      - * @param {String} action Name of the action (see {@link Ext.data.Api#actions}. - * @param {Object} options The options for the action that were specified in the {@link #request}. - * @param {Object} response - *

      The value of this parameter depends on the value of the type parameter:

      - *
        - *
      • 'response' :
        - *

        The raw browser response object (e.g.: XMLHttpRequest)

        - *
      • - *
      • 'remote' :
        - *

        The decoded response object sent from the server.

        - *
      • - *
      - * @param {Mixed} arg - *

      The type and value of this parameter depends on the value of the type parameter:

      - *
        - *
      • 'response' : Error
        - *

        The JavaScript Error object caught if the configured Reader could not read the data. - * If the remote request returns success===false, this parameter will be null.

        - *
      • - *
      • 'remote' : Record/Record[]
        - *

        This parameter will only exist if the action was a write action - * (Ext.data.Api.actions.create|update|destroy).

        - *
      • - *
      - */ - 'exception', - /** - * @event beforeload - * Fires before a request to retrieve a data object. - * @param {DataProxy} this The proxy for the request - * @param {Object} params The params object passed to the {@link #request} function - */ - 'beforeload', - /** - * @event load - * Fires before the load method's callback is called. - * @param {DataProxy} this The proxy for the request - * @param {Object} o The request transaction object - * @param {Object} options The callback's options property as passed to the {@link #request} function - */ - 'load', - /** - * @event loadexception - *

      This event is deprecated. The signature of the loadexception event - * varies depending on the proxy, use the catch-all {@link #exception} event instead. - * This event will fire in addition to the {@link #exception} event.

      - * @param {misc} misc See {@link #exception}. - * @deprecated - */ - 'loadexception', - /** - * @event beforewrite - *

      Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy

      - *

      In addition to being fired through the DataProxy instance that raised the event, this event is also fired - * through the Ext.data.DataProxy class to allow for centralized processing of beforewrite events from all - * DataProxies by attaching a listener to the Ext.data.DataProxy class itself.

      - * @param {DataProxy} this The proxy for the request - * @param {String} action [Ext.data.Api.actions.create|update|destroy] - * @param {Record/Record[]} rs The Record(s) to create|update|destroy. - * @param {Object} params The request params object. Edit params to add parameters to the request. - */ - 'beforewrite', - /** - * @event write - *

      Fires before the request-callback is called

      - *

      In addition to being fired through the DataProxy instance that raised the event, this event is also fired - * through the Ext.data.DataProxy class to allow for centralized processing of write events from all - * DataProxies by attaching a listener to the Ext.data.DataProxy class itself.

      - * @param {DataProxy} this The proxy that sent the request - * @param {String} action [Ext.data.Api.actions.create|upate|destroy] - * @param {Object} data The data object extracted from the server-response - * @param {Object} response The decoded response from server - * @param {Record/Record[]} rs The Record(s) from Store - * @param {Object} options The callback's options property as passed to the {@link #request} function - */ - 'write' - ); - Ext.data.DataProxy.superclass.constructor.call(this); - - // Prepare the proxy api. Ensures all API-actions are defined with the Object-form. - try { - Ext.data.Api.prepare(this); - } catch (e) { - if (e instanceof Ext.data.Api.Error) { - e.toConsole(); - } - } - // relay each proxy's events onto Ext.data.DataProxy class for centralized Proxy-listening - Ext.data.DataProxy.relayEvents(this, ['beforewrite', 'write', 'exception']); -}; - -Ext.extend(Ext.data.DataProxy, Ext.util.Observable, { - /** - * @cfg {Boolean} restful - *

      Defaults to false. Set to true to operate in a RESTful manner.

      - *

      Note: this parameter will automatically be set to true if the - * {@link Ext.data.Store} it is plugged into is set to restful: true. If the - * Store is RESTful, there is no need to set this option on the proxy.

      - *

      RESTful implementations enable the serverside framework to automatically route - * actions sent to one url based upon the HTTP method, for example: - *

      
      -store: new Ext.data.Store({
      -    restful: true,
      -    proxy: new Ext.data.HttpProxy({url:'/users'}); // all requests sent to /users
      -    ...
      -)}
      -     * 
      - * If there is no {@link #api} specified in the configuration of the proxy, - * all requests will be marshalled to a single RESTful url (/users) so the serverside - * framework can inspect the HTTP Method and act accordingly: - *
      -Method   url        action
      -POST     /users     create
      -GET      /users     read
      -PUT      /users/23  update
      -DESTROY  /users/23  delete
      -     * 

      - *

      If set to true, a {@link Ext.data.Record#phantom non-phantom} record's - * {@link Ext.data.Record#id id} will be appended to the url. Some MVC (e.g., Ruby on Rails, - * Merb and Django) support segment based urls where the segments in the URL follow the - * Model-View-Controller approach:

      
      -     * someSite.com/controller/action/id
      -     * 
      - * Where the segments in the url are typically:
        - *
      • The first segment : represents the controller class that should be invoked.
      • - *
      • The second segment : represents the class function, or method, that should be called.
      • - *
      • The third segment : represents the ID (a variable typically passed to the method).
      • - *

      - *

      Refer to {@link Ext.data.DataProxy#api} for additional information.

      - */ - restful: false, - - /** - *

      Redefines the Proxy's API or a single action of an API. Can be called with two method signatures.

      - *

      If called with an object as the only parameter, the object should redefine the entire API, e.g.:

      
      -proxy.setApi({
      -    read    : '/users/read',
      -    create  : '/users/create',
      -    update  : '/users/update',
      -    destroy : '/users/destroy'
      -});
      -
      - *

      If called with two parameters, the first parameter should be a string specifying the API action to - * redefine and the second parameter should be the URL (or function if using DirectProxy) to call for that action, e.g.:

      
      -proxy.setApi(Ext.data.Api.actions.read, '/users/new_load_url');
      -
      - * @param {String/Object} api An API specification object, or the name of an action. - * @param {String/Function} url The URL (or function if using DirectProxy) to call for the action. - */ - setApi : function() { - if (arguments.length == 1) { - var valid = Ext.data.Api.isValid(arguments[0]); - if (valid === true) { - this.api = arguments[0]; - } - else { - throw new Ext.data.Api.Error('invalid', valid); - } - } - else if (arguments.length == 2) { - if (!Ext.data.Api.isAction(arguments[0])) { - throw new Ext.data.Api.Error('invalid', arguments[0]); - } - this.api[arguments[0]] = arguments[1]; - } - Ext.data.Api.prepare(this); - }, - - /** - * Returns true if the specified action is defined as a unique action in the api-config. - * request. If all API-actions are routed to unique urls, the xaction parameter is unecessary. However, if no api is defined - * and all Proxy actions are routed to DataProxy#url, the server-side will require the xaction parameter to perform a switch to - * the corresponding code for CRUD action. - * @param {String [Ext.data.Api.CREATE|READ|UPDATE|DESTROY]} action - * @return {Boolean} - */ - isApiAction : function(action) { - return (this.api[action]) ? true : false; - }, - - /** - * All proxy actions are executed through this method. Automatically fires the "before" + action event - * @param {String} action Name of the action - * @param {Ext.data.Record/Ext.data.Record[]/null} rs Will be null when action is 'load' - * @param {Object} params - * @param {Ext.data.DataReader} reader - * @param {Function} callback - * @param {Object} scope The scope (this reference) in which the callback function is executed. Defaults to the Proxy object. - * @param {Object} options Any options specified for the action (e.g. see {@link Ext.data.Store#load}. - */ - request : function(action, rs, params, reader, callback, scope, options) { - if (!this.api[action] && !this.load) { - throw new Ext.data.DataProxy.Error('action-undefined', action); - } - params = params || {}; - if ((action === Ext.data.Api.actions.read) ? this.fireEvent("beforeload", this, params) : this.fireEvent("beforewrite", this, action, rs, params) !== false) { - this.doRequest.apply(this, arguments); - } - else { - callback.call(scope || this, null, options, false); - } - }, - - - /** - * Deprecated load method using old method signature. See {@doRequest} for preferred method. - * @deprecated - * @param {Object} params - * @param {Object} reader - * @param {Object} callback - * @param {Object} scope - * @param {Object} arg - */ - load : null, - - /** - * @cfg {Function} doRequest Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. - * (e.g.: {@link Ext.data.HttpProxy#doRequest HttpProxy.doRequest}, - * {@link Ext.data.DirectProxy#doRequest DirectProxy.doRequest}). - */ - doRequest : function(action, rs, params, reader, callback, scope, options) { - // default implementation of doRequest for backwards compatibility with 2.0 proxies. - // If we're executing here, the action is probably "load". - // Call with the pre-3.0 method signature. - this.load(params, reader, callback, scope, options); - }, - - /** - * @cfg {Function} onRead Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. Callback for read {@link Ext.data.Api#actions action}. - * @param {String} action Action name as per {@link Ext.data.Api.actions#read}. - * @param {Object} o The request transaction object - * @param {Object} res The server response - * @fires loadexception (deprecated) - * @fires exception - * @fires load - * @protected - */ - onRead : Ext.emptyFn, - /** - * @cfg {Function} onWrite Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. Callback for create, update and destroy {@link Ext.data.Api#actions actions}. - * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] - * @param {Object} trans The request transaction object - * @param {Object} res The server response - * @fires exception - * @fires write - * @protected - */ - onWrite : Ext.emptyFn, - /** - * buildUrl - * Sets the appropriate url based upon the action being executed. If restful is true, and only a single record is being acted upon, - * url will be built Rails-style, as in "/controller/action/32". restful will aply iff the supplied record is an - * instance of Ext.data.Record rather than an Array of them. - * @param {String} action The api action being executed [read|create|update|destroy] - * @param {Ext.data.Record/Ext.data.Record[]} record The record or Array of Records being acted upon. - * @return {String} url - * @private - */ - buildUrl : function(action, record) { - record = record || null; - - // conn.url gets nullified after each request. If it's NOT null here, that means the user must have intervened with a call - // to DataProxy#setUrl or DataProxy#setApi and changed it before the request was executed. If that's the case, use conn.url, - // otherwise, build the url from the api or this.url. - var url = (this.conn && this.conn.url) ? this.conn.url : (this.api[action]) ? this.api[action].url : this.url; - if (!url) { - throw new Ext.data.Api.Error('invalid-url', action); - } - - // look for urls having "provides" suffix used in some MVC frameworks like Rails/Merb and others. The provides suffice informs - // the server what data-format the client is dealing with and returns data in the same format (eg: application/json, application/xml, etc) - // e.g.: /users.json, /users.xml, etc. - // with restful routes, we need urls like: - // PUT /users/1.json - // DELETE /users/1.json - var provides = null; - var m = url.match(/(.*)(\.json|\.xml|\.html)$/); - if (m) { - provides = m[2]; // eg ".json" - url = m[1]; // eg: "/users" - } - // prettyUrls is deprectated in favor of restful-config - if ((this.restful === true || this.prettyUrls === true) && record instanceof Ext.data.Record && !record.phantom) { - url += '/' + record.id; - } - return (provides === null) ? url : url + provides; - }, - - /** - * Destroys the proxy by purging any event listeners and cancelling any active requests. - */ - destroy: function(){ - this.purgeListeners(); - } -}); - -// Apply the Observable prototype to the DataProxy class so that proxy instances can relay their -// events to the class. Allows for centralized listening of all proxy instances upon the DataProxy class. -Ext.apply(Ext.data.DataProxy, Ext.util.Observable.prototype); -Ext.util.Observable.call(Ext.data.DataProxy); - -/** - * @class Ext.data.DataProxy.Error - * @extends Ext.Error - * DataProxy Error extension. - * constructor - * @param {String} message Message describing the error. - * @param {Record/Record[]} arg - */ -Ext.data.DataProxy.Error = Ext.extend(Ext.Error, { - constructor : function(message, arg) { - this.arg = arg; - Ext.Error.call(this, message); - }, - name: 'Ext.data.DataProxy' -}); -Ext.apply(Ext.data.DataProxy.Error.prototype, { - lang: { - 'action-undefined': "DataProxy attempted to execute an API-action but found an undefined url / function. Please review your Proxy url/api-configuration.", - 'api-invalid': 'Recieved an invalid API-configuration. Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions.' - } -}); - - -/** - * @class Ext.data.Request - * A simple Request class used internally to the data package to provide more generalized remote-requests - * to a DataProxy. - * TODO Not yet implemented. Implement in Ext.data.Store#execute - */ -Ext.data.Request = function(params) { - Ext.apply(this, params); -}; -Ext.data.Request.prototype = { - /** - * @cfg {String} action - */ - action : undefined, - /** - * @cfg {Ext.data.Record[]/Ext.data.Record} rs The Store recordset associated with the request. - */ - rs : undefined, - /** - * @cfg {Object} params HTTP request params - */ - params: undefined, - /** - * @cfg {Function} callback The function to call when request is complete - */ - callback : Ext.emptyFn, - /** - * @cfg {Object} scope The scope of the callback funtion - */ - scope : undefined, - /** - * @cfg {Ext.data.DataReader} reader The DataReader instance which will parse the received response - */ - reader : undefined -}; -/** - * @class Ext.data.Response - * A generic response class to normalize response-handling internally to the framework. - */ -Ext.data.Response = function(params) { - Ext.apply(this, params); -}; -Ext.data.Response.prototype = { - /** - * @cfg {String} action {@link Ext.data.Api#actions} - */ - action: undefined, - /** - * @cfg {Boolean} success - */ - success : undefined, - /** - * @cfg {String} message - */ - message : undefined, - /** - * @cfg {Array/Object} data - */ - data: undefined, - /** - * @cfg {Object} raw The raw response returned from server-code - */ - raw: undefined, - /** - * @cfg {Ext.data.Record/Ext.data.Record[]} records related to the Request action - */ - records: undefined -}; -/** - * @class Ext.data.ScriptTagProxy - * @extends Ext.data.DataProxy - * An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain - * other than the originating domain of the running page.
      - *

      - * Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain - * of the running page, you must use this class, rather than HttpProxy.
      - *

      - * The content passed back from a server resource requested by a ScriptTagProxy must be executable JavaScript - * source code because it is used as the source inside a <script> tag.
      - *

      - * In order for the browser to process the returned data, the server must wrap the data object - * with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy. - * Below is a Java example for a servlet which returns data for either a ScriptTagProxy, or an HttpProxy - * depending on whether the callback name was passed: - *

      - *

      
      -boolean scriptTag = false;
      -String cb = request.getParameter("callback");
      -if (cb != null) {
      -    scriptTag = true;
      -    response.setContentType("text/javascript");
      -} else {
      -    response.setContentType("application/x-json");
      -}
      -Writer out = response.getWriter();
      -if (scriptTag) {
      -    out.write(cb + "(");
      -}
      -out.print(dataBlock.toJsonString());
      -if (scriptTag) {
      -    out.write(");");
      -}
      -
      - *

      Below is a PHP example to do the same thing:

      
      -$callback = $_REQUEST['callback'];
      -
      -// Create the output object.
      -$output = array('a' => 'Apple', 'b' => 'Banana');
      -
      -//start output
      -if ($callback) {
      -    header('Content-Type: text/javascript');
      -    echo $callback . '(' . json_encode($output) . ');';
      -} else {
      -    header('Content-Type: application/x-json');
      -    echo json_encode($output);
      -}
      -
      - *

      Below is the ASP.Net code to do the same thing:

      
      -String jsonString = "{success: true}";
      -String cb = Request.Params.Get("callback");
      -String responseString = "";
      -if (!String.IsNullOrEmpty(cb)) {
      -    responseString = cb + "(" + jsonString + ")";
      -} else {
      -    responseString = jsonString;
      -}
      -Response.Write(responseString);
      -
      - * - * @constructor - * @param {Object} config A configuration object. - */ -Ext.data.ScriptTagProxy = function(config){ - Ext.apply(this, config); - - Ext.data.ScriptTagProxy.superclass.constructor.call(this, config); - - this.head = document.getElementsByTagName("head")[0]; - - /** - * @event loadexception - * Deprecated in favor of 'exception' event. - * Fires if an exception occurs in the Proxy during data loading. This event can be fired for one of two reasons: - *
      • The load call timed out. This means the load callback did not execute within the time limit - * specified by {@link #timeout}. In this case, this event will be raised and the - * fourth parameter (read error) will be null.
      • - *
      • The load succeeded but the reader could not read the response. This means the server returned - * data, but the configured Reader threw an error while reading the data. In this case, this event will be - * raised and the caught error will be passed along as the fourth parameter of this event.
      - * Note that this event is also relayed through {@link Ext.data.Store}, so you can listen for it directly - * on any Store instance. - * @param {Object} this - * @param {Object} options The loading options that were specified (see {@link #load} for details). If the load - * call timed out, this parameter will be null. - * @param {Object} arg The callback's arg object passed to the {@link #load} function - * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data. - * If the remote request returns success: false, this parameter will be null. - */ -}; - -Ext.data.ScriptTagProxy.TRANS_ID = 1000; - -Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, { - /** - * @cfg {String} url The URL from which to request the data object. - */ - /** - * @cfg {Number} timeout (optional) The number of milliseconds to wait for a response. Defaults to 30 seconds. - */ - timeout : 30000, - /** - * @cfg {String} callbackParam (Optional) The name of the parameter to pass to the server which tells - * the server the name of the callback function set up by the load call to process the returned data object. - * Defaults to "callback".

      The server-side processing must read this parameter value, and generate - * javascript output which calls this named function passing the data object as its only parameter. - */ - callbackParam : "callback", - /** - * @cfg {Boolean} nocache (optional) Defaults to true. Disable caching by adding a unique parameter - * name to the request. - */ - nocache : true, - - /** - * HttpProxy implementation of DataProxy#doRequest - * @param {String} action - * @param {Ext.data.Record/Ext.data.Record[]} rs If action is read, rs will be null - * @param {Object} params An object containing properties which are to be used as HTTP parameters - * for the request to the remote server. - * @param {Ext.data.DataReader} reader The Reader object which converts the data - * object into a block of Ext.data.Records. - * @param {Function} callback The function into which to pass the block of Ext.data.Records. - * The function must be passed

        - *
      • The Record block object
      • - *
      • The "arg" argument from the load function
      • - *
      • A boolean success indicator
      • - *
      - * @param {Object} scope The scope (this reference) in which the callback function is executed. Defaults to the browser window. - * @param {Object} arg An optional argument which is passed to the callback as its second parameter. - */ - doRequest : function(action, rs, params, reader, callback, scope, arg) { - var p = Ext.urlEncode(Ext.apply(params, this.extraParams)); - - var url = this.buildUrl(action, rs); - if (!url) { - throw new Ext.data.Api.Error('invalid-url', url); - } - url = Ext.urlAppend(url, p); - - if(this.nocache){ - url = Ext.urlAppend(url, '_dc=' + (new Date().getTime())); - } - var transId = ++Ext.data.ScriptTagProxy.TRANS_ID; - var trans = { - id : transId, - action: action, - cb : "stcCallback"+transId, - scriptId : "stcScript"+transId, - params : params, - arg : arg, - url : url, - callback : callback, - scope : scope, - reader : reader - }; - window[trans.cb] = this.createCallback(action, rs, trans); - url += String.format("&{0}={1}", this.callbackParam, trans.cb); - if(this.autoAbort !== false){ - this.abort(); - } - - trans.timeoutId = this.handleFailure.defer(this.timeout, this, [trans]); - - var script = document.createElement("script"); - script.setAttribute("src", url); - script.setAttribute("type", "text/javascript"); - script.setAttribute("id", trans.scriptId); - this.head.appendChild(script); - - this.trans = trans; - }, - - // @private createCallback - createCallback : function(action, rs, trans) { - var self = this; - return function(res) { - self.trans = false; - self.destroyTrans(trans, true); - if (action === Ext.data.Api.actions.read) { - self.onRead.call(self, action, trans, res); - } else { - self.onWrite.call(self, action, trans, res, rs); - } - }; - }, - /** - * Callback for read actions - * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] - * @param {Object} trans The request transaction object - * @param {Object} res The server response - * @protected - */ - onRead : function(action, trans, res) { - var result; - try { - result = trans.reader.readRecords(res); - }catch(e){ - // @deprecated: fire loadexception - this.fireEvent("loadexception", this, trans, res, e); - - this.fireEvent('exception', this, 'response', action, trans, res, e); - trans.callback.call(trans.scope||window, null, trans.arg, false); - return; - } - if (result.success === false) { - // @deprecated: fire old loadexception for backwards-compat. - this.fireEvent('loadexception', this, trans, res); - - this.fireEvent('exception', this, 'remote', action, trans, res, null); - } else { - this.fireEvent("load", this, res, trans.arg); - } - trans.callback.call(trans.scope||window, result, trans.arg, result.success); - }, - /** - * Callback for write actions - * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] - * @param {Object} trans The request transaction object - * @param {Object} res The server response - * @protected - */ - onWrite : function(action, trans, response, rs) { - var reader = trans.reader; - try { - // though we already have a response object here in STP, run through readResponse to catch any meta-data exceptions. - var res = reader.readResponse(action, response); - } catch (e) { - this.fireEvent('exception', this, 'response', action, trans, res, e); - trans.callback.call(trans.scope||window, null, res, false); - return; - } - if(!res.success === true){ - this.fireEvent('exception', this, 'remote', action, trans, res, rs); - trans.callback.call(trans.scope||window, null, res, false); - return; - } - this.fireEvent("write", this, action, res.data, res, rs, trans.arg ); - trans.callback.call(trans.scope||window, res.data, res, true); - }, - - // private - isLoading : function(){ - return this.trans ? true : false; - }, - - /** - * Abort the current server request. - */ - abort : function(){ - if(this.isLoading()){ - this.destroyTrans(this.trans); - } - }, - - // private - destroyTrans : function(trans, isLoaded){ - this.head.removeChild(document.getElementById(trans.scriptId)); - clearTimeout(trans.timeoutId); - if(isLoaded){ - window[trans.cb] = undefined; - try{ - delete window[trans.cb]; - }catch(e){} - }else{ - // if hasn't been loaded, wait for load to remove it to prevent script error - window[trans.cb] = function(){ - window[trans.cb] = undefined; - try{ - delete window[trans.cb]; - }catch(e){} - }; - } - }, - - // private - handleFailure : function(trans){ - this.trans = false; - this.destroyTrans(trans, false); - if (trans.action === Ext.data.Api.actions.read) { - // @deprecated firing loadexception - this.fireEvent("loadexception", this, null, trans.arg); - } - - this.fireEvent('exception', this, 'response', trans.action, { - response: null, - options: trans.arg - }); - trans.callback.call(trans.scope||window, null, trans.arg, false); - }, - - // inherit docs - destroy: function(){ - this.abort(); - Ext.data.ScriptTagProxy.superclass.destroy.call(this); - } -});/** - * @class Ext.data.HttpProxy - * @extends Ext.data.DataProxy - *

      An implementation of {@link Ext.data.DataProxy} that processes data requests within the same - * domain of the originating page.

      - *

      Note: this class cannot be used to retrieve data from a domain other - * than the domain from which the running page was served. For cross-domain requests, use a - * {@link Ext.data.ScriptTagProxy ScriptTagProxy}.

      - *

      Be aware that to enable the browser to parse an XML document, the server must set - * the Content-Type header in the HTTP response to "text/xml".

      - * @constructor - * @param {Object} conn - * An {@link Ext.data.Connection} object, or options parameter to {@link Ext.Ajax#request}. - *

      Note that if this HttpProxy is being used by a {@link Ext.data.Store Store}, then the - * Store's call to {@link #load} will override any specified callback and params - * options. In this case, use the Store's {@link Ext.data.Store#events events} to modify parameters, - * or react to loading events. The Store's {@link Ext.data.Store#baseParams baseParams} may also be - * used to pass parameters known at instantiation time.

      - *

      If an options parameter is passed, the singleton {@link Ext.Ajax} object will be used to make - * the request.

      - */ -Ext.data.HttpProxy = function(conn){ - Ext.data.HttpProxy.superclass.constructor.call(this, conn); - - /** - * The Connection object (Or options parameter to {@link Ext.Ajax#request}) which this HttpProxy - * uses to make requests to the server. Properties of this object may be changed dynamically to - * change the way data is requested. - * @property - */ - this.conn = conn; - - // nullify the connection url. The url param has been copied to 'this' above. The connection - // url will be set during each execution of doRequest when buildUrl is called. This makes it easier for users to override the - // connection url during beforeaction events (ie: beforeload, beforewrite, etc). - // Url is always re-defined during doRequest. - this.conn.url = null; - - this.useAjax = !conn || !conn.events; - - // A hash containing active requests, keyed on action [Ext.data.Api.actions.create|read|update|destroy] - var actions = Ext.data.Api.actions; - this.activeRequest = {}; - for (var verb in actions) { - this.activeRequest[actions[verb]] = undefined; - } -}; - -Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { - /** - * Return the {@link Ext.data.Connection} object being used by this Proxy. - * @return {Connection} The Connection object. This object may be used to subscribe to events on - * a finer-grained basis than the DataProxy events. - */ - getConnection : function() { - return this.useAjax ? Ext.Ajax : this.conn; - }, - - /** - * Used for overriding the url used for a single request. Designed to be called during a beforeaction event. Calling setUrl - * will override any urls set via the api configuration parameter. Set the optional parameter makePermanent to set the url for - * all subsequent requests. If not set to makePermanent, the next request will use the same url or api configuration defined - * in the initial proxy configuration. - * @param {String} url - * @param {Boolean} makePermanent (Optional) [false] - * - * (e.g.: beforeload, beforesave, etc). - */ - setUrl : function(url, makePermanent) { - this.conn.url = url; - if (makePermanent === true) { - this.url = url; - this.api = null; - Ext.data.Api.prepare(this); - } - }, - - /** - * HttpProxy implementation of DataProxy#doRequest - * @param {String} action The crud action type (create, read, update, destroy) - * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null - * @param {Object} params An object containing properties which are to be used as HTTP parameters - * for the request to the remote server. - * @param {Ext.data.DataReader} reader The Reader object which converts the data - * object into a block of Ext.data.Records. - * @param {Function} callback - *

      A function to be called after the request. - * The callback is passed the following arguments:

        - *
      • r : Ext.data.Record[] The block of Ext.data.Records.
      • - *
      • options: Options object from the action request
      • - *
      • success: Boolean success indicator

      - * @param {Object} scope The scope (this reference) in which the callback function is executed. Defaults to the browser window. - * @param {Object} arg An optional argument which is passed to the callback as its second parameter. - * @protected - */ - doRequest : function(action, rs, params, reader, cb, scope, arg) { - var o = { - method: (this.api[action]) ? this.api[action]['method'] : undefined, - request: { - callback : cb, - scope : scope, - arg : arg - }, - reader: reader, - callback : this.createCallback(action, rs), - scope: this - }; - - // If possible, transmit data using jsonData || xmlData on Ext.Ajax.request (An installed DataWriter would have written it there.). - // Use std HTTP params otherwise. - if (params.jsonData) { - o.jsonData = params.jsonData; - } else if (params.xmlData) { - o.xmlData = params.xmlData; - } else { - o.params = params || {}; - } - // Set the connection url. If this.conn.url is not null here, - // the user must have overridden the url during a beforewrite/beforeload event-handler. - // this.conn.url is nullified after each request. - this.conn.url = this.buildUrl(action, rs); - - if(this.useAjax){ - - Ext.applyIf(o, this.conn); - - // If a currently running request is found for this action, abort it. - if (this.activeRequest[action]) { - //// - // Disabled aborting activeRequest while implementing REST. activeRequest[action] will have to become an array - // TODO ideas anyone? - // - //Ext.Ajax.abort(this.activeRequest[action]); - } - this.activeRequest[action] = Ext.Ajax.request(o); - }else{ - this.conn.request(o); - } - // request is sent, nullify the connection url in preparation for the next request - this.conn.url = null; - }, - - /** - * Returns a callback function for a request. Note a special case is made for the - * read action vs all the others. - * @param {String} action [create|update|delete|load] - * @param {Ext.data.Record[]} rs The Store-recordset being acted upon - * @private - */ - createCallback : function(action, rs) { - return function(o, success, response) { - this.activeRequest[action] = undefined; - if (!success) { - if (action === Ext.data.Api.actions.read) { - // @deprecated: fire loadexception for backwards compat. - // TODO remove - this.fireEvent('loadexception', this, o, response); - } - this.fireEvent('exception', this, 'response', action, o, response); - o.request.callback.call(o.request.scope, null, o.request.arg, false); - return; - } - if (action === Ext.data.Api.actions.read) { - this.onRead(action, o, response); - } else { - this.onWrite(action, o, response, rs); - } - }; - }, - - /** - * Callback for read action - * @param {String} action Action name as per {@link Ext.data.Api.actions#read}. - * @param {Object} o The request transaction object - * @param {Object} res The server response - * @fires loadexception (deprecated) - * @fires exception - * @fires load - * @protected - */ - onRead : function(action, o, response) { - var result; - try { - result = o.reader.read(response); - }catch(e){ - // @deprecated: fire old loadexception for backwards-compat. - // TODO remove - this.fireEvent('loadexception', this, o, response, e); - - this.fireEvent('exception', this, 'response', action, o, response, e); - o.request.callback.call(o.request.scope, null, o.request.arg, false); - return; - } - if (result.success === false) { - // @deprecated: fire old loadexception for backwards-compat. - // TODO remove - this.fireEvent('loadexception', this, o, response); - - // Get DataReader read-back a response-object to pass along to exception event - var res = o.reader.readResponse(action, response); - this.fireEvent('exception', this, 'remote', action, o, res, null); - } - else { - this.fireEvent('load', this, o, o.request.arg); - } - // TODO refactor onRead, onWrite to be more generalized now that we're dealing with Ext.data.Response instance - // the calls to request.callback(...) in each will have to be made identical. - // NOTE reader.readResponse does not currently return Ext.data.Response - o.request.callback.call(o.request.scope, result, o.request.arg, result.success); - }, - /** - * Callback for write actions - * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] - * @param {Object} trans The request transaction object - * @param {Object} res The server response - * @fires exception - * @fires write - * @protected - */ - onWrite : function(action, o, response, rs) { - var reader = o.reader; - var res; - try { - res = reader.readResponse(action, response); - } catch (e) { - this.fireEvent('exception', this, 'response', action, o, response, e); - o.request.callback.call(o.request.scope, null, o.request.arg, false); - return; - } - if (res.success === true) { - this.fireEvent('write', this, action, res.data, res, rs, o.request.arg); - } else { - this.fireEvent('exception', this, 'remote', action, o, res, rs); - } - // TODO refactor onRead, onWrite to be more generalized now that we're dealing with Ext.data.Response instance - // the calls to request.callback(...) in each will have to be made similar. - // NOTE reader.readResponse does not currently return Ext.data.Response - o.request.callback.call(o.request.scope, res.data, res, res.success); - }, - - // inherit docs - destroy: function(){ - if(!this.useAjax){ - this.conn.abort(); - }else if(this.activeRequest){ - var actions = Ext.data.Api.actions; - for (var verb in actions) { - if(this.activeRequest[actions[verb]]){ - Ext.Ajax.abort(this.activeRequest[actions[verb]]); - } - } - } - Ext.data.HttpProxy.superclass.destroy.call(this); - } -});/** - * @class Ext.data.MemoryProxy - * @extends Ext.data.DataProxy - * An implementation of Ext.data.DataProxy that simply passes the data specified in its constructor - * to the Reader when its load method is called. - * @constructor - * @param {Object} data The data object which the Reader uses to construct a block of Ext.data.Records. - */ -Ext.data.MemoryProxy = function(data){ - // Must define a dummy api with "read" action to satisfy DataProxy#doRequest and Ext.data.Api#prepare *before* calling super - var api = {}; - api[Ext.data.Api.actions.read] = true; - Ext.data.MemoryProxy.superclass.constructor.call(this, { - api: api - }); - this.data = data; -}; - -Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, { - /** - * @event loadexception - * Fires if an exception occurs in the Proxy during data loading. Note that this event is also relayed - * through {@link Ext.data.Store}, so you can listen for it directly on any Store instance. - * @param {Object} this - * @param {Object} arg The callback's arg object passed to the {@link #load} function - * @param {Object} null This parameter does not apply and will always be null for MemoryProxy - * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data - */ - - /** - * MemoryProxy implementation of DataProxy#doRequest - * @param {String} action - * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null - * @param {Object} params An object containing properties which are to be used as HTTP parameters - * for the request to the remote server. - * @param {Ext.data.DataReader} reader The Reader object which converts the data - * object into a block of Ext.data.Records. - * @param {Function} callback The function into which to pass the block of Ext.data.Records. - * The function must be passed
        - *
      • The Record block object
      • - *
      • The "arg" argument from the load function
      • - *
      • A boolean success indicator
      • - *
      - * @param {Object} scope The scope (this reference) in which the callback function is executed. Defaults to the browser window. - * @param {Object} arg An optional argument which is passed to the callback as its second parameter. - */ - doRequest : function(action, rs, params, reader, callback, scope, arg) { - // No implementation for CRUD in MemoryProxy. Assumes all actions are 'load' - params = params || {}; - var result; - try { - result = reader.readRecords(this.data); - }catch(e){ - // @deprecated loadexception - this.fireEvent("loadexception", this, null, arg, e); - - this.fireEvent('exception', this, 'response', action, arg, null, e); - callback.call(scope, null, arg, false); - return; - } - callback.call(scope, result, arg, true); - } -});/** - * @class Ext.data.Types - *

      This is s static class containing the system-supplied data types which may be given to a {@link Ext.data.Field Field}.

      - *

      The properties in this class are used as type indicators in the {@link Ext.data.Field Field} class, so to - * test whether a Field is of a certain type, compare the {@link Ext.data.Field#type type} property against properties - * of this class.

      - *

      Developers may add their own application-specific data types to this class. Definition names must be UPPERCASE. - * each type definition must contain three properties:

      - *
        - *
      • convert : Function
        A function to convert raw data values from a data block into the data - * to be stored in the Field. The function is passed the collowing parameters: - *
          - *
        • v : Mixed
          The data value as read by the Reader, if undefined will use - * the configured {@link Ext.data.Field#defaultValue defaultValue}.
        • - *
        • rec : Mixed
          The data object containing the row as read by the Reader. - * Depending on the Reader type, this could be an Array ({@link Ext.data.ArrayReader ArrayReader}), an object - * ({@link Ext.data.JsonReader JsonReader}), or an XML element ({@link Ext.data.XMLReader XMLReader}).
        • - *
      • - *
      • sortType : Function
        A function to convert the stored data into comparable form, as defined by {@link Ext.data.SortTypes}.
      • - *
      • type : String
        A textual data type name.
      • - *
      - *

      For example, to create a VELatLong field (See the Microsoft Bing Mapping API) containing the latitude/longitude value of a datapoint on a map from a JsonReader data block - * which contained the properties lat and long, you would define a new data type like this:

      - *
      
      -// Add a new Field data type which stores a VELatLong object in the Record.
      -Ext.data.Types.VELATLONG = {
      -    convert: function(v, data) {
      -        return new VELatLong(data.lat, data.long);
      -    },
      -    sortType: function(v) {
      -        return v.Latitude;  // When sorting, order by latitude
      -    },
      -    type: 'VELatLong'
      -};
      -
      - *

      Then, when declaring a Record, use

      
      -var types = Ext.data.Types; // allow shorthand type access
      -UnitRecord = Ext.data.Record.create([
      -    { name: 'unitName', mapping: 'UnitName' },
      -    { name: 'curSpeed', mapping: 'CurSpeed', type: types.INT },
      -    { name: 'latitude', mapping: 'lat', type: types.FLOAT },
      -    { name: 'latitude', mapping: 'lat', type: types.FLOAT },
      -    { name: 'position', type: types.VELATLONG }
      -]);
      -
      - * @singleton - */ -Ext.data.Types = new function(){ - var st = Ext.data.SortTypes; - Ext.apply(this, { - /** - * @type Regexp - * @property stripRe - * A regular expression for stripping non-numeric characters from a numeric value. Defaults to /[\$,%]/g. - * This should be overridden for localization. - */ - stripRe: /[\$,%]/g, - - /** - * @type Object. - * @property AUTO - * This data type means that no conversion is applied to the raw data before it is placed into a Record. - */ - AUTO: { - convert: function(v){ return v; }, - sortType: st.none, - type: 'auto' - }, - - /** - * @type Object. - * @property STRING - * This data type means that the raw data is converted into a String before it is placed into a Record. - */ - STRING: { - convert: function(v){ return (v === undefined || v === null) ? '' : String(v); }, - sortType: st.asUCString, - type: 'string' - }, - - /** - * @type Object. - * @property INT - * This data type means that the raw data is converted into an integer before it is placed into a Record. - *

      The synonym INTEGER is equivalent.

      - */ - INT: { - convert: function(v){ - return v !== undefined && v !== null && v !== '' ? - parseInt(String(v).replace(Ext.data.Types.stripRe, ''), 10) : (this.useNull ? null : 0); - }, - sortType: st.none, - type: 'int' - }, - - /** - * @type Object. - * @property FLOAT - * This data type means that the raw data is converted into a number before it is placed into a Record. - *

      The synonym NUMBER is equivalent.

      - */ - FLOAT: { - convert: function(v){ - return v !== undefined && v !== null && v !== '' ? - parseFloat(String(v).replace(Ext.data.Types.stripRe, ''), 10) : (this.useNull ? null : 0); - }, - sortType: st.none, - type: 'float' - }, - - /** - * @type Object. - * @property BOOL - *

      This data type means that the raw data is converted into a boolean before it is placed into - * a Record. The string "true" and the number 1 are converted to boolean true.

      - *

      The synonym BOOLEAN is equivalent.

      - */ - BOOL: { - convert: function(v){ return v === true || v === 'true' || v == 1; }, - sortType: st.none, - type: 'bool' - }, - - /** - * @type Object. - * @property DATE - * This data type means that the raw data is converted into a Date before it is placed into a Record. - * The date format is specified in the constructor of the {@link Ext.data.Field} to which this type is - * being applied. - */ - DATE: { - convert: function(v){ - var df = this.dateFormat; - if(!v){ - return null; - } - if(Ext.isDate(v)){ - return v; - } - if(df){ - if(df == 'timestamp'){ - return new Date(v*1000); - } - if(df == 'time'){ - return new Date(parseInt(v, 10)); - } - return Date.parseDate(v, df); - } - var parsed = Date.parse(v); - return parsed ? new Date(parsed) : null; - }, - sortType: st.asDate, - type: 'date' - } - }); - - Ext.apply(this, { - /** - * @type Object. - * @property BOOLEAN - *

      This data type means that the raw data is converted into a boolean before it is placed into - * a Record. The string "true" and the number 1 are converted to boolean true.

      - *

      The synonym BOOL is equivalent.

      - */ - BOOLEAN: this.BOOL, - /** - * @type Object. - * @property INTEGER - * This data type means that the raw data is converted into an integer before it is placed into a Record. - *

      The synonym INT is equivalent.

      - */ - INTEGER: this.INT, - /** - * @type Object. - * @property NUMBER - * This data type means that the raw data is converted into a number before it is placed into a Record. - *

      The synonym FLOAT is equivalent.

      - */ - NUMBER: this.FLOAT - }); -}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/data-foundation.js b/web-client/src/main/resources/apps/js/ext/pkgs/data-foundation.js deleted file mode 100644 index c74546d687a..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/data-foundation.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.data.Api=(function(){var a={};return{actions:{create:"create",read:"read",update:"update",destroy:"destroy"},restActions:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"},isAction:function(b){return(Ext.data.Api.actions[b])?true:false},getVerb:function(b){if(a[b]){return a[b]}for(var c in this.actions){if(this.actions[c]===b){a[b]=c;break}}return(a[b]!==undefined)?a[b]:null},isValid:function(b){var e=[];var d=this.actions;for(var c in b){if(!(c in d)){e.push(c)}}return(!e.length)?true:e},hasUniqueUrl:function(c,f){var b=(c.api[f])?c.api[f].url:null;var e=true;for(var d in c.api){if((e=(d===f)?true:(c.api[d].url!=b)?true:false)===false){break}}return e},prepare:function(b){if(!b.api){b.api={}}for(var d in this.actions){var c=this.actions[d];b.api[c]=b.api[c]||b.url||b.directFn;if(typeof(b.api[c])=="string"){b.api[c]={url:b.api[c],method:(b.restful===true)?Ext.data.Api.restActions[c]:undefined}}}},restify:function(b){b.restful=true;for(var c in this.restActions){b.api[this.actions[c]].method||(b.api[this.actions[c]].method=this.restActions[c])}b.onWrite=b.onWrite.createInterceptor(function(h,i,f,e){var d=i.reader;var g=new Ext.data.Response({action:h,raw:f});switch(f.status){case 200:return true;break;case 201:if(Ext.isEmpty(g.raw.responseText)){g.success=true}else{return true}break;case 204:g.success=true;g.data=null;break;default:return true;break}if(g.success===true){this.fireEvent("write",this,h,g.data,g,e,i.request.arg)}else{this.fireEvent("exception",this,"remote",h,i,g,e)}i.request.callback.call(i.request.scope,g.data,g,g.success);return false},b)}}})();Ext.data.Response=function(b,a){Ext.apply(this,b,{raw:a})};Ext.data.Response.prototype={message:null,success:false,status:null,root:null,raw:null,getMessage:function(){return this.message},getSuccess:function(){return this.success},getStatus:function(){return this.status},getRoot:function(){return this.root},getRawResponse:function(){return this.raw}};Ext.data.Api.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.Api"});Ext.apply(Ext.data.Api.Error.prototype,{lang:{"action-url-undefined":"No fallback url defined for this action. When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.",invalid:"received an invalid API-configuration. Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions","invalid-url":"Invalid url. Please review your proxy configuration.",execute:'Attempted to execute an unknown action. Valid API actions are defined in Ext.data.Api.actions"'}});Ext.data.SortTypes={none:function(a){return a},stripTagsRE:/<\/?[^>]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(f){return f.name});for(var b=0,a=e.length;b-1){a.join(null);this.data.removeAt(b)}if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}if(b>-1){this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(b){var a=[];this.each(function(c){a.push(c)});this.clearData();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}if(b!==true){this.fireEvent("clear",this,a)}},onClear:function(b,a){Ext.each(a,function(d,c){this.destroyRecord(this,d,c)},this)},insert:function(d,c){var e,a,b;c=[].concat(c);for(e=0,a=c.length;e=0;d--){if(b[d].phantom===true){var a=b.splice(d,1).shift();if(a.isValid()){f.push(a)}}else{if(!b[d].isValid()){b.splice(d,1)}}}if(f.length){g.push(["create",f])}if(b.length){g.push(["update",b])}}h=g.length;if(h){e=++this.batchCounter;for(d=0;d=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(b,k,g){var e,f;if(this.isDestroyed===true){return}if(!b||g===false){if(g!==false){this.fireEvent("load",this,[],k)}if(k.callback){k.callback.call(k.scope||this,[],k,false,b)}return}var a=b.records,h=b.totalRecords||a.length;if(!k||k.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(e=0,f=a.length;e-1){this.doUpdate(d)}else{j.push(d);++c}}this.totalLength=Math.max(h,this.data.length+c);this.add(j)}this.fireEvent("load",this,a,k);if(k.callback){k.callback.call(k.scope||this,a,k,true)}},loadData:function(c,a){var b=this.reader.readRecords(c);this.loadRecords(b,{add:a},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if((this.sortInfo||this.multiSortInfo)&&!this.remoteSort){this.sortData()}},sortData:function(){var a=this.hasMultiSort?this.multiSortInfo:this.sortInfo,h=a.direction||"ASC",g=a.sorters,c=[];if(!this.hasMultiSort){g=[{direction:h,field:a.field}]}for(var d=0,b=g.length;d1){for(var o=1,n=c.length;og?1:(h=0;b--){if(Ext.isArray(c)){this.realize(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.realize(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){throw new Ext.data.DataReader.Error("realize",a)}a.phantom=false;a._phid=a.id;a.id=this.getId(c);a.data=c;a.commit();a.store.reMap(a)}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(this.isData(c)){a.data=Ext.apply(a.data,c)}a.commit()}},extractData:function(k,a){var j=(this instanceof Ext.data.JsonReader)?"json":"node";var c=[];if(this.isData(k)&&!(this instanceof Ext.data.XmlReader)){k=[k]}var h=this.recordType.prototype.fields,o=h.items,m=h.length,c=[];if(a===true){var l=this.recordType;for(var e=0;e'ASC'. - */ - groupDir : 'ASC', - - /** - * Clears any existing grouping and refreshes the data using the default sort. - */ - clearGrouping : function(){ - this.groupField = false; - - if(this.remoteGroup){ - if(this.baseParams){ - delete this.baseParams.groupBy; - delete this.baseParams.groupDir; - } - var lo = this.lastOptions; - if(lo && lo.params){ - delete lo.params.groupBy; - delete lo.params.groupDir; - } - - this.reload(); - }else{ - this.sort(); - this.fireEvent('datachanged', this); - } - }, - - /** - * Groups the data by the specified field. - * @param {String} field The field name by which to sort the store's data - * @param {Boolean} forceRegroup (optional) True to force the group to be refreshed even if the field passed - * in is the same as the current grouping field, false to skip grouping on the same field (defaults to false) - */ - groupBy : function(field, forceRegroup, direction) { - direction = direction ? (String(direction).toUpperCase() == 'DESC' ? 'DESC' : 'ASC') : this.groupDir; - - if (this.groupField == field && this.groupDir == direction && !forceRegroup) { - return; // already grouped by this field - } - - //check the contents of the first sorter. If the field matches the CURRENT groupField (before it is set to the new one), - //remove the sorter as it is actually the grouper. The new grouper is added back in by this.sort - var sorters = this.multiSortInfo.sorters; - if (sorters.length > 0 && sorters[0].field == this.groupField) { - sorters.shift(); - } - - this.groupField = field; - this.groupDir = direction; - this.applyGroupField(); - - var fireGroupEvent = function() { - this.fireEvent('groupchange', this, this.getGroupState()); - }; - - if (this.groupOnSort) { - this.sort(field, direction); - fireGroupEvent.call(this); - return; - } - - if (this.remoteGroup) { - this.on('load', fireGroupEvent, this, {single: true}); - this.reload(); - } else { - this.sort(sorters); - fireGroupEvent.call(this); - } - }, - - //GroupingStore always uses multisorting so we intercept calls to sort here to make sure that our grouping sorter object - //is always injected first. - sort : function(fieldName, dir) { - if (this.remoteSort) { - return Ext.data.GroupingStore.superclass.sort.call(this, fieldName, dir); - } - - var sorters = []; - - //cater for any existing valid arguments to this.sort, massage them into an array of sorter objects - if (Ext.isArray(arguments[0])) { - sorters = arguments[0]; - } else if (fieldName == undefined) { - //we preserve the existing sortInfo here because this.sort is called after - //clearGrouping and there may be existing sorting - sorters = this.sortInfo ? [this.sortInfo] : []; - } else { - //TODO: this is lifted straight from Ext.data.Store's singleSort function. It should instead be - //refactored into a common method if possible - var field = this.fields.get(fieldName); - if (!field) return false; - - var name = field.name, - sortInfo = this.sortInfo || null, - sortToggle = this.sortToggle ? this.sortToggle[name] : null; - - if (!dir) { - if (sortInfo && sortInfo.field == name) { // toggle sort dir - dir = (this.sortToggle[name] || 'ASC').toggle('ASC', 'DESC'); - } else { - dir = field.sortDir; - } - } - - this.sortToggle[name] = dir; - this.sortInfo = {field: name, direction: dir}; - - sorters = [this.sortInfo]; - } - - //add the grouping sorter object as the first multisort sorter - if (this.groupField) { - sorters.unshift({direction: this.groupDir, field: this.groupField}); - } - - return this.multiSort.call(this, sorters, dir); - }, - - /** - * @private - * Saves the current grouping field and direction to this.baseParams and this.lastOptions.params - * if we're using remote grouping. Does not actually perform any grouping - just stores values - */ - applyGroupField: function(){ - if (this.remoteGroup) { - if(!this.baseParams){ - this.baseParams = {}; - } - - Ext.apply(this.baseParams, { - groupBy : this.groupField, - groupDir: this.groupDir - }); - - var lo = this.lastOptions; - if (lo && lo.params) { - lo.params.groupDir = this.groupDir; - - //this is deleted because of a bug reported at http://www.extjs.com/forum/showthread.php?t=82907 - delete lo.params.groupBy; - } - } - }, - - /** - * @private - * TODO: This function is apparently never invoked anywhere in the framework. It has no documentation - * and should be considered for deletion - */ - applyGrouping : function(alwaysFireChange){ - if(this.groupField !== false){ - this.groupBy(this.groupField, true, this.groupDir); - return true; - }else{ - if(alwaysFireChange === true){ - this.fireEvent('datachanged', this); - } - return false; - } - }, - - /** - * @private - * Returns the grouping field that should be used. If groupOnSort is used this will be sortInfo's field, - * otherwise it will be this.groupField - * @return {String} The group field - */ - getGroupState : function(){ - return this.groupOnSort && this.groupField !== false ? - (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField; - } -}); -Ext.reg('groupingstore', Ext.data.GroupingStore); diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/data-grouping.js b/web-client/src/main/resources/apps/js/ext/pkgs/data-grouping.js deleted file mode 100644 index 13c0b9c5f02..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/data-grouping.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.data.GroupingStore=Ext.extend(Ext.data.Store,{constructor:function(d){d=d||{};this.hasMultiSort=true;this.multiSortInfo=this.multiSortInfo||{sorters:[]};var e=this.multiSortInfo.sorters,c=d.groupField||this.groupField,b=d.sortInfo||this.sortInfo,a=d.groupDir||this.groupDir;if(c){e.push({field:c,direction:a})}if(b){e.push(b)}Ext.data.GroupingStore.superclass.constructor.call(this,d);this.addEvents("groupchange");this.applyGroupField()},remoteGroup:false,groupOnSort:false,groupDir:"ASC",clearGrouping:function(){this.groupField=false;if(this.remoteGroup){if(this.baseParams){delete this.baseParams.groupBy;delete this.baseParams.groupDir}var a=this.lastOptions;if(a&&a.params){delete a.params.groupBy;delete a.params.groupDir}this.reload()}else{this.sort();this.fireEvent("datachanged",this)}},groupBy:function(e,a,d){d=d?(String(d).toUpperCase()=="DESC"?"DESC":"ASC"):this.groupDir;if(this.groupField==e&&this.groupDir==d&&!a){return}var c=this.multiSortInfo.sorters;if(c.length>0&&c[0].field==this.groupField){c.shift()}this.groupField=e;this.groupDir=d;this.applyGroupField();var b=function(){this.fireEvent("groupchange",this,this.getGroupState())};if(this.groupOnSort){this.sort(e,d);b.call(this);return}if(this.remoteGroup){this.on("load",b,this,{single:true});this.reload()}else{this.sort(c);b.call(this)}},sort:function(g,c){if(this.remoteSort){return Ext.data.GroupingStore.superclass.sort.call(this,g,c)}var f=[];if(Ext.isArray(arguments[0])){f=arguments[0]}else{if(g==undefined){f=this.sortInfo?[this.sortInfo]:[]}else{var e=this.fields.get(g);if(!e){return false}var b=e.name,a=this.sortInfo||null,d=this.sortToggle?this.sortToggle[b]:null;if(!c){if(a&&a.field==b){c=(this.sortToggle[b]||"ASC").toggle("ASC","DESC")}else{c=e.sortDir}}this.sortToggle[b]=c;this.sortInfo={field:b,direction:c};f=[this.sortInfo]}}if(this.groupField){f.unshift({direction:this.groupDir,field:this.groupField})}return this.multiSort.call(this,f,c)},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}Ext.apply(this.baseParams,{groupBy:this.groupField,groupDir:this.groupDir});var a=this.lastOptions;if(a&&a.params){a.params.groupDir=this.groupDir;delete a.params.groupBy}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);return true}else{if(a===true){this.fireEvent("datachanged",this)}return false}},getGroupState:function(){return this.groupOnSort&&this.groupField!==false?(this.sortInfo?this.sortInfo.field:undefined):this.groupField}});Ext.reg("groupingstore",Ext.data.GroupingStore); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/data-json-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/data-json-debug.js deleted file mode 100644 index fae02554376..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/data-json-debug.js +++ /dev/null @@ -1,650 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.data.JsonWriter - * @extends Ext.data.DataWriter - * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action. - */ -Ext.data.JsonWriter = Ext.extend(Ext.data.DataWriter, { - /** - * @cfg {Boolean} encode

      true to {@link Ext.util.JSON#encode JSON encode} the - * {@link Ext.data.DataWriter#toHash hashed data} into a standard HTTP parameter named after this - * Reader's meta.root property which, by default is imported from the associated Reader. Defaults to true.

      - *

      If set to false, the hashed data is {@link Ext.util.JSON#encode JSON encoded}, along with - * the associated {@link Ext.data.Store}'s {@link Ext.data.Store#baseParams baseParams}, into the POST body.

      - *

      When using {@link Ext.data.DirectProxy}, set this to false since Ext.Direct.JsonProvider will perform - * its own json-encoding. In addition, if you're using {@link Ext.data.HttpProxy}, setting to false - * will cause HttpProxy to transmit data using the jsonData configuration-params of {@link Ext.Ajax#request} - * instead of params.

      - *

      When using a {@link Ext.data.Store#restful} Store, some serverside frameworks are - * tuned to expect data through the jsonData mechanism. In those cases, one will want to set encode: false, as in - * let the lower-level connection object (eg: Ext.Ajax) do the encoding.

      - */ - encode : true, - /** - * @cfg {Boolean} encodeDelete False to send only the id to the server on delete, true to encode it in an object - * literal, eg:
      
      -{id: 1}
      - * 
      Defaults to false - */ - encodeDelete: false, - - constructor : function(config){ - Ext.data.JsonWriter.superclass.constructor.call(this, config); - }, - - /** - *

      This method should not need to be called by application code, however it may be useful on occasion to - * override it, or augment it with an {@link Function#createInterceptor interceptor} or {@link Function#createSequence sequence}.

      - *

      The provided implementation encodes the serialized data representing the Store's modified Records into the Ajax request's - * params according to the {@link #encode} setting.

      - * @param {Object} Ajax request params object to write into. - * @param {Object} baseParams as defined by {@link Ext.data.Store#baseParams}. The baseParms must be encoded by the extending class, eg: {@link Ext.data.JsonWriter}, {@link Ext.data.XmlWriter}. - * @param {Object/Object[]} data Data object representing the serialized modified records from the Store. May be either a single object, - * or an Array of objects - user implementations must handle both cases. - */ - render : function(params, baseParams, data) { - if (this.encode === true) { - // Encode here now. - Ext.apply(params, baseParams); - params[this.meta.root] = Ext.encode(data); - } else { - // defer encoding for some other layer, probably in {@link Ext.Ajax#request}. Place everything into "jsonData" key. - var jdata = Ext.apply({}, baseParams); - jdata[this.meta.root] = data; - params.jsonData = jdata; - } - }, - /** - * Implements abstract Ext.data.DataWriter#createRecord - * @protected - * @param {Ext.data.Record} rec - * @return {Object} - */ - createRecord : function(rec) { - return this.toHash(rec); - }, - /** - * Implements abstract Ext.data.DataWriter#updateRecord - * @protected - * @param {Ext.data.Record} rec - * @return {Object} - */ - updateRecord : function(rec) { - return this.toHash(rec); - - }, - /** - * Implements abstract Ext.data.DataWriter#destroyRecord - * @protected - * @param {Ext.data.Record} rec - * @return {Object} - */ - destroyRecord : function(rec){ - if(this.encodeDelete){ - var data = {}; - data[this.meta.idProperty] = rec.id; - return data; - }else{ - return rec.id; - } - } -});/** - * @class Ext.data.JsonReader - * @extends Ext.data.DataReader - *

      Data reader class to create an Array of {@link Ext.data.Record} objects - * from a JSON packet based on mappings in a provided {@link Ext.data.Record} - * constructor.

      - *

      Example code:

      - *
      
      -var myReader = new Ext.data.JsonReader({
      -    // metadata configuration options:
      -    {@link #idProperty}: 'id'
      -    {@link #root}: 'rows',
      -    {@link #totalProperty}: 'results',
      -    {@link Ext.data.DataReader#messageProperty}: "msg"  // The element within the response that provides a user-feedback message (optional)
      -
      -    // the fields config option will internally create an {@link Ext.data.Record}
      -    // constructor that provides mapping for reading the record data objects
      -    {@link Ext.data.DataReader#fields fields}: [
      -        // map Record's 'firstname' field to data object's key of same name
      -        {name: 'name', mapping: 'firstname'},
      -        // map Record's 'job' field to data object's 'occupation' key
      -        {name: 'job', mapping: 'occupation'}
      -    ]
      -});
      -
      - *

      This would consume a JSON data object of the form:

      
      -{
      -    results: 2000, // Reader's configured {@link #totalProperty}
      -    rows: [        // Reader's configured {@link #root}
      -        // record data objects:
      -        { {@link #idProperty id}: 1, firstname: 'Bill', occupation: 'Gardener' },
      -        { {@link #idProperty id}: 2, firstname: 'Ben' , occupation: 'Horticulturalist' },
      -        ...
      -    ]
      -}
      -
      - *

      Automatic configuration using metaData

      - *

      It is possible to change a JsonReader's metadata at any time by including - * a metaData property in the JSON data object. If the JSON data - * object has a metaData property, a {@link Ext.data.Store Store} - * object using this Reader will reconfigure itself to use the newly provided - * field definition and fire its {@link Ext.data.Store#metachange metachange} - * event. The metachange event handler may interrogate the metaData - * property to perform any configuration required.

      - *

      Note that reconfiguring a Store potentially invalidates objects which may - * refer to Fields or Records which no longer exist.

      - *

      To use this facility you would create the JsonReader like this:

      
      -var myReader = new Ext.data.JsonReader();
      -
      - *

      The first data packet from the server would configure the reader by - * containing a metaData property and the data. For - * example, the JSON data object might take the form:

      
      -{
      -    metaData: {
      -        "{@link #idProperty}": "id",
      -        "{@link #root}": "rows",
      -        "{@link #totalProperty}": "results"
      -        "{@link #successProperty}": "success",
      -        "{@link Ext.data.DataReader#fields fields}": [
      -            {"name": "name"},
      -            {"name": "job", "mapping": "occupation"}
      -        ],
      -        // used by store to set its sortInfo
      -        "sortInfo":{
      -           "field": "name",
      -           "direction": "ASC"
      -        },
      -        // {@link Ext.PagingToolbar paging data} (if applicable)
      -        "start": 0,
      -        "limit": 2,
      -        // custom property
      -        "foo": "bar"
      -    },
      -    // Reader's configured {@link #successProperty}
      -    "success": true,
      -    // Reader's configured {@link #totalProperty}
      -    "results": 2000,
      -    // Reader's configured {@link #root}
      -    // (this data simulates 2 results {@link Ext.PagingToolbar per page})
      -    "rows": [ // *Note: this must be an Array
      -        { "id": 1, "name": "Bill", "occupation": "Gardener" },
      -        { "id": 2, "name":  "Ben", "occupation": "Horticulturalist" }
      -    ]
      -}
      - * 
      - *

      The metaData property in the JSON data object should contain:

      - *
        - *
      • any of the configuration options for this class
      • - *
      • a {@link Ext.data.Record#fields fields} property which - * the JsonReader will use as an argument to the - * {@link Ext.data.Record#create data Record create method} in order to - * configure the layout of the Records it will produce.
      • - *
      • a {@link Ext.data.Store#sortInfo sortInfo} property - * which the JsonReader will use to set the {@link Ext.data.Store}'s - * {@link Ext.data.Store#sortInfo sortInfo} property
      • - *
      • any custom properties needed
      • - *
      - * - * @constructor - * Create a new JsonReader - * @param {Object} meta Metadata configuration options. - * @param {Array/Object} recordType - *

      Either an Array of {@link Ext.data.Field Field} definition objects (which - * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record} - * constructor created from {@link Ext.data.Record#create}.

      - */ -Ext.data.JsonReader = function(meta, recordType){ - meta = meta || {}; - /** - * @cfg {String} idProperty [id] Name of the property within a row object - * that contains a record identifier value. Defaults to id - */ - /** - * @cfg {String} successProperty [success] Name of the property from which to - * retrieve the success attribute. Defaults to success. See - * {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception} - * for additional information. - */ - /** - * @cfg {String} totalProperty [total] Name of the property from which to - * retrieve the total number of records in the dataset. This is only needed - * if the whole dataset is not passed in one go, but is being paged from - * the remote server. Defaults to total. - */ - /** - * @cfg {String} root [undefined] Required. The name of the property - * which contains the Array of row objects. Defaults to undefined. - * An exception will be thrown if the root property is undefined. The data - * packet value for this property should be an empty array to clear the data - * or show no data. - */ - Ext.applyIf(meta, { - idProperty: 'id', - successProperty: 'success', - totalProperty: 'total' - }); - - Ext.data.JsonReader.superclass.constructor.call(this, meta, recordType || meta.fields); -}; -Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, { - /** - * This JsonReader's metadata as passed to the constructor, or as passed in - * the last data packet's metaData property. - * @type Mixed - * @property meta - */ - /** - * This method is only used by a DataProxy which has retrieved data from a remote server. - * @param {Object} response The XHR object which contains the JSON data in its responseText. - * @return {Object} data A data block which is used by an Ext.data.Store object as - * a cache of Ext.data.Records. - */ - read : function(response){ - var json = response.responseText; - var o = Ext.decode(json); - if(!o) { - throw {message: 'JsonReader.read: Json object not found'}; - } - return this.readRecords(o); - }, - - /* - * TODO: refactor code between JsonReader#readRecords, #readResponse into 1 method. - * there's ugly duplication going on due to maintaining backwards compat. with 2.0. It's time to do this. - */ - /** - * Decode a JSON response from server. - * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] - * @param {Object} response The XHR object returned through an Ajax server request. - * @return {Response} A {@link Ext.data.Response Response} object containing the data response, and also status information. - */ - readResponse : function(action, response) { - var o = (response.responseText !== undefined) ? Ext.decode(response.responseText) : response; - if(!o) { - throw new Ext.data.JsonReader.Error('response'); - } - - var root = this.getRoot(o), - success = this.getSuccess(o); - if (success && action === Ext.data.Api.actions.create) { - var def = Ext.isDefined(root); - if (def && Ext.isEmpty(root)) { - throw new Ext.data.JsonReader.Error('root-empty', this.meta.root); - } - else if (!def) { - throw new Ext.data.JsonReader.Error('root-undefined-response', this.meta.root); - } - } - - // instantiate response object - var res = new Ext.data.Response({ - action: action, - success: success, - data: (root) ? this.extractData(root, false) : [], - message: this.getMessage(o), - raw: o - }); - - // blow up if no successProperty - if (Ext.isEmpty(res.success)) { - throw new Ext.data.JsonReader.Error('successProperty-response', this.meta.successProperty); - } - return res; - }, - - /** - * Create a data block containing Ext.data.Records from a JSON object. - * @param {Object} o An object which contains an Array of row objects in the property specified - * in the config as 'root, and optionally a property, specified in the config as 'totalProperty' - * which contains the total size of the dataset. - * @return {Object} data A data block which is used by an Ext.data.Store object as - * a cache of Ext.data.Records. - */ - readRecords : function(o){ - /** - * After any data loads, the raw JSON data is available for further custom processing. If no data is - * loaded or there is a load exception this property will be undefined. - * @type Object - */ - this.jsonData = o; - if(o.metaData){ - this.onMetaChange(o.metaData); - } - var s = this.meta, Record = this.recordType, - f = Record.prototype.fields, fi = f.items, fl = f.length, v; - - var root = this.getRoot(o), c = root.length, totalRecords = c, success = true; - if(s.totalProperty){ - v = parseInt(this.getTotal(o), 10); - if(!isNaN(v)){ - totalRecords = v; - } - } - if(s.successProperty){ - v = this.getSuccess(o); - if(v === false || v === 'false'){ - success = false; - } - } - - // TODO return Ext.data.Response instance instead. @see #readResponse - return { - success : success, - records : this.extractData(root, true), // <-- true to return [Ext.data.Record] - totalRecords : totalRecords - }; - }, - - // private - buildExtractors : function() { - if(this.ef){ - return; - } - var s = this.meta, Record = this.recordType, - f = Record.prototype.fields, fi = f.items, fl = f.length; - - if(s.totalProperty) { - this.getTotal = this.createAccessor(s.totalProperty); - } - if(s.successProperty) { - this.getSuccess = this.createAccessor(s.successProperty); - } - if (s.messageProperty) { - this.getMessage = this.createAccessor(s.messageProperty); - } - this.getRoot = s.root ? this.createAccessor(s.root) : function(p){return p;}; - if (s.id || s.idProperty) { - var g = this.createAccessor(s.id || s.idProperty); - this.getId = function(rec) { - var r = g(rec); - return (r === undefined || r === '') ? null : r; - }; - } else { - this.getId = function(){return null;}; - } - var ef = []; - for(var i = 0; i < fl; i++){ - f = fi[i]; - var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name; - ef.push(this.createAccessor(map)); - } - this.ef = ef; - }, - - /** - * @ignore - * TODO This isn't used anywhere?? Don't we want to use this where possible instead of complex #createAccessor? - */ - simpleAccess : function(obj, subsc) { - return obj[subsc]; - }, - - /** - * @ignore - */ - createAccessor : function(){ - var re = /[\[\.]/; - return function(expr) { - if(Ext.isEmpty(expr)){ - return Ext.emptyFn; - } - if(Ext.isFunction(expr)){ - return expr; - } - var i = String(expr).search(re); - if(i >= 0){ - return new Function('obj', 'return obj' + (i > 0 ? '.' : '') + expr); - } - return function(obj){ - return obj[expr]; - }; - - }; - }(), - - /** - * type-casts a single row of raw-data from server - * @param {Object} data - * @param {Array} items - * @param {Integer} len - * @private - */ - extractValues : function(data, items, len) { - var f, values = {}; - for(var j = 0; j < len; j++){ - f = items[j]; - var v = this.ef[j](data); - values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data); - } - return values; - } -}); - -/** - * @class Ext.data.JsonReader.Error - * Error class for JsonReader - */ -Ext.data.JsonReader.Error = Ext.extend(Ext.Error, { - constructor : function(message, arg) { - this.arg = arg; - Ext.Error.call(this, message); - }, - name : 'Ext.data.JsonReader' -}); -Ext.apply(Ext.data.JsonReader.Error.prototype, { - lang: { - 'response': 'An error occurred while json-decoding your server response', - 'successProperty-response': 'Could not locate your "successProperty" in your server response. Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response. See the JsonReader docs.', - 'root-undefined-config': 'Your JsonReader was configured without a "root" property. Please review your JsonReader config and make sure to define the root property. See the JsonReader docs.', - 'idProperty-undefined' : 'Your JsonReader was configured without an "idProperty" Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id"). See the JsonReader docs.', - 'root-empty': 'Data was expected to be returned by the server in the "root" property of the response. Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response. See JsonReader docs.' - } -}); -/** - * @class Ext.data.ArrayReader - * @extends Ext.data.JsonReader - *

      Data reader class to create an Array of {@link Ext.data.Record} objects from an Array. - * Each element of that Array represents a row of data fields. The - * fields are pulled into a Record object using as a subscript, the mapping property - * of the field definition if it exists, or the field's ordinal position in the definition.

      - *

      Example code:

      - *
      
      -var Employee = Ext.data.Record.create([
      -    {name: 'name', mapping: 1},         // "mapping" only needed if an "id" field is present which
      -    {name: 'occupation', mapping: 2}    // precludes using the ordinal position as the index.
      -]);
      -var myReader = new Ext.data.ArrayReader({
      -    {@link #idIndex}: 0
      -}, Employee);
      -
      - *

      This would consume an Array like this:

      - *
      
      -[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]
      - * 
      - * @constructor - * Create a new ArrayReader - * @param {Object} meta Metadata configuration options. - * @param {Array/Object} recordType - *

      Either an Array of {@link Ext.data.Field Field} definition objects (which - * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record} - * constructor created from {@link Ext.data.Record#create}.

      - */ -Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, { - /** - * @cfg {String} successProperty - * @hide - */ - /** - * @cfg {Number} id (optional) The subscript within row Array that provides an ID for the Record. - * Deprecated. Use {@link #idIndex} instead. - */ - /** - * @cfg {Number} idIndex (optional) The subscript within row Array that provides an ID for the Record. - */ - /** - * Create a data block containing Ext.data.Records from an Array. - * @param {Object} o An Array of row objects which represents the dataset. - * @return {Object} data A data block which is used by an Ext.data.Store object as - * a cache of Ext.data.Records. - */ - readRecords : function(o){ - this.arrayData = o; - var s = this.meta, - sid = s ? Ext.num(s.idIndex, s.id) : null, - recordType = this.recordType, - fields = recordType.prototype.fields, - records = [], - success = true, - v; - - var root = this.getRoot(o); - - for(var i = 0, len = root.length; i < len; i++) { - var n = root[i], - values = {}, - id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null); - for(var j = 0, jlen = fields.length; j < jlen; j++) { - var f = fields.items[j], - k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j; - v = n[k] !== undefined ? n[k] : f.defaultValue; - v = f.convert(v, n); - values[f.name] = v; - } - var record = new recordType(values, id); - record.json = n; - records[records.length] = record; - } - - var totalRecords = records.length; - - if(s.totalProperty) { - v = parseInt(this.getTotal(o), 10); - if(!isNaN(v)) { - totalRecords = v; - } - } - if(s.successProperty){ - v = this.getSuccess(o); - if(v === false || v === 'false'){ - success = false; - } - } - - return { - success : success, - records : records, - totalRecords : totalRecords - }; - } -});/** - * @class Ext.data.ArrayStore - * @extends Ext.data.Store - *

      Formerly known as "SimpleStore".

      - *

      Small helper class to make creating {@link Ext.data.Store}s from Array data easier. - * An ArrayStore will be automatically configured with a {@link Ext.data.ArrayReader}.

      - *

      A store configuration would be something like:

      
      -var store = new Ext.data.ArrayStore({
      -    // store configs
      -    autoDestroy: true,
      -    storeId: 'myStore',
      -    // reader configs
      -    idIndex: 0,  
      -    fields: [
      -       'company',
      -       {name: 'price', type: 'float'},
      -       {name: 'change', type: 'float'},
      -       {name: 'pctChange', type: 'float'},
      -       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
      -    ]
      -});
      - * 

      - *

      This store is configured to consume a returned object of the form:

      
      -var myData = [
      -    ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
      -    ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
      -    ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
      -    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
      -    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
      -];
      - * 
      - * An object literal of this form could also be used as the {@link #data} config option.

      - *

      *Note: Although not listed here, this class accepts all of the configuration options of - * {@link Ext.data.ArrayReader ArrayReader}.

      - * @constructor - * @param {Object} config - * @xtype arraystore - */ -Ext.data.ArrayStore = Ext.extend(Ext.data.Store, { - /** - * @cfg {Ext.data.DataReader} reader @hide - */ - constructor: function(config){ - Ext.data.ArrayStore.superclass.constructor.call(this, Ext.apply(config, { - reader: new Ext.data.ArrayReader(config) - })); - }, - - loadData : function(data, append){ - if(this.expandData === true){ - var r = []; - for(var i = 0, len = data.length; i < len; i++){ - r[r.length] = [data[i]]; - } - data = r; - } - Ext.data.ArrayStore.superclass.loadData.call(this, data, append); - } -}); -Ext.reg('arraystore', Ext.data.ArrayStore); - -// backwards compat -Ext.data.SimpleStore = Ext.data.ArrayStore; -Ext.reg('simplestore', Ext.data.SimpleStore);/** - * @class Ext.data.JsonStore - * @extends Ext.data.Store - *

      Small helper class to make creating {@link Ext.data.Store}s from JSON data easier. - * A JsonStore will be automatically configured with a {@link Ext.data.JsonReader}.

      - *

      A store configuration would be something like:

      
      -var store = new Ext.data.JsonStore({
      -    // store configs
      -    autoDestroy: true,
      -    url: 'get-images.php',
      -    storeId: 'myStore',
      -    // reader configs
      -    root: 'images',
      -    idProperty: 'name',
      -    fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
      -});
      - * 

      - *

      This store is configured to consume a returned object of the form:

      
      -{
      -    images: [
      -        {name: 'Image one', url:'/GetImage.php?id=1', size:46.5, lastmod: new Date(2007, 10, 29)},
      -        {name: 'Image Two', url:'/GetImage.php?id=2', size:43.2, lastmod: new Date(2007, 10, 30)}
      -    ]
      -}
      - * 
      - * An object literal of this form could also be used as the {@link #data} config option.

      - *

      *Note: Although not listed here, this class accepts all of the configuration options of - * {@link Ext.data.JsonReader JsonReader}.

      - * @constructor - * @param {Object} config - * @xtype jsonstore - */ -Ext.data.JsonStore = Ext.extend(Ext.data.Store, { - /** - * @cfg {Ext.data.DataReader} reader @hide - */ - constructor: function(config){ - Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(config, { - reader: new Ext.data.JsonReader(config) - })); - } -}); -Ext.reg('jsonstore', Ext.data.JsonStore); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/data-json.js b/web-client/src/main/resources/apps/js/ext/pkgs/data-json.js deleted file mode 100644 index 72950dd4e82..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/data-json.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.data.JsonWriter=Ext.extend(Ext.data.DataWriter,{encode:true,encodeDelete:false,constructor:function(a){Ext.data.JsonWriter.superclass.constructor.call(this,a)},render:function(c,d,b){if(this.encode===true){Ext.apply(c,d);c[this.meta.root]=Ext.encode(b)}else{var a=Ext.apply({},d);a[this.meta.root]=b;c.jsonData=a}},createRecord:function(a){return this.toHash(a)},updateRecord:function(a){return this.toHash(a)},destroyRecord:function(b){if(this.encodeDelete){var a={};a[this.meta.idProperty]=b.id;return a}else{return b.id}}});Ext.data.JsonReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:"id",successProperty:"success",totalProperty:"total"});Ext.data.JsonReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(a){var b=a.responseText;var c=Ext.decode(b);if(!c){throw {message:"JsonReader.read: Json object not found"}}return this.readRecords(c)},readResponse:function(e,b){var g=(b.responseText!==undefined)?Ext.decode(b.responseText):b;if(!g){throw new Ext.data.JsonReader.Error("response")}var a=this.getRoot(g),f=this.getSuccess(g);if(f&&e===Ext.data.Api.actions.create){var d=Ext.isDefined(a);if(d&&Ext.isEmpty(a)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!d){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}var c=new Ext.data.Response({action:e,success:f,data:(a)?this.extractData(a,false):[],message:this.getMessage(g),raw:g});if(Ext.isEmpty(c.success)){throw new Ext.data.JsonReader.Error("successProperty-response",this.meta.successProperty)}return c},readRecords:function(a){this.jsonData=a;if(a.metaData){this.onMetaChange(a.metaData)}var m=this.meta,h=this.recordType,b=h.prototype.fields,l=b.items,i=b.length,j;var g=this.getRoot(a),e=g.length,d=e,k=true;if(m.totalProperty){j=parseInt(this.getTotal(a),10);if(!isNaN(j)){d=j}}if(m.successProperty){j=this.getSuccess(a);if(j===false||j==="false"){k=false}}return{success:k,records:this.extractData(g,true),totalRecords:d}},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.createAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.createAccessor(l.successProperty)}if(l.messageProperty){this.getMessage=this.createAccessor(l.messageProperty)}this.getRoot=l.root?this.createAccessor(l.root):function(f){return f};if(l.id||l.idProperty){var d=this.createAccessor(l.id||l.idProperty);this.getId=function(g){var f=d(g);return(f===undefined||f==="")?null:f}}else{this.getId=function(){return null}}var c=[];for(var b=0;b=0){return new Function("obj","return obj"+(b>0?".":"")+c)}return function(d){return d[c]}}}(),extractValues:function(h,d,a){var g,c={};for(var e=0;eIn order to use these features, an {@link #itemSelector} - * config must be provided for the DataView to determine what nodes it will be working with.
      - * - *

      The example below binds a DataView to a {@link Ext.data.Store} and renders it into an {@link Ext.Panel}.

      - *
      
      -var store = new Ext.data.JsonStore({
      -    url: 'get-images.php',
      -    root: 'images',
      -    fields: [
      -        'name', 'url',
      -        {name:'size', type: 'float'},
      -        {name:'lastmod', type:'date', dateFormat:'timestamp'}
      -    ]
      -});
      -store.load();
      -
      -var tpl = new Ext.XTemplate(
      -    '<tpl for=".">',
      -        '<div class="thumb-wrap" id="{name}">',
      -        '<div class="thumb"><img src="{url}" title="{name}"></div>',
      -        '<span class="x-editable">{shortName}</span></div>',
      -    '</tpl>',
      -    '<div class="x-clear"></div>'
      -);
      -
      -var panel = new Ext.Panel({
      -    id:'images-view',
      -    frame:true,
      -    width:535,
      -    autoHeight:true,
      -    collapsible:true,
      -    layout:'fit',
      -    title:'Simple DataView',
      -
      -    items: new Ext.DataView({
      -        store: store,
      -        tpl: tpl,
      -        autoHeight:true,
      -        multiSelect: true,
      -        overClass:'x-view-over',
      -        itemSelector:'div.thumb-wrap',
      -        emptyText: 'No images to display'
      -    })
      -});
      -panel.render(document.body);
      -
      - * @constructor - * Create a new DataView - * @param {Object} config The config object - * @xtype dataview - */ -Ext.DataView = Ext.extend(Ext.BoxComponent, { - /** - * @cfg {String/Array} tpl - * The HTML fragment or an array of fragments that will make up the template used by this DataView. This should - * be specified in the same format expected by the constructor of {@link Ext.XTemplate}. - */ - /** - * @cfg {Ext.data.Store} store - * The {@link Ext.data.Store} to bind this DataView to. - */ - /** - * @cfg {String} itemSelector - * This is a required setting. A simple CSS selector (e.g. div.some-class or - * span:first-child) that will be used to determine what nodes this DataView will be - * working with. - */ - /** - * @cfg {Boolean} multiSelect - * True to allow selection of more than one item at a time, false to allow selection of only a single item - * at a time or no selection at all, depending on the value of {@link #singleSelect} (defaults to false). - */ - /** - * @cfg {Boolean} singleSelect - * True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false). - * Note that if {@link #multiSelect} = true, this value will be ignored. - */ - /** - * @cfg {Boolean} simpleSelect - * True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl, - * false to force the user to hold Ctrl or Shift to select more than on item (defaults to false). - */ - /** - * @cfg {String} overClass - * A CSS class to apply to each item in the view on mouseover (defaults to undefined). - */ - /** - * @cfg {String} loadingText - * A string to display during data load operations (defaults to undefined). If specified, this text will be - * displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's - * contents will continue to display normally until the new data is loaded and the contents are replaced. - */ - /** - * @cfg {String} selectedClass - * A CSS class to apply to each selected item in the view (defaults to 'x-view-selected'). - */ - selectedClass : "x-view-selected", - /** - * @cfg {String} emptyText - * The text to display in the view when there is no data to display (defaults to ''). - */ - emptyText : "", - - /** - * @cfg {Boolean} deferEmptyText True to defer emptyText being applied until the store's first load - */ - deferEmptyText: true, - /** - * @cfg {Boolean} trackOver True to enable mouseenter and mouseleave events - */ - trackOver: false, - - /** - * @cfg {Boolean} blockRefresh Set this to true to ignore datachanged events on the bound store. This is useful if - * you wish to provide custom transition animations via a plugin (defaults to false) - */ - blockRefresh: false, - - //private - last: false, - - // private - initComponent : function(){ - Ext.DataView.superclass.initComponent.call(this); - if(Ext.isString(this.tpl) || Ext.isArray(this.tpl)){ - this.tpl = new Ext.XTemplate(this.tpl); - } - - this.addEvents( - /** - * @event beforeclick - * Fires before a click is processed. Returns false to cancel the default action. - * @param {Ext.DataView} this - * @param {Number} index The index of the target node - * @param {HTMLElement} node The target node - * @param {Ext.EventObject} e The raw event object - */ - "beforeclick", - /** - * @event click - * Fires when a template node is clicked. - * @param {Ext.DataView} this - * @param {Number} index The index of the target node - * @param {HTMLElement} node The target node - * @param {Ext.EventObject} e The raw event object - */ - "click", - /** - * @event mouseenter - * Fires when the mouse enters a template node. trackOver:true or an overClass must be set to enable this event. - * @param {Ext.DataView} this - * @param {Number} index The index of the target node - * @param {HTMLElement} node The target node - * @param {Ext.EventObject} e The raw event object - */ - "mouseenter", - /** - * @event mouseleave - * Fires when the mouse leaves a template node. trackOver:true or an overClass must be set to enable this event. - * @param {Ext.DataView} this - * @param {Number} index The index of the target node - * @param {HTMLElement} node The target node - * @param {Ext.EventObject} e The raw event object - */ - "mouseleave", - /** - * @event containerclick - * Fires when a click occurs and it is not on a template node. - * @param {Ext.DataView} this - * @param {Ext.EventObject} e The raw event object - */ - "containerclick", - /** - * @event dblclick - * Fires when a template node is double clicked. - * @param {Ext.DataView} this - * @param {Number} index The index of the target node - * @param {HTMLElement} node The target node - * @param {Ext.EventObject} e The raw event object - */ - "dblclick", - /** - * @event contextmenu - * Fires when a template node is right clicked. - * @param {Ext.DataView} this - * @param {Number} index The index of the target node - * @param {HTMLElement} node The target node - * @param {Ext.EventObject} e The raw event object - */ - "contextmenu", - /** - * @event containercontextmenu - * Fires when a right click occurs that is not on a template node. - * @param {Ext.DataView} this - * @param {Ext.EventObject} e The raw event object - */ - "containercontextmenu", - /** - * @event selectionchange - * Fires when the selected nodes change. - * @param {Ext.DataView} this - * @param {Array} selections Array of the selected nodes - */ - "selectionchange", - - /** - * @event beforeselect - * Fires before a selection is made. If any handlers return false, the selection is cancelled. - * @param {Ext.DataView} this - * @param {HTMLElement} node The node to be selected - * @param {Array} selections Array of currently selected nodes - */ - "beforeselect" - ); - - this.store = Ext.StoreMgr.lookup(this.store); - this.all = new Ext.CompositeElementLite(); - this.selected = new Ext.CompositeElementLite(); - }, - - // private - afterRender : function(){ - Ext.DataView.superclass.afterRender.call(this); - - this.mon(this.getTemplateTarget(), { - "click": this.onClick, - "dblclick": this.onDblClick, - "contextmenu": this.onContextMenu, - scope:this - }); - - if(this.overClass || this.trackOver){ - this.mon(this.getTemplateTarget(), { - "mouseover": this.onMouseOver, - "mouseout": this.onMouseOut, - scope:this - }); - } - - if(this.store){ - this.bindStore(this.store, true); - } - }, - - /** - * Refreshes the view by reloading the data from the store and re-rendering the template. - */ - refresh : function() { - this.clearSelections(false, true); - var el = this.getTemplateTarget(), - records = this.store.getRange(); - - el.update(''); - if(records.length < 1){ - if(!this.deferEmptyText || this.hasSkippedEmptyText){ - el.update(this.emptyText); - } - this.all.clear(); - }else{ - this.tpl.overwrite(el, this.collectData(records, 0)); - this.all.fill(Ext.query(this.itemSelector, el.dom)); - this.updateIndexes(0); - } - this.hasSkippedEmptyText = true; - }, - - getTemplateTarget: function(){ - return this.el; - }, - - /** - * Function which can be overridden to provide custom formatting for each Record that is used by this - * DataView's {@link #tpl template} to render each node. - * @param {Array/Object} data The raw data object that was used to create the Record. - * @param {Number} recordIndex the index number of the Record being prepared for rendering. - * @param {Record} record The Record being prepared for rendering. - * @return {Array/Object} The formatted data in a format expected by the internal {@link #tpl template}'s overwrite() method. - * (either an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})) - */ - prepareData : function(data){ - return data; - }, - - /** - *

      Function which can be overridden which returns the data object passed to this - * DataView's {@link #tpl template} to render the whole DataView.

      - *

      This is usually an Array of data objects, each element of which is processed by an - * {@link Ext.XTemplate XTemplate} which uses '<tpl for=".">' to iterate over its supplied - * data object as an Array. However, named properties may be placed into the data object to - * provide non-repeating data such as headings, totals etc.

      - * @param {Array} records An Array of {@link Ext.data.Record}s to be rendered into the DataView. - * @param {Number} startIndex the index number of the Record being prepared for rendering. - * @return {Array} An Array of data objects to be processed by a repeating XTemplate. May also - * contain named properties. - */ - collectData : function(records, startIndex){ - var r = [], - i = 0, - len = records.length; - for(; i < len; i++){ - r[r.length] = this.prepareData(records[i].data, startIndex + i, records[i]); - } - return r; - }, - - // private - bufferRender : function(records, index){ - var div = document.createElement('div'); - this.tpl.overwrite(div, this.collectData(records, index)); - return Ext.query(this.itemSelector, div); - }, - - // private - onUpdate : function(ds, record){ - var index = this.store.indexOf(record); - if(index > -1){ - var sel = this.isSelected(index), - original = this.all.elements[index], - node = this.bufferRender([record], index)[0]; - - this.all.replaceElement(index, node, true); - if(sel){ - this.selected.replaceElement(original, node); - this.all.item(index).addClass(this.selectedClass); - } - this.updateIndexes(index, index); - } - }, - - // private - onAdd : function(ds, records, index){ - if(this.all.getCount() === 0){ - this.refresh(); - return; - } - var nodes = this.bufferRender(records, index), n, a = this.all.elements; - if(index < this.all.getCount()){ - n = this.all.item(index).insertSibling(nodes, 'before', true); - a.splice.apply(a, [index, 0].concat(nodes)); - }else{ - n = this.all.last().insertSibling(nodes, 'after', true); - a.push.apply(a, nodes); - } - this.updateIndexes(index); - }, - - // private - onRemove : function(ds, record, index){ - this.deselect(index); - this.all.removeElement(index, true); - this.updateIndexes(index); - if (this.store.getCount() === 0){ - this.refresh(); - } - }, - - /** - * Refreshes an individual node's data from the store. - * @param {Number} index The item's data index in the store - */ - refreshNode : function(index){ - this.onUpdate(this.store, this.store.getAt(index)); - }, - - // private - updateIndexes : function(startIndex, endIndex){ - var ns = this.all.elements; - startIndex = startIndex || 0; - endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length - 1)); - for(var i = startIndex; i <= endIndex; i++){ - ns[i].viewIndex = i; - } - }, - - /** - * Returns the store associated with this DataView. - * @return {Ext.data.Store} The store - */ - getStore : function(){ - return this.store; - }, - - /** - * Changes the data store bound to this view and refreshes it. - * @param {Store} store The store to bind to this view - */ - bindStore : function(store, initial){ - if(!initial && this.store){ - if(store !== this.store && this.store.autoDestroy){ - this.store.destroy(); - }else{ - this.store.un("beforeload", this.onBeforeLoad, this); - this.store.un("datachanged", this.onDataChanged, this); - this.store.un("add", this.onAdd, this); - this.store.un("remove", this.onRemove, this); - this.store.un("update", this.onUpdate, this); - this.store.un("clear", this.refresh, this); - } - if(!store){ - this.store = null; - } - } - if(store){ - store = Ext.StoreMgr.lookup(store); - store.on({ - scope: this, - beforeload: this.onBeforeLoad, - datachanged: this.onDataChanged, - add: this.onAdd, - remove: this.onRemove, - update: this.onUpdate, - clear: this.refresh - }); - } - this.store = store; - if(store){ - this.refresh(); - } - }, - - /** - * @private - * Calls this.refresh if this.blockRefresh is not true - */ - onDataChanged: function() { - if (this.blockRefresh !== true) { - this.refresh.apply(this, arguments); - } - }, - - /** - * Returns the template node the passed child belongs to, or null if it doesn't belong to one. - * @param {HTMLElement} node - * @return {HTMLElement} The template node - */ - findItemFromChild : function(node){ - return Ext.fly(node).findParent(this.itemSelector, this.getTemplateTarget()); - }, - - // private - onClick : function(e){ - var item = e.getTarget(this.itemSelector, this.getTemplateTarget()), - index; - if(item){ - index = this.indexOf(item); - if(this.onItemClick(item, index, e) !== false){ - this.fireEvent("click", this, index, item, e); - } - }else{ - if(this.fireEvent("containerclick", this, e) !== false){ - this.onContainerClick(e); - } - } - }, - - onContainerClick : function(e){ - this.clearSelections(); - }, - - // private - onContextMenu : function(e){ - var item = e.getTarget(this.itemSelector, this.getTemplateTarget()); - if(item){ - this.fireEvent("contextmenu", this, this.indexOf(item), item, e); - }else{ - this.fireEvent("containercontextmenu", this, e); - } - }, - - // private - onDblClick : function(e){ - var item = e.getTarget(this.itemSelector, this.getTemplateTarget()); - if(item){ - this.fireEvent("dblclick", this, this.indexOf(item), item, e); - } - }, - - // private - onMouseOver : function(e){ - var item = e.getTarget(this.itemSelector, this.getTemplateTarget()); - if(item && item !== this.lastItem){ - this.lastItem = item; - Ext.fly(item).addClass(this.overClass); - this.fireEvent("mouseenter", this, this.indexOf(item), item, e); - } - }, - - // private - onMouseOut : function(e){ - if(this.lastItem){ - if(!e.within(this.lastItem, true, true)){ - Ext.fly(this.lastItem).removeClass(this.overClass); - this.fireEvent("mouseleave", this, this.indexOf(this.lastItem), this.lastItem, e); - delete this.lastItem; - } - } - }, - - // private - onItemClick : function(item, index, e){ - if(this.fireEvent("beforeclick", this, index, item, e) === false){ - return false; - } - if(this.multiSelect){ - this.doMultiSelection(item, index, e); - e.preventDefault(); - }else if(this.singleSelect){ - this.doSingleSelection(item, index, e); - e.preventDefault(); - } - return true; - }, - - // private - doSingleSelection : function(item, index, e){ - if(e.ctrlKey && this.isSelected(index)){ - this.deselect(index); - }else{ - this.select(index, false); - } - }, - - // private - doMultiSelection : function(item, index, e){ - if(e.shiftKey && this.last !== false){ - var last = this.last; - this.selectRange(last, index, e.ctrlKey); - this.last = last; // reset the last - }else{ - if((e.ctrlKey||this.simpleSelect) && this.isSelected(index)){ - this.deselect(index); - }else{ - this.select(index, e.ctrlKey || e.shiftKey || this.simpleSelect); - } - } - }, - - /** - * Gets the number of selected nodes. - * @return {Number} The node count - */ - getSelectionCount : function(){ - return this.selected.getCount(); - }, - - /** - * Gets the currently selected nodes. - * @return {Array} An array of HTMLElements - */ - getSelectedNodes : function(){ - return this.selected.elements; - }, - - /** - * Gets the indexes of the selected nodes. - * @return {Array} An array of numeric indexes - */ - getSelectedIndexes : function(){ - var indexes = [], - selected = this.selected.elements, - i = 0, - len = selected.length; - - for(; i < len; i++){ - indexes.push(selected[i].viewIndex); - } - return indexes; - }, - - /** - * Gets an array of the selected records - * @return {Array} An array of {@link Ext.data.Record} objects - */ - getSelectedRecords : function(){ - return this.getRecords(this.selected.elements); - }, - - /** - * Gets an array of the records from an array of nodes - * @param {Array} nodes The nodes to evaluate - * @return {Array} records The {@link Ext.data.Record} objects - */ - getRecords : function(nodes){ - var records = [], - i = 0, - len = nodes.length; - - for(; i < len; i++){ - records[records.length] = this.store.getAt(nodes[i].viewIndex); - } - return records; - }, - - /** - * Gets a record from a node - * @param {HTMLElement} node The node to evaluate - * @return {Record} record The {@link Ext.data.Record} object - */ - getRecord : function(node){ - return this.store.getAt(node.viewIndex); - }, - - /** - * Clears all selections. - * @param {Boolean} suppressEvent (optional) True to skip firing of the selectionchange event - */ - clearSelections : function(suppressEvent, skipUpdate){ - if((this.multiSelect || this.singleSelect) && this.selected.getCount() > 0){ - if(!skipUpdate){ - this.selected.removeClass(this.selectedClass); - } - this.selected.clear(); - this.last = false; - if(!suppressEvent){ - this.fireEvent("selectionchange", this, this.selected.elements); - } - } - }, - - /** - * Returns true if the passed node is selected, else false. - * @param {HTMLElement/Number/Ext.data.Record} node The node, node index or record to check - * @return {Boolean} True if selected, else false - */ - isSelected : function(node){ - return this.selected.contains(this.getNode(node)); - }, - - /** - * Deselects a node. - * @param {HTMLElement/Number/Record} node The node, node index or record to deselect - */ - deselect : function(node){ - if(this.isSelected(node)){ - node = this.getNode(node); - this.selected.removeElement(node); - if(this.last == node.viewIndex){ - this.last = false; - } - Ext.fly(node).removeClass(this.selectedClass); - this.fireEvent("selectionchange", this, this.selected.elements); - } - }, - - /** - * Selects a set of nodes. - * @param {Array/HTMLElement/String/Number/Ext.data.Record} nodeInfo An HTMLElement template node, index of a template node, - * id of a template node, record associated with a node or an array of any of those to select - * @param {Boolean} keepExisting (optional) true to keep existing selections - * @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange vent - */ - select : function(nodeInfo, keepExisting, suppressEvent){ - if(Ext.isArray(nodeInfo)){ - if(!keepExisting){ - this.clearSelections(true); - } - for(var i = 0, len = nodeInfo.length; i < len; i++){ - this.select(nodeInfo[i], true, true); - } - if(!suppressEvent){ - this.fireEvent("selectionchange", this, this.selected.elements); - } - } else{ - var node = this.getNode(nodeInfo); - if(!keepExisting){ - this.clearSelections(true); - } - if(node && !this.isSelected(node)){ - if(this.fireEvent("beforeselect", this, node, this.selected.elements) !== false){ - Ext.fly(node).addClass(this.selectedClass); - this.selected.add(node); - this.last = node.viewIndex; - if(!suppressEvent){ - this.fireEvent("selectionchange", this, this.selected.elements); - } - } - } - } - }, - - /** - * Selects a range of nodes. All nodes between start and end are selected. - * @param {Number} start The index of the first node in the range - * @param {Number} end The index of the last node in the range - * @param {Boolean} keepExisting (optional) True to retain existing selections - */ - selectRange : function(start, end, keepExisting){ - if(!keepExisting){ - this.clearSelections(true); - } - this.select(this.getNodes(start, end), true); - }, - - /** - * Gets a template node. - * @param {HTMLElement/String/Number/Ext.data.Record} nodeInfo An HTMLElement template node, index of a template node, - * the id of a template node or the record associated with the node. - * @return {HTMLElement} The node or null if it wasn't found - */ - getNode : function(nodeInfo){ - if(Ext.isString(nodeInfo)){ - return document.getElementById(nodeInfo); - }else if(Ext.isNumber(nodeInfo)){ - return this.all.elements[nodeInfo]; - }else if(nodeInfo instanceof Ext.data.Record){ - var idx = this.store.indexOf(nodeInfo); - return this.all.elements[idx]; - } - return nodeInfo; - }, - - /** - * Gets a range nodes. - * @param {Number} start (optional) The index of the first node in the range - * @param {Number} end (optional) The index of the last node in the range - * @return {Array} An array of nodes - */ - getNodes : function(start, end){ - var ns = this.all.elements, - nodes = [], - i; - - start = start || 0; - end = !Ext.isDefined(end) ? Math.max(ns.length - 1, 0) : end; - if(start <= end){ - for(i = start; i <= end && ns[i]; i++){ - nodes.push(ns[i]); - } - } else{ - for(i = start; i >= end && ns[i]; i--){ - nodes.push(ns[i]); - } - } - return nodes; - }, - - /** - * Finds the index of the passed node. - * @param {HTMLElement/String/Number/Record} nodeInfo An HTMLElement template node, index of a template node, the id of a template node - * or a record associated with a node. - * @return {Number} The index of the node or -1 - */ - indexOf : function(node){ - node = this.getNode(node); - if(Ext.isNumber(node.viewIndex)){ - return node.viewIndex; - } - return this.all.indexOf(node); - }, - - // private - onBeforeLoad : function(){ - if(this.loadingText){ - this.clearSelections(false, true); - this.getTemplateTarget().update('
      '+this.loadingText+'
      '); - this.all.clear(); - } - }, - - onDestroy : function(){ - this.all.clear(); - this.selected.clear(); - Ext.DataView.superclass.onDestroy.call(this); - this.bindStore(null); - } -}); - -/** - * Changes the data store bound to this view and refreshes it. (deprecated in favor of bindStore) - * @param {Store} store The store to bind to this view - */ -Ext.DataView.prototype.setStore = Ext.DataView.prototype.bindStore; - -Ext.reg('dataview', Ext.DataView); -/** - * @class Ext.list.ListView - * @extends Ext.DataView - *

      Ext.list.ListView is a fast and light-weight implentation of a - * {@link Ext.grid.GridPanel Grid} like view with the following characteristics:

      - *
        - *
      • resizable columns
      • - *
      • selectable
      • - *
      • column widths are initially proportioned by percentage based on the container - * width and number of columns
      • - *
      • uses templates to render the data in any required format
      • - *
      • no horizontal scrolling
      • - *
      • no editing
      • - *
      - *

      Example usage:

      - *
      
      -// consume JSON of this form:
      -{
      -   "images":[
      -      {
      -         "name":"dance_fever.jpg",
      -         "size":2067,
      -         "lastmod":1236974993000,
      -         "url":"images\/thumbs\/dance_fever.jpg"
      -      },
      -      {
      -         "name":"zack_sink.jpg",
      -         "size":2303,
      -         "lastmod":1236974993000,
      -         "url":"images\/thumbs\/zack_sink.jpg"
      -      }
      -   ]
      -}
      -var store = new Ext.data.JsonStore({
      -    url: 'get-images.php',
      -    root: 'images',
      -    fields: [
      -        'name', 'url',
      -        {name:'size', type: 'float'},
      -        {name:'lastmod', type:'date', dateFormat:'timestamp'}
      -    ]
      -});
      -store.load();
      -
      -var listView = new Ext.list.ListView({
      -    store: store,
      -    multiSelect: true,
      -    emptyText: 'No images to display',
      -    reserveScrollOffset: true,
      -    columns: [{
      -        header: 'File',
      -        width: .5,
      -        dataIndex: 'name'
      -    },{
      -        header: 'Last Modified',
      -        width: .35,
      -        dataIndex: 'lastmod',
      -        tpl: '{lastmod:date("m-d h:i a")}'
      -    },{
      -        header: 'Size',
      -        dataIndex: 'size',
      -        tpl: '{size:fileSize}', // format using Ext.util.Format.fileSize()
      -        align: 'right'
      -    }]
      -});
      -
      -// put it in a Panel so it looks pretty
      -var panel = new Ext.Panel({
      -    id:'images-view',
      -    width:425,
      -    height:250,
      -    collapsible:true,
      -    layout:'fit',
      -    title:'Simple ListView (0 items selected)',
      -    items: listView
      -});
      -panel.render(document.body);
      -
      -// little bit of feedback
      -listView.on('selectionchange', function(view, nodes){
      -    var l = nodes.length;
      -    var s = l != 1 ? 's' : '';
      -    panel.setTitle('Simple ListView ('+l+' item'+s+' selected)');
      -});
      - * 
      - * @constructor - * @param {Object} config - * @xtype listview - */ -Ext.list.ListView = Ext.extend(Ext.DataView, { - /** - * Set this property to true to disable the header click handler disabling sort - * (defaults to false). - * @type Boolean - * @property disableHeaders - */ - /** - * @cfg {Boolean} hideHeaders - * true to hide the {@link #internalTpl header row} (defaults to false so - * the {@link #internalTpl header row} will be shown). - */ - /** - * @cfg {String} itemSelector - * Defaults to 'dl' to work with the preconfigured {@link Ext.DataView#tpl tpl}. - * This setting specifies the CSS selector (e.g. div.some-class or span:first-child) - * that will be used to determine what nodes the ListView will be working with. - */ - itemSelector: 'dl', - /** - * @cfg {String} selectedClass The CSS class applied to a selected row (defaults to - * 'x-list-selected'). An example overriding the default styling: -
      
      -    .x-list-selected {background-color: yellow;}
      -    
      - * @type String - */ - selectedClass:'x-list-selected', - /** - * @cfg {String} overClass The CSS class applied when over a row (defaults to - * 'x-list-over'). An example overriding the default styling: -
      
      -    .x-list-over {background-color: orange;}
      -    
      - * @type String - */ - overClass:'x-list-over', - /** - * @cfg {Boolean} reserveScrollOffset - * By default will defer accounting for the configured {@link #scrollOffset} - * for 10 milliseconds. Specify true to account for the configured - * {@link #scrollOffset} immediately. - */ - /** - * @cfg {Number} scrollOffset The amount of space to reserve for the scrollbar (defaults to - * undefined). If an explicit value isn't specified, this will be automatically - * calculated. - */ - scrollOffset : undefined, - /** - * @cfg {Boolean/Object} columnResize - * Specify true or specify a configuration object for {@link Ext.list.ListView.ColumnResizer} - * to enable the columns to be resizable (defaults to true). - */ - columnResize: true, - /** - * @cfg {Array} columns An array of column configuration objects, for example: - *
      
      -{
      -    align: 'right',
      -    dataIndex: 'size',
      -    header: 'Size',
      -    tpl: '{size:fileSize}',
      -    width: .35
      -}
      -     * 
      - * Acceptable properties for each column configuration object are: - *
        - *
      • align : String
        Set the CSS text-align property - * of the column. Defaults to 'left'.
      • - *
      • dataIndex : String
        See {@link Ext.grid.Column}. - * {@link Ext.grid.Column#dataIndex dataIndex} for details.
      • - *
      • header : String
        See {@link Ext.grid.Column}. - * {@link Ext.grid.Column#header header} for details.
      • - *
      • tpl : String
        Specify a string to pass as the - * configuration string for {@link Ext.XTemplate}. By default an {@link Ext.XTemplate} - * will be implicitly created using the dataIndex.
      • - *
      • width : Number
        Percentage of the container width - * this column should be allocated. Columns that have no width specified will be - * allocated with an equal percentage to fill 100% of the container width. To easily take - * advantage of the full container width, leave the width of at least one column undefined. - * Note that if you do not want to take up the full width of the container, the width of - * every column needs to be explicitly defined.
      • - *
      - */ - /** - * @cfg {Boolean/Object} columnSort - * Specify true or specify a configuration object for {@link Ext.list.ListView.Sorter} - * to enable the columns to be sortable (defaults to true). - */ - columnSort: true, - /** - * @cfg {String/Array} internalTpl - * The template to be used for the header row. See {@link #tpl} for more details. - */ - - /* - * IE has issues when setting percentage based widths to 100%. Default to 99. - */ - maxColumnWidth: Ext.isIE ? 99 : 100, - - initComponent : function(){ - if(this.columnResize){ - this.colResizer = new Ext.list.ColumnResizer(this.colResizer); - this.colResizer.init(this); - } - if(this.columnSort){ - this.colSorter = new Ext.list.Sorter(this.columnSort); - this.colSorter.init(this); - } - if(!this.internalTpl){ - this.internalTpl = new Ext.XTemplate( - '
      ', - '', - '
      ', - '{header}', - '
      ', - '
      ', - '
      ', - '
      ', - '
      ', - '
      ' - ); - } - if(!this.tpl){ - this.tpl = new Ext.XTemplate( - '', - '
      ', - '', - '
      ', - ' class="{cls}">', - '{[values.tpl.apply(parent)]}', - '
      ', - '
      ', - '
      ', - '
      ', - '
      ' - ); - }; - - var cs = this.columns, - allocatedWidth = 0, - colsWithWidth = 0, - len = cs.length, - columns = []; - - for(var i = 0; i < len; i++){ - var c = cs[i]; - if(!c.isColumn) { - c.xtype = c.xtype ? (/^lv/.test(c.xtype) ? c.xtype : 'lv' + c.xtype) : 'lvcolumn'; - c = Ext.create(c); - } - if(c.width) { - allocatedWidth += c.width*100; - if(allocatedWidth > this.maxColumnWidth){ - c.width -= (allocatedWidth - this.maxColumnWidth) / 100; - } - colsWithWidth++; - } - columns.push(c); - } - - cs = this.columns = columns; - - // auto calculate missing column widths - if(colsWithWidth < len){ - var remaining = len - colsWithWidth; - if(allocatedWidth < this.maxColumnWidth){ - var perCol = ((this.maxColumnWidth-allocatedWidth) / remaining)/100; - for(var j = 0; j < len; j++){ - var c = cs[j]; - if(!c.width){ - c.width = perCol; - } - } - } - } - Ext.list.ListView.superclass.initComponent.call(this); - }, - - onRender : function(){ - this.autoEl = { - cls: 'x-list-wrap' - }; - Ext.list.ListView.superclass.onRender.apply(this, arguments); - - this.internalTpl.overwrite(this.el, {columns: this.columns}); - - this.innerBody = Ext.get(this.el.dom.childNodes[1].firstChild); - this.innerHd = Ext.get(this.el.dom.firstChild.firstChild); - - if(this.hideHeaders){ - this.el.dom.firstChild.style.display = 'none'; - } - }, - - getTemplateTarget : function(){ - return this.innerBody; - }, - - /** - *

      Function which can be overridden which returns the data object passed to this - * view's {@link #tpl template} to render the whole ListView. The returned object - * shall contain the following properties:

      - *
        - *
      • columns : String
        See {@link #columns}
      • - *
      • rows : String
        See - * {@link Ext.DataView}.{@link Ext.DataView#collectData collectData}
      • - *
      - * @param {Array} records An Array of {@link Ext.data.Record}s to be rendered into the DataView. - * @param {Number} startIndex the index number of the Record being prepared for rendering. - * @return {Object} A data object containing properties to be processed by a repeating - * XTemplate as described above. - */ - collectData : function(){ - var rs = Ext.list.ListView.superclass.collectData.apply(this, arguments); - return { - columns: this.columns, - rows: rs - }; - }, - - verifyInternalSize : function(){ - if(this.lastSize){ - this.onResize(this.lastSize.width, this.lastSize.height); - } - }, - - // private - onResize : function(w, h){ - var body = this.innerBody.dom, - header = this.innerHd.dom, - scrollWidth = w - Ext.num(this.scrollOffset, Ext.getScrollBarWidth()) + 'px', - parentNode; - - if(!body){ - return; - } - parentNode = body.parentNode; - if(Ext.isNumber(w)){ - if(this.reserveScrollOffset || ((parentNode.offsetWidth - parentNode.clientWidth) > 10)){ - body.style.width = scrollWidth; - header.style.width = scrollWidth; - }else{ - body.style.width = w + 'px'; - header.style.width = w + 'px'; - setTimeout(function(){ - if((parentNode.offsetWidth - parentNode.clientWidth) > 10){ - body.style.width = scrollWidth; - header.style.width = scrollWidth; - } - }, 10); - } - } - if(Ext.isNumber(h)){ - parentNode.style.height = Math.max(0, h - header.parentNode.offsetHeight) + 'px'; - } - }, - - updateIndexes : function(){ - Ext.list.ListView.superclass.updateIndexes.apply(this, arguments); - this.verifyInternalSize(); - }, - - findHeaderIndex : function(header){ - header = header.dom || header; - var parentNode = header.parentNode, - children = parentNode.parentNode.childNodes, - i = 0, - c; - for(; c = children[i]; i++){ - if(c == parentNode){ - return i; - } - } - return -1; - }, - - setHdWidths : function(){ - var els = this.innerHd.dom.getElementsByTagName('div'), - i = 0, - columns = this.columns, - len = columns.length; - - for(; i < len; i++){ - els[i].style.width = (columns[i].width*100) + '%'; - } - } -}); - -Ext.reg('listview', Ext.list.ListView); - -// Backwards compatibility alias -Ext.ListView = Ext.list.ListView;/** - * @class Ext.list.Column - *

      This class encapsulates column configuration data to be used in the initialization of a - * {@link Ext.list.ListView ListView}.

      - *

      While subclasses are provided to render data in different ways, this class renders a passed - * data field unchanged and is usually used for textual columns.

      - */ -Ext.list.Column = Ext.extend(Object, { - /** - * @private - * @cfg {Boolean} isColumn - * Used by ListView constructor method to avoid reprocessing a Column - * if isColumn is not set ListView will recreate a new Ext.list.Column - * Defaults to true. - */ - isColumn: true, - - /** - * @cfg {String} align - * Set the CSS text-align property of the column. Defaults to 'left'. - */ - align: 'left', - /** - * @cfg {String} header Optional. The header text to be used as innerHTML - * (html tags are accepted) to display in the ListView. Note: to - * have a clickable header with no text displayed use ' '. - */ - header: '', - - /** - * @cfg {Number} width Optional. Percentage of the container width - * this column should be allocated. Columns that have no width specified will be - * allocated with an equal percentage to fill 100% of the container width. To easily take - * advantage of the full container width, leave the width of at least one column undefined. - * Note that if you do not want to take up the full width of the container, the width of - * every column needs to be explicitly defined. - */ - width: null, - - /** - * @cfg {String} cls Optional. This option can be used to add a CSS class to the cell of each - * row for this column. - */ - cls: '', - - /** - * @cfg {String} tpl Optional. Specify a string to pass as the - * configuration string for {@link Ext.XTemplate}. By default an {@link Ext.XTemplate} - * will be implicitly created using the dataIndex. - */ - - /** - * @cfg {String} dataIndex

      Required. The name of the field in the - * ListViews's {@link Ext.data.Store}'s {@link Ext.data.Record} definition from - * which to draw the column's value.

      - */ - - constructor : function(c){ - if(!c.tpl){ - c.tpl = new Ext.XTemplate('{' + c.dataIndex + '}'); - } - else if(Ext.isString(c.tpl)){ - c.tpl = new Ext.XTemplate(c.tpl); - } - - Ext.apply(this, c); - } -}); - -Ext.reg('lvcolumn', Ext.list.Column); - -/** - * @class Ext.list.NumberColumn - * @extends Ext.list.Column - *

      A Column definition class which renders a numeric data field according to a {@link #format} string. See the - * {@link Ext.list.Column#xtype xtype} config option of {@link Ext.list.Column} for more details.

      - */ -Ext.list.NumberColumn = Ext.extend(Ext.list.Column, { - /** - * @cfg {String} format - * A formatting string as used by {@link Ext.util.Format#number} to format a numeric value for this Column - * (defaults to '0,000.00'). - */ - format: '0,000.00', - - constructor : function(c) { - c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':number("' + (c.format || this.format) + '")}'); - Ext.list.NumberColumn.superclass.constructor.call(this, c); - } -}); - -Ext.reg('lvnumbercolumn', Ext.list.NumberColumn); - -/** - * @class Ext.list.DateColumn - * @extends Ext.list.Column - *

      A Column definition class which renders a passed date according to the default locale, or a configured - * {@link #format}. See the {@link Ext.list.Column#xtype xtype} config option of {@link Ext.list.Column} - * for more details.

      - */ -Ext.list.DateColumn = Ext.extend(Ext.list.Column, { - format: 'm/d/Y', - constructor : function(c) { - c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':date("' + (c.format || this.format) + '")}'); - Ext.list.DateColumn.superclass.constructor.call(this, c); - } -}); -Ext.reg('lvdatecolumn', Ext.list.DateColumn); - -/** - * @class Ext.list.BooleanColumn - * @extends Ext.list.Column - *

      A Column definition class which renders boolean data fields. See the {@link Ext.list.Column#xtype xtype} - * config option of {@link Ext.list.Column} for more details.

      - */ -Ext.list.BooleanColumn = Ext.extend(Ext.list.Column, { - /** - * @cfg {String} trueText - * The string returned by the renderer when the column value is not falsey (defaults to 'true'). - */ - trueText: 'true', - /** - * @cfg {String} falseText - * The string returned by the renderer when the column value is falsey (but not undefined) (defaults to - * 'false'). - */ - falseText: 'false', - /** - * @cfg {String} undefinedText - * The string returned by the renderer when the column value is undefined (defaults to ' '). - */ - undefinedText: ' ', - - constructor : function(c) { - c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':this.format}'); - - var t = this.trueText, f = this.falseText, u = this.undefinedText; - c.tpl.format = function(v){ - if(v === undefined){ - return u; - } - if(!v || v === 'false'){ - return f; - } - return t; - }; - - Ext.list.DateColumn.superclass.constructor.call(this, c); - } -}); - -Ext.reg('lvbooleancolumn', Ext.list.BooleanColumn);/** - * @class Ext.list.ColumnResizer - * @extends Ext.util.Observable - *

      Supporting Class for Ext.list.ListView

      - * @constructor - * @param {Object} config - */ -Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, { - /** - * @cfg {Number} minPct The minimum percentage to allot for any column (defaults to .05) - */ - minPct: .05, - - constructor: function(config){ - Ext.apply(this, config); - Ext.list.ColumnResizer.superclass.constructor.call(this); - }, - init : function(listView){ - this.view = listView; - listView.on('render', this.initEvents, this); - }, - - initEvents : function(view){ - view.mon(view.innerHd, 'mousemove', this.handleHdMove, this); - this.tracker = new Ext.dd.DragTracker({ - onBeforeStart: this.onBeforeStart.createDelegate(this), - onStart: this.onStart.createDelegate(this), - onDrag: this.onDrag.createDelegate(this), - onEnd: this.onEnd.createDelegate(this), - tolerance: 3, - autoStart: 300 - }); - this.tracker.initEl(view.innerHd); - view.on('beforedestroy', this.tracker.destroy, this.tracker); - }, - - handleHdMove : function(e, t){ - var handleWidth = 5, - x = e.getPageX(), - header = e.getTarget('em', 3, true); - if(header){ - var region = header.getRegion(), - style = header.dom.style, - parentNode = header.dom.parentNode; - - if(x - region.left <= handleWidth && parentNode != parentNode.parentNode.firstChild){ - this.activeHd = Ext.get(parentNode.previousSibling.firstChild); - style.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize'; - } else if(region.right - x <= handleWidth && parentNode != parentNode.parentNode.lastChild.previousSibling){ - this.activeHd = header; - style.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize'; - } else{ - delete this.activeHd; - style.cursor = ''; - } - } - }, - - onBeforeStart : function(e){ - this.dragHd = this.activeHd; - return !!this.dragHd; - }, - - onStart: function(e){ - - var me = this, - view = me.view, - dragHeader = me.dragHd, - x = me.tracker.getXY()[0]; - - me.proxy = view.el.createChild({cls:'x-list-resizer'}); - me.dragX = dragHeader.getX(); - me.headerIndex = view.findHeaderIndex(dragHeader); - - me.headersDisabled = view.disableHeaders; - view.disableHeaders = true; - - me.proxy.setHeight(view.el.getHeight()); - me.proxy.setX(me.dragX); - me.proxy.setWidth(x - me.dragX); - - this.setBoundaries(); - - }, - - // Sets up the boundaries for the drag/drop operation - setBoundaries: function(relativeX){ - var view = this.view, - headerIndex = this.headerIndex, - width = view.innerHd.getWidth(), - relativeX = view.innerHd.getX(), - minWidth = Math.ceil(width * this.minPct), - maxWidth = width - minWidth, - numColumns = view.columns.length, - headers = view.innerHd.select('em', true), - minX = minWidth + relativeX, - maxX = maxWidth + relativeX, - header; - - if (numColumns == 2) { - this.minX = minX; - this.maxX = maxX; - }else{ - header = headers.item(headerIndex + 2); - this.minX = headers.item(headerIndex).getX() + minWidth; - this.maxX = header ? header.getX() - minWidth : maxX; - if (headerIndex == 0) { - // First - this.minX = minX; - } else if (headerIndex == numColumns - 2) { - // Last - this.maxX = maxX; - } - } - }, - - onDrag: function(e){ - var me = this, - cursorX = me.tracker.getXY()[0].constrain(me.minX, me.maxX); - - me.proxy.setWidth(cursorX - this.dragX); - }, - - onEnd: function(e){ - /* calculate desired width by measuring proxy and then remove it */ - var newWidth = this.proxy.getWidth(), - index = this.headerIndex, - view = this.view, - columns = view.columns, - width = view.innerHd.getWidth(), - newPercent = Math.ceil(newWidth * view.maxColumnWidth / width) / 100, - disabled = this.headersDisabled, - headerCol = columns[index], - otherCol = columns[index + 1], - totalPercent = headerCol.width + otherCol.width; - - this.proxy.remove(); - - headerCol.width = newPercent; - otherCol.width = totalPercent - newPercent; - - delete this.dragHd; - view.setHdWidths(); - view.refresh(); - - setTimeout(function(){ - view.disableHeaders = disabled; - }, 100); - } -}); - -// Backwards compatibility alias -Ext.ListView.ColumnResizer = Ext.list.ColumnResizer;/** - * @class Ext.list.Sorter - * @extends Ext.util.Observable - *

      Supporting Class for Ext.list.ListView

      - * @constructor - * @param {Object} config - */ -Ext.list.Sorter = Ext.extend(Ext.util.Observable, { - /** - * @cfg {Array} sortClasses - * The CSS classes applied to a header when it is sorted. (defaults to ["sort-asc", "sort-desc"]) - */ - sortClasses : ["sort-asc", "sort-desc"], - - constructor: function(config){ - Ext.apply(this, config); - Ext.list.Sorter.superclass.constructor.call(this); - }, - - init : function(listView){ - this.view = listView; - listView.on('render', this.initEvents, this); - }, - - initEvents : function(view){ - view.mon(view.innerHd, 'click', this.onHdClick, this); - view.innerHd.setStyle('cursor', 'pointer'); - view.mon(view.store, 'datachanged', this.updateSortState, this); - this.updateSortState.defer(10, this, [view.store]); - }, - - updateSortState : function(store){ - var state = store.getSortState(); - if(!state){ - return; - } - this.sortState = state; - var cs = this.view.columns, sortColumn = -1; - for(var i = 0, len = cs.length; i < len; i++){ - if(cs[i].dataIndex == state.field){ - sortColumn = i; - break; - } - } - if(sortColumn != -1){ - var sortDir = state.direction; - this.updateSortIcon(sortColumn, sortDir); - } - }, - - updateSortIcon : function(col, dir){ - var sc = this.sortClasses; - var hds = this.view.innerHd.select('em').removeClass(sc); - hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]); - }, - - onHdClick : function(e){ - var hd = e.getTarget('em', 3); - if(hd && !this.view.disableHeaders){ - var index = this.view.findHeaderIndex(hd); - this.view.store.sort(this.view.columns[index].dataIndex); - } - } -}); - -// Backwards compatibility alias -Ext.ListView.Sorter = Ext.list.Sorter; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/data-list-views.js b/web-client/src/main/resources/apps/js/ext/pkgs/data-list-views.js deleted file mode 100644 index ad683dccc8c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/data-list-views.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.DataView=Ext.extend(Ext.BoxComponent,{selectedClass:"x-view-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,last:false,initComponent:function(){Ext.DataView.superclass.initComponent.call(this);if(Ext.isString(this.tpl)||Ext.isArray(this.tpl)){this.tpl=new Ext.XTemplate(this.tpl)}this.addEvents("beforeclick","click","mouseenter","mouseleave","containerclick","dblclick","contextmenu","containercontextmenu","selectionchange","beforeselect");this.store=Ext.StoreMgr.lookup(this.store);this.all=new Ext.CompositeElementLite();this.selected=new Ext.CompositeElementLite()},afterRender:function(){Ext.DataView.superclass.afterRender.call(this);this.mon(this.getTemplateTarget(),{click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this});if(this.overClass||this.trackOver){this.mon(this.getTemplateTarget(),{mouseover:this.onMouseOver,mouseout:this.onMouseOut,scope:this})}if(this.store){this.bindStore(this.store,true)}},refresh:function(){this.clearSelections(false,true);var b=this.getTemplateTarget(),a=this.store.getRange();b.update("");if(a.length<1){if(!this.deferEmptyText||this.hasSkippedEmptyText){b.update(this.emptyText)}this.all.clear()}else{this.tpl.overwrite(b,this.collectData(a,0));this.all.fill(Ext.query(this.itemSelector,b.dom));this.updateIndexes(0)}this.hasSkippedEmptyText=true},getTemplateTarget:function(){return this.el},prepareData:function(a){return a},collectData:function(b,e){var d=[],c=0,a=b.length;for(;c-1){var e=this.isSelected(b),c=this.all.elements[b],d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)}},onAdd:function(f,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),g,b=this.all.elements;if(e0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,f,b){if(Ext.isArray(d)){if(!f){this.clearSelections(true)}for(var c=0,a=d.length;c=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('
      '+this.loadingText+"
      ");this.all.clear()}},onDestroy:function(){this.all.clear();this.selected.clear();Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.list.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:undefined,columnResize:true,columnSort:true,maxColumnWidth:Ext.isIE?99:100,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.list.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.list.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('
      ','','
      ',"{header}","
      ","
      ",'
      ',"
      ",'
      ',"
      ")}if(!this.tpl){this.tpl=new Ext.XTemplate('',"
      ",'','
      ',' class="{cls}">',"{[values.tpl.apply(parent)]}","
      ","
      ",'
      ',"
      ","
      ")}var k=this.columns,g=0,h=0,l=k.length,b=[];for(var f=0;fthis.maxColumnWidth){m.width-=(g-this.maxColumnWidth)/100}h++}b.push(m)}k=this.columns=b;if(h10)){b.style.width=d;f.style.width=d}else{b.style.width=c+"px";f.style.width=c+"px";setTimeout(function(){if((a.offsetWidth-a.clientWidth)>10){b.style.width=d;f.style.width=d}},10)}}if(Ext.isNumber(e)){a.style.height=Math.max(0,e-f.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.list.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(f){f=f.dom||f;var a=f.parentNode,d=a.parentNode.childNodes,b=0,e;for(;e=d[b];b++){if(e==a){return b}}return -1},setHdWidths:function(){var d=this.innerHd.dom.getElementsByTagName("div"),c=0,b=this.columns,a=b.length;for(;cNote:
      - * this parameter is required only when sending extra {@link Ext.data.Store#baseParams baseParams} to the server - * during a write-request -- if no baseParams are set, the {@link Ext.data.XmlReader#record} meta-property can - * suffice as the XML document root-node for write-actions involving just a single record. For requests - * involving multiple records and NO baseParams, the {@link Ext.data.XmlWriter#root} property can - * act as the XML document root. - */ - documentRoot: 'xrequest', - /** - * @cfg {Boolean} forceDocumentRoot [false] Set to true to force XML documents having a root-node as defined - * by {@link #documentRoot}, even with no baseParams defined. - */ - forceDocumentRoot: false, - /** - * @cfg {String} root [records] The name of the containing element which will contain the nodes of an write-action involving multiple records. Each - * xml-record written to the server will be wrapped in an element named after {@link Ext.data.XmlReader#record} property. - * eg: -
      -<?xml version="1.0" encoding="UTF-8"?>
      -<user><first>Barney</first></user>
      -
      - * However, when multiple records are written in a batch-operation, these records must be wrapped in a containing - * Element. - * eg: -
      -<?xml version="1.0" encoding="UTF-8"?>
      -    <records>
      -        <first>Barney</first></user>
      -        <records><first>Barney</first></user>
      -    </records>
      -
      - * Defaults to records. Do not confuse the nature of this property with that of {@link #documentRoot} - */ - root: 'records', - /** - * @cfg {String} xmlVersion [1.0] The version written to header of xml documents. -
      <?xml version="1.0" encoding="ISO-8859-15"?>
      - */ - xmlVersion : '1.0', - /** - * @cfg {String} xmlEncoding [ISO-8859-15] The encoding written to header of xml documents. -
      <?xml version="1.0" encoding="ISO-8859-15"?>
      - */ - xmlEncoding: 'ISO-8859-15', - /** - * @cfg {String/Ext.XTemplate} tpl The XML template used to render {@link Ext.data.Api#actions write-actions} to your server. - *

      One can easily provide his/her own custom {@link Ext.XTemplate#constructor template-definition} if the default does not suffice.

      - *

      Defaults to:

      -
      -<?xml version="{version}" encoding="{encoding}"?>
      -    <tpl if="documentRoot"><{documentRoot}>
      -    <tpl for="baseParams">
      -        <tpl for=".">
      -            <{name}>{value}</{name}>
      -        </tpl>
      -    </tpl>
      -    <tpl if="records.length > 1"><{root}>',
      -    <tpl for="records">
      -        <{parent.record}>
      -        <tpl for=".">
      -            <{name}>{value}</{name}>
      -        </tpl>
      -        </{parent.record}>
      -    </tpl>
      -    <tpl if="records.length > 1"></{root}></tpl>
      -    <tpl if="documentRoot"></{documentRoot}></tpl>
      -
      - *

      Templates will be called with the following API

      - *
        - *
      • {String} version [1.0] The xml version.
      • - *
      • {String} encoding [ISO-8859-15] The xml encoding.
      • - *
      • {String/false} documentRoot The XML document root-node name or false if not required. See {@link #documentRoot} and {@link #forceDocumentRoot}.
      • - *
      • {String} record The meta-data parameter defined on your {@link Ext.data.XmlReader#record} configuration represents the name of the xml-tag containing each record.
      • - *
      • {String} root The meta-data parameter defined by {@link Ext.data.XmlWriter#root} configuration-parameter. Represents the name of the xml root-tag when sending multiple records to the server.
      • - *
      • {Array} records The records being sent to the server, ie: the subject of the write-action being performed. The records parameter will be always be an array, even when only a single record is being acted upon. - * Each item within the records array will contain an array of field objects having the following properties: - *
          - *
        • {String} name The field-name of the record as defined by your {@link Ext.data.Record#create Ext.data.Record definition}. The "mapping" property will be used, otherwise it will match the "name" property. Use this parameter to define the XML tag-name of the property.
        • - *
        • {Mixed} value The record value of the field enclosed within XML tags specified by name property above.
        • - *
      • - *
      • {Array} baseParams. The baseParams as defined upon {@link Ext.data.Store#baseParams}. Note that the baseParams have been converted into an array of [{name : "foo", value: "bar"}, ...] pairs in the same manner as the records parameter above. See {@link #documentRoot} and {@link #forceDocumentRoot}.
      • - *
      - */ - // Encoding the ? here in case it's being included by some kind of page that will parse it (eg. PHP) - tpl: '<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}', - - - /** - * XmlWriter implementation of the final stage of a write action. - * @param {Object} params Transport-proxy's (eg: {@link Ext.Ajax#request}) params-object to write-to. - * @param {Object} baseParams as defined by {@link Ext.data.Store#baseParams}. The baseParms must be encoded by the extending class, eg: {@link Ext.data.JsonWriter}, {@link Ext.data.XmlWriter}. - * @param {Object/Object[]} data Data-object representing the compiled Store-recordset. - */ - render : function(params, baseParams, data) { - baseParams = this.toArray(baseParams); - params.xmlData = this.tpl.applyTemplate({ - version: this.xmlVersion, - encoding: this.xmlEncoding, - documentRoot: (baseParams.length > 0 || this.forceDocumentRoot === true) ? this.documentRoot : false, - record: this.meta.record, - root: this.root, - baseParams: baseParams, - records: (Ext.isArray(data[0])) ? data : [data] - }); - }, - - /** - * createRecord - * @protected - * @param {Ext.data.Record} rec - * @return {Array} Array of name:value pairs for attributes of the {@link Ext.data.Record}. See {@link Ext.data.DataWriter#toHash}. - */ - createRecord : function(rec) { - return this.toArray(this.toHash(rec)); - }, - - /** - * updateRecord - * @protected - * @param {Ext.data.Record} rec - * @return {Array} Array of {name:value} pairs for attributes of the {@link Ext.data.Record}. See {@link Ext.data.DataWriter#toHash}. - */ - updateRecord : function(rec) { - return this.toArray(this.toHash(rec)); - - }, - /** - * destroyRecord - * @protected - * @param {Ext.data.Record} rec - * @return {Array} Array containing a attribute-object (name/value pair) representing the {@link Ext.data.DataReader#idProperty idProperty}. - */ - destroyRecord : function(rec) { - var data = {}; - data[this.meta.idProperty] = rec.id; - return this.toArray(data); - } -}); -/** - * @class Ext.data.XmlReader - * @extends Ext.data.DataReader - *

      Data reader class to create an Array of {@link Ext.data.Record} objects from an XML document - * based on mappings in a provided {@link Ext.data.Record} constructor.

      - *

      Note: that in order for the browser to parse a returned XML document, the Content-Type - * header in the HTTP response must be set to "text/xml" or "application/xml".

      - *

      Example code:

      - *
      
      -var Employee = Ext.data.Record.create([
      -   {name: 'name', mapping: 'name'},     // "mapping" property not needed if it is the same as "name"
      -   {name: 'occupation'}                 // This field will use "occupation" as the mapping.
      -]);
      -var myReader = new Ext.data.XmlReader({
      -   totalProperty: "results", // The element which contains the total dataset size (optional)
      -   record: "row",           // The repeated element which contains row information
      -   idProperty: "id"         // The element within the row that provides an ID for the record (optional)
      -   messageProperty: "msg"   // The element within the response that provides a user-feedback message (optional)
      -}, Employee);
      -
      - *

      - * This would consume an XML file like this: - *

      
      -<?xml version="1.0" encoding="UTF-8"?>
      -<dataset>
      - <results>2</results>
      - <row>
      -   <id>1</id>
      -   <name>Bill</name>
      -   <occupation>Gardener</occupation>
      - </row>
      - <row>
      -   <id>2</id>
      -   <name>Ben</name>
      -   <occupation>Horticulturalist</occupation>
      - </row>
      -</dataset>
      -
      - * @cfg {String} totalProperty The DomQuery path from which to retrieve the total number of records - * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being - * paged from the remote server. - * @cfg {String} record The DomQuery path to the repeated element which contains record information. - * @cfg {String} record The DomQuery path to the repeated element which contains record information. - * @cfg {String} successProperty The DomQuery path to the success attribute used by forms. - * @cfg {String} idPath The DomQuery path relative from the record element to the element that contains - * a record identifier value. - * @constructor - * Create a new XmlReader. - * @param {Object} meta Metadata configuration options - * @param {Object} recordType Either an Array of field definition objects as passed to - * {@link Ext.data.Record#create}, or a Record constructor object created using {@link Ext.data.Record#create}. - */ -Ext.data.XmlReader = function(meta, recordType){ - meta = meta || {}; - - // backwards compat, convert idPath or id / success - Ext.applyIf(meta, { - idProperty: meta.idProperty || meta.idPath || meta.id, - successProperty: meta.successProperty || meta.success - }); - - Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields); -}; -Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, { - /** - * This method is only used by a DataProxy which has retrieved data from a remote server. - * @param {Object} response The XHR object which contains the parsed XML document. The response is expected - * to contain a property called responseXML which refers to an XML document object. - * @return {Object} records A data block which is used by an {@link Ext.data.Store} as - * a cache of Ext.data.Records. - */ - read : function(response){ - var doc = response.responseXML; - if(!doc) { - throw {message: "XmlReader.read: XML Document not available"}; - } - return this.readRecords(doc); - }, - - /** - * Create a data block containing Ext.data.Records from an XML document. - * @param {Object} doc A parsed XML document. - * @return {Object} records A data block which is used by an {@link Ext.data.Store} as - * a cache of Ext.data.Records. - */ - readRecords : function(doc){ - /** - * After any data loads/reads, the raw XML Document is available for further custom processing. - * @type XMLDocument - */ - this.xmlData = doc; - - var root = doc.documentElement || doc, - q = Ext.DomQuery, - totalRecords = 0, - success = true; - - if(this.meta.totalProperty){ - totalRecords = this.getTotal(root, 0); - } - if(this.meta.successProperty){ - success = this.getSuccess(root); - } - - var records = this.extractData(q.select(this.meta.record, root), true); // <-- true to return Ext.data.Record[] - - // TODO return Ext.data.Response instance. @see #readResponse - return { - success : success, - records : records, - totalRecords : totalRecords || records.length - }; - }, - - /** - * Decode an XML response from server. - * @param {String} action [{@link Ext.data.Api#actions} create|read|update|destroy] - * @param {Object} response HTTP Response object from browser. - * @return {Ext.data.Response} An instance of {@link Ext.data.Response} - */ - readResponse : function(action, response) { - var q = Ext.DomQuery, - doc = response.responseXML, - root = doc.documentElement || doc; - - // create general Response instance. - var res = new Ext.data.Response({ - action: action, - success : this.getSuccess(root), - message: this.getMessage(root), - data: this.extractData(q.select(this.meta.record, root) || q.select(this.meta.root, root), false), - raw: doc - }); - - if (Ext.isEmpty(res.success)) { - throw new Ext.data.DataReader.Error('successProperty-response', this.meta.successProperty); - } - - // Create actions from a response having status 200 must return pk - if (action === Ext.data.Api.actions.create) { - var def = Ext.isDefined(res.data); - if (def && Ext.isEmpty(res.data)) { - throw new Ext.data.JsonReader.Error('root-empty', this.meta.root); - } - else if (!def) { - throw new Ext.data.JsonReader.Error('root-undefined-response', this.meta.root); - } - } - return res; - }, - - getSuccess : function() { - return true; - }, - - /** - * build response-data extractor functions. - * @private - * @ignore - */ - buildExtractors : function() { - if(this.ef){ - return; - } - var s = this.meta, - Record = this.recordType, - f = Record.prototype.fields, - fi = f.items, - fl = f.length; - - if(s.totalProperty) { - this.getTotal = this.createAccessor(s.totalProperty); - } - if(s.successProperty) { - this.getSuccess = this.createAccessor(s.successProperty); - } - if (s.messageProperty) { - this.getMessage = this.createAccessor(s.messageProperty); - } - this.getRoot = function(res) { - return (!Ext.isEmpty(res[this.meta.record])) ? res[this.meta.record] : res[this.meta.root]; - }; - if (s.idPath || s.idProperty) { - var g = this.createAccessor(s.idPath || s.idProperty); - this.getId = function(rec) { - var id = g(rec) || rec.id; - return (id === undefined || id === '') ? null : id; - }; - } else { - this.getId = function(){return null;}; - } - var ef = []; - for(var i = 0; i < fl; i++){ - f = fi[i]; - var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name; - ef.push(this.createAccessor(map)); - } - this.ef = ef; - }, - - /** - * Creates a function to return some particular key of data from a response. - * @param {String} key - * @return {Function} - * @private - * @ignore - */ - createAccessor : function(){ - var q = Ext.DomQuery; - return function(key) { - if (Ext.isFunction(key)) { - return key; - } - switch(key) { - case this.meta.totalProperty: - return function(root, def){ - return q.selectNumber(key, root, def); - }; - break; - case this.meta.successProperty: - return function(root, def) { - var sv = q.selectValue(key, root, true); - var success = sv !== false && sv !== 'false'; - return success; - }; - break; - default: - return function(root, def) { - return q.selectValue(key, root, def); - }; - break; - } - }; - }(), - - /** - * extracts values and type-casts a row of data from server, extracted by #extractData - * @param {Hash} data - * @param {Ext.data.Field[]} items - * @param {Number} len - * @private - * @ignore - */ - extractValues : function(data, items, len) { - var f, values = {}; - for(var j = 0; j < len; j++){ - f = items[j]; - var v = this.ef[j](data); - values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data); - } - return values; - } -});/** - * @class Ext.data.XmlStore - * @extends Ext.data.Store - *

      Small helper class to make creating {@link Ext.data.Store}s from XML data easier. - * A XmlStore will be automatically configured with a {@link Ext.data.XmlReader}.

      - *

      A store configuration would be something like:

      
      -var store = new Ext.data.XmlStore({
      -    // store configs
      -    autoDestroy: true,
      -    storeId: 'myStore',
      -    url: 'sheldon.xml', // automatically configures a HttpProxy
      -    // reader configs
      -    record: 'Item', // records will have an "Item" tag
      -    idPath: 'ASIN',
      -    totalRecords: '@TotalResults'
      -    fields: [
      -        // set up the fields mapping into the xml doc
      -        // The first needs mapping, the others are very basic
      -        {name: 'Author', mapping: 'ItemAttributes > Author'},
      -        'Title', 'Manufacturer', 'ProductGroup'
      -    ]
      -});
      - * 

      - *

      This store is configured to consume a returned object of the form:

      
      -<?xml version="1.0" encoding="UTF-8"?>
      -<ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
      -    <Items>
      -        <Request>
      -            <IsValid>True</IsValid>
      -            <ItemSearchRequest>
      -                <Author>Sidney Sheldon</Author>
      -                <SearchIndex>Books</SearchIndex>
      -            </ItemSearchRequest>
      -        </Request>
      -        <TotalResults>203</TotalResults>
      -        <TotalPages>21</TotalPages>
      -        <Item>
      -            <ASIN>0446355453</ASIN>
      -            <DetailPageURL>
      -                http://www.amazon.com/
      -            </DetailPageURL>
      -            <ItemAttributes>
      -                <Author>Sidney Sheldon</Author>
      -                <Manufacturer>Warner Books</Manufacturer>
      -                <ProductGroup>Book</ProductGroup>
      -                <Title>Master of the Game</Title>
      -            </ItemAttributes>
      -        </Item>
      -    </Items>
      -</ItemSearchResponse>
      - * 
      - * An object literal of this form could also be used as the {@link #data} config option.

      - *

      Note: Although not listed here, this class accepts all of the configuration options of - * {@link Ext.data.XmlReader XmlReader}.

      - * @constructor - * @param {Object} config - * @xtype xmlstore - */ -Ext.data.XmlStore = Ext.extend(Ext.data.Store, { - /** - * @cfg {Ext.data.DataReader} reader @hide - */ - constructor: function(config){ - Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(config, { - reader: new Ext.data.XmlReader(config) - })); - } -}); -Ext.reg('xmlstore', Ext.data.XmlStore); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/data-xml.js b/web-client/src/main/resources/apps/js/ext/pkgs/data-xml.js deleted file mode 100644 index 1abd302cc77..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/data-xml.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.data.XmlWriter=function(a){Ext.data.XmlWriter.superclass.constructor.apply(this,arguments);this.tpl=(typeof(this.tpl)==="string")?new Ext.XTemplate(this.tpl).compile():this.tpl.compile()};Ext.extend(Ext.data.XmlWriter,Ext.data.DataWriter,{documentRoot:"xrequest",forceDocumentRoot:false,root:"records",xmlVersion:"1.0",xmlEncoding:"ISO-8859-15",tpl:'<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}',render:function(b,c,a){c=this.toArray(c);b.xmlData=this.tpl.applyTemplate({version:this.xmlVersion,encoding:this.xmlEncoding,documentRoot:(c.length>0||this.forceDocumentRoot===true)?this.documentRoot:false,record:this.meta.record,root:this.root,baseParams:c,records:(Ext.isArray(a[0]))?a:[a]})},createRecord:function(a){return this.toArray(this.toHash(a))},updateRecord:function(a){return this.toArray(this.toHash(a))},destroyRecord:function(b){var a={};a[this.meta.idProperty]=b.id;return this.toArray(a)}});Ext.data.XmlReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:a.idProperty||a.idPath||a.id,successProperty:a.successProperty||a.success});Ext.data.XmlReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b){throw {message:"XmlReader.read: XML Document not available"}}return this.readRecords(b)},readRecords:function(d){this.xmlData=d;var a=d.documentElement||d,c=Ext.DomQuery,f=0,e=true;if(this.meta.totalProperty){f=this.getTotal(a,0)}if(this.meta.successProperty){e=this.getSuccess(a)}var b=this.extractData(c.select(this.meta.record,a),true);return{success:e,records:b,totalRecords:f||b.length}},readResponse:function(f,b){var e=Ext.DomQuery,g=b.responseXML,a=g.documentElement||g;var c=new Ext.data.Response({action:f,success:this.getSuccess(a),message:this.getMessage(a),data:this.extractData(e.select(this.meta.record,a)||e.select(this.meta.root,a),false),raw:g});if(Ext.isEmpty(c.success)){throw new Ext.data.DataReader.Error("successProperty-response",this.meta.successProperty)}if(f===Ext.data.Api.actions.create){var d=Ext.isDefined(c.data);if(d&&Ext.isEmpty(c.data)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!d){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}return c},getSuccess:function(){return true},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.createAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.createAccessor(l.successProperty)}if(l.messageProperty){this.getMessage=this.createAccessor(l.messageProperty)}this.getRoot=function(f){return(!Ext.isEmpty(f[this.meta.record]))?f[this.meta.record]:f[this.meta.root]};if(l.idPath||l.idProperty){var d=this.createAccessor(l.idPath||l.idProperty);this.getId=function(f){var g=d(f)||f.id;return(g===undefined||g==="")?null:g}}else{this.getId=function(){return null}}var c=[];for(var b=0;bundefined
      . A list of params to be executed - * server side. Specify the params in the order in which they must be executed on the server-side - * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace, - * comma, or pipe. For example, - * any of the following would be acceptable:
      
      -paramOrder: ['param1','param2','param3']
      -paramOrder: 'param1 param2 param3'
      -paramOrder: 'param1,param2,param3'
      -paramOrder: 'param1|param2|param'
      -     
      - */ - paramOrder: undefined, - - /** - * @cfg {Boolean} paramsAsHash - * Send parameters as a collection of named arguments (defaults to true). Providing a - * {@link #paramOrder} nullifies this configuration. - */ - paramsAsHash: true, - - /** - * @cfg {Function} directFn - * Function to call when executing a request. directFn is a simple alternative to defining the api configuration-parameter - * for Store's which will not implement a full CRUD api. - */ - directFn : undefined, - - /** - * DirectProxy implementation of {@link Ext.data.DataProxy#doRequest} - * @param {String} action The crud action type (create, read, update, destroy) - * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null - * @param {Object} params An object containing properties which are to be used as HTTP parameters - * for the request to the remote server. - * @param {Ext.data.DataReader} reader The Reader object which converts the data - * object into a block of Ext.data.Records. - * @param {Function} callback - *

      A function to be called after the request. - * The callback is passed the following arguments:

        - *
      • r : Ext.data.Record[] The block of Ext.data.Records.
      • - *
      • options: Options object from the action request
      • - *
      • success: Boolean success indicator

      - * @param {Object} scope The scope (this reference) in which the callback function is executed. Defaults to the browser window. - * @param {Object} arg An optional argument which is passed to the callback as its second parameter. - * @protected - */ - doRequest : function(action, rs, params, reader, callback, scope, options) { - var args = [], - directFn = this.api[action] || this.directFn; - - switch (action) { - case Ext.data.Api.actions.create: - args.push(params.jsonData); // <-- create(Hash) - break; - case Ext.data.Api.actions.read: - // If the method has no parameters, ignore the paramOrder/paramsAsHash. - if(directFn.directCfg.method.len > 0){ - if(this.paramOrder){ - for(var i = 0, len = this.paramOrder.length; i < len; i++){ - args.push(params[this.paramOrder[i]]); - } - }else if(this.paramsAsHash){ - args.push(params); - } - } - break; - case Ext.data.Api.actions.update: - args.push(params.jsonData); // <-- update(Hash/Hash[]) - break; - case Ext.data.Api.actions.destroy: - args.push(params.jsonData); // <-- destroy(Int/Int[]) - break; - } - - var trans = { - params : params || {}, - request: { - callback : callback, - scope : scope, - arg : options - }, - reader: reader - }; - - args.push(this.createCallback(action, rs, trans), this); - directFn.apply(window, args); - }, - - // private - createCallback : function(action, rs, trans) { - var me = this; - return function(result, res) { - if (!res.status) { - // @deprecated fire loadexception - if (action === Ext.data.Api.actions.read) { - me.fireEvent("loadexception", me, trans, res, null); - } - me.fireEvent('exception', me, 'remote', action, trans, res, null); - trans.request.callback.call(trans.request.scope, null, trans.request.arg, false); - return; - } - if (action === Ext.data.Api.actions.read) { - me.onRead(action, trans, result, res); - } else { - me.onWrite(action, trans, result, res, rs); - } - }; - }, - - /** - * Callback for read actions - * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] - * @param {Object} trans The request transaction object - * @param {Object} result Data object picked out of the server-response. - * @param {Object} res The server response - * @protected - */ - onRead : function(action, trans, result, res) { - var records; - try { - records = trans.reader.readRecords(result); - } - catch (ex) { - // @deprecated: Fire old loadexception for backwards-compat. - this.fireEvent("loadexception", this, trans, res, ex); - - this.fireEvent('exception', this, 'response', action, trans, res, ex); - trans.request.callback.call(trans.request.scope, null, trans.request.arg, false); - return; - } - this.fireEvent("load", this, res, trans.request.arg); - trans.request.callback.call(trans.request.scope, records, trans.request.arg, true); - }, - /** - * Callback for write actions - * @param {String} action [{@link Ext.data.Api#actions create|read|update|destroy}] - * @param {Object} trans The request transaction object - * @param {Object} result Data object picked out of the server-response. - * @param {Object} res The server response - * @param {Ext.data.Record/[Ext.data.Record]} rs The Store resultset associated with the action. - * @protected - */ - onWrite : function(action, trans, result, res, rs) { - var data = trans.reader.extractData(trans.reader.getRoot(result), false); - var success = trans.reader.getSuccess(result); - success = (success !== false); - if (success){ - this.fireEvent("write", this, action, data, res, rs, trans.request.arg); - }else{ - this.fireEvent('exception', this, 'remote', action, trans, result, rs); - } - trans.request.callback.call(trans.request.scope, data, res, success); - } -}); -/** - * @class Ext.data.DirectStore - * @extends Ext.data.Store - *

      Small helper class to create an {@link Ext.data.Store} configured with an - * {@link Ext.data.DirectProxy} and {@link Ext.data.JsonReader} to make interacting - * with an {@link Ext.Direct} Server-side {@link Ext.direct.Provider Provider} easier. - * To create a different proxy/reader combination create a basic {@link Ext.data.Store} - * configured as needed.

      - * - *

      *Note: Although they are not listed, this class inherits all of the config options of:

      - *
        - *
      • {@link Ext.data.Store Store}
      • - *
          - * - *
        - *
      • {@link Ext.data.JsonReader JsonReader}
      • - *
          - *
        • {@link Ext.data.JsonReader#root root}
        • - *
        • {@link Ext.data.JsonReader#idProperty idProperty}
        • - *
        • {@link Ext.data.JsonReader#totalProperty totalProperty}
        • - *
        - * - *
      • {@link Ext.data.DirectProxy DirectProxy}
      • - *
          - *
        • {@link Ext.data.DirectProxy#directFn directFn}
        • - *
        • {@link Ext.data.DirectProxy#paramOrder paramOrder}
        • - *
        • {@link Ext.data.DirectProxy#paramsAsHash paramsAsHash}
        • - *
        - *
      - * - * @xtype directstore - * - * @constructor - * @param {Object} config - */ -Ext.data.DirectStore = Ext.extend(Ext.data.Store, { - constructor : function(config){ - // each transaction upon a singe record will generate a distinct Direct transaction since Direct queues them into one Ajax request. - var c = Ext.apply({}, { - batchTransactions: false - }, config); - Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, { - proxy: Ext.isDefined(c.proxy) ? c.proxy : new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')), - reader: (!Ext.isDefined(c.reader) && c.fields) ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader - })); - } -}); -Ext.reg('directstore', Ext.data.DirectStore); -/** - * @class Ext.Direct - * @extends Ext.util.Observable - *

      Overview

      - * - *

      Ext.Direct aims to streamline communication between the client and server - * by providing a single interface that reduces the amount of common code - * typically required to validate data and handle returned data packets - * (reading data, error conditions, etc).

      - * - *

      The Ext.direct namespace includes several classes for a closer integration - * with the server-side. The Ext.data namespace also includes classes for working - * with Ext.data.Stores which are backed by data from an Ext.Direct method.

      - * - *

      Specification

      - * - *

      For additional information consult the - * Ext.Direct Specification.

      - * - *

      Providers

      - * - *

      Ext.Direct uses a provider architecture, where one or more providers are - * used to transport data to and from the server. There are several providers - * that exist in the core at the moment:

        - * - *
      • {@link Ext.direct.JsonProvider JsonProvider} for simple JSON operations
      • - *
      • {@link Ext.direct.PollingProvider PollingProvider} for repeated requests
      • - *
      • {@link Ext.direct.RemotingProvider RemotingProvider} exposes server side - * on the client.
      • - *
      - * - *

      A provider does not need to be invoked directly, providers are added via - * {@link Ext.Direct}.{@link Ext.Direct#add add}.

      - * - *

      Router

      - * - *

      Ext.Direct utilizes a "router" on the server to direct requests from the client - * to the appropriate server-side method. Because the Ext.Direct API is completely - * platform-agnostic, you could completely swap out a Java based server solution - * and replace it with one that uses C# without changing the client side JavaScript - * at all.

      - * - *

      Server side events

      - * - *

      Custom events from the server may be handled by the client by adding - * listeners, for example:

      - *
      
      -{"type":"event","name":"message","data":"Successfully polled at: 11:19:30 am"}
      -
      -// add a handler for a 'message' event sent by the server
      -Ext.Direct.on('message', function(e){
      -    out.append(String.format('<p><i>{0}</i></p>', e.data));
      -            out.el.scrollTo('t', 100000, true);
      -});
      - * 
      - * @singleton - */ -Ext.Direct = Ext.extend(Ext.util.Observable, { - /** - * Each event type implements a getData() method. The default event types are: - *
        - *
      • event : Ext.Direct.Event
      • - *
      • exception : Ext.Direct.ExceptionEvent
      • - *
      • rpc : Ext.Direct.RemotingEvent
      • - *
      - * @property eventTypes - * @type Object - */ - - /** - * Four types of possible exceptions which can occur: - *
        - *
      • Ext.Direct.exceptions.TRANSPORT : 'xhr'
      • - *
      • Ext.Direct.exceptions.PARSE : 'parse'
      • - *
      • Ext.Direct.exceptions.LOGIN : 'login'
      • - *
      • Ext.Direct.exceptions.SERVER : 'exception'
      • - *
      - * @property exceptions - * @type Object - */ - exceptions: { - TRANSPORT: 'xhr', - PARSE: 'parse', - LOGIN: 'login', - SERVER: 'exception' - }, - - // private - constructor: function(){ - this.addEvents( - /** - * @event event - * Fires after an event. - * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred. - * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}. - */ - 'event', - /** - * @event exception - * Fires after an event exception. - * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred. - */ - 'exception' - ); - this.transactions = {}; - this.providers = {}; - }, - - /** - * Adds an Ext.Direct Provider and creates the proxy or stub methods to execute server-side methods. - * If the provider is not already connected, it will auto-connect. - *
      
      -var pollProv = new Ext.direct.PollingProvider({
      -    url: 'php/poll2.php'
      -});
      -
      -Ext.Direct.addProvider(
      -    {
      -        "type":"remoting",       // create a {@link Ext.direct.RemotingProvider}
      -        "url":"php\/router.php", // url to connect to the Ext.Direct server-side router.
      -        "actions":{              // each property within the actions object represents a Class
      -            "TestAction":[       // array of methods within each server side Class
      -            {
      -                "name":"doEcho", // name of method
      -                "len":1
      -            },{
      -                "name":"multiply",
      -                "len":1
      -            },{
      -                "name":"doForm",
      -                "formHandler":true, // handle form on server with Ext.Direct.Transaction
      -                "len":1
      -            }]
      -        },
      -        "namespace":"myApplication",// namespace to create the Remoting Provider in
      -    },{
      -        type: 'polling', // create a {@link Ext.direct.PollingProvider}
      -        url:  'php/poll.php'
      -    },
      -    pollProv // reference to previously created instance
      -);
      -     * 
      - * @param {Object/Array} provider Accepts either an Array of Provider descriptions (an instance - * or config object for a Provider) or any number of Provider descriptions as arguments. Each - * Provider description instructs Ext.Direct how to create client-side stub methods. - */ - addProvider : function(provider){ - var a = arguments; - if(a.length > 1){ - for(var i = 0, len = a.length; i < len; i++){ - this.addProvider(a[i]); - } - return; - } - - // if provider has not already been instantiated - if(!provider.events){ - provider = new Ext.Direct.PROVIDERS[provider.type](provider); - } - provider.id = provider.id || Ext.id(); - this.providers[provider.id] = provider; - - provider.on('data', this.onProviderData, this); - provider.on('exception', this.onProviderException, this); - - - if(!provider.isConnected()){ - provider.connect(); - } - - return provider; - }, - - /** - * Retrieve a {@link Ext.direct.Provider provider} by the - * {@link Ext.direct.Provider#id id} specified when the provider is - * {@link #addProvider added}. - * @param {String} id Unique identifier assigned to the provider when calling {@link #addProvider} - */ - getProvider : function(id){ - return this.providers[id]; - }, - - removeProvider : function(id){ - var provider = id.id ? id : this.providers[id]; - provider.un('data', this.onProviderData, this); - provider.un('exception', this.onProviderException, this); - delete this.providers[provider.id]; - return provider; - }, - - addTransaction: function(t){ - this.transactions[t.tid] = t; - return t; - }, - - removeTransaction: function(t){ - delete this.transactions[t.tid || t]; - return t; - }, - - getTransaction: function(tid){ - return this.transactions[tid.tid || tid]; - }, - - onProviderData : function(provider, e){ - if(Ext.isArray(e)){ - for(var i = 0, len = e.length; i < len; i++){ - this.onProviderData(provider, e[i]); - } - return; - } - if(e.name && e.name != 'event' && e.name != 'exception'){ - this.fireEvent(e.name, e); - }else if(e.type == 'exception'){ - this.fireEvent('exception', e); - } - this.fireEvent('event', e, provider); - }, - - createEvent : function(response, extraProps){ - return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps)); - } -}); -// overwrite impl. with static instance -Ext.Direct = new Ext.Direct(); - -Ext.Direct.TID = 1; -Ext.Direct.PROVIDERS = {};/** - * @class Ext.Direct.Transaction - * @extends Object - *

      Supporting Class for Ext.Direct (not intended to be used directly).

      - * @constructor - * @param {Object} config - */ -Ext.Direct.Transaction = function(config){ - Ext.apply(this, config); - this.tid = ++Ext.Direct.TID; - this.retryCount = 0; -}; -Ext.Direct.Transaction.prototype = { - send: function(){ - this.provider.queueTransaction(this); - }, - - retry: function(){ - this.retryCount++; - this.send(); - }, - - getProvider: function(){ - return this.provider; - } -};Ext.Direct.Event = function(config){ - Ext.apply(this, config); -}; - -Ext.Direct.Event.prototype = { - status: true, - getData: function(){ - return this.data; - } -}; - -Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, { - type: 'rpc', - getTransaction: function(){ - return this.transaction || Ext.Direct.getTransaction(this.tid); - } -}); - -Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, { - status: false, - type: 'exception' -}); - -Ext.Direct.eventTypes = { - 'rpc': Ext.Direct.RemotingEvent, - 'event': Ext.Direct.Event, - 'exception': Ext.Direct.ExceptionEvent -}; -/** - * @class Ext.direct.Provider - * @extends Ext.util.Observable - *

      Ext.direct.Provider is an abstract class meant to be extended.

      - * - *

      For example ExtJs implements the following subclasses:

      - *
      
      -Provider
      -|
      -+---{@link Ext.direct.JsonProvider JsonProvider} 
      -    |
      -    +---{@link Ext.direct.PollingProvider PollingProvider}   
      -    |
      -    +---{@link Ext.direct.RemotingProvider RemotingProvider}   
      - * 
      - * @abstract - */ -Ext.direct.Provider = Ext.extend(Ext.util.Observable, { - /** - * @cfg {String} id - * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}). - * You should assign an id if you need to be able to access the provider later and you do - * not have an object reference available, for example: - *
      
      -Ext.Direct.addProvider(
      -    {
      -        type: 'polling',
      -        url:  'php/poll.php',
      -        id:   'poll-provider'
      -    }
      -);
      -     
      -var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}('poll-provider');
      -p.disconnect();
      -     * 
      - */ - - /** - * @cfg {Number} priority - * Priority of the request. Lower is higher priority, 0 means "duplex" (always on). - * All Providers default to 1 except for PollingProvider which defaults to 3. - */ - priority: 1, - - /** - * @cfg {String} type - * Required, undefined by default. The type of provider specified - * to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a - * new Provider. Acceptable values by default are:
        - *
      • polling : {@link Ext.direct.PollingProvider PollingProvider}
      • - *
      • remoting : {@link Ext.direct.RemotingProvider RemotingProvider}
      • - *
      - */ - - // private - constructor : function(config){ - Ext.apply(this, config); - this.addEvents( - /** - * @event connect - * Fires when the Provider connects to the server-side - * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}. - */ - 'connect', - /** - * @event disconnect - * Fires when the Provider disconnects from the server-side - * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}. - */ - 'disconnect', - /** - * @event data - * Fires when the Provider receives data from the server-side - * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}. - * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred. - */ - 'data', - /** - * @event exception - * Fires when the Provider receives an exception from the server-side - */ - 'exception' - ); - Ext.direct.Provider.superclass.constructor.call(this, config); - }, - - /** - * Returns whether or not the server-side is currently connected. - * Abstract method for subclasses to implement. - */ - isConnected: function(){ - return false; - }, - - /** - * Abstract methods for subclasses to implement. - */ - connect: Ext.emptyFn, - - /** - * Abstract methods for subclasses to implement. - */ - disconnect: Ext.emptyFn -}); -/** - * @class Ext.direct.JsonProvider - * @extends Ext.direct.Provider - */ -Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, { - parseResponse: function(xhr){ - if(!Ext.isEmpty(xhr.responseText)){ - if(typeof xhr.responseText == 'object'){ - return xhr.responseText; - } - return Ext.decode(xhr.responseText); - } - return null; - }, - - getEvents: function(xhr){ - var data = null; - try{ - data = this.parseResponse(xhr); - }catch(e){ - var event = new Ext.Direct.ExceptionEvent({ - data: e, - xhr: xhr, - code: Ext.Direct.exceptions.PARSE, - message: 'Error parsing json response: \n\n ' + data - }); - return [event]; - } - var events = []; - if(Ext.isArray(data)){ - for(var i = 0, len = data.length; i < len; i++){ - events.push(Ext.Direct.createEvent(data[i])); - } - }else{ - events.push(Ext.Direct.createEvent(data)); - } - return events; - } -});/** - * @class Ext.direct.PollingProvider - * @extends Ext.direct.JsonProvider - * - *

      Provides for repetitive polling of the server at distinct {@link #interval intervals}. - * The initial request for data originates from the client, and then is responded to by the - * server.

      - * - *

      All configurations for the PollingProvider should be generated by the server-side - * API portion of the Ext.Direct stack.

      - * - *

      An instance of PollingProvider may be created directly via the new keyword or by simply - * specifying type = 'polling'. For example:

      - *
      
      -var pollA = new Ext.direct.PollingProvider({
      -    type:'polling',
      -    url: 'php/pollA.php',
      -});
      -Ext.Direct.addProvider(pollA);
      -pollA.disconnect();
      -
      -Ext.Direct.addProvider(
      -    {
      -        type:'polling',
      -        url: 'php/pollB.php',
      -        id: 'pollB-provider'
      -    }
      -);
      -var pollB = Ext.Direct.getProvider('pollB-provider');
      - * 
      - */ -Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, { - /** - * @cfg {Number} priority - * Priority of the request (defaults to 3). See {@link Ext.direct.Provider#priority}. - */ - // override default priority - priority: 3, - - /** - * @cfg {Number} interval - * How often to poll the server-side in milliseconds (defaults to 3000 - every - * 3 seconds). - */ - interval: 3000, - - /** - * @cfg {Object} baseParams An object containing properties which are to be sent as parameters - * on every polling request - */ - - /** - * @cfg {String/Function} url - * The url which the PollingProvider should contact with each request. This can also be - * an imported Ext.Direct method which will accept the baseParams as its only argument. - */ - - // private - constructor : function(config){ - Ext.direct.PollingProvider.superclass.constructor.call(this, config); - this.addEvents( - /** - * @event beforepoll - * Fired immediately before a poll takes place, an event handler can return false - * in order to cancel the poll. - * @param {Ext.direct.PollingProvider} - */ - 'beforepoll', - /** - * @event poll - * This event has not yet been implemented. - * @param {Ext.direct.PollingProvider} - */ - 'poll' - ); - }, - - // inherited - isConnected: function(){ - return !!this.pollTask; - }, - - /** - * Connect to the server-side and begin the polling process. To handle each - * response subscribe to the data event. - */ - connect: function(){ - if(this.url && !this.pollTask){ - this.pollTask = Ext.TaskMgr.start({ - run: function(){ - if(this.fireEvent('beforepoll', this) !== false){ - if(typeof this.url == 'function'){ - this.url(this.baseParams); - }else{ - Ext.Ajax.request({ - url: this.url, - callback: this.onData, - scope: this, - params: this.baseParams - }); - } - } - }, - interval: this.interval, - scope: this - }); - this.fireEvent('connect', this); - }else if(!this.url){ - throw 'Error initializing PollingProvider, no url configured.'; - } - }, - - /** - * Disconnect from the server-side and stop the polling process. The disconnect - * event will be fired on a successful disconnect. - */ - disconnect: function(){ - if(this.pollTask){ - Ext.TaskMgr.stop(this.pollTask); - delete this.pollTask; - this.fireEvent('disconnect', this); - } - }, - - // private - onData: function(opt, success, xhr){ - if(success){ - var events = this.getEvents(xhr); - for(var i = 0, len = events.length; i < len; i++){ - var e = events[i]; - this.fireEvent('data', this, e); - } - }else{ - var e = new Ext.Direct.ExceptionEvent({ - data: e, - code: Ext.Direct.exceptions.TRANSPORT, - message: 'Unable to connect to the server.', - xhr: xhr - }); - this.fireEvent('data', this, e); - } - } -}); - -Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider;/** - * @class Ext.direct.RemotingProvider - * @extends Ext.direct.JsonProvider - * - *

      The {@link Ext.direct.RemotingProvider RemotingProvider} exposes access to - * server side methods on the client (a remote procedure call (RPC) type of - * connection where the client can initiate a procedure on the server).

      - * - *

      This allows for code to be organized in a fashion that is maintainable, - * while providing a clear path between client and server, something that is - * not always apparent when using URLs.

      - * - *

      To accomplish this the server-side needs to describe what classes and methods - * are available on the client-side. This configuration will typically be - * outputted by the server-side Ext.Direct stack when the API description is built.

      - */ -Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, { - /** - * @cfg {Object} actions - * Object literal defining the server side actions and methods. For example, if - * the Provider is configured with: - *
      
      -"actions":{ // each property within the 'actions' object represents a server side Class 
      -    "TestAction":[ // array of methods within each server side Class to be   
      -    {              // stubbed out on client
      -        "name":"doEcho", 
      -        "len":1            
      -    },{
      -        "name":"multiply",// name of method
      -        "len":2           // The number of parameters that will be used to create an
      -                          // array of data to send to the server side function.
      -                          // Ensure the server sends back a Number, not a String. 
      -    },{
      -        "name":"doForm",
      -        "formHandler":true, // direct the client to use specialized form handling method 
      -        "len":1
      -    }]
      -}
      -     * 
      - *

      Note that a Store is not required, a server method can be called at any time. - * In the following example a client side handler is used to call the - * server side method "multiply" in the server-side "TestAction" Class:

      - *
      
      -TestAction.multiply(
      -    2, 4, // pass two arguments to server, so specify len=2
      -    // callback function after the server is called
      -    // result: the result returned by the server
      -    //      e: Ext.Direct.RemotingEvent object
      -    function(result, e){
      -        var t = e.getTransaction();
      -        var action = t.action; // server side Class called
      -        var method = t.method; // server side method called
      -        if(e.status){
      -            var answer = Ext.encode(result); // 8
      -    
      -        }else{
      -            var msg = e.message; // failure message
      -        }
      -    }
      -);
      -     * 
      - * In the example above, the server side "multiply" function will be passed two - * arguments (2 and 4). The "multiply" method should return the value 8 which will be - * available as the result in the example above. - */ - - /** - * @cfg {String/Object} namespace - * Namespace for the Remoting Provider (defaults to the browser global scope of window). - * Explicitly specify the namespace Object, or specify a String to have a - * {@link Ext#namespace namespace created} implicitly. - */ - - /** - * @cfg {String} url - * Required. The url to connect to the {@link Ext.Direct} server-side router. - */ - - /** - * @cfg {String} enableUrlEncode - * Specify which param will hold the arguments for the method. - * Defaults to 'data'. - */ - - /** - * @cfg {Number/Boolean} enableBuffer - *

      true or false to enable or disable combining of method - * calls. If a number is specified this is the amount of time in milliseconds - * to wait before sending a batched request (defaults to 10).

      - *

      Calls which are received within the specified timeframe will be - * concatenated together and sent in a single request, optimizing the - * application by reducing the amount of round trips that have to be made - * to the server.

      - */ - enableBuffer: 10, - - /** - * @cfg {Number} maxRetries - * Number of times to re-attempt delivery on failure of a call. Defaults to 1. - */ - maxRetries: 1, - - /** - * @cfg {Number} timeout - * The timeout to use for each request. Defaults to undefined. - */ - timeout: undefined, - - constructor : function(config){ - Ext.direct.RemotingProvider.superclass.constructor.call(this, config); - this.addEvents( - /** - * @event beforecall - * Fires immediately before the client-side sends off the RPC call. - * By returning false from an event handler you can prevent the call from - * executing. - * @param {Ext.direct.RemotingProvider} provider - * @param {Ext.Direct.Transaction} transaction - * @param {Object} meta The meta data - */ - 'beforecall', - /** - * @event call - * Fires immediately after the request to the server-side is sent. This does - * NOT fire after the response has come back from the call. - * @param {Ext.direct.RemotingProvider} provider - * @param {Ext.Direct.Transaction} transaction - * @param {Object} meta The meta data - */ - 'call' - ); - this.namespace = (Ext.isString(this.namespace)) ? Ext.ns(this.namespace) : this.namespace || window; - this.transactions = {}; - this.callBuffer = []; - }, - - // private - initAPI : function(){ - var o = this.actions; - for(var c in o){ - var cls = this.namespace[c] || (this.namespace[c] = {}), - ms = o[c]; - for(var i = 0, len = ms.length; i < len; i++){ - var m = ms[i]; - cls[m.name] = this.createMethod(c, m); - } - } - }, - - // inherited - isConnected: function(){ - return !!this.connected; - }, - - connect: function(){ - if(this.url){ - this.initAPI(); - this.connected = true; - this.fireEvent('connect', this); - }else if(!this.url){ - throw 'Error initializing RemotingProvider, no url configured.'; - } - }, - - disconnect: function(){ - if(this.connected){ - this.connected = false; - this.fireEvent('disconnect', this); - } - }, - - onData: function(opt, success, xhr){ - if(success){ - var events = this.getEvents(xhr); - for(var i = 0, len = events.length; i < len; i++){ - var e = events[i], - t = this.getTransaction(e); - this.fireEvent('data', this, e); - if(t){ - this.doCallback(t, e, true); - Ext.Direct.removeTransaction(t); - } - } - }else{ - var ts = [].concat(opt.ts); - for(var i = 0, len = ts.length; i < len; i++){ - var t = this.getTransaction(ts[i]); - if(t && t.retryCount < this.maxRetries){ - t.retry(); - }else{ - var e = new Ext.Direct.ExceptionEvent({ - data: e, - transaction: t, - code: Ext.Direct.exceptions.TRANSPORT, - message: 'Unable to connect to the server.', - xhr: xhr - }); - this.fireEvent('data', this, e); - if(t){ - this.doCallback(t, e, false); - Ext.Direct.removeTransaction(t); - } - } - } - } - }, - - getCallData: function(t){ - return { - action: t.action, - method: t.method, - data: t.data, - type: 'rpc', - tid: t.tid - }; - }, - - doSend : function(data){ - var o = { - url: this.url, - callback: this.onData, - scope: this, - ts: data, - timeout: this.timeout - }, callData; - - if(Ext.isArray(data)){ - callData = []; - for(var i = 0, len = data.length; i < len; i++){ - callData.push(this.getCallData(data[i])); - } - }else{ - callData = this.getCallData(data); - } - - if(this.enableUrlEncode){ - var params = {}; - params[Ext.isString(this.enableUrlEncode) ? this.enableUrlEncode : 'data'] = Ext.encode(callData); - o.params = params; - }else{ - o.jsonData = callData; - } - Ext.Ajax.request(o); - }, - - combineAndSend : function(){ - var len = this.callBuffer.length; - if(len > 0){ - this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer); - this.callBuffer = []; - } - }, - - queueTransaction: function(t){ - if(t.form){ - this.processForm(t); - return; - } - this.callBuffer.push(t); - if(this.enableBuffer){ - if(!this.callTask){ - this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this); - } - this.callTask.delay(Ext.isNumber(this.enableBuffer) ? this.enableBuffer : 10); - }else{ - this.combineAndSend(); - } - }, - - doCall : function(c, m, args){ - var data = null, hs = args[m.len], scope = args[m.len+1]; - - if(m.len !== 0){ - data = args.slice(0, m.len); - } - - var t = new Ext.Direct.Transaction({ - provider: this, - args: args, - action: c, - method: m.name, - data: data, - cb: scope && Ext.isFunction(hs) ? hs.createDelegate(scope) : hs - }); - - if(this.fireEvent('beforecall', this, t, m) !== false){ - Ext.Direct.addTransaction(t); - this.queueTransaction(t); - this.fireEvent('call', this, t, m); - } - }, - - doForm : function(c, m, form, callback, scope){ - var t = new Ext.Direct.Transaction({ - provider: this, - action: c, - method: m.name, - args:[form, callback, scope], - cb: scope && Ext.isFunction(callback) ? callback.createDelegate(scope) : callback, - isForm: true - }); - - if(this.fireEvent('beforecall', this, t, m) !== false){ - Ext.Direct.addTransaction(t); - var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data', - params = { - extTID: t.tid, - extAction: c, - extMethod: m.name, - extType: 'rpc', - extUpload: String(isUpload) - }; - - // change made from typeof callback check to callback.params - // to support addl param passing in DirectSubmit EAC 6/2 - Ext.apply(t, { - form: Ext.getDom(form), - isUpload: isUpload, - params: callback && Ext.isObject(callback.params) ? Ext.apply(params, callback.params) : params - }); - this.fireEvent('call', this, t, m); - this.processForm(t); - } - }, - - processForm: function(t){ - Ext.Ajax.request({ - url: this.url, - params: t.params, - callback: this.onData, - scope: this, - form: t.form, - isUpload: t.isUpload, - ts: t - }); - }, - - createMethod : function(c, m){ - var f; - if(!m.formHandler){ - f = function(){ - this.doCall(c, m, Array.prototype.slice.call(arguments, 0)); - }.createDelegate(this); - }else{ - f = function(form, callback, scope){ - this.doForm(c, m, form, callback, scope); - }.createDelegate(this); - } - f.directCfg = { - action: c, - method: m - }; - return f; - }, - - getTransaction: function(opt){ - return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null; - }, - - doCallback: function(t, e){ - var fn = e.status ? 'success' : 'failure'; - if(t && t.cb){ - var hs = t.cb, - result = Ext.isDefined(e.result) ? e.result : e.data; - if(Ext.isFunction(hs)){ - hs(result, e); - } else{ - Ext.callback(hs[fn], hs.scope, [result, e]); - Ext.callback(hs.callback, hs.scope, [result, e]); - } - } - } -}); -Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/direct.js b/web-client/src/main/resources/apps/js/ext/pkgs/direct.js deleted file mode 100644 index 7ca5961b2d7..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/direct.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.data.DirectProxy=function(a){Ext.apply(this,a);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}Ext.data.DirectProxy.superclass.constructor.call(this,a)};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(b,c,a,e,j,k,m){var h=[],g=this.api[b]||this.directFn;switch(b){case Ext.data.Api.actions.create:h.push(a.jsonData);break;case Ext.data.Api.actions.read:if(g.directCfg.method.len>0){if(this.paramOrder){for(var d=0,f=this.paramOrder.length;d1){for(var d=0,b=c.length;d0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(Ext.isNumber(this.enableBuffer)?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(h,a,b){var g=null,e=b[a.len],f=b[a.len+1];if(a.len!==0){g=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:h,method:a.name,data:g,cb:f&&Ext.isFunction(e)?e.createDelegate(f):e});if(this.fireEvent("beforecall",this,d,a)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d,a)}},doForm:function(i,b,f,h,e){var d=new Ext.Direct.Transaction({provider:this,action:i,method:b.name,args:[f,h,e],cb:e&&Ext.isFunction(h)?h.createDelegate(e):h,isForm:true});if(this.fireEvent("beforecall",this,d,b)!==false){Ext.Direct.addTransaction(d);var a=String(f.getAttribute("enctype")).toLowerCase()=="multipart/form-data",g={extTID:d.tid,extAction:i,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(f),isUpload:a,params:h&&Ext.isObject(h.params)?Ext.apply(g,h.params):g});this.fireEvent("call",this,d,b);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,f,c){this.doForm(d,a,e,f,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,f){var d=f.status?"success":"failure";if(c&&c.cb){var b=c.cb,a=Ext.isDefined(f.result)?f.result:f.data;if(Ext.isFunction(b)){b(a,f)}else{Ext.callback(b[d],b.scope,[a,f]);Ext.callback(b.callback,b.scope,[a,f])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/ext-core-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/ext-core-debug.js deleted file mode 100644 index 88c75b66f6a..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/ext-core-debug.js +++ /dev/null @@ -1,7996 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -(function(){ - -var EXTUTIL = Ext.util, - EACH = Ext.each, - TRUE = true, - FALSE = false; -/** - * @class Ext.util.Observable - * Base class that provides a common interface for publishing events. Subclasses are expected to - * to have a property "events" with all the events defined, and, optionally, a property "listeners" - * with configured listeners defined.
      - * For example: - *
      
      -Employee = Ext.extend(Ext.util.Observable, {
      -    constructor: function(config){
      -        this.name = config.name;
      -        this.addEvents({
      -            "fired" : true,
      -            "quit" : true
      -        });
      -
      -        // Copy configured listeners into *this* object so that the base class's
      -        // constructor will add them.
      -        this.listeners = config.listeners;
      -
      -        // Call our superclass constructor to complete construction process.
      -        Employee.superclass.constructor.call(this, config)
      -    }
      -});
      -
      - * This could then be used like this:
      
      -var newEmployee = new Employee({
      -    name: employeeName,
      -    listeners: {
      -        quit: function() {
      -            // By default, "this" will be the object that fired the event.
      -            alert(this.name + " has quit!");
      -        }
      -    }
      -});
      -
      - */ -EXTUTIL.Observable = function(){ - /** - * @cfg {Object} listeners (optional)

      A config object containing one or more event handlers to be added to this - * object during initialization. This should be a valid listeners config object as specified in the - * {@link #addListener} example for attaching multiple handlers at once.

      - *

      DOM events from ExtJs {@link Ext.Component Components}

      - *

      While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this - * is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}'s - * {@link Ext.DataView#click click} event passing the node clicked on. To access DOM - * events directly from a Component's HTMLElement, listeners must be added to the {@link Ext.Component#getEl Element} after the Component - * has been rendered. A plugin can simplify this step:

      
      -// Plugin is configured with a listeners config object.
      -// The Component is appended to the argument list of all handler functions.
      -Ext.DomObserver = Ext.extend(Object, {
      -    constructor: function(config) {
      -        this.listeners = config.listeners ? config.listeners : config;
      -    },
      -
      -    // Component passes itself into plugin's init method
      -    init: function(c) {
      -        var p, l = this.listeners;
      -        for (p in l) {
      -            if (Ext.isFunction(l[p])) {
      -                l[p] = this.createHandler(l[p], c);
      -            } else {
      -                l[p].fn = this.createHandler(l[p].fn, c);
      -            }
      -        }
      -
      -        // Add the listeners to the Element immediately following the render call
      -        c.render = c.render.{@link Function#createSequence createSequence}(function() {
      -            var e = c.getEl();
      -            if (e) {
      -                e.on(l);
      -            }
      -        });
      -    },
      -
      -    createHandler: function(fn, c) {
      -        return function(e) {
      -            fn.call(this, e, c);
      -        };
      -    }
      -});
      -
      -var combo = new Ext.form.ComboBox({
      -
      -    // Collapse combo when its element is clicked on
      -    plugins: [ new Ext.DomObserver({
      -        click: function(evt, comp) {
      -            comp.collapse();
      -        }
      -    })],
      -    store: myStore,
      -    typeAhead: true,
      -    mode: 'local',
      -    triggerAction: 'all'
      -});
      -     * 

      - */ - var me = this, e = me.events; - if(me.listeners){ - me.on(me.listeners); - delete me.listeners; - } - me.events = e || {}; -}; - -EXTUTIL.Observable.prototype = { - // private - filterOptRe : /^(?:scope|delay|buffer|single)$/, - - /** - *

      Fires the specified event with the passed parameters (minus the event name).

      - *

      An event may be set to bubble up an Observable parent hierarchy (See {@link Ext.Component#getBubbleTarget}) - * by calling {@link #enableBubble}.

      - * @param {String} eventName The name of the event to fire. - * @param {Object...} args Variable number of parameters are passed to handlers. - * @return {Boolean} returns false if any of the handlers return false otherwise it returns true. - */ - fireEvent : function(){ - var a = Array.prototype.slice.call(arguments, 0), - ename = a[0].toLowerCase(), - me = this, - ret = TRUE, - ce = me.events[ename], - cc, - q, - c; - if (me.eventsSuspended === TRUE) { - if (q = me.eventQueue) { - q.push(a); - } - } - else if(typeof ce == 'object') { - if (ce.bubble){ - if(ce.fire.apply(ce, a.slice(1)) === FALSE) { - return FALSE; - } - c = me.getBubbleTarget && me.getBubbleTarget(); - if(c && c.enableBubble) { - cc = c.events[ename]; - if(!cc || typeof cc != 'object' || !cc.bubble) { - c.enableBubble(ename); - } - return c.fireEvent.apply(c, a); - } - } - else { - a.shift(); - ret = ce.fire.apply(ce, a); - } - } - return ret; - }, - - /** - * Appends an event handler to this object. - * @param {String} eventName The name of the event to listen for. - * @param {Function} handler The method the event invokes. - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. - * If omitted, defaults to the object which fired the event. - * @param {Object} options (optional) An object containing handler configuration. - * properties. This may contain any of the following properties:
        - *
      • scope : Object
        The scope (this reference) in which the handler function is executed. - * If omitted, defaults to the object which fired the event.
      • - *
      • delay : Number
        The number of milliseconds to delay the invocation of the handler after the event fires.
      • - *
      • single : Boolean
        True to add a handler to handle just the next firing of the event, and then remove itself.
      • - *
      • buffer : Number
        Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed - * by the specified number of milliseconds. If the event fires again within that time, the original - * handler is not invoked, but the new handler is scheduled in its place.
      • - *
      • target : Observable
        Only call the handler if the event was fired on the target Observable, not - * if the event was bubbled up from a child Observable.
      • - *

      - *

      - * Combining Options
      - * Using the options argument, it is possible to combine different types of listeners:
      - *
      - * A delayed, one-time listener. - *

      
      -myDataView.on('click', this.onClick, this, {
      -single: true,
      -delay: 100
      -});
      - *

      - * Attaching multiple handlers in 1 call
      - * The method also allows for a single argument to be passed which is a config object containing properties - * which specify multiple handlers. - *

      - *

      
      -myGridPanel.on({
      -'click' : {
      -    fn: this.onClick,
      -    scope: this,
      -    delay: 100
      -},
      -'mouseover' : {
      -    fn: this.onMouseOver,
      -    scope: this
      -},
      -'mouseout' : {
      -    fn: this.onMouseOut,
      -    scope: this
      -}
      -});
      - *

      - * Or a shorthand syntax:
      - *

      
      -myGridPanel.on({
      -'click' : this.onClick,
      -'mouseover' : this.onMouseOver,
      -'mouseout' : this.onMouseOut,
      - scope: this
      -});
      - */ - addListener : function(eventName, fn, scope, o){ - var me = this, - e, - oe, - ce; - - if (typeof eventName == 'object') { - o = eventName; - for (e in o) { - oe = o[e]; - if (!me.filterOptRe.test(e)) { - me.addListener(e, oe.fn || oe, oe.scope || o.scope, oe.fn ? oe : o); - } - } - } else { - eventName = eventName.toLowerCase(); - ce = me.events[eventName] || TRUE; - if (typeof ce == 'boolean') { - me.events[eventName] = ce = new EXTUTIL.Event(me, eventName); - } - ce.addListener(fn, scope, typeof o == 'object' ? o : {}); - } - }, - - /** - * Removes an event handler. - * @param {String} eventName The type of event the handler was associated with. - * @param {Function} handler The handler to remove. This must be a reference to the function passed into the {@link #addListener} call. - * @param {Object} scope (optional) The scope originally specified for the handler. - */ - removeListener : function(eventName, fn, scope){ - var ce = this.events[eventName.toLowerCase()]; - if (typeof ce == 'object') { - ce.removeListener(fn, scope); - } - }, - - /** - * Removes all listeners for this object - */ - purgeListeners : function(){ - var events = this.events, - evt, - key; - for(key in events){ - evt = events[key]; - if(typeof evt == 'object'){ - evt.clearListeners(); - } - } - }, - - /** - * Adds the specified events to the list of events which this Observable may fire. - * @param {Object|String} o Either an object with event names as properties with a value of true - * or the first event name string if multiple event names are being passed as separate parameters. - * @param {string} Optional. Event name if multiple event names are being passed as separate parameters. - * Usage:
      
      -this.addEvents('storeloaded', 'storecleared');
      -
      - */ - addEvents : function(o){ - var me = this; - me.events = me.events || {}; - if (typeof o == 'string') { - var a = arguments, - i = a.length; - while(i--) { - me.events[a[i]] = me.events[a[i]] || TRUE; - } - } else { - Ext.applyIf(me.events, o); - } - }, - - /** - * Checks to see if this object has any listeners for a specified event - * @param {String} eventName The name of the event to check for - * @return {Boolean} True if the event is being listened for, else false - */ - hasListener : function(eventName){ - var e = this.events[eventName.toLowerCase()]; - return typeof e == 'object' && e.listeners.length > 0; - }, - - /** - * Suspend the firing of all events. (see {@link #resumeEvents}) - * @param {Boolean} queueSuspended Pass as true to queue up suspended events to be fired - * after the {@link #resumeEvents} call instead of discarding all suspended events; - */ - suspendEvents : function(queueSuspended){ - this.eventsSuspended = TRUE; - if(queueSuspended && !this.eventQueue){ - this.eventQueue = []; - } - }, - - /** - * Resume firing events. (see {@link #suspendEvents}) - * If events were suspended using the queueSuspended parameter, then all - * events fired during event suspension will be sent to any listeners now. - */ - resumeEvents : function(){ - var me = this, - queued = me.eventQueue || []; - me.eventsSuspended = FALSE; - delete me.eventQueue; - EACH(queued, function(e) { - me.fireEvent.apply(me, e); - }); - } -}; - -var OBSERVABLE = EXTUTIL.Observable.prototype; -/** - * Appends an event handler to this object (shorthand for {@link #addListener}.) - * @param {String} eventName The type of event to listen for - * @param {Function} handler The method the event invokes - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. - * If omitted, defaults to the object which fired the event. - * @param {Object} options (optional) An object containing handler configuration. - * @method - */ -OBSERVABLE.on = OBSERVABLE.addListener; -/** - * Removes an event handler (shorthand for {@link #removeListener}.) - * @param {String} eventName The type of event the handler was associated with. - * @param {Function} handler The handler to remove. This must be a reference to the function passed into the {@link #addListener} call. - * @param {Object} scope (optional) The scope originally specified for the handler. - * @method - */ -OBSERVABLE.un = OBSERVABLE.removeListener; - -/** - * Removes all added captures from the Observable. - * @param {Observable} o The Observable to release - * @static - */ -EXTUTIL.Observable.releaseCapture = function(o){ - o.fireEvent = OBSERVABLE.fireEvent; -}; - -function createTargeted(h, o, scope){ - return function(){ - if(o.target == arguments[0]){ - h.apply(scope, Array.prototype.slice.call(arguments, 0)); - } - }; -}; - -function createBuffered(h, o, l, scope){ - l.task = new EXTUTIL.DelayedTask(); - return function(){ - l.task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0)); - }; -}; - -function createSingle(h, e, fn, scope){ - return function(){ - e.removeListener(fn, scope); - return h.apply(scope, arguments); - }; -}; - -function createDelayed(h, o, l, scope){ - return function(){ - var task = new EXTUTIL.DelayedTask(), - args = Array.prototype.slice.call(arguments, 0); - if(!l.tasks) { - l.tasks = []; - } - l.tasks.push(task); - task.delay(o.delay || 10, function(){ - l.tasks.remove(task); - h.apply(scope, args); - }, scope); - }; -}; - -EXTUTIL.Event = function(obj, name){ - this.name = name; - this.obj = obj; - this.listeners = []; -}; - -EXTUTIL.Event.prototype = { - addListener : function(fn, scope, options){ - var me = this, - l; - scope = scope || me.obj; - if(!me.isListening(fn, scope)){ - l = me.createListener(fn, scope, options); - if(me.firing){ // if we are currently firing this event, don't disturb the listener loop - me.listeners = me.listeners.slice(0); - } - me.listeners.push(l); - } - }, - - createListener: function(fn, scope, o){ - o = o || {}; - scope = scope || this.obj; - var l = { - fn: fn, - scope: scope, - options: o - }, h = fn; - if(o.target){ - h = createTargeted(h, o, scope); - } - if(o.delay){ - h = createDelayed(h, o, l, scope); - } - if(o.single){ - h = createSingle(h, this, fn, scope); - } - if(o.buffer){ - h = createBuffered(h, o, l, scope); - } - l.fireFn = h; - return l; - }, - - findListener : function(fn, scope){ - var list = this.listeners, - i = list.length, - l; - - scope = scope || this.obj; - while(i--){ - l = list[i]; - if(l){ - if(l.fn == fn && l.scope == scope){ - return i; - } - } - } - return -1; - }, - - isListening : function(fn, scope){ - return this.findListener(fn, scope) != -1; - }, - - removeListener : function(fn, scope){ - var index, - l, - k, - me = this, - ret = FALSE; - if((index = me.findListener(fn, scope)) != -1){ - if (me.firing) { - me.listeners = me.listeners.slice(0); - } - l = me.listeners[index]; - if(l.task) { - l.task.cancel(); - delete l.task; - } - k = l.tasks && l.tasks.length; - if(k) { - while(k--) { - l.tasks[k].cancel(); - } - delete l.tasks; - } - me.listeners.splice(index, 1); - ret = TRUE; - } - return ret; - }, - - // Iterate to stop any buffered/delayed events - clearListeners : function(){ - var me = this, - l = me.listeners, - i = l.length; - while(i--) { - me.removeListener(l[i].fn, l[i].scope); - } - }, - - fire : function(){ - var me = this, - listeners = me.listeners, - len = listeners.length, - i = 0, - l; - - if(len > 0){ - me.firing = TRUE; - var args = Array.prototype.slice.call(arguments, 0); - for (; i < len; i++) { - l = listeners[i]; - if(l && l.fireFn.apply(l.scope || me.obj || window, args) === FALSE) { - return (me.firing = FALSE); - } - } - } - me.firing = FALSE; - return TRUE; - } - -}; -})(); -/** - * @class Ext.DomHelper - *

      The DomHelper class provides a layer of abstraction from DOM and transparently supports creating - * elements via DOM or using HTML fragments. It also has the ability to create HTML fragment templates - * from your DOM building code.

      - * - *

      DomHelper element specification object

      - *

      A specification object is used when creating elements. Attributes of this object - * are assumed to be element attributes, except for 4 special attributes: - *

        - *
      • tag :
        The tag name of the element
      • - *
      • children : or cn
        An array of the - * same kind of element definition objects to be created and appended. These can be nested - * as deep as you want.
      • - *
      • cls :
        The class attribute of the element. - * This will end up being either the "class" attribute on a HTML fragment or className - * for a DOM node, depending on whether DomHelper is using fragments or DOM.
      • - *
      • html :
        The innerHTML for the element
      • - *

      - * - *

      Insertion methods

      - *

      Commonly used insertion methods: - *

        - *
      • {@link #append} :
      • - *
      • {@link #insertBefore} :
      • - *
      • {@link #insertAfter} :
      • - *
      • {@link #overwrite} :
      • - *
      • {@link #createTemplate} :
      • - *
      • {@link #insertHtml} :
      • - *

      - * - *

      Example

      - *

      This is an example, where an unordered list with 3 children items is appended to an existing - * element with id 'my-div':
      -

      
      -var dh = Ext.DomHelper; // create shorthand alias
      -// specification object
      -var spec = {
      -    id: 'my-ul',
      -    tag: 'ul',
      -    cls: 'my-list',
      -    // append children after creating
      -    children: [     // may also specify 'cn' instead of 'children'
      -        {tag: 'li', id: 'item0', html: 'List Item 0'},
      -        {tag: 'li', id: 'item1', html: 'List Item 1'},
      -        {tag: 'li', id: 'item2', html: 'List Item 2'}
      -    ]
      -};
      -var list = dh.append(
      -    'my-div', // the context element 'my-div' can either be the id or the actual node
      -    spec      // the specification object
      -);
      - 

      - *

      Element creation specification parameters in this class may also be passed as an Array of - * specification objects. This can be used to insert multiple sibling nodes into an existing - * container very efficiently. For example, to add more list items to the example above:

      
      -dh.append('my-ul', [
      -    {tag: 'li', id: 'item3', html: 'List Item 3'},
      -    {tag: 'li', id: 'item4', html: 'List Item 4'}
      -]);
      - * 

      - * - *

      Templating

      - *

      The real power is in the built-in templating. Instead of creating or appending any elements, - * {@link #createTemplate} returns a Template object which can be used over and over to - * insert new elements. Revisiting the example above, we could utilize templating this time: - *

      
      -// create the node
      -var list = dh.append('my-div', {tag: 'ul', cls: 'my-list'});
      -// get template
      -var tpl = dh.createTemplate({tag: 'li', id: 'item{0}', html: 'List Item {0}'});
      -
      -for(var i = 0; i < 5, i++){
      -    tpl.append(list, [i]); // use template to append to the actual node
      -}
      - * 

      - *

      An example using a template:

      
      -var html = '{2}';
      -
      -var tpl = new Ext.DomHelper.createTemplate(html);
      -tpl.append('blog-roll', ['link1', 'http://www.jackslocum.com/', "Jack's Site"]);
      -tpl.append('blog-roll', ['link2', 'http://www.dustindiaz.com/', "Dustin's Site"]);
      - * 

      - * - *

      The same example using named parameters:

      
      -var html = '{text}';
      -
      -var tpl = new Ext.DomHelper.createTemplate(html);
      -tpl.append('blog-roll', {
      -    id: 'link1',
      -    url: 'http://www.jackslocum.com/',
      -    text: "Jack's Site"
      -});
      -tpl.append('blog-roll', {
      -    id: 'link2',
      -    url: 'http://www.dustindiaz.com/',
      -    text: "Dustin's Site"
      -});
      - * 

      - * - *

      Compiling Templates

      - *

      Templates are applied using regular expressions. The performance is great, but if - * you are adding a bunch of DOM elements using the same template, you can increase - * performance even further by {@link Ext.Template#compile "compiling"} the template. - * The way "{@link Ext.Template#compile compile()}" works is the template is parsed and - * broken up at the different variable points and a dynamic function is created and eval'ed. - * The generated function performs string concatenation of these parts and the passed - * variables instead of using regular expressions. - *

      
      -var html = '{text}';
      -
      -var tpl = new Ext.DomHelper.createTemplate(html);
      -tpl.compile();
      -
      -//... use template like normal
      - * 

      - * - *

      Performance Boost

      - *

      DomHelper will transparently create HTML fragments when it can. Using HTML fragments instead - * of DOM can significantly boost performance.

      - *

      Element creation specification parameters may also be strings. If {@link #useDom} is false, - * then the string is used as innerHTML. If {@link #useDom} is true, a string specification - * results in the creation of a text node. Usage:

      - *
      
      -Ext.DomHelper.useDom = true; // force it to use DOM; reduces performance
      - * 
      - * @singleton - */ -Ext.DomHelper = function(){ - var tempTableEl = null, - emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i, - tableRe = /^table|tbody|tr|td$/i, - confRe = /tag|children|cn|html$/i, - tableElRe = /td|tr|tbody/i, - cssRe = /([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi, - endRe = /end/i, - pub, - // kill repeat to save bytes - afterbegin = 'afterbegin', - afterend = 'afterend', - beforebegin = 'beforebegin', - beforeend = 'beforeend', - ts = '', - te = '
      ', - tbs = ts+'', - tbe = ''+te, - trs = tbs + '', - tre = ''+tbe; - - // private - function doInsert(el, o, returnElement, pos, sibling, append){ - var newNode = pub.insertHtml(pos, Ext.getDom(el), createHtml(o)); - return returnElement ? Ext.get(newNode, true) : newNode; - } - - // build as innerHTML where available - function createHtml(o){ - var b = '', - attr, - val, - key, - cn; - - if(typeof o == "string"){ - b = o; - } else if (Ext.isArray(o)) { - for (var i=0; i < o.length; i++) { - if(o[i]) { - b += createHtml(o[i]); - } - }; - } else { - b += '<' + (o.tag = o.tag || 'div'); - for (attr in o) { - val = o[attr]; - if(!confRe.test(attr)){ - if (typeof val == "object") { - b += ' ' + attr + '="'; - for (key in val) { - b += key + ':' + val[key] + ';'; - }; - b += '"'; - }else{ - b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '="' + val + '"'; - } - } - }; - // Now either just close the tag or try to add children and close the tag. - if (emptyTags.test(o.tag)) { - b += '/>'; - } else { - b += '>'; - if ((cn = o.children || o.cn)) { - b += createHtml(cn); - } else if(o.html){ - b += o.html; - } - b += ''; - } - } - return b; - } - - function ieTable(depth, s, h, e){ - tempTableEl.innerHTML = [s, h, e].join(''); - var i = -1, - el = tempTableEl, - ns; - while(++i < depth){ - el = el.firstChild; - } -// If the result is multiple siblings, then encapsulate them into one fragment. - if(ns = el.nextSibling){ - var df = document.createDocumentFragment(); - while(el){ - ns = el.nextSibling; - df.appendChild(el); - el = ns; - } - el = df; - } - return el; - } - - /** - * @ignore - * Nasty code for IE's broken table implementation - */ - function insertIntoTable(tag, where, el, html) { - var node, - before; - - tempTableEl = tempTableEl || document.createElement('div'); - - if(tag == 'td' && (where == afterbegin || where == beforeend) || - !tableElRe.test(tag) && (where == beforebegin || where == afterend)) { - return; - } - before = where == beforebegin ? el : - where == afterend ? el.nextSibling : - where == afterbegin ? el.firstChild : null; - - if (where == beforebegin || where == afterend) { - el = el.parentNode; - } - - if (tag == 'td' || (tag == 'tr' && (where == beforeend || where == afterbegin))) { - node = ieTable(4, trs, html, tre); - } else if ((tag == 'tbody' && (where == beforeend || where == afterbegin)) || - (tag == 'tr' && (where == beforebegin || where == afterend))) { - node = ieTable(3, tbs, html, tbe); - } else { - node = ieTable(2, ts, html, te); - } - el.insertBefore(node, before); - return node; - } - - /** - * @ignore - * Fix for IE9 createContextualFragment missing method - */ - function createContextualFragment(html){ - var div = document.createElement("div"), - fragment = document.createDocumentFragment(), - i = 0, - length, childNodes; - - div.innerHTML = html; - childNodes = div.childNodes; - length = childNodes.length; - - for (; i < length; i++) { - fragment.appendChild(childNodes[i].cloneNode(true)); - } - - return fragment; - } - - pub = { - /** - * Returns the markup for the passed Element(s) config. - * @param {Object} o The DOM object spec (and children) - * @return {String} - */ - markup : function(o){ - return createHtml(o); - }, - - /** - * Applies a style specification to an element. - * @param {String/HTMLElement} el The element to apply styles to - * @param {String/Object/Function} styles A style specification string e.g. 'width:100px', or object in the form {width:'100px'}, or - * a function which returns such a specification. - */ - applyStyles : function(el, styles){ - if (styles) { - var matches; - - el = Ext.fly(el); - if (typeof styles == "function") { - styles = styles.call(); - } - if (typeof styles == "string") { - /** - * Since we're using the g flag on the regex, we need to set the lastIndex. - * This automatically happens on some implementations, but not others, see: - * http://stackoverflow.com/questions/2645273/javascript-regular-expression-literal-persists-between-function-calls - * http://blog.stevenlevithan.com/archives/fixing-javascript-regexp - */ - cssRe.lastIndex = 0; - while ((matches = cssRe.exec(styles))) { - el.setStyle(matches[1], matches[2]); - } - } else if (typeof styles == "object") { - el.setStyle(styles); - } - } - }, - /** - * Inserts an HTML fragment into the DOM. - * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd. - * @param {HTMLElement} el The context element - * @param {String} html The HTML fragment - * @return {HTMLElement} The new node - */ - insertHtml : function(where, el, html){ - var hash = {}, - hashVal, - range, - rangeEl, - setStart, - frag, - rs; - - where = where.toLowerCase(); - // add these here because they are used in both branches of the condition. - hash[beforebegin] = ['BeforeBegin', 'previousSibling']; - hash[afterend] = ['AfterEnd', 'nextSibling']; - - if (el.insertAdjacentHTML) { - if(tableRe.test(el.tagName) && (rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html))){ - return rs; - } - // add these two to the hash. - hash[afterbegin] = ['AfterBegin', 'firstChild']; - hash[beforeend] = ['BeforeEnd', 'lastChild']; - if ((hashVal = hash[where])) { - el.insertAdjacentHTML(hashVal[0], html); - return el[hashVal[1]]; - } - } else { - range = el.ownerDocument.createRange(); - setStart = 'setStart' + (endRe.test(where) ? 'After' : 'Before'); - if (hash[where]) { - range[setStart](el); - if (!range.createContextualFragment) { - frag = createContextualFragment(html); - } - else { - frag = range.createContextualFragment(html); - } - el.parentNode.insertBefore(frag, where == beforebegin ? el : el.nextSibling); - return el[(where == beforebegin ? 'previous' : 'next') + 'Sibling']; - } else { - rangeEl = (where == afterbegin ? 'first' : 'last') + 'Child'; - if (el.firstChild) { - range[setStart](el[rangeEl]); - if (!range.createContextualFragment) { - frag = createContextualFragment(html); - } - else { - frag = range.createContextualFragment(html); - } - if(where == afterbegin){ - el.insertBefore(frag, el.firstChild); - }else{ - el.appendChild(frag); - } - } else { - el.innerHTML = html; - } - return el[rangeEl]; - } - } - throw 'Illegal insertion point -> "' + where + '"'; - }, - - /** - * Creates new DOM element(s) and inserts them before el. - * @param {Mixed} el The context element - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - */ - insertBefore : function(el, o, returnElement){ - return doInsert(el, o, returnElement, beforebegin); - }, - - /** - * Creates new DOM element(s) and inserts them after el. - * @param {Mixed} el The context element - * @param {Object} o The DOM object spec (and children) - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - */ - insertAfter : function(el, o, returnElement){ - return doInsert(el, o, returnElement, afterend, 'nextSibling'); - }, - - /** - * Creates new DOM element(s) and inserts them as the first child of el. - * @param {Mixed} el The context element - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - */ - insertFirst : function(el, o, returnElement){ - return doInsert(el, o, returnElement, afterbegin, 'firstChild'); - }, - - /** - * Creates new DOM element(s) and appends them to el. - * @param {Mixed} el The context element - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - */ - append : function(el, o, returnElement){ - return doInsert(el, o, returnElement, beforeend, '', true); - }, - - /** - * Creates new DOM element(s) and overwrites the contents of el with them. - * @param {Mixed} el The context element - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - */ - overwrite : function(el, o, returnElement){ - el = Ext.getDom(el); - el.innerHTML = createHtml(o); - return returnElement ? Ext.get(el.firstChild) : el.firstChild; - }, - - createHtml : createHtml - }; - return pub; -}(); -/** - * @class Ext.Template - *

      Represents an HTML fragment template. Templates may be {@link #compile precompiled} - * for greater performance.

      - *

      For example usage {@link #Template see the constructor}.

      - * - * @constructor - * An instance of this class may be created by passing to the constructor either - * a single argument, or multiple arguments: - *
        - *
      • single argument : String/Array - *
        - * The single argument may be either a String or an Array:
          - *
        • String :
        • 
          -var t = new Ext.Template("<div>Hello {0}.</div>");
          -t.{@link #append}('some-element', ['foo']);
          - * 
          - *
        • Array :
        • - * An Array will be combined with join(''). -
          
          -var t = new Ext.Template([
          -    '<div name="{id}">',
          -        '<span class="{cls}">{name:trim} {value:ellipsis(10)}</span>',
          -    '</div>',
          -]);
          -t.{@link #compile}();
          -t.{@link #append}('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});
          -
          - *
      • - *
      • multiple arguments : String, Object, Array, ... - *
        - * Multiple arguments will be combined with join(''). - *
        
        -var t = new Ext.Template(
        -    '<div name="{id}">',
        -        '<span class="{cls}">{name} {value}</span>',
        -    '</div>',
        -    // a configuration object:
        -    {
        -        compiled: true,      // {@link #compile} immediately
        -        disableFormats: true // See Notes below.
        -    }
        -);
        - * 
        - *

        Notes:

        - *
          - *
        • Formatting and disableFormats are not applicable for Ext Core.
        • - *
        • For a list of available format functions, see {@link Ext.util.Format}.
        • - *
        • disableFormats reduces {@link #apply} time - * when no formatting is required.
        • - *
        - *
      • - *
      - * @param {Mixed} config - */ -Ext.Template = function(html){ - var me = this, - a = arguments, - buf = [], - v; - - if (Ext.isArray(html)) { - html = html.join(""); - } else if (a.length > 1) { - for(var i = 0, len = a.length; i < len; i++){ - v = a[i]; - if(typeof v == 'object'){ - Ext.apply(me, v); - } else { - buf.push(v); - } - }; - html = buf.join(''); - } - - /**@private*/ - me.html = html; - /** - * @cfg {Boolean} compiled Specify true to compile the template - * immediately (see {@link #compile}). - * Defaults to false. - */ - if (me.compiled) { - me.compile(); - } -}; -Ext.Template.prototype = { - /** - * @cfg {RegExp} re The regular expression used to match template variables. - * Defaults to:
      
      -     * re : /\{([\w\-]+)\}/g                                     // for Ext Core
      -     * re : /\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g      // for Ext JS
      -     * 
      - */ - re : /\{([\w\-]+)\}/g, - /** - * See {@link #re}. - * @type RegExp - * @property re - */ - - /** - * Returns an HTML fragment of this template with the specified values applied. - * @param {Object/Array} values - * The template values. Can be an array if the params are numeric (i.e. {0}) - * or an object (i.e. {foo: 'bar'}). - * @return {String} The HTML fragment - */ - applyTemplate : function(values){ - var me = this; - - return me.compiled ? - me.compiled(values) : - me.html.replace(me.re, function(m, name){ - return values[name] !== undefined ? values[name] : ""; - }); - }, - - /** - * Sets the HTML used as the template and optionally compiles it. - * @param {String} html - * @param {Boolean} compile (optional) True to compile the template (defaults to undefined) - * @return {Ext.Template} this - */ - set : function(html, compile){ - var me = this; - me.html = html; - me.compiled = null; - return compile ? me.compile() : me; - }, - - /** - * Compiles the template into an internal function, eliminating the RegEx overhead. - * @return {Ext.Template} this - */ - compile : function(){ - var me = this, - sep = Ext.isGecko ? "+" : ","; - - function fn(m, name){ - name = "values['" + name + "']"; - return "'"+ sep + '(' + name + " == undefined ? '' : " + name + ')' + sep + "'"; - } - - eval("this.compiled = function(values){ return " + (Ext.isGecko ? "'" : "['") + - me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + - (Ext.isGecko ? "';};" : "'].join('');};")); - return me; - }, - - /** - * Applies the supplied values to the template and inserts the new node(s) as the first child of el. - * @param {Mixed} el The context element - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) - * @return {HTMLElement/Ext.Element} The new node or Element - */ - insertFirst: function(el, values, returnElement){ - return this.doInsert('afterBegin', el, values, returnElement); - }, - - /** - * Applies the supplied values to the template and inserts the new node(s) before el. - * @param {Mixed} el The context element - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) - * @return {HTMLElement/Ext.Element} The new node or Element - */ - insertBefore: function(el, values, returnElement){ - return this.doInsert('beforeBegin', el, values, returnElement); - }, - - /** - * Applies the supplied values to the template and inserts the new node(s) after el. - * @param {Mixed} el The context element - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) - * @return {HTMLElement/Ext.Element} The new node or Element - */ - insertAfter : function(el, values, returnElement){ - return this.doInsert('afterEnd', el, values, returnElement); - }, - - /** - * Applies the supplied values to the template and appends - * the new node(s) to the specified el. - *

      For example usage {@link #Template see the constructor}.

      - * @param {Mixed} el The context element - * @param {Object/Array} values - * The template values. Can be an array if the params are numeric (i.e. {0}) - * or an object (i.e. {foo: 'bar'}). - * @param {Boolean} returnElement (optional) true to return an Ext.Element (defaults to undefined) - * @return {HTMLElement/Ext.Element} The new node or Element - */ - append : function(el, values, returnElement){ - return this.doInsert('beforeEnd', el, values, returnElement); - }, - - doInsert : function(where, el, values, returnEl){ - el = Ext.getDom(el); - var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values)); - return returnEl ? Ext.get(newNode, true) : newNode; - }, - - /** - * Applies the supplied values to the template and overwrites the content of el with the new node(s). - * @param {Mixed} el The context element - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) - * @return {HTMLElement/Ext.Element} The new node or Element - */ - overwrite : function(el, values, returnElement){ - el = Ext.getDom(el); - el.innerHTML = this.applyTemplate(values); - return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; - } -}; -/** - * Alias for {@link #applyTemplate} - * Returns an HTML fragment of this template with the specified values applied. - * @param {Object/Array} values - * The template values. Can be an array if the params are numeric (i.e. {0}) - * or an object (i.e. {foo: 'bar'}). - * @return {String} The HTML fragment - * @member Ext.Template - * @method apply - */ -Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; - -/** - * Creates a template from the passed element's value (display:none textarea, preferred) or innerHTML. - * @param {String/HTMLElement} el A DOM element or its id - * @param {Object} config A configuration object - * @return {Ext.Template} The created template - * @static - */ -Ext.Template.from = function(el, config){ - el = Ext.getDom(el); - return new Ext.Template(el.value || el.innerHTML, config || ''); -}; -/* - * This is code is also distributed under MIT license for use - * with jQuery and prototype JavaScript libraries. - */ -/** - * @class Ext.DomQuery -Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). -

      -DomQuery supports most of the CSS3 selectors spec, along with some custom selectors and basic XPath.

      - -

      -All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure. -

      -

      Element Selectors:

      -
        -
      • * any element
      • -
      • E an element with the tag E
      • -
      • E F All descendent elements of E that have the tag F
      • -
      • E > F or E/F all direct children elements of E that have the tag F
      • -
      • E + F all elements with the tag F that are immediately preceded by an element with the tag E
      • -
      • E ~ F all elements with the tag F that are preceded by a sibling element with the tag E
      • -
      -

      Attribute Selectors:

      -

      The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.

      -
        -
      • E[foo] has an attribute "foo"
      • -
      • E[foo=bar] has an attribute "foo" that equals "bar"
      • -
      • E[foo^=bar] has an attribute "foo" that starts with "bar"
      • -
      • E[foo$=bar] has an attribute "foo" that ends with "bar"
      • -
      • E[foo*=bar] has an attribute "foo" that contains the substring "bar"
      • -
      • E[foo%=2] has an attribute "foo" that is evenly divisible by 2
      • -
      • E[foo!=bar] attribute "foo" does not equal "bar"
      • -
      -

      Pseudo Classes:

      -
        -
      • E:first-child E is the first child of its parent
      • -
      • E:last-child E is the last child of its parent
      • -
      • E:nth-child(n) E is the nth child of its parent (1 based as per the spec)
      • -
      • E:nth-child(odd) E is an odd child of its parent
      • -
      • E:nth-child(even) E is an even child of its parent
      • -
      • E:only-child E is the only child of its parent
      • -
      • E:checked E is an element that is has a checked attribute that is true (e.g. a radio or checkbox)
      • -
      • E:first the first E in the resultset
      • -
      • E:last the last E in the resultset
      • -
      • E:nth(n) the nth E in the resultset (1 based)
      • -
      • E:odd shortcut for :nth-child(odd)
      • -
      • E:even shortcut for :nth-child(even)
      • -
      • E:contains(foo) E's innerHTML contains the substring "foo"
      • -
      • E:nodeValue(foo) E contains a textNode with a nodeValue that equals "foo"
      • -
      • E:not(S) an E element that does not match simple selector S
      • -
      • E:has(S) an E element that has a descendent that matches simple selector S
      • -
      • E:next(S) an E element whose next sibling matches simple selector S
      • -
      • E:prev(S) an E element whose previous sibling matches simple selector S
      • -
      • E:any(S1|S2|S2) an E element which matches any of the simple selectors S1, S2 or S3//\\
      • -
      -

      CSS Value Selectors:

      -
        -
      • E{display=none} css value "display" that equals "none"
      • -
      • E{display^=none} css value "display" that starts with "none"
      • -
      • E{display$=none} css value "display" that ends with "none"
      • -
      • E{display*=none} css value "display" that contains the substring "none"
      • -
      • E{display%=2} css value "display" that is evenly divisible by 2
      • -
      • E{display!=none} css value "display" that does not equal "none"
      • -
      - * @singleton - */ -Ext.DomQuery = function(){ - var cache = {}, - simpleCache = {}, - valueCache = {}, - nonSpace = /\S/, - trimRe = /^\s+|\s+$/g, - tplRe = /\{(\d+)\}/g, - modeRe = /^(\s?[\/>+~]\s?|\s|$)/, - tagTokenRe = /^(#)?([\w\-\*]+)/, - nthRe = /(\d*)n\+?(\d*)/, - nthRe2 = /\D/, - // This is for IE MSXML which does not support expandos. - // IE runs the same speed using setAttribute, however FF slows way down - // and Safari completely fails so they need to continue to use expandos. - isIE = window.ActiveXObject ? true : false, - key = 30803; - - // this eval is stop the compressor from - // renaming the variable to something shorter - eval("var batch = 30803;"); - - // Retrieve the child node from a particular - // parent at the specified index. - function child(parent, index){ - var i = 0, - n = parent.firstChild; - while(n){ - if(n.nodeType == 1){ - if(++i == index){ - return n; - } - } - n = n.nextSibling; - } - return null; - } - - // retrieve the next element node - function next(n){ - while((n = n.nextSibling) && n.nodeType != 1); - return n; - } - - // retrieve the previous element node - function prev(n){ - while((n = n.previousSibling) && n.nodeType != 1); - return n; - } - - // Mark each child node with a nodeIndex skipping and - // removing empty text nodes. - function children(parent){ - var n = parent.firstChild, - nodeIndex = -1, - nextNode; - while(n){ - nextNode = n.nextSibling; - // clean worthless empty nodes. - if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ - parent.removeChild(n); - }else{ - // add an expando nodeIndex - n.nodeIndex = ++nodeIndex; - } - n = nextNode; - } - return this; - } - - - // nodeSet - array of nodes - // cls - CSS Class - function byClassName(nodeSet, cls){ - if(!cls){ - return nodeSet; - } - var result = [], ri = -1; - for(var i = 0, ci; ci = nodeSet[i]; i++){ - if((' '+ci.className+' ').indexOf(cls) != -1){ - result[++ri] = ci; - } - } - return result; - }; - - function attrValue(n, attr){ - // if its an array, use the first node. - if(!n.tagName && typeof n.length != "undefined"){ - n = n[0]; - } - if(!n){ - return null; - } - - if(attr == "for"){ - return n.htmlFor; - } - if(attr == "class" || attr == "className"){ - return n.className; - } - return n.getAttribute(attr) || n[attr]; - - }; - - - // ns - nodes - // mode - false, /, >, +, ~ - // tagName - defaults to "*" - function getNodes(ns, mode, tagName){ - var result = [], ri = -1, cs; - if(!ns){ - return result; - } - tagName = tagName || "*"; - // convert to array - if(typeof ns.getElementsByTagName != "undefined"){ - ns = [ns]; - } - - // no mode specified, grab all elements by tagName - // at any depth - if(!mode){ - for(var i = 0, ni; ni = ns[i]; i++){ - cs = ni.getElementsByTagName(tagName); - for(var j = 0, ci; ci = cs[j]; j++){ - result[++ri] = ci; - } - } - // Direct Child mode (/ or >) - // E > F or E/F all direct children elements of E that have the tag - } else if(mode == "/" || mode == ">"){ - var utag = tagName.toUpperCase(); - for(var i = 0, ni, cn; ni = ns[i]; i++){ - cn = ni.childNodes; - for(var j = 0, cj; cj = cn[j]; j++){ - if(cj.nodeName == utag || cj.nodeName == tagName || tagName == '*'){ - result[++ri] = cj; - } - } - } - // Immediately Preceding mode (+) - // E + F all elements with the tag F that are immediately preceded by an element with the tag E - }else if(mode == "+"){ - var utag = tagName.toUpperCase(); - for(var i = 0, n; n = ns[i]; i++){ - while((n = n.nextSibling) && n.nodeType != 1); - if(n && (n.nodeName == utag || n.nodeName == tagName || tagName == '*')){ - result[++ri] = n; - } - } - // Sibling mode (~) - // E ~ F all elements with the tag F that are preceded by a sibling element with the tag E - }else if(mode == "~"){ - var utag = tagName.toUpperCase(); - for(var i = 0, n; n = ns[i]; i++){ - while((n = n.nextSibling)){ - if (n.nodeName == utag || n.nodeName == tagName || tagName == '*'){ - result[++ri] = n; - } - } - } - } - return result; - } - - function concat(a, b){ - if(b.slice){ - return a.concat(b); - } - for(var i = 0, l = b.length; i < l; i++){ - a[a.length] = b[i]; - } - return a; - } - - function byTag(cs, tagName){ - if(cs.tagName || cs == document){ - cs = [cs]; - } - if(!tagName){ - return cs; - } - var result = [], ri = -1; - tagName = tagName.toLowerCase(); - for(var i = 0, ci; ci = cs[i]; i++){ - if(ci.nodeType == 1 && ci.tagName.toLowerCase() == tagName){ - result[++ri] = ci; - } - } - return result; - } - - function byId(cs, id){ - if(cs.tagName || cs == document){ - cs = [cs]; - } - if(!id){ - return cs; - } - var result = [], ri = -1; - for(var i = 0, ci; ci = cs[i]; i++){ - if(ci && ci.id == id){ - result[++ri] = ci; - return result; - } - } - return result; - } - - // operators are =, !=, ^=, $=, *=, %=, |= and ~= - // custom can be "{" - function byAttribute(cs, attr, value, op, custom){ - var result = [], - ri = -1, - useGetStyle = custom == "{", - fn = Ext.DomQuery.operators[op], - a, - xml, - hasXml; - - for(var i = 0, ci; ci = cs[i]; i++){ - // skip non-element nodes. - if(ci.nodeType != 1){ - continue; - } - // only need to do this for the first node - if(!hasXml){ - xml = Ext.DomQuery.isXml(ci); - hasXml = true; - } - - // we only need to change the property names if we're dealing with html nodes, not XML - if(!xml){ - if(useGetStyle){ - a = Ext.DomQuery.getStyle(ci, attr); - } else if (attr == "class" || attr == "className"){ - a = ci.className; - } else if (attr == "for"){ - a = ci.htmlFor; - } else if (attr == "href"){ - // getAttribute href bug - // http://www.glennjones.net/Post/809/getAttributehrefbug.htm - a = ci.getAttribute("href", 2); - } else{ - a = ci.getAttribute(attr); - } - }else{ - a = ci.getAttribute(attr); - } - if((fn && fn(a, value)) || (!fn && a)){ - result[++ri] = ci; - } - } - return result; - } - - function byPseudo(cs, name, value){ - return Ext.DomQuery.pseudos[name](cs, value); - } - - function nodupIEXml(cs){ - var d = ++key, - r; - cs[0].setAttribute("_nodup", d); - r = [cs[0]]; - for(var i = 1, len = cs.length; i < len; i++){ - var c = cs[i]; - if(!c.getAttribute("_nodup") != d){ - c.setAttribute("_nodup", d); - r[r.length] = c; - } - } - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].removeAttribute("_nodup"); - } - return r; - } - - function nodup(cs){ - if(!cs){ - return []; - } - var len = cs.length, c, i, r = cs, cj, ri = -1; - if(!len || typeof cs.nodeType != "undefined" || len == 1){ - return cs; - } - if(isIE && typeof cs[0].selectSingleNode != "undefined"){ - return nodupIEXml(cs); - } - var d = ++key; - cs[0]._nodup = d; - for(i = 1; c = cs[i]; i++){ - if(c._nodup != d){ - c._nodup = d; - }else{ - r = []; - for(var j = 0; j < i; j++){ - r[++ri] = cs[j]; - } - for(j = i+1; cj = cs[j]; j++){ - if(cj._nodup != d){ - cj._nodup = d; - r[++ri] = cj; - } - } - return r; - } - } - return r; - } - - function quickDiffIEXml(c1, c2){ - var d = ++key, - r = []; - for(var i = 0, len = c1.length; i < len; i++){ - c1[i].setAttribute("_qdiff", d); - } - for(var i = 0, len = c2.length; i < len; i++){ - if(c2[i].getAttribute("_qdiff") != d){ - r[r.length] = c2[i]; - } - } - for(var i = 0, len = c1.length; i < len; i++){ - c1[i].removeAttribute("_qdiff"); - } - return r; - } - - function quickDiff(c1, c2){ - var len1 = c1.length, - d = ++key, - r = []; - if(!len1){ - return c2; - } - if(isIE && typeof c1[0].selectSingleNode != "undefined"){ - return quickDiffIEXml(c1, c2); - } - for(var i = 0; i < len1; i++){ - c1[i]._qdiff = d; - } - for(var i = 0, len = c2.length; i < len; i++){ - if(c2[i]._qdiff != d){ - r[r.length] = c2[i]; - } - } - return r; - } - - function quickId(ns, mode, root, id){ - if(ns == root){ - var d = root.ownerDocument || root; - return d.getElementById(id); - } - ns = getNodes(ns, mode, "*"); - return byId(ns, id); - } - - return { - getStyle : function(el, name){ - return Ext.fly(el).getStyle(name); - }, - /** - * Compiles a selector/xpath query into a reusable function. The returned function - * takes one parameter "root" (optional), which is the context node from where the query should start. - * @param {String} selector The selector/xpath query - * @param {String} type (optional) Either "select" (the default) or "simple" for a simple selector match - * @return {Function} - */ - compile : function(path, type){ - type = type || "select"; - - // setup fn preamble - var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"], - mode, - lastPath, - matchers = Ext.DomQuery.matchers, - matchersLn = matchers.length, - modeMatch, - // accept leading mode switch - lmode = path.match(modeRe); - - if(lmode && lmode[1]){ - fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";'; - path = path.replace(lmode[1], ""); - } - - // strip leading slashes - while(path.substr(0, 1)=="/"){ - path = path.substr(1); - } - - while(path && lastPath != path){ - lastPath = path; - var tokenMatch = path.match(tagTokenRe); - if(type == "select"){ - if(tokenMatch){ - // ID Selector - if(tokenMatch[1] == "#"){ - fn[fn.length] = 'n = quickId(n, mode, root, "'+tokenMatch[2]+'");'; - }else{ - fn[fn.length] = 'n = getNodes(n, mode, "'+tokenMatch[2]+'");'; - } - path = path.replace(tokenMatch[0], ""); - }else if(path.substr(0, 1) != '@'){ - fn[fn.length] = 'n = getNodes(n, mode, "*");'; - } - // type of "simple" - }else{ - if(tokenMatch){ - if(tokenMatch[1] == "#"){ - fn[fn.length] = 'n = byId(n, "'+tokenMatch[2]+'");'; - }else{ - fn[fn.length] = 'n = byTag(n, "'+tokenMatch[2]+'");'; - } - path = path.replace(tokenMatch[0], ""); - } - } - while(!(modeMatch = path.match(modeRe))){ - var matched = false; - for(var j = 0; j < matchersLn; j++){ - var t = matchers[j]; - var m = path.match(t.re); - if(m){ - fn[fn.length] = t.select.replace(tplRe, function(x, i){ - return m[i]; - }); - path = path.replace(m[0], ""); - matched = true; - break; - } - } - // prevent infinite loop on bad selector - if(!matched){ - throw 'Error parsing selector, parsing failed at "' + path + '"'; - } - } - if(modeMatch[1]){ - fn[fn.length] = 'mode="'+modeMatch[1].replace(trimRe, "")+'";'; - path = path.replace(modeMatch[1], ""); - } - } - // close fn out - fn[fn.length] = "return nodup(n);\n}"; - - // eval fn and return it - eval(fn.join("")); - return f; - }, - - /** - * Selects a group of elements. - * @param {String} selector The selector/xpath query (can be a comma separated list of selectors) - * @param {Node/String} root (optional) The start of the query (defaults to document). - * @return {Array} An Array of DOM elements which match the selector. If there are - * no matches, and empty Array is returned. - */ - jsSelect: function(path, root, type){ - // set root to doc if not specified. - root = root || document; - - if(typeof root == "string"){ - root = document.getElementById(root); - } - var paths = path.split(","), - results = []; - - // loop over each selector - for(var i = 0, len = paths.length; i < len; i++){ - var subPath = paths[i].replace(trimRe, ""); - // compile and place in cache - if(!cache[subPath]){ - cache[subPath] = Ext.DomQuery.compile(subPath); - if(!cache[subPath]){ - throw subPath + " is not a valid selector"; - } - } - var result = cache[subPath](root); - if(result && result != document){ - results = results.concat(result); - } - } - - // if there were multiple selectors, make sure dups - // are eliminated - if(paths.length > 1){ - return nodup(results); - } - return results; - }, - isXml: function(el) { - var docEl = (el ? el.ownerDocument || el : 0).documentElement; - return docEl ? docEl.nodeName !== "HTML" : false; - }, - select : document.querySelectorAll ? function(path, root, type) { - root = root || document; - if (!Ext.DomQuery.isXml(root)) { - try { - var cs = root.querySelectorAll(path); - return Ext.toArray(cs); - } - catch (ex) {} - } - return Ext.DomQuery.jsSelect.call(this, path, root, type); - } : function(path, root, type) { - return Ext.DomQuery.jsSelect.call(this, path, root, type); - }, - - /** - * Selects a single element. - * @param {String} selector The selector/xpath query - * @param {Node} root (optional) The start of the query (defaults to document). - * @return {Element} The DOM element which matched the selector. - */ - selectNode : function(path, root){ - return Ext.DomQuery.select(path, root)[0]; - }, - - /** - * Selects the value of a node, optionally replacing null with the defaultValue. - * @param {String} selector The selector/xpath query - * @param {Node} root (optional) The start of the query (defaults to document). - * @param {String} defaultValue - * @return {String} - */ - selectValue : function(path, root, defaultValue){ - path = path.replace(trimRe, ""); - if(!valueCache[path]){ - valueCache[path] = Ext.DomQuery.compile(path, "select"); - } - var n = valueCache[path](root), v; - n = n[0] ? n[0] : n; - - // overcome a limitation of maximum textnode size - // Rumored to potentially crash IE6 but has not been confirmed. - // http://reference.sitepoint.com/javascript/Node/normalize - // https://developer.mozilla.org/En/DOM/Node.normalize - if (typeof n.normalize == 'function') n.normalize(); - - v = (n && n.firstChild ? n.firstChild.nodeValue : null); - return ((v === null||v === undefined||v==='') ? defaultValue : v); - }, - - /** - * Selects the value of a node, parsing integers and floats. Returns the defaultValue, or 0 if none is specified. - * @param {String} selector The selector/xpath query - * @param {Node} root (optional) The start of the query (defaults to document). - * @param {Number} defaultValue - * @return {Number} - */ - selectNumber : function(path, root, defaultValue){ - var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0); - return parseFloat(v); - }, - - /** - * Returns true if the passed element(s) match the passed simple selector (e.g. div.some-class or span:first-child) - * @param {String/HTMLElement/Array} el An element id, element or array of elements - * @param {String} selector The simple selector to test - * @return {Boolean} - */ - is : function(el, ss){ - if(typeof el == "string"){ - el = document.getElementById(el); - } - var isArray = Ext.isArray(el), - result = Ext.DomQuery.filter(isArray ? el : [el], ss); - return isArray ? (result.length == el.length) : (result.length > 0); - }, - - /** - * Filters an array of elements to only include matches of a simple selector (e.g. div.some-class or span:first-child) - * @param {Array} el An array of elements to filter - * @param {String} selector The simple selector to test - * @param {Boolean} nonMatches If true, it returns the elements that DON'T match - * the selector instead of the ones that match - * @return {Array} An Array of DOM elements which match the selector. If there are - * no matches, and empty Array is returned. - */ - filter : function(els, ss, nonMatches){ - ss = ss.replace(trimRe, ""); - if(!simpleCache[ss]){ - simpleCache[ss] = Ext.DomQuery.compile(ss, "simple"); - } - var result = simpleCache[ss](els); - return nonMatches ? quickDiff(result, els) : result; - }, - - /** - * Collection of matching regular expressions and code snippets. - * Each capture group within () will be replace the {} in the select - * statement as specified by their index. - */ - matchers : [{ - re: /^\.([\w\-]+)/, - select: 'n = byClassName(n, " {1} ");' - }, { - re: /^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, - select: 'n = byPseudo(n, "{1}", "{2}");' - },{ - re: /^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?(["']?)(.*?)\4)?[\]\}])/, - select: 'n = byAttribute(n, "{2}", "{5}", "{3}", "{1}");' - }, { - re: /^#([\w\-]+)/, - select: 'n = byId(n, "{1}");' - },{ - re: /^@([\w\-]+)/, - select: 'return {firstChild:{nodeValue:attrValue(n, "{1}")}};' - } - ], - - /** - * Collection of operator comparison functions. The default operators are =, !=, ^=, $=, *=, %=, |= and ~=. - * New operators can be added as long as the match the format c= where c is any character other than space, > <. - */ - operators : { - "=" : function(a, v){ - return a == v; - }, - "!=" : function(a, v){ - return a != v; - }, - "^=" : function(a, v){ - return a && a.substr(0, v.length) == v; - }, - "$=" : function(a, v){ - return a && a.substr(a.length-v.length) == v; - }, - "*=" : function(a, v){ - return a && a.indexOf(v) !== -1; - }, - "%=" : function(a, v){ - return (a % v) == 0; - }, - "|=" : function(a, v){ - return a && (a == v || a.substr(0, v.length+1) == v+'-'); - }, - "~=" : function(a, v){ - return a && (' '+a+' ').indexOf(' '+v+' ') != -1; - } - }, - - /** - *

      Object hash of "pseudo class" filter functions which are used when filtering selections. Each function is passed - * two parameters:

        - *
      • c : Array
        An Array of DOM elements to filter.
      • - *
      • v : String
        The argument (if any) supplied in the selector.
      • - *
      - *

      A filter function returns an Array of DOM elements which conform to the pseudo class.

      - *

      In addition to the provided pseudo classes listed above such as first-child and nth-child, - * developers may add additional, custom psuedo class filters to select elements according to application-specific requirements.

      - *

      For example, to filter <a> elements to only return links to external resources:

      - *
      -Ext.DomQuery.pseudos.external = function(c, v){
      -    var r = [], ri = -1;
      -    for(var i = 0, ci; ci = c[i]; i++){
      -//      Include in result set only if it's a link to an external resource
      -        if(ci.hostname != location.hostname){
      -            r[++ri] = ci;
      -        }
      -    }
      -    return r;
      -};
      - * Then external links could be gathered with the following statement:
      -var externalLinks = Ext.select("a:external");
      -
      - */ - pseudos : { - "first-child" : function(c){ - var r = [], ri = -1, n; - for(var i = 0, ci; ci = n = c[i]; i++){ - while((n = n.previousSibling) && n.nodeType != 1); - if(!n){ - r[++ri] = ci; - } - } - return r; - }, - - "last-child" : function(c){ - var r = [], ri = -1, n; - for(var i = 0, ci; ci = n = c[i]; i++){ - while((n = n.nextSibling) && n.nodeType != 1); - if(!n){ - r[++ri] = ci; - } - } - return r; - }, - - "nth-child" : function(c, a) { - var r = [], ri = -1, - m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a), - f = (m[1] || 1) - 0, l = m[2] - 0; - for(var i = 0, n; n = c[i]; i++){ - var pn = n.parentNode; - if (batch != pn._batch) { - var j = 0; - for(var cn = pn.firstChild; cn; cn = cn.nextSibling){ - if(cn.nodeType == 1){ - cn.nodeIndex = ++j; - } - } - pn._batch = batch; - } - if (f == 1) { - if (l == 0 || n.nodeIndex == l){ - r[++ri] = n; - } - } else if ((n.nodeIndex + l) % f == 0){ - r[++ri] = n; - } - } - - return r; - }, - - "only-child" : function(c){ - var r = [], ri = -1;; - for(var i = 0, ci; ci = c[i]; i++){ - if(!prev(ci) && !next(ci)){ - r[++ri] = ci; - } - } - return r; - }, - - "empty" : function(c){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var cns = ci.childNodes, j = 0, cn, empty = true; - while(cn = cns[j]){ - ++j; - if(cn.nodeType == 1 || cn.nodeType == 3){ - empty = false; - break; - } - } - if(empty){ - r[++ri] = ci; - } - } - return r; - }, - - "contains" : function(c, v){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if((ci.textContent||ci.innerText||'').indexOf(v) != -1){ - r[++ri] = ci; - } - } - return r; - }, - - "nodeValue" : function(c, v){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(ci.firstChild && ci.firstChild.nodeValue == v){ - r[++ri] = ci; - } - } - return r; - }, - - "checked" : function(c){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(ci.checked == true){ - r[++ri] = ci; - } - } - return r; - }, - - "not" : function(c, ss){ - return Ext.DomQuery.filter(c, ss, true); - }, - - "any" : function(c, selectors){ - var ss = selectors.split('|'), - r = [], ri = -1, s; - for(var i = 0, ci; ci = c[i]; i++){ - for(var j = 0; s = ss[j]; j++){ - if(Ext.DomQuery.is(ci, s)){ - r[++ri] = ci; - break; - } - } - } - return r; - }, - - "odd" : function(c){ - return this["nth-child"](c, "odd"); - }, - - "even" : function(c){ - return this["nth-child"](c, "even"); - }, - - "nth" : function(c, a){ - return c[a-1] || []; - }, - - "first" : function(c){ - return c[0] || []; - }, - - "last" : function(c){ - return c[c.length-1] || []; - }, - - "has" : function(c, ss){ - var s = Ext.DomQuery.select, - r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(s(ss, ci).length > 0){ - r[++ri] = ci; - } - } - return r; - }, - - "next" : function(c, ss){ - var is = Ext.DomQuery.is, - r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var n = next(ci); - if(n && is(n, ss)){ - r[++ri] = ci; - } - } - return r; - }, - - "prev" : function(c, ss){ - var is = Ext.DomQuery.is, - r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var n = prev(ci); - if(n && is(n, ss)){ - r[++ri] = ci; - } - } - return r; - } - } - }; -}(); - -/** - * Selects an array of DOM nodes by CSS/XPath selector. Shorthand of {@link Ext.DomQuery#select} - * @param {String} path The selector/xpath query - * @param {Node} root (optional) The start of the query (defaults to document). - * @return {Array} - * @member Ext - * @method query - */ -Ext.query = Ext.DomQuery.select; -/** - * @class Ext.util.DelayedTask - *

      The DelayedTask class provides a convenient way to "buffer" the execution of a method, - * performing setTimeout where a new timeout cancels the old timeout. When called, the - * task will wait the specified time period before executing. If durng that time period, - * the task is called again, the original call will be cancelled. This continues so that - * the function is only called a single time for each iteration.

      - *

      This method is especially useful for things like detecting whether a user has finished - * typing in a text field. An example would be performing validation on a keypress. You can - * use this class to buffer the keypress events for a certain number of milliseconds, and - * perform only if they stop for that amount of time. Usage:

      
      -var task = new Ext.util.DelayedTask(function(){
      -    alert(Ext.getDom('myInputField').value.length);
      -});
      -// Wait 500ms before calling our function. If the user presses another key 
      -// during that 500ms, it will be cancelled and we'll wait another 500ms.
      -Ext.get('myInputField').on('keypress', function(){
      -    task.{@link #delay}(500); 
      -});
      - * 
      - *

      Note that we are using a DelayedTask here to illustrate a point. The configuration - * option buffer for {@link Ext.util.Observable#addListener addListener/on} will - * also setup a delayed task for you to buffer events.

      - * @constructor The parameters to this constructor serve as defaults and are not required. - * @param {Function} fn (optional) The default function to call. - * @param {Object} scope The default scope (The this reference) in which the - * function is called. If not specified, this will refer to the browser window. - * @param {Array} args (optional) The default Array of arguments. - */ -Ext.util.DelayedTask = function(fn, scope, args){ - var me = this, - id, - call = function(){ - clearInterval(id); - id = null; - fn.apply(scope, args || []); - }; - - /** - * Cancels any pending timeout and queues a new one - * @param {Number} delay The milliseconds to delay - * @param {Function} newFn (optional) Overrides function passed to constructor - * @param {Object} newScope (optional) Overrides scope passed to constructor. Remember that if no scope - * is specified, this will refer to the browser window. - * @param {Array} newArgs (optional) Overrides args passed to constructor - */ - me.delay = function(delay, newFn, newScope, newArgs){ - me.cancel(); - fn = newFn || fn; - scope = newScope || scope; - args = newArgs || args; - id = setInterval(call, delay); - }; - - /** - * Cancel the last queued timeout - */ - me.cancel = function(){ - if(id){ - clearInterval(id); - id = null; - } - }; -};/** - * @class Ext.Element - *

      Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.

      - *

      All instances of this class inherit the methods of {@link Ext.Fx} making visual effects easily available to all DOM elements.

      - *

      Note that the events documented in this class are not Ext events, they encapsulate browser events. To - * access the underlying browser event, see {@link Ext.EventObject#browserEvent}. Some older - * browsers may not support the full range of events. Which events are supported is beyond the control of ExtJs.

      - * Usage:
      -
      
      -// by id
      -var el = Ext.get("my-div");
      -
      -// by DOM element reference
      -var el = Ext.get(myDivElement);
      -
      - * Animations
      - *

      When an element is manipulated, by default there is no animation.

      - *
      
      -var el = Ext.get("my-div");
      -
      -// no animation
      -el.setWidth(100);
      - * 
      - *

      Many of the functions for manipulating an element have an optional "animate" parameter. This - * parameter can be specified as boolean (true) for default animation effects.

      - *
      
      -// default animation
      -el.setWidth(100, true);
      - * 
      - * - *

      To configure the effects, an object literal with animation options to use as the Element animation - * configuration object can also be specified. Note that the supported Element animation configuration - * options are a subset of the {@link Ext.Fx} animation options specific to Fx effects. The supported - * Element animation configuration options are:

      -
      -Option    Default   Description
      ---------- --------  ---------------------------------------------
      -{@link Ext.Fx#duration duration}  .35       The duration of the animation in seconds
      -{@link Ext.Fx#easing easing}    easeOut   The easing method
      -{@link Ext.Fx#callback callback}  none      A function to execute when the anim completes
      -{@link Ext.Fx#scope scope}     this      The scope (this) of the callback function
      -
      - * - *
      
      -// Element animation options object
      -var opt = {
      -    {@link Ext.Fx#duration duration}: 1,
      -    {@link Ext.Fx#easing easing}: 'elasticIn',
      -    {@link Ext.Fx#callback callback}: this.foo,
      -    {@link Ext.Fx#scope scope}: this
      -};
      -// animation with some options set
      -el.setWidth(100, opt);
      - * 
      - *

      The Element animation object being used for the animation will be set on the options - * object as "anim", which allows you to stop or manipulate the animation. Here is an example:

      - *
      
      -// using the "anim" property to get the Anim object
      -if(opt.anim.isAnimated()){
      -    opt.anim.stop();
      -}
      - * 
      - *

      Also see the {@link #animate} method for another animation technique.

      - *

      Composite (Collections of) Elements

      - *

      For working with collections of Elements, see {@link Ext.CompositeElement}

      - * @constructor Create a new Element directly. - * @param {String/HTMLElement} element - * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class). - */ -(function(){ -var DOC = document; - -Ext.Element = function(element, forceNew){ - var dom = typeof element == "string" ? - DOC.getElementById(element) : element, - id; - - if(!dom) return null; - - id = dom.id; - - if(!forceNew && id && Ext.elCache[id]){ // element object already exists - return Ext.elCache[id].el; - } - - /** - * The DOM element - * @type HTMLElement - */ - this.dom = dom; - - /** - * The DOM element ID - * @type String - */ - this.id = id || Ext.id(dom); -}; - -var DH = Ext.DomHelper, - El = Ext.Element, - EC = Ext.elCache; - -El.prototype = { - /** - * Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function) - * @param {Object} o The object with the attributes - * @param {Boolean} useSet (optional) false to override the default setAttribute to use expandos. - * @return {Ext.Element} this - */ - set : function(o, useSet){ - var el = this.dom, - attr, - val, - useSet = (useSet !== false) && !!el.setAttribute; - - for (attr in o) { - if (o.hasOwnProperty(attr)) { - val = o[attr]; - if (attr == 'style') { - DH.applyStyles(el, val); - } else if (attr == 'cls') { - el.className = val; - } else if (useSet) { - el.setAttribute(attr, val); - } else { - el[attr] = val; - } - } - } - return this; - }, - -// Mouse events - /** - * @event click - * Fires when a mouse click is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event contextmenu - * Fires when a right click is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event dblclick - * Fires when a mouse double click is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event mousedown - * Fires when a mousedown is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event mouseup - * Fires when a mouseup is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event mouseover - * Fires when a mouseover is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event mousemove - * Fires when a mousemove is detected with the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event mouseout - * Fires when a mouseout is detected with the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event mouseenter - * Fires when the mouse enters the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event mouseleave - * Fires when the mouse leaves the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - -// Keyboard events - /** - * @event keypress - * Fires when a keypress is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event keydown - * Fires when a keydown is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event keyup - * Fires when a keyup is detected within the element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - - -// HTML frame/object events - /** - * @event load - * Fires when the user agent finishes loading all content within the element. Only supported by window, frames, objects and images. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event unload - * Fires when the user agent removes all content from a window or frame. For elements, it fires when the target element or any of its content has been removed. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event abort - * Fires when an object/image is stopped from loading before completely loaded. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event error - * Fires when an object/image/frame cannot be loaded properly. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event resize - * Fires when a document view is resized. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event scroll - * Fires when a document view is scrolled. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - -// Form events - /** - * @event select - * Fires when a user selects some text in a text field, including input and textarea. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event change - * Fires when a control loses the input focus and its value has been modified since gaining focus. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event submit - * Fires when a form is submitted. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event reset - * Fires when a form is reset. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event focus - * Fires when an element receives focus either via the pointing device or by tab navigation. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event blur - * Fires when an element loses focus either via the pointing device or by tabbing navigation. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - -// User Interface events - /** - * @event DOMFocusIn - * Where supported. Similar to HTML focus event, but can be applied to any focusable element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event DOMFocusOut - * Where supported. Similar to HTML blur event, but can be applied to any focusable element. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event DOMActivate - * Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - -// DOM Mutation events - /** - * @event DOMSubtreeModified - * Where supported. Fires when the subtree is modified. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event DOMNodeInserted - * Where supported. Fires when a node has been added as a child of another node. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event DOMNodeRemoved - * Where supported. Fires when a descendant node of the element is removed. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event DOMNodeRemovedFromDocument - * Where supported. Fires when a node is being removed from a document. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event DOMNodeInsertedIntoDocument - * Where supported. Fires when a node is being inserted into a document. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event DOMAttrModified - * Where supported. Fires when an attribute has been modified. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - /** - * @event DOMCharacterDataModified - * Where supported. Fires when the character data has been modified. - * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. - * @param {HtmlElement} t The target of the event. - * @param {Object} o The options configuration passed to the {@link #addListener} call. - */ - - /** - * The default unit to append to CSS values where a unit isn't provided (defaults to px). - * @type String - */ - defaultUnit : "px", - - /** - * Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child) - * @param {String} selector The simple selector to test - * @return {Boolean} True if this element matches the selector, else false - */ - is : function(simpleSelector){ - return Ext.DomQuery.is(this.dom, simpleSelector); - }, - - /** - * Tries to focus the element. Any exceptions are caught and ignored. - * @param {Number} defer (optional) Milliseconds to defer the focus - * @return {Ext.Element} this - */ - focus : function(defer, /* private */ dom) { - var me = this, - dom = dom || me.dom; - try{ - if(Number(defer)){ - me.focus.defer(defer, null, [null, dom]); - }else{ - dom.focus(); - } - }catch(e){} - return me; - }, - - /** - * Tries to blur the element. Any exceptions are caught and ignored. - * @return {Ext.Element} this - */ - blur : function() { - try{ - this.dom.blur(); - }catch(e){} - return this; - }, - - /** - * Returns the value of the "value" attribute - * @param {Boolean} asNumber true to parse the value as a number - * @return {String/Number} - */ - getValue : function(asNumber){ - var val = this.dom.value; - return asNumber ? parseInt(val, 10) : val; - }, - - /** - * Appends an event handler to this element. The shorthand version {@link #on} is equivalent. - * @param {String} eventName The name of event to handle. - * @param {Function} fn The handler function the event invokes. This function is passed - * the following parameters:
        - *
      • evt : EventObject
        The {@link Ext.EventObject EventObject} describing the event.
      • - *
      • el : HtmlElement
        The DOM element which was the target of the event. - * Note that this may be filtered by using the delegate option.
      • - *
      • o : Object
        The options object from the addListener call.
      • - *
      - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. - * If omitted, defaults to this Element.. - * @param {Object} options (optional) An object containing handler configuration properties. - * This may contain any of the following properties:
        - *
      • scope Object :
        The scope (this reference) in which the handler function is executed. - * If omitted, defaults to this Element.
      • - *
      • delegate String:
        A simple selector to filter the target or look for a descendant of the target. See below for additional details.
      • - *
      • stopEvent Boolean:
        True to stop the event. That is stop propagation, and prevent the default action.
      • - *
      • preventDefault Boolean:
        True to prevent the default action
      • - *
      • stopPropagation Boolean:
        True to prevent event propagation
      • - *
      • normalized Boolean:
        False to pass a browser event to the handler function instead of an Ext.EventObject
      • - *
      • target Ext.Element:
        Only call the handler if the event was fired on the target Element, not if the event was bubbled up from a child node.
      • - *
      • delay Number:
        The number of milliseconds to delay the invocation of the handler after the event fires.
      • - *
      • single Boolean:
        True to add a handler to handle just the next firing of the event, and then remove itself.
      • - *
      • buffer Number:
        Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed - * by the specified number of milliseconds. If the event fires again within that time, the original - * handler is not invoked, but the new handler is scheduled in its place.
      • - *

      - *

      - * Combining Options
      - * In the following examples, the shorthand form {@link #on} is used rather than the more verbose - * addListener. The two are equivalent. Using the options argument, it is possible to combine different - * types of listeners:
      - *
      - * A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the - * options object. The options object is available as the third parameter in the handler function.

      - * Code:
      
      -el.on('click', this.onClick, this, {
      -    single: true,
      -    delay: 100,
      -    stopEvent : true,
      -    forumId: 4
      -});

      - *

      - * Attaching multiple handlers in 1 call
      - * The method also allows for a single argument to be passed which is a config object containing properties - * which specify multiple handlers.

      - *

      - * Code:

      
      -el.on({
      -    'click' : {
      -        fn: this.onClick,
      -        scope: this,
      -        delay: 100
      -    },
      -    'mouseover' : {
      -        fn: this.onMouseOver,
      -        scope: this
      -    },
      -    'mouseout' : {
      -        fn: this.onMouseOut,
      -        scope: this
      -    }
      -});
      - *

      - * Or a shorthand syntax:
      - * Code:

      -el.on({ - 'click' : this.onClick, - 'mouseover' : this.onMouseOver, - 'mouseout' : this.onMouseOut, - scope: this -}); - *

      - *

      delegate

      - *

      This is a configuration option that you can pass along when registering a handler for - * an event to assist with event delegation. Event delegation is a technique that is used to - * reduce memory consumption and prevent exposure to memory-leaks. By registering an event - * for a container element as opposed to each element within a container. By setting this - * configuration option to a simple selector, the target element will be filtered to look for - * a descendant of the target. - * For example:

      
      -// using this markup:
      -<div id='elId'>
      -    <p id='p1'>paragraph one</p>
      -    <p id='p2' class='clickable'>paragraph two</p>
      -    <p id='p3'>paragraph three</p>
      -</div>
      -// utilize event delegation to registering just one handler on the container element:
      -el = Ext.get('elId');
      -el.on(
      -    'click',
      -    function(e,t) {
      -        // handle click
      -        console.info(t.id); // 'p2'
      -    },
      -    this,
      -    {
      -        // filter the target element to be a descendant with the class 'clickable'
      -        delegate: '.clickable'
      -    }
      -);
      -     * 

      - * @return {Ext.Element} this - */ - addListener : function(eventName, fn, scope, options){ - Ext.EventManager.on(this.dom, eventName, fn, scope || this, options); - return this; - }, - - /** - * Removes an event handler from this element. The shorthand version {@link #un} is equivalent. - * Note: if a scope was explicitly specified when {@link #addListener adding} the - * listener, the same scope must be specified here. - * Example: - *
      
      -el.removeListener('click', this.handlerFn);
      -// or
      -el.un('click', this.handlerFn);
      -
      - * @param {String} eventName The name of the event from which to remove the handler. - * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #addListener} call. - * @param {Object} scope If a scope (this reference) was specified when the listener was added, - * then this must refer to the same object. - * @return {Ext.Element} this - */ - removeListener : function(eventName, fn, scope){ - Ext.EventManager.removeListener(this.dom, eventName, fn, scope || this); - return this; - }, - - /** - * Removes all previous added listeners from this element - * @return {Ext.Element} this - */ - removeAllListeners : function(){ - Ext.EventManager.removeAll(this.dom); - return this; - }, - - /** - * Recursively removes all previous added listeners from this element and its children - * @return {Ext.Element} this - */ - purgeAllListeners : function() { - Ext.EventManager.purgeElement(this, true); - return this; - }, - /** - * @private Test if size has a unit, otherwise appends the default - */ - addUnits : function(size){ - if(size === "" || size == "auto" || size === undefined){ - size = size || ''; - } else if(!isNaN(size) || !unitPattern.test(size)){ - size = size + (this.defaultUnit || 'px'); - } - return size; - }, - - /** - *

      Updates the innerHTML of this Element - * from a specified URL. Note that this is subject to the Same Origin Policy

      - *

      Updating innerHTML of an element will not execute embedded <script> elements. This is a browser restriction.

      - * @param {Mixed} options. Either a sring containing the URL from which to load the HTML, or an {@link Ext.Ajax#request} options object specifying - * exactly how to request the HTML. - * @return {Ext.Element} this - */ - load : function(url, params, cb){ - Ext.Ajax.request(Ext.apply({ - params: params, - url: url.url || url, - callback: cb, - el: this.dom, - indicatorText: url.indicatorText || '' - }, Ext.isObject(url) ? url : {})); - return this; - }, - - /** - * Tests various css rules/browsers to determine if this element uses a border box - * @return {Boolean} - */ - isBorderBox : function(){ - return Ext.isBorderBox || Ext.isForcedBorderBox || noBoxAdjust[(this.dom.tagName || "").toLowerCase()]; - }, - - /** - *

      Removes this element's dom reference. Note that event and cache removal is handled at {@link Ext#removeNode}

      - */ - remove : function(){ - var me = this, - dom = me.dom; - - if (dom) { - delete me.dom; - Ext.removeNode(dom); - } - }, - - /** - * Sets up event handlers to call the passed functions when the mouse is moved into and out of the Element. - * @param {Function} overFn The function to call when the mouse enters the Element. - * @param {Function} outFn The function to call when the mouse leaves the Element. - * @param {Object} scope (optional) The scope (this reference) in which the functions are executed. Defaults to the Element's DOM element. - * @param {Object} options (optional) Options for the listener. See {@link Ext.util.Observable#addListener the options parameter}. - * @return {Ext.Element} this - */ - hover : function(overFn, outFn, scope, options){ - var me = this; - me.on('mouseenter', overFn, scope || me.dom, options); - me.on('mouseleave', outFn, scope || me.dom, options); - return me; - }, - - /** - * Returns true if this element is an ancestor of the passed element - * @param {HTMLElement/String} el The element to check - * @return {Boolean} True if this element is an ancestor of el, else false - */ - contains : function(el){ - return !el ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el); - }, - - /** - * Returns the value of a namespaced attribute from the element's underlying DOM node. - * @param {String} namespace The namespace in which to look for the attribute - * @param {String} name The attribute name - * @return {String} The attribute value - * @deprecated - */ - getAttributeNS : function(ns, name){ - return this.getAttribute(name, ns); - }, - - /** - * Returns the value of an attribute from the element's underlying DOM node. - * @param {String} name The attribute name - * @param {String} namespace (optional) The namespace in which to look for the attribute - * @return {String} The attribute value - */ - getAttribute: (function(){ - var test = document.createElement('table'), - isBrokenOnTable = false, - hasGetAttribute = 'getAttribute' in test, - unknownRe = /undefined|unknown/; - - if (hasGetAttribute) { - - try { - test.getAttribute('ext:qtip'); - } catch (e) { - isBrokenOnTable = true; - } - - return function(name, ns) { - var el = this.dom, - value; - - if (el.getAttributeNS) { - value = el.getAttributeNS(ns, name) || null; - } - - if (value == null) { - if (ns) { - if (isBrokenOnTable && el.tagName.toUpperCase() == 'TABLE') { - try { - value = el.getAttribute(ns + ':' + name); - } catch (e) { - value = ''; - } - } else { - value = el.getAttribute(ns + ':' + name); - } - } else { - value = el.getAttribute(name) || el[name]; - } - } - return value || ''; - }; - } else { - return function(name, ns) { - var el = this.om, - value, - attribute; - - if (ns) { - attribute = el[ns + ':' + name]; - value = unknownRe.test(typeof attribute) ? undefined : attribute; - } else { - value = el[name]; - } - return value || ''; - }; - } - test = null; - })(), - - /** - * Update the innerHTML of this element - * @param {String} html The new HTML - * @return {Ext.Element} this - */ - update : function(html) { - if (this.dom) { - this.dom.innerHTML = html; - } - return this; - } -}; - -var ep = El.prototype; - -El.addMethods = function(o){ - Ext.apply(ep, o); -}; - -/** - * Appends an event handler (shorthand for {@link #addListener}). - * @param {String} eventName The name of event to handle. - * @param {Function} fn The handler function the event invokes. - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. - * @param {Object} options (optional) An object containing standard {@link #addListener} options - * @member Ext.Element - * @method on - */ -ep.on = ep.addListener; - -/** - * Removes an event handler from this element (see {@link #removeListener} for additional notes). - * @param {String} eventName The name of the event from which to remove the handler. - * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #addListener} call. - * @param {Object} scope If a scope (this reference) was specified when the listener was added, - * then this must refer to the same object. - * @return {Ext.Element} this - * @member Ext.Element - * @method un - */ -ep.un = ep.removeListener; - -/** - * true to automatically adjust width and height settings for box-model issues (default to true) - */ -ep.autoBoxAdjust = true; - -// private -var unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i, - docEl; - -/** - * @private - */ - -/** - * Retrieves Ext.Element objects. - *

      This method does not retrieve {@link Ext.Component Component}s. This method - * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by - * its ID, use {@link Ext.ComponentMgr#get}.

      - *

      Uses simple caching to consistently return the same object. Automatically fixes if an - * object was recreated with the same id via AJAX or DOM.

      - * @param {Mixed} el The id of the node, a DOM Node or an existing Element. - * @return {Element} The Element object (or null if no matching element was found) - * @static - * @member Ext.Element - * @method get - */ -El.get = function(el){ - var ex, - elm, - id; - if(!el){ return null; } - if (typeof el == "string") { // element id - if (!(elm = DOC.getElementById(el))) { - return null; - } - if (EC[el] && EC[el].el) { - ex = EC[el].el; - ex.dom = elm; - } else { - ex = El.addToCache(new El(elm)); - } - return ex; - } else if (el.tagName) { // dom element - if(!(id = el.id)){ - id = Ext.id(el); - } - if (EC[id] && EC[id].el) { - ex = EC[id].el; - ex.dom = el; - } else { - ex = El.addToCache(new El(el)); - } - return ex; - } else if (el instanceof El) { - if(el != docEl){ - // refresh dom element in case no longer valid, - // catch case where it hasn't been appended - - // If an el instance is passed, don't pass to getElementById without some kind of id - if (Ext.isIE && (el.id == undefined || el.id == '')) { - el.dom = el.dom; - } else { - el.dom = DOC.getElementById(el.id) || el.dom; - } - } - return el; - } else if(el.isComposite) { - return el; - } else if(Ext.isArray(el)) { - return El.select(el); - } else if(el == DOC) { - // create a bogus element object representing the document object - if(!docEl){ - var f = function(){}; - f.prototype = El.prototype; - docEl = new f(); - docEl.dom = DOC; - } - return docEl; - } - return null; -}; - -El.addToCache = function(el, id){ - id = id || el.id; - EC[id] = { - el: el, - data: {}, - events: {} - }; - return el; -}; - -// private method for getting and setting element data -El.data = function(el, key, value){ - el = El.get(el); - if (!el) { - return null; - } - var c = EC[el.id].data; - if(arguments.length == 2){ - return c[key]; - }else{ - return (c[key] = value); - } -}; - -// private -// Garbage collection - uncache elements/purge listeners on orphaned elements -// so we don't hold a reference and cause the browser to retain them -function garbageCollect(){ - if(!Ext.enableGarbageCollector){ - clearInterval(El.collectorThreadId); - } else { - var eid, - el, - d, - o; - - for(eid in EC){ - o = EC[eid]; - if(o.skipGC){ - continue; - } - el = o.el; - d = el.dom; - // ------------------------------------------------------- - // Determining what is garbage: - // ------------------------------------------------------- - // !d - // dom node is null, definitely garbage - // ------------------------------------------------------- - // !d.parentNode - // no parentNode == direct orphan, definitely garbage - // ------------------------------------------------------- - // !d.offsetParent && !document.getElementById(eid) - // display none elements have no offsetParent so we will - // also try to look it up by it's id. However, check - // offsetParent first so we don't do unneeded lookups. - // This enables collection of elements that are not orphans - // directly, but somewhere up the line they have an orphan - // parent. - // ------------------------------------------------------- - if(!d || !d.parentNode || (!d.offsetParent && !DOC.getElementById(eid))){ - if(Ext.enableListenerCollection){ - Ext.EventManager.removeAll(d); - } - delete EC[eid]; - } - } - // Cleanup IE Object leaks - if (Ext.isIE) { - var t = {}; - for (eid in EC) { - t[eid] = EC[eid]; - } - EC = Ext.elCache = t; - } - } -} -El.collectorThreadId = setInterval(garbageCollect, 30000); - -var flyFn = function(){}; -flyFn.prototype = El.prototype; - -// dom is optional -El.Flyweight = function(dom){ - this.dom = dom; -}; - -El.Flyweight.prototype = new flyFn(); -El.Flyweight.prototype.isFlyweight = true; -El._flyweights = {}; - -/** - *

      Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - - * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}

      - *

      Use this to make one-time references to DOM elements which are not going to be accessed again either by - * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get} - * will be more appropriate to take advantage of the caching provided by the Ext.Element class.

      - * @param {String/HTMLElement} el The dom node or id - * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts - * (e.g. internally Ext uses "_global") - * @return {Element} The shared Element object (or null if no matching element was found) - * @member Ext.Element - * @method fly - */ -El.fly = function(el, named){ - var ret = null; - named = named || '_global'; - - if (el = Ext.getDom(el)) { - (El._flyweights[named] = El._flyweights[named] || new El.Flyweight()).dom = el; - ret = El._flyweights[named]; - } - return ret; -}; - -/** - * Retrieves Ext.Element objects. - *

      This method does not retrieve {@link Ext.Component Component}s. This method - * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by - * its ID, use {@link Ext.ComponentMgr#get}.

      - *

      Uses simple caching to consistently return the same object. Automatically fixes if an - * object was recreated with the same id via AJAX or DOM.

      - * Shorthand of {@link Ext.Element#get} - * @param {Mixed} el The id of the node, a DOM Node or an existing Element. - * @return {Element} The Element object (or null if no matching element was found) - * @member Ext - * @method get - */ -Ext.get = El.get; - -/** - *

      Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - - * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}

      - *

      Use this to make one-time references to DOM elements which are not going to be accessed again either by - * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get} - * will be more appropriate to take advantage of the caching provided by the Ext.Element class.

      - * @param {String/HTMLElement} el The dom node or id - * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts - * (e.g. internally Ext uses "_global") - * @return {Element} The shared Element object (or null if no matching element was found) - * @member Ext - * @method fly - */ -Ext.fly = El.fly; - -// speedy lookup for elements never to box adjust -var noBoxAdjust = Ext.isStrict ? { - select:1 -} : { - input:1, select:1, textarea:1 -}; -if(Ext.isIE || Ext.isGecko){ - noBoxAdjust['button'] = 1; -} - -})(); -/** - * @class Ext.Element - */ -Ext.Element.addMethods(function(){ - var PARENTNODE = 'parentNode', - NEXTSIBLING = 'nextSibling', - PREVIOUSSIBLING = 'previousSibling', - DQ = Ext.DomQuery, - GET = Ext.get; - - return { - /** - * Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child) - * @param {String} selector The simple selector to test - * @param {Number/Mixed} maxDepth (optional) The max depth to search as a number or element (defaults to 50 || document.body) - * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node - * @return {HTMLElement} The matching DOM node (or null if no match was found) - */ - findParent : function(simpleSelector, maxDepth, returnEl){ - var p = this.dom, - b = document.body, - depth = 0, - stopEl; - if(Ext.isGecko && Object.prototype.toString.call(p) == '[object XULElement]') { - return null; - } - maxDepth = maxDepth || 50; - if (isNaN(maxDepth)) { - stopEl = Ext.getDom(maxDepth); - maxDepth = Number.MAX_VALUE; - } - while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){ - if(DQ.is(p, simpleSelector)){ - return returnEl ? GET(p) : p; - } - depth++; - p = p.parentNode; - } - return null; - }, - - /** - * Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child) - * @param {String} selector The simple selector to test - * @param {Number/Mixed} maxDepth (optional) The max depth to - search as a number or element (defaults to 10 || document.body) - * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node - * @return {HTMLElement} The matching DOM node (or null if no match was found) - */ - findParentNode : function(simpleSelector, maxDepth, returnEl){ - var p = Ext.fly(this.dom.parentNode, '_internal'); - return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null; - }, - - /** - * Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child). - * This is a shortcut for findParentNode() that always returns an Ext.Element. - * @param {String} selector The simple selector to test - * @param {Number/Mixed} maxDepth (optional) The max depth to - search as a number or element (defaults to 10 || document.body) - * @return {Ext.Element} The matching DOM node (or null if no match was found) - */ - up : function(simpleSelector, maxDepth){ - return this.findParentNode(simpleSelector, maxDepth, true); - }, - - /** - * Creates a {@link Ext.CompositeElement} for child nodes based on the passed CSS selector (the selector should not contain an id). - * @param {String} selector The CSS selector - * @return {CompositeElement/CompositeElementLite} The composite element - */ - select : function(selector){ - return Ext.Element.select(selector, this.dom); - }, - - /** - * Selects child nodes based on the passed CSS selector (the selector should not contain an id). - * @param {String} selector The CSS selector - * @return {Array} An array of the matched nodes - */ - query : function(selector){ - return DQ.select(selector, this.dom); - }, - - /** - * Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id). - * @param {String} selector The CSS selector - * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false) - * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true) - */ - child : function(selector, returnDom){ - var n = DQ.selectNode(selector, this.dom); - return returnDom ? n : GET(n); - }, - - /** - * Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id). - * @param {String} selector The CSS selector - * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false) - * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true) - */ - down : function(selector, returnDom){ - var n = DQ.selectNode(" > " + selector, this.dom); - return returnDom ? n : GET(n); - }, - - /** - * Gets the parent node for this element, optionally chaining up trying to match a selector - * @param {String} selector (optional) Find a parent node that matches the passed simple selector - * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element - * @return {Ext.Element/HTMLElement} The parent node or null - */ - parent : function(selector, returnDom){ - return this.matchNode(PARENTNODE, PARENTNODE, selector, returnDom); - }, - - /** - * Gets the next sibling, skipping text nodes - * @param {String} selector (optional) Find the next sibling that matches the passed simple selector - * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element - * @return {Ext.Element/HTMLElement} The next sibling or null - */ - next : function(selector, returnDom){ - return this.matchNode(NEXTSIBLING, NEXTSIBLING, selector, returnDom); - }, - - /** - * Gets the previous sibling, skipping text nodes - * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector - * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element - * @return {Ext.Element/HTMLElement} The previous sibling or null - */ - prev : function(selector, returnDom){ - return this.matchNode(PREVIOUSSIBLING, PREVIOUSSIBLING, selector, returnDom); - }, - - - /** - * Gets the first child, skipping text nodes - * @param {String} selector (optional) Find the next sibling that matches the passed simple selector - * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element - * @return {Ext.Element/HTMLElement} The first child or null - */ - first : function(selector, returnDom){ - return this.matchNode(NEXTSIBLING, 'firstChild', selector, returnDom); - }, - - /** - * Gets the last child, skipping text nodes - * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector - * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element - * @return {Ext.Element/HTMLElement} The last child or null - */ - last : function(selector, returnDom){ - return this.matchNode(PREVIOUSSIBLING, 'lastChild', selector, returnDom); - }, - - matchNode : function(dir, start, selector, returnDom){ - var n = this.dom[start]; - while(n){ - if(n.nodeType == 1 && (!selector || DQ.is(n, selector))){ - return !returnDom ? GET(n) : n; - } - n = n[dir]; - } - return null; - } - }; -}());/** - * @class Ext.Element - */ -Ext.Element.addMethods( -function() { - var GETDOM = Ext.getDom, - GET = Ext.get, - DH = Ext.DomHelper; - - return { - /** - * Appends the passed element(s) to this element - * @param {String/HTMLElement/Array/Element/CompositeElement} el - * @return {Ext.Element} this - */ - appendChild: function(el){ - return GET(el).appendTo(this); - }, - - /** - * Appends this element to the passed element - * @param {Mixed} el The new parent element - * @return {Ext.Element} this - */ - appendTo: function(el){ - GETDOM(el).appendChild(this.dom); - return this; - }, - - /** - * Inserts this element before the passed element in the DOM - * @param {Mixed} el The element before which this element will be inserted - * @return {Ext.Element} this - */ - insertBefore: function(el){ - (el = GETDOM(el)).parentNode.insertBefore(this.dom, el); - return this; - }, - - /** - * Inserts this element after the passed element in the DOM - * @param {Mixed} el The element to insert after - * @return {Ext.Element} this - */ - insertAfter: function(el){ - (el = GETDOM(el)).parentNode.insertBefore(this.dom, el.nextSibling); - return this; - }, - - /** - * Inserts (or creates) an element (or DomHelper config) as the first child of this element - * @param {Mixed/Object} el The id or element to insert or a DomHelper config to create and insert - * @return {Ext.Element} The new child - */ - insertFirst: function(el, returnDom){ - el = el || {}; - if(el.nodeType || el.dom || typeof el == 'string'){ // element - el = GETDOM(el); - this.dom.insertBefore(el, this.dom.firstChild); - return !returnDom ? GET(el) : el; - }else{ // dh config - return this.createChild(el, this.dom.firstChild, returnDom); - } - }, - - /** - * Replaces the passed element with this element - * @param {Mixed} el The element to replace - * @return {Ext.Element} this - */ - replace: function(el){ - el = GET(el); - this.insertBefore(el); - el.remove(); - return this; - }, - - /** - * Replaces this element with the passed element - * @param {Mixed/Object} el The new element or a DomHelper config of an element to create - * @return {Ext.Element} this - */ - replaceWith: function(el){ - var me = this; - - if(el.nodeType || el.dom || typeof el == 'string'){ - el = GETDOM(el); - me.dom.parentNode.insertBefore(el, me.dom); - }else{ - el = DH.insertBefore(me.dom, el); - } - - delete Ext.elCache[me.id]; - Ext.removeNode(me.dom); - me.id = Ext.id(me.dom = el); - Ext.Element.addToCache(me.isFlyweight ? new Ext.Element(me.dom) : me); - return me; - }, - - /** - * Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element. - * @param {Object} config DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be - * automatically generated with the specified attributes. - * @param {HTMLElement} insertBefore (optional) a child element of this element - * @param {Boolean} returnDom (optional) true to return the dom node instead of creating an Element - * @return {Ext.Element} The new child element - */ - createChild: function(config, insertBefore, returnDom){ - config = config || {tag:'div'}; - return insertBefore ? - DH.insertBefore(insertBefore, config, returnDom !== true) : - DH[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true); - }, - - /** - * Creates and wraps this element with another element - * @param {Object} config (optional) DomHelper element config object for the wrapper element or null for an empty div - * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element - * @return {HTMLElement/Element} The newly created wrapper element - */ - wrap: function(config, returnDom){ - var newEl = DH.insertBefore(this.dom, config || {tag: "div"}, !returnDom); - newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom); - return newEl; - }, - - /** - * Inserts an html fragment into this element - * @param {String} where Where to insert the html in relation to this element - beforeBegin, afterBegin, beforeEnd, afterEnd. - * @param {String} html The HTML fragment - * @param {Boolean} returnEl (optional) True to return an Ext.Element (defaults to false) - * @return {HTMLElement/Ext.Element} The inserted node (or nearest related if more than 1 inserted) - */ - insertHtml : function(where, html, returnEl){ - var el = DH.insertHtml(where, this.dom, html); - return returnEl ? Ext.get(el) : el; - } - }; -}());/** - * @class Ext.Element - */ -Ext.Element.addMethods(function(){ - // local style camelizing for speed - var supports = Ext.supports, - propCache = {}, - camelRe = /(-[a-z])/gi, - view = document.defaultView, - opacityRe = /alpha\(opacity=(.*)\)/i, - trimRe = /^\s+|\s+$/g, - EL = Ext.Element, - spacesRe = /\s+/, - wordsRe = /\w/g, - PADDING = "padding", - MARGIN = "margin", - BORDER = "border", - LEFT = "-left", - RIGHT = "-right", - TOP = "-top", - BOTTOM = "-bottom", - WIDTH = "-width", - MATH = Math, - HIDDEN = 'hidden', - ISCLIPPED = 'isClipped', - OVERFLOW = 'overflow', - OVERFLOWX = 'overflow-x', - OVERFLOWY = 'overflow-y', - ORIGINALCLIP = 'originalClip', - // special markup used throughout Ext when box wrapping elements - borders = {l: BORDER + LEFT + WIDTH, r: BORDER + RIGHT + WIDTH, t: BORDER + TOP + WIDTH, b: BORDER + BOTTOM + WIDTH}, - paddings = {l: PADDING + LEFT, r: PADDING + RIGHT, t: PADDING + TOP, b: PADDING + BOTTOM}, - margins = {l: MARGIN + LEFT, r: MARGIN + RIGHT, t: MARGIN + TOP, b: MARGIN + BOTTOM}, - data = Ext.Element.data; - - - // private - function camelFn(m, a) { - return a.charAt(1).toUpperCase(); - } - - function chkCache(prop) { - return propCache[prop] || (propCache[prop] = prop == 'float' ? (supports.cssFloat ? 'cssFloat' : 'styleFloat') : prop.replace(camelRe, camelFn)); - } - - return { - // private ==> used by Fx - adjustWidth : function(width) { - var me = this; - var isNum = (typeof width == "number"); - if(isNum && me.autoBoxAdjust && !me.isBorderBox()){ - width -= (me.getBorderWidth("lr") + me.getPadding("lr")); - } - return (isNum && width < 0) ? 0 : width; - }, - - // private ==> used by Fx - adjustHeight : function(height) { - var me = this; - var isNum = (typeof height == "number"); - if(isNum && me.autoBoxAdjust && !me.isBorderBox()){ - height -= (me.getBorderWidth("tb") + me.getPadding("tb")); - } - return (isNum && height < 0) ? 0 : height; - }, - - - /** - * Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out. - * @param {String/Array} className The CSS class to add, or an array of classes - * @return {Ext.Element} this - */ - addClass : function(className){ - var me = this, - i, - len, - v, - cls = []; - // Separate case is for speed - if (!Ext.isArray(className)) { - if (typeof className == 'string' && !this.hasClass(className)) { - me.dom.className += " " + className; - } - } - else { - for (i = 0, len = className.length; i < len; i++) { - v = className[i]; - if (typeof v == 'string' && (' ' + me.dom.className + ' ').indexOf(' ' + v + ' ') == -1) { - cls.push(v); - } - } - if (cls.length) { - me.dom.className += " " + cls.join(" "); - } - } - return me; - }, - - /** - * Removes one or more CSS classes from the element. - * @param {String/Array} className The CSS class to remove, or an array of classes - * @return {Ext.Element} this - */ - removeClass : function(className){ - var me = this, - i, - idx, - len, - cls, - elClasses; - if (!Ext.isArray(className)){ - className = [className]; - } - if (me.dom && me.dom.className) { - elClasses = me.dom.className.replace(trimRe, '').split(spacesRe); - for (i = 0, len = className.length; i < len; i++) { - cls = className[i]; - if (typeof cls == 'string') { - cls = cls.replace(trimRe, ''); - idx = elClasses.indexOf(cls); - if (idx != -1) { - elClasses.splice(idx, 1); - } - } - } - me.dom.className = elClasses.join(" "); - } - return me; - }, - - /** - * Adds one or more CSS classes to this element and removes the same class(es) from all siblings. - * @param {String/Array} className The CSS class to add, or an array of classes - * @return {Ext.Element} this - */ - radioClass : function(className){ - var cn = this.dom.parentNode.childNodes, - v, - i, - len; - className = Ext.isArray(className) ? className : [className]; - for (i = 0, len = cn.length; i < len; i++) { - v = cn[i]; - if (v && v.nodeType == 1) { - Ext.fly(v, '_internal').removeClass(className); - } - }; - return this.addClass(className); - }, - - /** - * Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it). - * @param {String} className The CSS class to toggle - * @return {Ext.Element} this - */ - toggleClass : function(className){ - return this.hasClass(className) ? this.removeClass(className) : this.addClass(className); - }, - - /** - * Checks if the specified CSS class exists on this element's DOM node. - * @param {String} className The CSS class to check for - * @return {Boolean} True if the class exists, else false - */ - hasClass : function(className){ - return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1; - }, - - /** - * Replaces a CSS class on the element with another. If the old name does not exist, the new name will simply be added. - * @param {String} oldClassName The CSS class to replace - * @param {String} newClassName The replacement CSS class - * @return {Ext.Element} this - */ - replaceClass : function(oldClassName, newClassName){ - return this.removeClass(oldClassName).addClass(newClassName); - }, - - isStyle : function(style, val) { - return this.getStyle(style) == val; - }, - - /** - * Normalizes currentStyle and computedStyle. - * @param {String} property The style property whose value is returned. - * @return {String} The current value of the style property for this element. - */ - getStyle : function(){ - return view && view.getComputedStyle ? - function(prop){ - var el = this.dom, - v, - cs, - out, - display; - - if(el == document){ - return null; - } - prop = chkCache(prop); - out = (v = el.style[prop]) ? v : - (cs = view.getComputedStyle(el, "")) ? cs[prop] : null; - - // Ignore cases when the margin is correctly reported as 0, the bug only shows - // numbers larger. - if(prop == 'marginRight' && out != '0px' && !supports.correctRightMargin){ - display = el.style.display; - el.style.display = 'inline-block'; - out = view.getComputedStyle(el, '').marginRight; - el.style.display = display; - } - - if(prop == 'backgroundColor' && out == 'rgba(0, 0, 0, 0)' && !supports.correctTransparentColor){ - out = 'transparent'; - } - return out; - } : - function(prop){ - var el = this.dom, - m, - cs; - - if(el == document) return null; - if (prop == 'opacity') { - if (el.style.filter.match) { - if(m = el.style.filter.match(opacityRe)){ - var fv = parseFloat(m[1]); - if(!isNaN(fv)){ - return fv ? fv / 100 : 0; - } - } - } - return 1; - } - prop = chkCache(prop); - return el.style[prop] || ((cs = el.currentStyle) ? cs[prop] : null); - }; - }(), - - /** - * Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values - * are convert to standard 6 digit hex color. - * @param {String} attr The css attribute - * @param {String} defaultValue The default value to use when a valid color isn't found - * @param {String} prefix (optional) defaults to #. Use an empty string when working with - * color anims. - */ - getColor : function(attr, defaultValue, prefix){ - var v = this.getStyle(attr), - color = (typeof prefix != 'undefined') ? prefix : '#', - h; - - if(!v || (/transparent|inherit/.test(v))) { - return defaultValue; - } - if(/^r/.test(v)){ - Ext.each(v.slice(4, v.length -1).split(','), function(s){ - h = parseInt(s, 10); - color += (h < 16 ? '0' : '') + h.toString(16); - }); - }else{ - v = v.replace('#', ''); - color += v.length == 3 ? v.replace(/^(\w)(\w)(\w)$/, '$1$1$2$2$3$3') : v; - } - return(color.length > 5 ? color.toLowerCase() : defaultValue); - }, - - /** - * Wrapper for setting style properties, also takes single object parameter of multiple styles. - * @param {String/Object} property The style property to be set, or an object of multiple styles. - * @param {String} value (optional) The value to apply to the given property, or null if an object was passed. - * @return {Ext.Element} this - */ - setStyle : function(prop, value){ - var tmp, style; - - if (typeof prop != 'object') { - tmp = {}; - tmp[prop] = value; - prop = tmp; - } - for (style in prop) { - value = prop[style]; - style == 'opacity' ? - this.setOpacity(value) : - this.dom.style[chkCache(style)] = value; - } - return this; - }, - - /** - * Set the opacity of the element - * @param {Float} opacity The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc - * @param {Boolean/Object} animate (optional) a standard Element animation config object or true for - * the default animation ({duration: .35, easing: 'easeIn'}) - * @return {Ext.Element} this - */ - setOpacity : function(opacity, animate){ - var me = this, - s = me.dom.style; - - if(!animate || !me.anim){ - if(Ext.isIE){ - var opac = opacity < 1 ? 'alpha(opacity=' + opacity * 100 + ')' : '', - val = s.filter.replace(opacityRe, '').replace(trimRe, ''); - - s.zoom = 1; - s.filter = val + (val.length > 0 ? ' ' : '') + opac; - }else{ - s.opacity = opacity; - } - }else{ - me.anim({opacity: {to: opacity}}, me.preanim(arguments, 1), null, .35, 'easeIn'); - } - return me; - }, - - /** - * Clears any opacity settings from this element. Required in some cases for IE. - * @return {Ext.Element} this - */ - clearOpacity : function(){ - var style = this.dom.style; - if(Ext.isIE){ - if(!Ext.isEmpty(style.filter)){ - style.filter = style.filter.replace(opacityRe, '').replace(trimRe, ''); - } - }else{ - style.opacity = style['-moz-opacity'] = style['-khtml-opacity'] = ''; - } - return this; - }, - - /** - * Returns the offset height of the element - * @param {Boolean} contentHeight (optional) true to get the height minus borders and padding - * @return {Number} The element's height - */ - getHeight : function(contentHeight){ - var me = this, - dom = me.dom, - hidden = Ext.isIE && me.isStyle('display', 'none'), - h = MATH.max(dom.offsetHeight, hidden ? 0 : dom.clientHeight) || 0; - - h = !contentHeight ? h : h - me.getBorderWidth("tb") - me.getPadding("tb"); - return h < 0 ? 0 : h; - }, - - /** - * Returns the offset width of the element - * @param {Boolean} contentWidth (optional) true to get the width minus borders and padding - * @return {Number} The element's width - */ - getWidth : function(contentWidth){ - var me = this, - dom = me.dom, - hidden = Ext.isIE && me.isStyle('display', 'none'), - w = MATH.max(dom.offsetWidth, hidden ? 0 : dom.clientWidth) || 0; - w = !contentWidth ? w : w - me.getBorderWidth("lr") - me.getPadding("lr"); - return w < 0 ? 0 : w; - }, - - /** - * Set the width of this Element. - * @param {Mixed} width The new width. This may be one of:
        - *
      • A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS width style. Animation may not be used. - *
      - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - setWidth : function(width, animate){ - var me = this; - width = me.adjustWidth(width); - !animate || !me.anim ? - me.dom.style.width = me.addUnits(width) : - me.anim({width : {to : width}}, me.preanim(arguments, 1)); - return me; - }, - - /** - * Set the height of this Element. - *
      
      -// change the height to 200px and animate with default configuration
      -Ext.fly('elementId').setHeight(200, true);
      -
      -// change the height to 150px and animate with a custom configuration
      -Ext.fly('elId').setHeight(150, {
      -    duration : .5, // animation will have a duration of .5 seconds
      -    // will change the content to "finished"
      -    callback: function(){ this.{@link #update}("finished"); }
      -});
      -         * 
      - * @param {Mixed} height The new height. This may be one of:
        - *
      • A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels.)
      • - *
      • A String used to set the CSS height style. Animation may not be used.
      • - *
      - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - setHeight : function(height, animate){ - var me = this; - height = me.adjustHeight(height); - !animate || !me.anim ? - me.dom.style.height = me.addUnits(height) : - me.anim({height : {to : height}}, me.preanim(arguments, 1)); - return me; - }, - - /** - * Gets the width of the border(s) for the specified side(s) - * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example, - * passing 'lr' would get the border left width + the border right width. - * @return {Number} The width of the sides passed added together - */ - getBorderWidth : function(side){ - return this.addStyles(side, borders); - }, - - /** - * Gets the width of the padding(s) for the specified side(s) - * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example, - * passing 'lr' would get the padding left + the padding right. - * @return {Number} The padding of the sides passed added together - */ - getPadding : function(side){ - return this.addStyles(side, paddings); - }, - - /** - * Store the current overflow setting and clip overflow on the element - use {@link #unclip} to remove - * @return {Ext.Element} this - */ - clip : function(){ - var me = this, - dom = me.dom; - - if(!data(dom, ISCLIPPED)){ - data(dom, ISCLIPPED, true); - data(dom, ORIGINALCLIP, { - o: me.getStyle(OVERFLOW), - x: me.getStyle(OVERFLOWX), - y: me.getStyle(OVERFLOWY) - }); - me.setStyle(OVERFLOW, HIDDEN); - me.setStyle(OVERFLOWX, HIDDEN); - me.setStyle(OVERFLOWY, HIDDEN); - } - return me; - }, - - /** - * Return clipping (overflow) to original clipping before {@link #clip} was called - * @return {Ext.Element} this - */ - unclip : function(){ - var me = this, - dom = me.dom; - - if(data(dom, ISCLIPPED)){ - data(dom, ISCLIPPED, false); - var o = data(dom, ORIGINALCLIP); - if(o.o){ - me.setStyle(OVERFLOW, o.o); - } - if(o.x){ - me.setStyle(OVERFLOWX, o.x); - } - if(o.y){ - me.setStyle(OVERFLOWY, o.y); - } - } - return me; - }, - - // private - addStyles : function(sides, styles){ - var ttlSize = 0, - sidesArr = sides.match(wordsRe), - side, - size, - i, - len = sidesArr.length; - for (i = 0; i < len; i++) { - side = sidesArr[i]; - size = side && parseInt(this.getStyle(styles[side]), 10); - if (size) { - ttlSize += MATH.abs(size); - } - } - return ttlSize; - }, - - margins : margins - }; -}() -); -/** - * @class Ext.Element - */ -(function(){ -var D = Ext.lib.Dom, - LEFT = "left", - RIGHT = "right", - TOP = "top", - BOTTOM = "bottom", - POSITION = "position", - STATIC = "static", - RELATIVE = "relative", - AUTO = "auto", - ZINDEX = "z-index"; - -Ext.Element.addMethods({ - /** - * Gets the current X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). - * @return {Number} The X position of the element - */ - getX : function(){ - return D.getX(this.dom); - }, - - /** - * Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). - * @return {Number} The Y position of the element - */ - getY : function(){ - return D.getY(this.dom); - }, - - /** - * Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). - * @return {Array} The XY position of the element - */ - getXY : function(){ - return D.getXY(this.dom); - }, - - /** - * Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates. - * @param {Mixed} element The element to get the offsets from. - * @return {Array} The XY page offsets (e.g. [100, -200]) - */ - getOffsetsTo : function(el){ - var o = this.getXY(), - e = Ext.fly(el, '_internal').getXY(); - return [o[0]-e[0],o[1]-e[1]]; - }, - - /** - * Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). - * @param {Number} The X position of the element - * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object - * @return {Ext.Element} this - */ - setX : function(x, animate){ - return this.setXY([x, this.getY()], this.animTest(arguments, animate, 1)); - }, - - /** - * Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). - * @param {Number} The Y position of the element - * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object - * @return {Ext.Element} this - */ - setY : function(y, animate){ - return this.setXY([this.getX(), y], this.animTest(arguments, animate, 1)); - }, - - /** - * Sets the element's left position directly using CSS style (instead of {@link #setX}). - * @param {String} left The left CSS property value - * @return {Ext.Element} this - */ - setLeft : function(left){ - this.setStyle(LEFT, this.addUnits(left)); - return this; - }, - - /** - * Sets the element's top position directly using CSS style (instead of {@link #setY}). - * @param {String} top The top CSS property value - * @return {Ext.Element} this - */ - setTop : function(top){ - this.setStyle(TOP, this.addUnits(top)); - return this; - }, - - /** - * Sets the element's CSS right style. - * @param {String} right The right CSS property value - * @return {Ext.Element} this - */ - setRight : function(right){ - this.setStyle(RIGHT, this.addUnits(right)); - return this; - }, - - /** - * Sets the element's CSS bottom style. - * @param {String} bottom The bottom CSS property value - * @return {Ext.Element} this - */ - setBottom : function(bottom){ - this.setStyle(BOTTOM, this.addUnits(bottom)); - return this; - }, - - /** - * Sets the position of the element in page coordinates, regardless of how the element is positioned. - * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). - * @param {Array} pos Contains X & Y [x, y] values for new position (coordinates are page-based) - * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object - * @return {Ext.Element} this - */ - setXY : function(pos, animate){ - var me = this; - if(!animate || !me.anim){ - D.setXY(me.dom, pos); - }else{ - me.anim({points: {to: pos}}, me.preanim(arguments, 1), 'motion'); - } - return me; - }, - - /** - * Sets the position of the element in page coordinates, regardless of how the element is positioned. - * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). - * @param {Number} x X value for new position (coordinates are page-based) - * @param {Number} y Y value for new position (coordinates are page-based) - * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object - * @return {Ext.Element} this - */ - setLocation : function(x, y, animate){ - return this.setXY([x, y], this.animTest(arguments, animate, 2)); - }, - - /** - * Sets the position of the element in page coordinates, regardless of how the element is positioned. - * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). - * @param {Number} x X value for new position (coordinates are page-based) - * @param {Number} y Y value for new position (coordinates are page-based) - * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object - * @return {Ext.Element} this - */ - moveTo : function(x, y, animate){ - return this.setXY([x, y], this.animTest(arguments, animate, 2)); - }, - - /** - * Gets the left X coordinate - * @param {Boolean} local True to get the local css position instead of page coordinate - * @return {Number} - */ - getLeft : function(local){ - return !local ? this.getX() : parseInt(this.getStyle(LEFT), 10) || 0; - }, - - /** - * Gets the right X coordinate of the element (element X position + element width) - * @param {Boolean} local True to get the local css position instead of page coordinate - * @return {Number} - */ - getRight : function(local){ - var me = this; - return !local ? me.getX() + me.getWidth() : (me.getLeft(true) + me.getWidth()) || 0; - }, - - /** - * Gets the top Y coordinate - * @param {Boolean} local True to get the local css position instead of page coordinate - * @return {Number} - */ - getTop : function(local) { - return !local ? this.getY() : parseInt(this.getStyle(TOP), 10) || 0; - }, - - /** - * Gets the bottom Y coordinate of the element (element Y position + element height) - * @param {Boolean} local True to get the local css position instead of page coordinate - * @return {Number} - */ - getBottom : function(local){ - var me = this; - return !local ? me.getY() + me.getHeight() : (me.getTop(true) + me.getHeight()) || 0; - }, - - /** - * Initializes positioning on this element. If a desired position is not passed, it will make the - * the element positioned relative IF it is not already positioned. - * @param {String} pos (optional) Positioning to use "relative", "absolute" or "fixed" - * @param {Number} zIndex (optional) The zIndex to apply - * @param {Number} x (optional) Set the page X position - * @param {Number} y (optional) Set the page Y position - */ - position : function(pos, zIndex, x, y){ - var me = this; - - if(!pos && me.isStyle(POSITION, STATIC)){ - me.setStyle(POSITION, RELATIVE); - } else if(pos) { - me.setStyle(POSITION, pos); - } - if(zIndex){ - me.setStyle(ZINDEX, zIndex); - } - if(x || y) me.setXY([x || false, y || false]); - }, - - /** - * Clear positioning back to the default when the document was loaded - * @param {String} value (optional) The value to use for the left,right,top,bottom, defaults to '' (empty string). You could use 'auto'. - * @return {Ext.Element} this - */ - clearPositioning : function(value){ - value = value || ''; - this.setStyle({ - left : value, - right : value, - top : value, - bottom : value, - "z-index" : "", - position : STATIC - }); - return this; - }, - - /** - * Gets an object with all CSS positioning properties. Useful along with setPostioning to get - * snapshot before performing an update and then restoring the element. - * @return {Object} - */ - getPositioning : function(){ - var l = this.getStyle(LEFT); - var t = this.getStyle(TOP); - return { - "position" : this.getStyle(POSITION), - "left" : l, - "right" : l ? "" : this.getStyle(RIGHT), - "top" : t, - "bottom" : t ? "" : this.getStyle(BOTTOM), - "z-index" : this.getStyle(ZINDEX) - }; - }, - - /** - * Set positioning with an object returned by getPositioning(). - * @param {Object} posCfg - * @return {Ext.Element} this - */ - setPositioning : function(pc){ - var me = this, - style = me.dom.style; - - me.setStyle(pc); - - if(pc.right == AUTO){ - style.right = ""; - } - if(pc.bottom == AUTO){ - style.bottom = ""; - } - - return me; - }, - - /** - * Translates the passed page coordinates into left/top css values for this element - * @param {Number/Array} x The page x or an array containing [x, y] - * @param {Number} y (optional) The page y, required if x is not an array - * @return {Object} An object with left and top properties. e.g. {left: (value), top: (value)} - */ - translatePoints : function(x, y){ - y = isNaN(x[1]) ? y : x[1]; - x = isNaN(x[0]) ? x : x[0]; - var me = this, - relative = me.isStyle(POSITION, RELATIVE), - o = me.getXY(), - l = parseInt(me.getStyle(LEFT), 10), - t = parseInt(me.getStyle(TOP), 10); - - l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft); - t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop); - - return {left: (x - o[0] + l), top: (y - o[1] + t)}; - }, - - animTest : function(args, animate, i) { - return !!animate && this.preanim ? this.preanim(args, i) : false; - } -}); -})();/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Returns true if this element is scrollable. - * @return {Boolean} - */ - isScrollable : function(){ - var dom = this.dom; - return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth; - }, - - /** - * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll(). - * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values. - * @param {Number} value The new scroll value. - * @return {Element} this - */ - scrollTo : function(side, value){ - this.dom["scroll" + (/top/i.test(side) ? "Top" : "Left")] = value; - return this; - }, - - /** - * Returns the current scroll position of the element. - * @return {Object} An object containing the scroll position in the format {left: (scrollLeft), top: (scrollTop)} - */ - getScroll : function(){ - var d = this.dom, - doc = document, - body = doc.body, - docElement = doc.documentElement, - l, - t, - ret; - - if(d == doc || d == body){ - if(Ext.isIE && Ext.isStrict){ - l = docElement.scrollLeft; - t = docElement.scrollTop; - }else{ - l = window.pageXOffset; - t = window.pageYOffset; - } - ret = {left: l || (body ? body.scrollLeft : 0), top: t || (body ? body.scrollTop : 0)}; - }else{ - ret = {left: d.scrollLeft, top: d.scrollTop}; - } - return ret; - } -});/** - * @class Ext.Element - */ -/** - * Visibility mode constant for use with {@link #setVisibilityMode}. Use visibility to hide element - * @static - * @type Number - */ -Ext.Element.VISIBILITY = 1; -/** - * Visibility mode constant for use with {@link #setVisibilityMode}. Use display to hide element - * @static - * @type Number - */ -Ext.Element.DISPLAY = 2; - -/** - * Visibility mode constant for use with {@link #setVisibilityMode}. Use offsets (x and y positioning offscreen) - * to hide element. - * @static - * @type Number - */ -Ext.Element.OFFSETS = 3; - - -Ext.Element.ASCLASS = 4; - -/** - * Defaults to 'x-hide-nosize' - * @static - * @type String - */ -Ext.Element.visibilityCls = 'x-hide-nosize'; - -Ext.Element.addMethods(function(){ - var El = Ext.Element, - OPACITY = "opacity", - VISIBILITY = "visibility", - DISPLAY = "display", - HIDDEN = "hidden", - OFFSETS = "offsets", - ASCLASS = "asclass", - NONE = "none", - NOSIZE = 'nosize', - ORIGINALDISPLAY = 'originalDisplay', - VISMODE = 'visibilityMode', - ISVISIBLE = 'isVisible', - data = El.data, - getDisplay = function(dom){ - var d = data(dom, ORIGINALDISPLAY); - if(d === undefined){ - data(dom, ORIGINALDISPLAY, d = ''); - } - return d; - }, - getVisMode = function(dom){ - var m = data(dom, VISMODE); - if(m === undefined){ - data(dom, VISMODE, m = 1); - } - return m; - }; - - return { - /** - * The element's default display mode (defaults to "") - * @type String - */ - originalDisplay : "", - visibilityMode : 1, - - /** - * Sets the element's visibility mode. When setVisible() is called it - * will use this to determine whether to set the visibility or the display property. - * @param {Number} visMode Ext.Element.VISIBILITY or Ext.Element.DISPLAY - * @return {Ext.Element} this - */ - setVisibilityMode : function(visMode){ - data(this.dom, VISMODE, visMode); - return this; - }, - - /** - * Perform custom animation on this element. - *
        - *
      • Animation Properties
      • - * - *

        The Animation Control Object enables gradual transitions for any member of an - * element's style object that takes a numeric value including but not limited to - * these properties:

          - *
        • bottom, top, left, right
        • - *
        • height, width
        • - *
        • margin, padding
        • - *
        • borderWidth
        • - *
        • opacity
        • - *
        • fontSize
        • - *
        • lineHeight
        • - *
        - * - * - *
      • Animation Property Attributes
      • - * - *

        Each Animation Property is a config object with optional properties:

        - *
          - *
        • by* : relative change - start at current value, change by this value
        • - *
        • from : ignore current value, start from this value
        • - *
        • to* : start at current value, go to this value
        • - *
        • unit : any allowable unit specification
        • - *

          * do not specify both to and by for an animation property

          - *
        - * - *
      • Animation Types
      • - * - *

        The supported animation types:

          - *
        • 'run' : Default - *
          
          -var el = Ext.get('complexEl');
          -el.animate(
          -    // animation control object
          -    {
          -        borderWidth: {to: 3, from: 0},
          -        opacity: {to: .3, from: 1},
          -        height: {to: 50, from: el.getHeight()},
          -        width: {to: 300, from: el.getWidth()},
          -        top  : {by: - 100, unit: 'px'},
          -    },
          -    0.35,      // animation duration
          -    null,      // callback
          -    'easeOut', // easing method
          -    'run'      // animation type ('run','color','motion','scroll')
          -);
          -         * 
          - *
        • - *
        • 'color' - *

          Animates transition of background, text, or border colors.

          - *
          
          -el.animate(
          -    // animation control object
          -    {
          -        color: { to: '#06e' },
          -        backgroundColor: { to: '#e06' }
          -    },
          -    0.35,      // animation duration
          -    null,      // callback
          -    'easeOut', // easing method
          -    'color'    // animation type ('run','color','motion','scroll')
          -);
          -         * 
          - *
        • - * - *
        • 'motion' - *

          Animates the motion of an element to/from specific points using optional bezier - * way points during transit.

          - *
          
          -el.animate(
          -    // animation control object
          -    {
          -        borderWidth: {to: 3, from: 0},
          -        opacity: {to: .3, from: 1},
          -        height: {to: 50, from: el.getHeight()},
          -        width: {to: 300, from: el.getWidth()},
          -        top  : {by: - 100, unit: 'px'},
          -        points: {
          -            to: [50, 100],  // go to this point
          -            control: [      // optional bezier way points
          -                [ 600, 800],
          -                [-100, 200]
          -            ]
          -        }
          -    },
          -    3000,      // animation duration (milliseconds!)
          -    null,      // callback
          -    'easeOut', // easing method
          -    'motion'   // animation type ('run','color','motion','scroll')
          -);
          -         * 
          - *
        • - *
        • 'scroll' - *

          Animate horizontal or vertical scrolling of an overflowing page element.

          - *
          
          -el.animate(
          -    // animation control object
          -    {
          -        scroll: {to: [400, 300]}
          -    },
          -    0.35,      // animation duration
          -    null,      // callback
          -    'easeOut', // easing method
          -    'scroll'   // animation type ('run','color','motion','scroll')
          -);
          -         * 
          - *
        • - *
        - * - *
      - * - * @param {Object} args The animation control args - * @param {Float} duration (optional) How long the animation lasts in seconds (defaults to .35) - * @param {Function} onComplete (optional) Function to call when animation completes - * @param {String} easing (optional) {@link Ext.Fx#easing} method to use (defaults to 'easeOut') - * @param {String} animType (optional) 'run' is the default. Can also be 'color', - * 'motion', or 'scroll' - * @return {Ext.Element} this - */ - animate : function(args, duration, onComplete, easing, animType){ - this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType); - return this; - }, - - /* - * @private Internal animation call - */ - anim : function(args, opt, animType, defaultDur, defaultEase, cb){ - animType = animType || 'run'; - opt = opt || {}; - var me = this, - anim = Ext.lib.Anim[animType]( - me.dom, - args, - (opt.duration || defaultDur) || .35, - (opt.easing || defaultEase) || 'easeOut', - function(){ - if(cb) cb.call(me); - if(opt.callback) opt.callback.call(opt.scope || me, me, opt); - }, - me - ); - opt.anim = anim; - return anim; - }, - - // private legacy anim prep - preanim : function(a, i){ - return !a[i] ? false : (typeof a[i] == 'object' ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]}); - }, - - /** - * Checks whether the element is currently visible using both visibility and display properties. - * @return {Boolean} True if the element is currently visible, else false - */ - isVisible : function() { - var me = this, - dom = me.dom, - visible = data(dom, ISVISIBLE); - - if(typeof visible == 'boolean'){ //return the cached value if registered - return visible; - } - //Determine the current state based on display states - visible = !me.isStyle(VISIBILITY, HIDDEN) && - !me.isStyle(DISPLAY, NONE) && - !((getVisMode(dom) == El.ASCLASS) && me.hasClass(me.visibilityCls || El.visibilityCls)); - - data(dom, ISVISIBLE, visible); - return visible; - }, - - /** - * Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use - * the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property. - * @param {Boolean} visible Whether the element is visible - * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object - * @return {Ext.Element} this - */ - setVisible : function(visible, animate){ - var me = this, isDisplay, isVisibility, isOffsets, isNosize, - dom = me.dom, - visMode = getVisMode(dom); - - - // hideMode string override - if (typeof animate == 'string'){ - switch (animate) { - case DISPLAY: - visMode = El.DISPLAY; - break; - case VISIBILITY: - visMode = El.VISIBILITY; - break; - case OFFSETS: - visMode = El.OFFSETS; - break; - case NOSIZE: - case ASCLASS: - visMode = El.ASCLASS; - break; - } - me.setVisibilityMode(visMode); - animate = false; - } - - if (!animate || !me.anim) { - if(visMode == El.ASCLASS ){ - - me[visible?'removeClass':'addClass'](me.visibilityCls || El.visibilityCls); - - } else if (visMode == El.DISPLAY){ - - return me.setDisplayed(visible); - - } else if (visMode == El.OFFSETS){ - - if (!visible){ - me.hideModeStyles = { - position: me.getStyle('position'), - top: me.getStyle('top'), - left: me.getStyle('left') - }; - me.applyStyles({position: 'absolute', top: '-10000px', left: '-10000px'}); - } else { - me.applyStyles(me.hideModeStyles || {position: '', top: '', left: ''}); - delete me.hideModeStyles; - } - - }else{ - me.fixDisplay(); - dom.style.visibility = visible ? "visible" : HIDDEN; - } - }else{ - // closure for composites - if(visible){ - me.setOpacity(.01); - me.setVisible(true); - } - me.anim({opacity: { to: (visible?1:0) }}, - me.preanim(arguments, 1), - null, - .35, - 'easeIn', - function(){ - visible || me.setVisible(false).setOpacity(1); - }); - } - data(dom, ISVISIBLE, visible); //set logical visibility state - return me; - }, - - - /** - * @private - * Determine if the Element has a relevant height and width available based - * upon current logical visibility state - */ - hasMetrics : function(){ - var dom = this.dom; - return this.isVisible() || (getVisMode(dom) == El.VISIBILITY); - }, - - /** - * Toggles the element's visibility or display, depending on visibility mode. - * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object - * @return {Ext.Element} this - */ - toggle : function(animate){ - var me = this; - me.setVisible(!me.isVisible(), me.preanim(arguments, 0)); - return me; - }, - - /** - * Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true. - * @param {Mixed} value Boolean value to display the element using its default display, or a string to set the display directly. - * @return {Ext.Element} this - */ - setDisplayed : function(value) { - if(typeof value == "boolean"){ - value = value ? getDisplay(this.dom) : NONE; - } - this.setStyle(DISPLAY, value); - return this; - }, - - // private - fixDisplay : function(){ - var me = this; - if(me.isStyle(DISPLAY, NONE)){ - me.setStyle(VISIBILITY, HIDDEN); - me.setStyle(DISPLAY, getDisplay(this.dom)); // first try reverting to default - if(me.isStyle(DISPLAY, NONE)){ // if that fails, default to block - me.setStyle(DISPLAY, "block"); - } - } - }, - - /** - * Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}. - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - hide : function(animate){ - // hideMode override - if (typeof animate == 'string'){ - this.setVisible(false, animate); - return this; - } - this.setVisible(false, this.preanim(arguments, 0)); - return this; - }, - - /** - * Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}. - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - show : function(animate){ - // hideMode override - if (typeof animate == 'string'){ - this.setVisible(true, animate); - return this; - } - this.setVisible(true, this.preanim(arguments, 0)); - return this; - } - }; -}());(function(){ - // contants - var NULL = null, - UNDEFINED = undefined, - TRUE = true, - FALSE = false, - SETX = "setX", - SETY = "setY", - SETXY = "setXY", - LEFT = "left", - BOTTOM = "bottom", - TOP = "top", - RIGHT = "right", - HEIGHT = "height", - WIDTH = "width", - POINTS = "points", - HIDDEN = "hidden", - ABSOLUTE = "absolute", - VISIBLE = "visible", - MOTION = "motion", - POSITION = "position", - EASEOUT = "easeOut", - /* - * Use a light flyweight here since we are using so many callbacks and are always assured a DOM element - */ - flyEl = new Ext.Element.Flyweight(), - queues = {}, - getObject = function(o){ - return o || {}; - }, - fly = function(dom){ - flyEl.dom = dom; - flyEl.id = Ext.id(dom); - return flyEl; - }, - /* - * Queueing now stored outside of the element due to closure issues - */ - getQueue = function(id){ - if(!queues[id]){ - queues[id] = []; - } - return queues[id]; - }, - setQueue = function(id, value){ - queues[id] = value; - }; - -//Notifies Element that fx methods are available -Ext.enableFx = TRUE; - -/** - * @class Ext.Fx - *

      A class to provide basic animation and visual effects support. Note: This class is automatically applied - * to the {@link Ext.Element} interface when included, so all effects calls should be performed via {@link Ext.Element}. - * Conversely, since the effects are not actually defined in {@link Ext.Element}, Ext.Fx must be - * {@link Ext#enableFx included} in order for the Element effects to work.


      - * - *

      Method Chaining

      - *

      It is important to note that although the Fx methods and many non-Fx Element methods support "method chaining" in that - * they return the Element object itself as the method return value, it is not always possible to mix the two in a single - * method chain. The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced. - * Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately. For this reason, - * while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the - * expected results and should be done with care. Also see {@link #callback}.


      - * - *

      Anchor Options for Motion Effects

      - *

      Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element - * that will serve as either the start or end point of the animation. Following are all of the supported anchor positions:

      -
      -Value  Description
      ------  -----------------------------
      -tl     The top left corner
      -t      The center of the top edge
      -tr     The top right corner
      -l      The center of the left edge
      -r      The center of the right edge
      -bl     The bottom left corner
      -b      The center of the bottom edge
      -br     The bottom right corner
      -
      - * Note: some Fx methods accept specific custom config parameters. The options shown in the Config Options - * section below are common options that can be passed to any Fx method unless otherwise noted.
      - * - * @cfg {Function} callback A function called when the effect is finished. Note that effects are queued internally by the - * Fx class, so a callback is not required to specify another effect -- effects can simply be chained together - * and called in sequence (see note for Method Chaining above), for example:
      
      - * el.slideIn().highlight();
      - * 
      - * The callback is intended for any additional code that should run once a particular effect has completed. The Element - * being operated upon is passed as the first parameter. - * - * @cfg {Object} scope The scope (this reference) in which the {@link #callback} function is executed. Defaults to the browser window. - * - * @cfg {String} easing A valid Ext.lib.Easing value for the effect:

        - *
      • backBoth
      • - *
      • backIn
      • - *
      • backOut
      • - *
      • bounceBoth
      • - *
      • bounceIn
      • - *
      • bounceOut
      • - *
      • easeBoth
      • - *
      • easeBothStrong
      • - *
      • easeIn
      • - *
      • easeInStrong
      • - *
      • easeNone
      • - *
      • easeOut
      • - *
      • easeOutStrong
      • - *
      • elasticBoth
      • - *
      • elasticIn
      • - *
      • elasticOut
      • - *
      - * - * @cfg {String} afterCls A css class to apply after the effect - * @cfg {Number} duration The length of time (in seconds) that the effect should last - * - * @cfg {Number} endOpacity Only applicable for {@link #fadeIn} or {@link #fadeOut}, a number between - * 0 and 1 inclusive to configure the ending opacity value. - * - * @cfg {Boolean} remove Whether the Element should be removed from the DOM and destroyed after the effect finishes - * @cfg {Boolean} useDisplay Whether to use the display CSS property instead of visibility when hiding Elements (only applies to - * effects that end with the element being visually hidden, ignored otherwise) - * @cfg {String/Object/Function} afterStyle A style specification string, e.g. "width:100px", or an object - * in the form {width:"100px"}, or a function which returns such a specification that will be applied to the - * Element after the effect finishes. - * @cfg {Boolean} block Whether the effect should block other effects from queueing while it runs - * @cfg {Boolean} concurrent Whether to allow subsequently-queued effects to run at the same time as the current effect, or to ensure that they run in sequence - * @cfg {Boolean} stopFx Whether preceding effects should be stopped and removed before running current effect (only applies to non blocking effects) - */ -Ext.Fx = { - - // private - calls the function taking arguments from the argHash based on the key. Returns the return value of the function. - // this is useful for replacing switch statements (for example). - switchStatements : function(key, fn, argHash){ - return fn.apply(this, argHash[key]); - }, - - /** - * Slides the element into view. An anchor point can be optionally passed to set the point of - * origin for the slide effect. This function automatically handles wrapping the element with - * a fixed-size container if needed. See the Fx class overview for valid anchor point options. - * Usage: - *
      
      -// default: slide the element in from the top
      -el.slideIn();
      -
      -// custom: slide the element in from the right with a 2-second duration
      -el.slideIn('r', { duration: 2 });
      -
      -// common config options shown with default values
      -el.slideIn('t', {
      -    easing: 'easeOut',
      -    duration: .5
      -});
      -
      - * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't') - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - slideIn : function(anchor, o){ - o = getObject(o); - var me = this, - dom = me.dom, - st = dom.style, - xy, - r, - b, - wrap, - after, - st, - args, - pt, - bw, - bh; - - anchor = anchor || "t"; - - me.queueFx(o, function(){ - xy = fly(dom).getXY(); - // fix display to visibility - fly(dom).fixDisplay(); - - // restore values after effect - r = fly(dom).getFxRestore(); - b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight}; - b.right = b.x + b.width; - b.bottom = b.y + b.height; - - // fixed size for slide - fly(dom).setWidth(b.width).setHeight(b.height); - - // wrap if needed - wrap = fly(dom).fxWrap(r.pos, o, HIDDEN); - - st.visibility = VISIBLE; - st.position = ABSOLUTE; - - // clear out temp styles after slide and unwrap - function after(){ - fly(dom).fxUnwrap(wrap, r.pos, o); - st.width = r.width; - st.height = r.height; - fly(dom).afterFx(o); - } - - // time to calculate the positions - pt = {to: [b.x, b.y]}; - bw = {to: b.width}; - bh = {to: b.height}; - - function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){ - var ret = {}; - fly(wrap).setWidth(ww).setHeight(wh); - if(fly(wrap)[sXY]){ - fly(wrap)[sXY](sXYval); - } - style[s1] = style[s2] = "0"; - if(w){ - ret.width = w; - } - if(h){ - ret.height = h; - } - if(p){ - ret.points = p; - } - return ret; - }; - - args = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, { - t : [wrap, st, b.width, 0, NULL, NULL, LEFT, BOTTOM, NULL, bh, NULL], - l : [wrap, st, 0, b.height, NULL, NULL, RIGHT, TOP, bw, NULL, NULL], - r : [wrap, st, b.width, b.height, SETX, b.right, LEFT, TOP, NULL, NULL, pt], - b : [wrap, st, b.width, b.height, SETY, b.bottom, LEFT, TOP, NULL, bh, pt], - tl : [wrap, st, 0, 0, NULL, NULL, RIGHT, BOTTOM, bw, bh, pt], - bl : [wrap, st, 0, 0, SETY, b.y + b.height, RIGHT, TOP, bw, bh, pt], - br : [wrap, st, 0, 0, SETXY, [b.right, b.bottom], LEFT, TOP, bw, bh, pt], - tr : [wrap, st, 0, 0, SETX, b.x + b.width, LEFT, BOTTOM, bw, bh, pt] - }); - - st.visibility = VISIBLE; - fly(wrap).show(); - - arguments.callee.anim = fly(wrap).fxanim(args, - o, - MOTION, - .5, - EASEOUT, - after); - }); - return me; - }, - - /** - * Slides the element out of view. An anchor point can be optionally passed to set the end point - * for the slide effect. When the effect is completed, the element will be hidden (visibility = - * 'hidden') but block elements will still take up space in the document. The element must be removed - * from the DOM using the 'remove' config option if desired. This function automatically handles - * wrapping the element with a fixed-size container if needed. See the Fx class overview for valid anchor point options. - * Usage: - *
      
      -// default: slide the element out to the top
      -el.slideOut();
      -
      -// custom: slide the element out to the right with a 2-second duration
      -el.slideOut('r', { duration: 2 });
      -
      -// common config options shown with default values
      -el.slideOut('t', {
      -    easing: 'easeOut',
      -    duration: .5,
      -    remove: false,
      -    useDisplay: false
      -});
      -
      - * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't') - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - slideOut : function(anchor, o){ - o = getObject(o); - var me = this, - dom = me.dom, - st = dom.style, - xy = me.getXY(), - wrap, - r, - b, - a, - zero = {to: 0}; - - anchor = anchor || "t"; - - me.queueFx(o, function(){ - - // restore values after effect - r = fly(dom).getFxRestore(); - b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight}; - b.right = b.x + b.width; - b.bottom = b.y + b.height; - - // fixed size for slide - fly(dom).setWidth(b.width).setHeight(b.height); - - // wrap if needed - wrap = fly(dom).fxWrap(r.pos, o, VISIBLE); - - st.visibility = VISIBLE; - st.position = ABSOLUTE; - fly(wrap).setWidth(b.width).setHeight(b.height); - - function after(){ - o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide(); - fly(dom).fxUnwrap(wrap, r.pos, o); - st.width = r.width; - st.height = r.height; - fly(dom).afterFx(o); - } - - function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){ - var ret = {}; - - style[s1] = style[s2] = "0"; - ret[p1] = v1; - if(p2){ - ret[p2] = v2; - } - if(p3){ - ret[p3] = v3; - } - - return ret; - }; - - a = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, { - t : [st, LEFT, BOTTOM, HEIGHT, zero], - l : [st, RIGHT, TOP, WIDTH, zero], - r : [st, LEFT, TOP, WIDTH, zero, POINTS, {to : [b.right, b.y]}], - b : [st, LEFT, TOP, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}], - tl : [st, RIGHT, BOTTOM, WIDTH, zero, HEIGHT, zero], - bl : [st, RIGHT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}], - br : [st, LEFT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x + b.width, b.bottom]}], - tr : [st, LEFT, BOTTOM, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.right, b.y]}] - }); - - arguments.callee.anim = fly(wrap).fxanim(a, - o, - MOTION, - .5, - EASEOUT, - after); - }); - return me; - }, - - /** - * Fades the element out while slowly expanding it in all directions. When the effect is completed, the - * element will be hidden (visibility = 'hidden') but block elements will still take up space in the document. - * The element must be removed from the DOM using the 'remove' config option if desired. - * Usage: - *
      
      -// default
      -el.puff();
      -
      -// common config options shown with default values
      -el.puff({
      -    easing: 'easeOut',
      -    duration: .5,
      -    remove: false,
      -    useDisplay: false
      -});
      -
      - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - puff : function(o){ - o = getObject(o); - var me = this, - dom = me.dom, - st = dom.style, - width, - height, - r; - - me.queueFx(o, function(){ - width = fly(dom).getWidth(); - height = fly(dom).getHeight(); - fly(dom).clearOpacity(); - fly(dom).show(); - - // restore values after effect - r = fly(dom).getFxRestore(); - - function after(){ - o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide(); - fly(dom).clearOpacity(); - fly(dom).setPositioning(r.pos); - st.width = r.width; - st.height = r.height; - st.fontSize = ''; - fly(dom).afterFx(o); - } - - arguments.callee.anim = fly(dom).fxanim({ - width : {to : fly(dom).adjustWidth(width * 2)}, - height : {to : fly(dom).adjustHeight(height * 2)}, - points : {by : [-width * .5, -height * .5]}, - opacity : {to : 0}, - fontSize: {to : 200, unit: "%"} - }, - o, - MOTION, - .5, - EASEOUT, - after); - }); - return me; - }, - - /** - * Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television). - * When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still - * take up space in the document. The element must be removed from the DOM using the 'remove' config option if desired. - * Usage: - *
      
      -// default
      -el.switchOff();
      -
      -// all config options shown with default values
      -el.switchOff({
      -    easing: 'easeIn',
      -    duration: .3,
      -    remove: false,
      -    useDisplay: false
      -});
      -
      - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - switchOff : function(o){ - o = getObject(o); - var me = this, - dom = me.dom, - st = dom.style, - r; - - me.queueFx(o, function(){ - fly(dom).clearOpacity(); - fly(dom).clip(); - - // restore values after effect - r = fly(dom).getFxRestore(); - - function after(){ - o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide(); - fly(dom).clearOpacity(); - fly(dom).setPositioning(r.pos); - st.width = r.width; - st.height = r.height; - fly(dom).afterFx(o); - }; - - fly(dom).fxanim({opacity : {to : 0.3}}, - NULL, - NULL, - .1, - NULL, - function(){ - fly(dom).clearOpacity(); - (function(){ - fly(dom).fxanim({ - height : {to : 1}, - points : {by : [0, fly(dom).getHeight() * .5]} - }, - o, - MOTION, - 0.3, - 'easeIn', - after); - }).defer(100); - }); - }); - return me; - }, - - /** - * Highlights the Element by setting a color (applies to the background-color by default, but can be - * changed using the "attr" config option) and then fading back to the original color. If no original - * color is available, you should provide the "endColor" config option which will be cleared after the animation. - * Usage: -
      
      -// default: highlight background to yellow
      -el.highlight();
      -
      -// custom: highlight foreground text to blue for 2 seconds
      -el.highlight("0000ff", { attr: 'color', duration: 2 });
      -
      -// common config options shown with default values
      -el.highlight("ffff9c", {
      -    attr: "background-color", //can be any valid CSS property (attribute) that supports a color value
      -    endColor: (current color) or "ffffff",
      -    easing: 'easeIn',
      -    duration: 1
      -});
      -
      - * @param {String} color (optional) The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c') - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - highlight : function(color, o){ - o = getObject(o); - var me = this, - dom = me.dom, - attr = o.attr || "backgroundColor", - a = {}, - restore; - - me.queueFx(o, function(){ - fly(dom).clearOpacity(); - fly(dom).show(); - - function after(){ - dom.style[attr] = restore; - fly(dom).afterFx(o); - } - restore = dom.style[attr]; - a[attr] = {from: color || "ffff9c", to: o.endColor || fly(dom).getColor(attr) || "ffffff"}; - arguments.callee.anim = fly(dom).fxanim(a, - o, - 'color', - 1, - 'easeIn', - after); - }); - return me; - }, - - /** - * Shows a ripple of exploding, attenuating borders to draw attention to an Element. - * Usage: -
      
      -// default: a single light blue ripple
      -el.frame();
      -
      -// custom: 3 red ripples lasting 3 seconds total
      -el.frame("ff0000", 3, { duration: 3 });
      -
      -// common config options shown with default values
      -el.frame("C3DAF9", 1, {
      -    duration: 1 //duration of each individual ripple.
      -    // Note: Easing is not configurable and will be ignored if included
      -});
      -
      - * @param {String} color (optional) The color of the border. Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9'). - * @param {Number} count (optional) The number of ripples to display (defaults to 1) - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - frame : function(color, count, o){ - o = getObject(o); - var me = this, - dom = me.dom, - proxy, - active; - - me.queueFx(o, function(){ - color = color || '#C3DAF9'; - if(color.length == 6){ - color = '#' + color; - } - count = count || 1; - fly(dom).show(); - - var xy = fly(dom).getXY(), - b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight}, - queue = function(){ - proxy = fly(document.body || document.documentElement).createChild({ - style:{ - position : ABSOLUTE, - 'z-index': 35000, // yee haw - border : '0px solid ' + color - } - }); - return proxy.queueFx({}, animFn); - }; - - - arguments.callee.anim = { - isAnimated: true, - stop: function() { - count = 0; - proxy.stopFx(); - } - }; - - function animFn(){ - var scale = Ext.isBorderBox ? 2 : 1; - active = proxy.anim({ - top : {from : b.y, to : b.y - 20}, - left : {from : b.x, to : b.x - 20}, - borderWidth : {from : 0, to : 10}, - opacity : {from : 1, to : 0}, - height : {from : b.height, to : b.height + 20 * scale}, - width : {from : b.width, to : b.width + 20 * scale} - },{ - duration: o.duration || 1, - callback: function() { - proxy.remove(); - --count > 0 ? queue() : fly(dom).afterFx(o); - } - }); - arguments.callee.anim = { - isAnimated: true, - stop: function(){ - active.stop(); - } - }; - }; - queue(); - }); - return me; - }, - - /** - * Creates a pause before any subsequent queued effects begin. If there are - * no effects queued after the pause it will have no effect. - * Usage: -
      
      -el.pause(1);
      -
      - * @param {Number} seconds The length of time to pause (in seconds) - * @return {Ext.Element} The Element - */ - pause : function(seconds){ - var dom = this.dom, - t; - - this.queueFx({}, function(){ - t = setTimeout(function(){ - fly(dom).afterFx({}); - }, seconds * 1000); - arguments.callee.anim = { - isAnimated: true, - stop: function(){ - clearTimeout(t); - fly(dom).afterFx({}); - } - }; - }); - return this; - }, - - /** - * Fade an element in (from transparent to opaque). The ending opacity can be specified - * using the {@link #endOpacity} config option. - * Usage: -
      
      -// default: fade in from opacity 0 to 100%
      -el.fadeIn();
      -
      -// custom: fade in from opacity 0 to 75% over 2 seconds
      -el.fadeIn({ endOpacity: .75, duration: 2});
      -
      -// common config options shown with default values
      -el.fadeIn({
      -    endOpacity: 1, //can be any value between 0 and 1 (e.g. .5)
      -    easing: 'easeOut',
      -    duration: .5
      -});
      -
      - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - fadeIn : function(o){ - o = getObject(o); - var me = this, - dom = me.dom, - to = o.endOpacity || 1; - - me.queueFx(o, function(){ - fly(dom).setOpacity(0); - fly(dom).fixDisplay(); - dom.style.visibility = VISIBLE; - arguments.callee.anim = fly(dom).fxanim({opacity:{to:to}}, - o, NULL, .5, EASEOUT, function(){ - if(to == 1){ - fly(dom).clearOpacity(); - } - fly(dom).afterFx(o); - }); - }); - return me; - }, - - /** - * Fade an element out (from opaque to transparent). The ending opacity can be specified - * using the {@link #endOpacity} config option. Note that IE may require - * {@link #useDisplay}:true in order to redisplay correctly. - * Usage: -
      
      -// default: fade out from the element's current opacity to 0
      -el.fadeOut();
      -
      -// custom: fade out from the element's current opacity to 25% over 2 seconds
      -el.fadeOut({ endOpacity: .25, duration: 2});
      -
      -// common config options shown with default values
      -el.fadeOut({
      -    endOpacity: 0, //can be any value between 0 and 1 (e.g. .5)
      -    easing: 'easeOut',
      -    duration: .5,
      -    remove: false,
      -    useDisplay: false
      -});
      -
      - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - fadeOut : function(o){ - o = getObject(o); - var me = this, - dom = me.dom, - style = dom.style, - to = o.endOpacity || 0; - - me.queueFx(o, function(){ - arguments.callee.anim = fly(dom).fxanim({ - opacity : {to : to}}, - o, - NULL, - .5, - EASEOUT, - function(){ - if(to == 0){ - Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ? - style.display = "none" : - style.visibility = HIDDEN; - - fly(dom).clearOpacity(); - } - fly(dom).afterFx(o); - }); - }); - return me; - }, - - /** - * Animates the transition of an element's dimensions from a starting height/width - * to an ending height/width. This method is a convenience implementation of {@link shift}. - * Usage: -
      
      -// change height and width to 100x100 pixels
      -el.scale(100, 100);
      -
      -// common config options shown with default values.  The height and width will default to
      -// the element's existing values if passed as null.
      -el.scale(
      -    [element's width],
      -    [element's height], {
      -        easing: 'easeOut',
      -        duration: .35
      -    }
      -);
      -
      - * @param {Number} width The new width (pass undefined to keep the original width) - * @param {Number} height The new height (pass undefined to keep the original height) - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - scale : function(w, h, o){ - this.shift(Ext.apply({}, o, { - width: w, - height: h - })); - return this; - }, - - /** - * Animates the transition of any combination of an element's dimensions, xy position and/or opacity. - * Any of these properties not specified in the config object will not be changed. This effect - * requires that at least one new dimension, position or opacity setting must be passed in on - * the config object in order for the function to have any effect. - * Usage: -
      
      -// slide the element horizontally to x position 200 while changing the height and opacity
      -el.shift({ x: 200, height: 50, opacity: .8 });
      -
      -// common config options shown with default values.
      -el.shift({
      -    width: [element's width],
      -    height: [element's height],
      -    x: [element's x position],
      -    y: [element's y position],
      -    opacity: [element's opacity],
      -    easing: 'easeOut',
      -    duration: .35
      -});
      -
      - * @param {Object} options Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - shift : function(o){ - o = getObject(o); - var dom = this.dom, - a = {}; - - this.queueFx(o, function(){ - for (var prop in o) { - if (o[prop] != UNDEFINED) { - a[prop] = {to : o[prop]}; - } - } - - a.width ? a.width.to = fly(dom).adjustWidth(o.width) : a; - a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a; - - if (a.x || a.y || a.xy) { - a.points = a.xy || - {to : [ a.x ? a.x.to : fly(dom).getX(), - a.y ? a.y.to : fly(dom).getY()]}; - } - - arguments.callee.anim = fly(dom).fxanim(a, - o, - MOTION, - .35, - EASEOUT, - function(){ - fly(dom).afterFx(o); - }); - }); - return this; - }, - - /** - * Slides the element while fading it out of view. An anchor point can be optionally passed to set the - * ending point of the effect. - * Usage: - *
      
      -// default: slide the element downward while fading out
      -el.ghost();
      -
      -// custom: slide the element out to the right with a 2-second duration
      -el.ghost('r', { duration: 2 });
      -
      -// common config options shown with default values
      -el.ghost('b', {
      -    easing: 'easeOut',
      -    duration: .5,
      -    remove: false,
      -    useDisplay: false
      -});
      -
      - * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to bottom: 'b') - * @param {Object} options (optional) Object literal with any of the Fx config options - * @return {Ext.Element} The Element - */ - ghost : function(anchor, o){ - o = getObject(o); - var me = this, - dom = me.dom, - st = dom.style, - a = {opacity: {to: 0}, points: {}}, - pt = a.points, - r, - w, - h; - - anchor = anchor || "b"; - - me.queueFx(o, function(){ - // restore values after effect - r = fly(dom).getFxRestore(); - w = fly(dom).getWidth(); - h = fly(dom).getHeight(); - - function after(){ - o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide(); - fly(dom).clearOpacity(); - fly(dom).setPositioning(r.pos); - st.width = r.width; - st.height = r.height; - fly(dom).afterFx(o); - } - - pt.by = fly(dom).switchStatements(anchor.toLowerCase(), function(v1,v2){ return [v1, v2];}, { - t : [0, -h], - l : [-w, 0], - r : [w, 0], - b : [0, h], - tl : [-w, -h], - bl : [-w, h], - br : [w, h], - tr : [w, -h] - }); - - arguments.callee.anim = fly(dom).fxanim(a, - o, - MOTION, - .5, - EASEOUT, after); - }); - return me; - }, - - /** - * Ensures that all effects queued after syncFx is called on the element are - * run concurrently. This is the opposite of {@link #sequenceFx}. - * @return {Ext.Element} The Element - */ - syncFx : function(){ - var me = this; - me.fxDefaults = Ext.apply(me.fxDefaults || {}, { - block : FALSE, - concurrent : TRUE, - stopFx : FALSE - }); - return me; - }, - - /** - * Ensures that all effects queued after sequenceFx is called on the element are - * run in sequence. This is the opposite of {@link #syncFx}. - * @return {Ext.Element} The Element - */ - sequenceFx : function(){ - var me = this; - me.fxDefaults = Ext.apply(me.fxDefaults || {}, { - block : FALSE, - concurrent : FALSE, - stopFx : FALSE - }); - return me; - }, - - /* @private */ - nextFx : function(){ - var ef = getQueue(this.dom.id)[0]; - if(ef){ - ef.call(this); - } - }, - - /** - * Returns true if the element has any effects actively running or queued, else returns false. - * @return {Boolean} True if element has active effects, else false - */ - hasActiveFx : function(){ - return getQueue(this.dom.id)[0]; - }, - - /** - * Stops any running effects and clears the element's internal effects queue if it contains - * any additional effects that haven't started yet. - * @return {Ext.Element} The Element - */ - stopFx : function(finish){ - var me = this, - id = me.dom.id; - if(me.hasActiveFx()){ - var cur = getQueue(id)[0]; - if(cur && cur.anim){ - if(cur.anim.isAnimated){ - setQueue(id, [cur]); //clear - cur.anim.stop(finish !== undefined ? finish : TRUE); - }else{ - setQueue(id, []); - } - } - } - return me; - }, - - /* @private */ - beforeFx : function(o){ - if(this.hasActiveFx() && !o.concurrent){ - if(o.stopFx){ - this.stopFx(); - return TRUE; - } - return FALSE; - } - return TRUE; - }, - - /** - * Returns true if the element is currently blocking so that no other effect can be queued - * until this effect is finished, else returns false if blocking is not set. This is commonly - * used to ensure that an effect initiated by a user action runs to completion prior to the - * same effect being restarted (e.g., firing only one effect even if the user clicks several times). - * @return {Boolean} True if blocking, else false - */ - hasFxBlock : function(){ - var q = getQueue(this.dom.id); - return q && q[0] && q[0].block; - }, - - /* @private */ - queueFx : function(o, fn){ - var me = fly(this.dom); - if(!me.hasFxBlock()){ - Ext.applyIf(o, me.fxDefaults); - if(!o.concurrent){ - var run = me.beforeFx(o); - fn.block = o.block; - getQueue(me.dom.id).push(fn); - if(run){ - me.nextFx(); - } - }else{ - fn.call(me); - } - } - return me; - }, - - /* @private */ - fxWrap : function(pos, o, vis){ - var dom = this.dom, - wrap, - wrapXY; - if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){ - if(o.fixPosition){ - wrapXY = fly(dom).getXY(); - } - var div = document.createElement("div"); - div.style.visibility = vis; - wrap = dom.parentNode.insertBefore(div, dom); - fly(wrap).setPositioning(pos); - if(fly(wrap).isStyle(POSITION, "static")){ - fly(wrap).position("relative"); - } - fly(dom).clearPositioning('auto'); - fly(wrap).clip(); - wrap.appendChild(dom); - if(wrapXY){ - fly(wrap).setXY(wrapXY); - } - } - return wrap; - }, - - /* @private */ - fxUnwrap : function(wrap, pos, o){ - var dom = this.dom; - fly(dom).clearPositioning(); - fly(dom).setPositioning(pos); - if(!o.wrap){ - var pn = fly(wrap).dom.parentNode; - pn.insertBefore(dom, wrap); - fly(wrap).remove(); - } - }, - - /* @private */ - getFxRestore : function(){ - var st = this.dom.style; - return {pos: this.getPositioning(), width: st.width, height : st.height}; - }, - - /* @private */ - afterFx : function(o){ - var dom = this.dom, - id = dom.id; - if(o.afterStyle){ - fly(dom).setStyle(o.afterStyle); - } - if(o.afterCls){ - fly(dom).addClass(o.afterCls); - } - if(o.remove == TRUE){ - fly(dom).remove(); - } - if(o.callback){ - o.callback.call(o.scope, fly(dom)); - } - if(!o.concurrent){ - getQueue(id).shift(); - fly(dom).nextFx(); - } - }, - - /* @private */ - fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){ - animType = animType || 'run'; - opt = opt || {}; - var anim = Ext.lib.Anim[animType]( - this.dom, - args, - (opt.duration || defaultDur) || .35, - (opt.easing || defaultEase) || EASEOUT, - cb, - this - ); - opt.anim = anim; - return anim; - } -}; - -// backwards compat -Ext.Fx.resize = Ext.Fx.scale; - -//When included, Ext.Fx is automatically applied to Element so that all basic -//effects are available directly via the Element API -Ext.Element.addMethods(Ext.Fx); -})(); -/** - * @class Ext.CompositeElementLite - *

      This class encapsulates a collection of DOM elements, providing methods to filter - * members, or to perform collective actions upon the whole set.

      - *

      Although they are not listed, this class supports all of the methods of {@link Ext.Element} and - * {@link Ext.Fx}. The methods from these classes will be performed on all the elements in this collection.

      - * Example:
      
      -var els = Ext.select("#some-el div.some-class");
      -// or select directly from an existing element
      -var el = Ext.get('some-el');
      -el.select('div.some-class');
      -
      -els.setWidth(100); // all elements become 100 width
      -els.hide(true); // all elements fade out and hide
      -// or
      -els.setWidth(100).hide(true);
      -
      - */
      -Ext.CompositeElementLite = function(els, root){
      -    /**
      -     * 

      The Array of DOM elements which this CompositeElement encapsulates. Read-only.

      - *

      This will not usually be accessed in developers' code, but developers wishing - * to augment the capabilities of the CompositeElementLite class may use it when adding - * methods to the class.

      - *

      For example to add the nextAll method to the class to add all - * following siblings of selected elements, the code would be

      -Ext.override(Ext.CompositeElementLite, {
      -    nextAll: function() {
      -        var els = this.elements, i, l = els.length, n, r = [], ri = -1;
      -
      -//      Loop through all elements in this Composite, accumulating
      -//      an Array of all siblings.
      -        for (i = 0; i < l; i++) {
      -            for (n = els[i].nextSibling; n; n = n.nextSibling) {
      -                r[++ri] = n;
      -            }
      -        }
      -
      -//      Add all found siblings to this Composite
      -        return this.add(r);
      -    }
      -});
      - * @type Array - * @property elements - */ - this.elements = []; - this.add(els, root); - this.el = new Ext.Element.Flyweight(); -}; - -Ext.CompositeElementLite.prototype = { - isComposite: true, - - // private - getElement : function(el){ - // Set the shared flyweight dom property to the current element - var e = this.el; - e.dom = el; - e.id = el.id; - return e; - }, - - // private - transformElement : function(el){ - return Ext.getDom(el); - }, - - /** - * Returns the number of elements in this Composite. - * @return Number - */ - getCount : function(){ - return this.elements.length; - }, - /** - * Adds elements to this Composite object. - * @param {Mixed} els Either an Array of DOM elements to add, or another Composite object who's elements should be added. - * @return {CompositeElement} This Composite object. - */ - add : function(els, root){ - var me = this, - elements = me.elements; - if(!els){ - return this; - } - if(typeof els == "string"){ - els = Ext.Element.selectorFunction(els, root); - }else if(els.isComposite){ - els = els.elements; - }else if(!Ext.isIterable(els)){ - els = [els]; - } - - for(var i = 0, len = els.length; i < len; ++i){ - elements.push(me.transformElement(els[i])); - } - return me; - }, - - invoke : function(fn, args){ - var me = this, - els = me.elements, - len = els.length, - e, - i; - - for(i = 0; i < len; i++) { - e = els[i]; - if(e){ - Ext.Element.prototype[fn].apply(me.getElement(e), args); - } - } - return me; - }, - /** - * Returns a flyweight Element of the dom element object at the specified index - * @param {Number} index - * @return {Ext.Element} - */ - item : function(index){ - var me = this, - el = me.elements[index], - out = null; - - if(el){ - out = me.getElement(el); - } - return out; - }, - - // fixes scope with flyweight - addListener : function(eventName, handler, scope, opt){ - var els = this.elements, - len = els.length, - i, e; - - for(i = 0; iCalls the passed function for each element in this composite.

      - * @param {Function} fn The function to call. The function is passed the following parameters:
        - *
      • el : Element
        The current Element in the iteration. - * This is the flyweight (shared) Ext.Element instance, so if you require a - * a reference to the dom node, use el.dom.
      • - *
      • c : Composite
        This Composite object.
      • - *
      • idx : Number
        The zero-based index in the iteration.
      • - *
      - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. (defaults to the Element) - * @return {CompositeElement} this - */ - each : function(fn, scope){ - var me = this, - els = me.elements, - len = els.length, - i, e; - - for(i = 0; i - *
    • el : Ext.Element
      The current DOM element.
    • - *
    • index : Number
      The current index within the collection.
    • - * - * @return {CompositeElement} this - */ - filter : function(selector){ - var els = [], - me = this, - fn = Ext.isFunction(selector) ? selector - : function(el){ - return el.is(selector); - }; - - me.each(function(el, self, i) { - if (fn(el, i) !== false) { - els[els.length] = me.transformElement(el); - } - }); - - me.elements = els; - return me; - }, - - /** - * Find the index of the passed element within the composite collection. - * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection. - * @return Number The index of the passed Ext.Element in the composite collection, or -1 if not found. - */ - indexOf : function(el){ - return this.elements.indexOf(this.transformElement(el)); - }, - - /** - * Replaces the specified element with the passed element. - * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite - * to replace. - * @param {Mixed} replacement The id of an element or the Element itself. - * @param {Boolean} domReplace (Optional) True to remove and replace the element in the document too. - * @return {CompositeElement} this - */ - replaceElement : function(el, replacement, domReplace){ - var index = !isNaN(el) ? el : this.indexOf(el), - d; - if(index > -1){ - replacement = Ext.getDom(replacement); - if(domReplace){ - d = this.elements[index]; - d.parentNode.insertBefore(replacement, d); - Ext.removeNode(d); - } - this.elements.splice(index, 1, replacement); - } - return this; - }, - - /** - * Removes all elements. - */ - clear : function(){ - this.elements = []; - } -}; - -Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener; - -/** - * @private - * Copies all of the functions from Ext.Element's prototype onto CompositeElementLite's prototype. - * This is called twice - once immediately below, and once again after additional Ext.Element - * are added in Ext JS - */ -Ext.CompositeElementLite.importElementMethods = function() { - var fnName, - ElProto = Ext.Element.prototype, - CelProto = Ext.CompositeElementLite.prototype; - - for (fnName in ElProto) { - if (typeof ElProto[fnName] == 'function'){ - (function(fnName) { - CelProto[fnName] = CelProto[fnName] || function() { - return this.invoke(fnName, arguments); - }; - }).call(CelProto, fnName); - - } - } -}; - -Ext.CompositeElementLite.importElementMethods(); - -if(Ext.DomQuery){ - Ext.Element.selectorFunction = Ext.DomQuery.select; -} - -/** - * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods - * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or - * {@link Ext.CompositeElementLite CompositeElementLite} object. - * @param {String/Array} selector The CSS selector or an array of elements - * @param {HTMLElement/String} root (optional) The root element of the query or id of the root - * @return {CompositeElementLite/CompositeElement} - * @member Ext.Element - * @method select - */ -Ext.Element.select = function(selector, root){ - var els; - if(typeof selector == "string"){ - els = Ext.Element.selectorFunction(selector, root); - }else if(selector.length !== undefined){ - els = selector; - }else{ - throw "Invalid selector"; - } - return new Ext.CompositeElementLite(els); -}; -/** - * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods - * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or - * {@link Ext.CompositeElementLite CompositeElementLite} object. - * @param {String/Array} selector The CSS selector or an array of elements - * @param {HTMLElement/String} root (optional) The root element of the query or id of the root - * @return {CompositeElementLite/CompositeElement} - * @member Ext - * @method select - */ -Ext.select = Ext.Element.select; -(function(){ - var BEFOREREQUEST = "beforerequest", - REQUESTCOMPLETE = "requestcomplete", - REQUESTEXCEPTION = "requestexception", - UNDEFINED = undefined, - LOAD = 'load', - POST = 'POST', - GET = 'GET', - WINDOW = window; - - /** - * @class Ext.data.Connection - * @extends Ext.util.Observable - *

      The class encapsulates a connection to the page's originating domain, allowing requests to be made - * either to a configured URL, or to a URL specified at request time.

      - *

      Requests made by this class are asynchronous, and will return immediately. No data from - * the server will be available to the statement immediately following the {@link #request} call. - * To process returned data, use a - * success callback - * in the request options object, - * or an {@link #requestcomplete event listener}.

      - *

      File Uploads

      File uploads are not performed using normal "Ajax" techniques, that - * is they are not performed using XMLHttpRequests. Instead the form is submitted in the standard - * manner with the DOM <form> element temporarily modified to have its - * target set to refer - * to a dynamically generated, hidden <iframe> which is inserted into the document - * but removed after the return data has been gathered.

      - *

      The server response is parsed by the browser to create the document for the IFRAME. If the - * server is using JSON to send the return object, then the - * Content-Type header - * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.

      - *

      Characters which are significant to an HTML parser must be sent as HTML entities, so encode - * "<" as "&lt;", "&" as "&amp;" etc.

      - *

      The response text is retrieved from the document, and a fake XMLHttpRequest object - * is created containing a responseText property in order to conform to the - * requirements of event handlers and callbacks.

      - *

      Be aware that file upload packets are sent with the content type multipart/form - * and some server technologies (notably JEE) may require some custom processing in order to - * retrieve parameter names and parameter values from the packet content.

      - *

      Also note that it's not possible to check the response code of the hidden iframe, so the success handler will ALWAYS fire.

      - * @constructor - * @param {Object} config a configuration object. - */ - Ext.data.Connection = function(config){ - Ext.apply(this, config); - this.addEvents( - /** - * @event beforerequest - * Fires before a network request is made to retrieve a data object. - * @param {Connection} conn This Connection object. - * @param {Object} options The options config object passed to the {@link #request} method. - */ - BEFOREREQUEST, - /** - * @event requestcomplete - * Fires if the request was successfully completed. - * @param {Connection} conn This Connection object. - * @param {Object} response The XHR object containing the response data. - * See The XMLHttpRequest Object - * for details. - * @param {Object} options The options config object passed to the {@link #request} method. - */ - REQUESTCOMPLETE, - /** - * @event requestexception - * Fires if an error HTTP status was returned from the server. - * See HTTP Status Code Definitions - * for details of HTTP status codes. - * @param {Connection} conn This Connection object. - * @param {Object} response The XHR object containing the response data. - * See The XMLHttpRequest Object - * for details. - * @param {Object} options The options config object passed to the {@link #request} method. - */ - REQUESTEXCEPTION - ); - Ext.data.Connection.superclass.constructor.call(this); - }; - - Ext.extend(Ext.data.Connection, Ext.util.Observable, { - /** - * @cfg {String} url (Optional)

      The default URL to be used for requests to the server. Defaults to undefined.

      - *

      The url config may be a function which returns the URL to use for the Ajax request. The scope - * (this reference) of the function is the scope option passed to the {@link #request} method.

      - */ - /** - * @cfg {Object} extraParams (Optional) An object containing properties which are used as - * extra parameters to each request made by this object. (defaults to undefined) - */ - /** - * @cfg {Object} defaultHeaders (Optional) An object containing request headers which are added - * to each request made by this object. (defaults to undefined) - */ - /** - * @cfg {String} method (Optional) The default HTTP method to be used for requests. - * (defaults to undefined; if not set, but {@link #request} params are present, POST will be used; - * otherwise, GET will be used.) - */ - /** - * @cfg {Number} timeout (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000) - */ - timeout : 30000, - /** - * @cfg {Boolean} autoAbort (Optional) Whether this request should abort any pending requests. (defaults to false) - * @type Boolean - */ - autoAbort:false, - - /** - * @cfg {Boolean} disableCaching (Optional) True to add a unique cache-buster param to GET requests. (defaults to true) - * @type Boolean - */ - disableCaching: true, - - /** - * @cfg {String} disableCachingParam (Optional) Change the parameter which is sent went disabling caching - * through a cache buster. Defaults to '_dc' - * @type String - */ - disableCachingParam: '_dc', - - /** - *

      Sends an HTTP request to a remote server.

      - *

      Important: Ajax server requests are asynchronous, and this call will - * return before the response has been received. Process any returned data - * in a callback function.

      - *
      
      -Ext.Ajax.request({
      -   url: 'ajax_demo/sample.json',
      -   success: function(response, opts) {
      -      var obj = Ext.decode(response.responseText);
      -      console.dir(obj);
      -   },
      -   failure: function(response, opts) {
      -      console.log('server-side failure with status code ' + response.status);
      -   }
      -});
      -         * 
      - *

      To execute a callback function in the correct scope, use the scope option.

      - * @param {Object} options An object which may contain the following properties:
        - *
      • url : String/Function (Optional)
        The URL to - * which to send the request, or a function to call which returns a URL string. The scope of the - * function is specified by the scope option. Defaults to the configured - * {@link #url}.
      • - *
      • params : Object/String/Function (Optional)
        - * An object containing properties which are used as parameters to the - * request, a url encoded string or a function to call to get either. The scope of the function - * is specified by the scope option.
      • - *
      • method : String (Optional)
        The HTTP method to use - * for the request. Defaults to the configured method, or if no method was configured, - * "GET" if no parameters are being sent, and "POST" if parameters are being sent. Note that - * the method name is case-sensitive and should be all caps.
      • - *
      • callback : Function (Optional)
        The - * function to be called upon receipt of the HTTP response. The callback is - * called regardless of success or failure and is passed the following - * parameters:
          - *
        • options : Object
          The parameter to the request call.
        • - *
        • success : Boolean
          True if the request succeeded.
        • - *
        • response : Object
          The XMLHttpRequest object containing the response data. - * See http://www.w3.org/TR/XMLHttpRequest/ for details about - * accessing elements of the response.
        • - *
      • - *
      • success : Function (Optional)
        The function - * to be called upon success of the request. The callback is passed the following - * parameters:
          - *
        • response : Object
          The XMLHttpRequest object containing the response data.
        • - *
        • options : Object
          The parameter to the request call.
        • - *
      • - *
      • failure : Function (Optional)
        The function - * to be called upon failure of the request. The callback is passed the - * following parameters:
          - *
        • response : Object
          The XMLHttpRequest object containing the response data.
        • - *
        • options : Object
          The parameter to the request call.
        • - *
      • - *
      • scope : Object (Optional)
        The scope in - * which to execute the callbacks: The "this" object for the callback function. If the url, or params options were - * specified as functions from which to draw values, then this also serves as the scope for those function calls. - * Defaults to the browser window.
      • - *
      • timeout : Number (Optional)
        The timeout in milliseconds to be used for this request. Defaults to 30 seconds.
      • - *
      • form : Element/HTMLElement/String (Optional)
        The <form> - * Element or the id of the <form> to pull parameters from.
      • - *
      • isUpload : Boolean (Optional)
        Only meaningful when used - * with the form option. - *

        True if the form object is a file upload (will be set automatically if the form was - * configured with enctype "multipart/form-data").

        - *

        File uploads are not performed using normal "Ajax" techniques, that is they are not - * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the - * DOM <form> element temporarily modified to have its - * target set to refer - * to a dynamically generated, hidden <iframe> which is inserted into the document - * but removed after the return data has been gathered.

        - *

        The server response is parsed by the browser to create the document for the IFRAME. If the - * server is using JSON to send the return object, then the - * Content-Type header - * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.

        - *

        The response text is retrieved from the document, and a fake XMLHttpRequest object - * is created containing a responseText property in order to conform to the - * requirements of event handlers and callbacks.

        - *

        Be aware that file upload packets are sent with the content type multipart/form - * and some server technologies (notably JEE) may require some custom processing in order to - * retrieve parameter names and parameter values from the packet content.

        - *
      • - *
      • headers : Object (Optional)
        Request - * headers to set for the request.
      • - *
      • xmlData : Object (Optional)
        XML document - * to use for the post. Note: This will be used instead of params for the post - * data. Any params will be appended to the URL.
      • - *
      • jsonData : Object/String (Optional)
        JSON - * data to use as the post. Note: This will be used instead of params for the post - * data. Any params will be appended to the URL.
      • - *
      • disableCaching : Boolean (Optional)
        True - * to add a unique cache-buster param to GET requests.
      • - *

      - *

      The options object may also contain any other property which might be needed to perform - * postprocessing in a callback because it is passed to callback functions.

      - * @return {Number} transactionId The id of the server transaction. This may be used - * to cancel the request. - */ - request : function(o){ - var me = this; - if(me.fireEvent(BEFOREREQUEST, me, o)){ - if (o.el) { - if(!Ext.isEmpty(o.indicatorText)){ - me.indicatorText = '
      '+o.indicatorText+"
      "; - } - if(me.indicatorText) { - Ext.getDom(o.el).innerHTML = me.indicatorText; - } - o.success = (Ext.isFunction(o.success) ? o.success : function(){}).createInterceptor(function(response) { - Ext.getDom(o.el).innerHTML = response.responseText; - }); - } - - var p = o.params, - url = o.url || me.url, - method, - cb = {success: me.handleResponse, - failure: me.handleFailure, - scope: me, - argument: {options: o}, - timeout : Ext.num(o.timeout, me.timeout) - }, - form, - serForm; - - - if (Ext.isFunction(p)) { - p = p.call(o.scope||WINDOW, o); - } - - p = Ext.urlEncode(me.extraParams, Ext.isObject(p) ? Ext.urlEncode(p) : p); - - if (Ext.isFunction(url)) { - url = url.call(o.scope || WINDOW, o); - } - - if((form = Ext.getDom(o.form))){ - url = url || form.action; - if(o.isUpload || (/multipart\/form-data/i.test(form.getAttribute("enctype")))) { - return me.doFormUpload.call(me, o, p, url); - } - serForm = Ext.lib.Ajax.serializeForm(form); - p = p ? (p + '&' + serForm) : serForm; - } - - method = o.method || me.method || ((p || o.xmlData || o.jsonData) ? POST : GET); - - if(method === GET && (me.disableCaching && o.disableCaching !== false) || o.disableCaching === true){ - var dcp = o.disableCachingParam || me.disableCachingParam; - url = Ext.urlAppend(url, dcp + '=' + (new Date().getTime())); - } - - o.headers = Ext.applyIf(o.headers || {}, me.defaultHeaders || {}); - - if(o.autoAbort === true || me.autoAbort) { - me.abort(); - } - - if((method == GET || o.xmlData || o.jsonData) && p){ - url = Ext.urlAppend(url, p); - p = ''; - } - return (me.transId = Ext.lib.Ajax.request(method, url, cb, p, o)); - }else{ - return o.callback ? o.callback.apply(o.scope, [o,UNDEFINED,UNDEFINED]) : null; - } - }, - - /** - * Determine whether this object has a request outstanding. - * @param {Number} transactionId (Optional) defaults to the last transaction - * @return {Boolean} True if there is an outstanding request. - */ - isLoading : function(transId){ - return transId ? Ext.lib.Ajax.isCallInProgress(transId) : !! this.transId; - }, - - /** - * Aborts any outstanding request. - * @param {Number} transactionId (Optional) defaults to the last transaction - */ - abort : function(transId){ - if(transId || this.isLoading()){ - Ext.lib.Ajax.abort(transId || this.transId); - } - }, - - // private - handleResponse : function(response){ - this.transId = false; - var options = response.argument.options; - response.argument = options ? options.argument : null; - this.fireEvent(REQUESTCOMPLETE, this, response, options); - if(options.success){ - options.success.call(options.scope, response, options); - } - if(options.callback){ - options.callback.call(options.scope, options, true, response); - } - }, - - // private - handleFailure : function(response, e){ - this.transId = false; - var options = response.argument.options; - response.argument = options ? options.argument : null; - this.fireEvent(REQUESTEXCEPTION, this, response, options, e); - if(options.failure){ - options.failure.call(options.scope, response, options); - } - if(options.callback){ - options.callback.call(options.scope, options, false, response); - } - }, - - // private - doFormUpload : function(o, ps, url){ - var id = Ext.id(), - doc = document, - frame = doc.createElement('iframe'), - form = Ext.getDom(o.form), - hiddens = [], - hd, - encoding = 'multipart/form-data', - buf = { - target: form.target, - method: form.method, - encoding: form.encoding, - enctype: form.enctype, - action: form.action - }; - - /* - * Originally this behaviour was modified for Opera 10 to apply the secure URL after - * the frame had been added to the document. It seems this has since been corrected in - * Opera so the behaviour has been reverted, the URL will be set before being added. - */ - Ext.fly(frame).set({ - id: id, - name: id, - cls: 'x-hidden', - src: Ext.SSL_SECURE_URL - }); - - doc.body.appendChild(frame); - - // This is required so that IE doesn't pop the response up in a new window. - if(Ext.isIE){ - document.frames[id].name = id; - } - - - Ext.fly(form).set({ - target: id, - method: POST, - enctype: encoding, - encoding: encoding, - action: url || buf.action - }); - - // add dynamic params - Ext.iterate(Ext.urlDecode(ps, false), function(k, v){ - hd = doc.createElement('input'); - Ext.fly(hd).set({ - type: 'hidden', - value: v, - name: k - }); - form.appendChild(hd); - hiddens.push(hd); - }); - - function cb(){ - var me = this, - // bogus response object - r = {responseText : '', - responseXML : null, - argument : o.argument}, - doc, - firstChild; - - try{ - doc = frame.contentWindow.document || frame.contentDocument || WINDOW.frames[id].document; - if(doc){ - if(doc.body){ - if(/textarea/i.test((firstChild = doc.body.firstChild || {}).tagName)){ // json response wrapped in textarea - r.responseText = firstChild.value; - }else{ - r.responseText = doc.body.innerHTML; - } - } - //in IE the document may still have a body even if returns XML. - r.responseXML = doc.XMLDocument || doc; - } - } - catch(e) {} - - Ext.EventManager.removeListener(frame, LOAD, cb, me); - - me.fireEvent(REQUESTCOMPLETE, me, r, o); - - function runCallback(fn, scope, args){ - if(Ext.isFunction(fn)){ - fn.apply(scope, args); - } - } - - runCallback(o.success, o.scope, [r, o]); - runCallback(o.callback, o.scope, [o, true, r]); - - if(!me.debugUploads){ - setTimeout(function(){Ext.removeNode(frame);}, 100); - } - } - - Ext.EventManager.on(frame, LOAD, cb, this); - form.submit(); - - Ext.fly(form).set(buf); - Ext.each(hiddens, function(h) { - Ext.removeNode(h); - }); - } - }); -})(); - -/** - * @class Ext.Ajax - * @extends Ext.data.Connection - *

      The global Ajax request class that provides a simple way to make Ajax requests - * with maximum flexibility.

      - *

      Since Ext.Ajax is a singleton, you can set common properties/events for it once - * and override them at the request function level only if necessary.

      - *

      Common Properties you may want to set are:

        - *
      • {@link #method}

      • - *
      • {@link #extraParams}

      • - *
      • {@link #url}

      • - *
      - *
      
      -// Default headers to pass in every request
      -Ext.Ajax.defaultHeaders = {
      -    'Powered-By': 'Ext'
      -};
      - * 
      - *

      - *

      Common Events you may want to set are:

        - *
      • {@link Ext.data.Connection#beforerequest beforerequest}

      • - *
      • {@link Ext.data.Connection#requestcomplete requestcomplete}

      • - *
      • {@link Ext.data.Connection#requestexception requestexception}

      • - *
      - *
      
      -// Example: show a spinner during all Ajax requests
      -Ext.Ajax.on('beforerequest', this.showSpinner, this);
      -Ext.Ajax.on('requestcomplete', this.hideSpinner, this);
      -Ext.Ajax.on('requestexception', this.hideSpinner, this);
      - * 
      - *

      - *

      An example request:

      - *
      
      -// Basic request
      -Ext.Ajax.{@link Ext.data.Connection#request request}({
      -   url: 'foo.php',
      -   success: someFn,
      -   failure: otherFn,
      -   headers: {
      -       'my-header': 'foo'
      -   },
      -   params: { foo: 'bar' }
      -});
      -
      -// Simple ajax form submission
      -Ext.Ajax.{@link Ext.data.Connection#request request}({
      -    form: 'some-form',
      -    params: 'foo=bar'
      -});
      - * 
      - *

      - * @singleton - */ -Ext.Ajax = new Ext.data.Connection({ - /** - * @cfg {String} url @hide - */ - /** - * @cfg {Object} extraParams @hide - */ - /** - * @cfg {Object} defaultHeaders @hide - */ - /** - * @cfg {String} method (Optional) @hide - */ - /** - * @cfg {Number} timeout (Optional) @hide - */ - /** - * @cfg {Boolean} autoAbort (Optional) @hide - */ - - /** - * @cfg {Boolean} disableCaching (Optional) @hide - */ - - /** - * @property disableCaching - * True to add a unique cache-buster param to GET requests. (defaults to true) - * @type Boolean - */ - /** - * @property url - * The default URL to be used for requests to the server. (defaults to undefined) - * If the server receives all requests through one URL, setting this once is easier than - * entering it on every request. - * @type String - */ - /** - * @property extraParams - * An object containing properties which are used as extra parameters to each request made - * by this object (defaults to undefined). Session information and other data that you need - * to pass with each request are commonly put here. - * @type Object - */ - /** - * @property defaultHeaders - * An object containing request headers which are added to each request made by this object - * (defaults to undefined). - * @type Object - */ - /** - * @property method - * The default HTTP method to be used for requests. Note that this is case-sensitive and - * should be all caps (defaults to undefined; if not set but params are present will use - * "POST", otherwise will use "GET".) - * @type String - */ - /** - * @property timeout - * The timeout in milliseconds to be used for requests. (defaults to 30000) - * @type Number - */ - - /** - * @property autoAbort - * Whether a new request should abort any pending requests. (defaults to false) - * @type Boolean - */ - autoAbort : false, - - /** - * Serialize the passed form into a url encoded string - * @param {String/HTMLElement} form - * @return {String} - */ - serializeForm : function(form){ - return Ext.lib.Ajax.serializeForm(form); - } -}); -/** - * @class Ext.util.JSON - * Modified version of Douglas Crockford"s json.js that doesn"t - * mess with the Object prototype - * http://www.json.org/js.html - * @singleton - */ -Ext.util.JSON = new (function(){ - var useHasOwn = !!{}.hasOwnProperty, - isNative = function() { - var useNative = null; - - return function() { - if (useNative === null) { - useNative = Ext.USE_NATIVE_JSON && window.JSON && JSON.toString() == '[object JSON]'; - } - - return useNative; - }; - }(), - pad = function(n) { - return n < 10 ? "0" + n : n; - }, - doDecode = function(json){ - return json ? eval("(" + json + ")") : ""; - }, - doEncode = function(o){ - if(!Ext.isDefined(o) || o === null){ - return "null"; - }else if(Ext.isArray(o)){ - return encodeArray(o); - }else if(Ext.isDate(o)){ - return Ext.util.JSON.encodeDate(o); - }else if(Ext.isString(o)){ - return encodeString(o); - }else if(typeof o == "number"){ - //don't use isNumber here, since finite checks happen inside isNumber - return isFinite(o) ? String(o) : "null"; - }else if(Ext.isBoolean(o)){ - return String(o); - }else { - var a = ["{"], b, i, v; - for (i in o) { - // don't encode DOM objects - if(!o.getElementsByTagName){ - if(!useHasOwn || o.hasOwnProperty(i)) { - v = o[i]; - switch (typeof v) { - case "undefined": - case "function": - case "unknown": - break; - default: - if(b){ - a.push(','); - } - a.push(doEncode(i), ":", - v === null ? "null" : doEncode(v)); - b = true; - } - } - } - } - a.push("}"); - return a.join(""); - } - }, - m = { - "\b": '\\b', - "\t": '\\t', - "\n": '\\n', - "\f": '\\f', - "\r": '\\r', - '"' : '\\"', - "\\": '\\\\' - }, - encodeString = function(s){ - if (/["\\\x00-\x1f]/.test(s)) { - return '"' + s.replace(/([\x00-\x1f\\"])/g, function(a, b) { - var c = m[b]; - if(c){ - return c; - } - c = b.charCodeAt(); - return "\\u00" + - Math.floor(c / 16).toString(16) + - (c % 16).toString(16); - }) + '"'; - } - return '"' + s + '"'; - }, - encodeArray = function(o){ - var a = ["["], b, i, l = o.length, v; - for (i = 0; i < l; i += 1) { - v = o[i]; - switch (typeof v) { - case "undefined": - case "function": - case "unknown": - break; - default: - if (b) { - a.push(','); - } - a.push(v === null ? "null" : Ext.util.JSON.encode(v)); - b = true; - } - } - a.push("]"); - return a.join(""); - }; - - /** - *

      Encodes a Date. This returns the actual string which is inserted into the JSON string as the literal expression. - * The returned value includes enclosing double quotation marks.

      - *

      The default return format is "yyyy-mm-ddThh:mm:ss".

      - *

      To override this:

      
      -Ext.util.JSON.encodeDate = function(d) {
      -    return d.format('"Y-m-d"');
      -};
      -
      - * @param {Date} d The Date to encode - * @return {String} The string literal to use in a JSON string. - */ - this.encodeDate = function(o){ - return '"' + o.getFullYear() + "-" + - pad(o.getMonth() + 1) + "-" + - pad(o.getDate()) + "T" + - pad(o.getHours()) + ":" + - pad(o.getMinutes()) + ":" + - pad(o.getSeconds()) + '"'; - }; - - /** - * Encodes an Object, Array or other value - * @param {Mixed} o The variable to encode - * @return {String} The JSON string - */ - this.encode = function() { - var ec; - return function(o) { - if (!ec) { - // setup encoding function on first access - ec = isNative() ? JSON.stringify : doEncode; - } - return ec(o); - }; - }(); - - - /** - * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set. - * @param {String} json The JSON string - * @return {Object} The resulting object - */ - this.decode = function() { - var dc; - return function(json) { - if (!dc) { - // setup decoding function on first access - dc = isNative() ? JSON.parse : doDecode; - } - return dc(json); - }; - }(); - -})(); -/** - * Shorthand for {@link Ext.util.JSON#encode} - * @param {Mixed} o The variable to encode - * @return {String} The JSON string - * @member Ext - * @method encode - */ -Ext.encode = Ext.util.JSON.encode; -/** - * Shorthand for {@link Ext.util.JSON#decode} - * @param {String} json The JSON string - * @param {Boolean} safe (optional) Whether to return null or throw an exception if the JSON is invalid. - * @return {Object} The resulting object - * @member Ext - * @method decode - */ -Ext.decode = Ext.util.JSON.decode; -/** - * @class Ext.EventManager - * Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides - * several useful events directly. - * See {@link Ext.EventObject} for more details on normalized event objects. - * @singleton - */ -Ext.EventManager = function(){ - var docReadyEvent, - docReadyProcId, - docReadyState = false, - DETECT_NATIVE = Ext.isGecko || Ext.isWebKit || Ext.isSafari, - E = Ext.lib.Event, - D = Ext.lib.Dom, - DOC = document, - WINDOW = window, - DOMCONTENTLOADED = "DOMContentLoaded", - COMPLETE = 'complete', - propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, - /* - * This cache is used to hold special js objects, the document and window, that don't have an id. We need to keep - * a reference to them so we can look them up at a later point. - */ - specialElCache = []; - - function getId(el){ - var id = false, - i = 0, - len = specialElCache.length, - skip = false, - o; - - if (el) { - if (el.getElementById || el.navigator) { - // look up the id - for(; i < len; ++i){ - o = specialElCache[i]; - if(o.el === el){ - id = o.id; - break; - } - } - if(!id){ - // for browsers that support it, ensure that give the el the same id - id = Ext.id(el); - specialElCache.push({ - id: id, - el: el - }); - skip = true; - } - }else{ - id = Ext.id(el); - } - if(!Ext.elCache[id]){ - Ext.Element.addToCache(new Ext.Element(el), id); - if(skip){ - Ext.elCache[id].skipGC = true; - } - } - } - return id; - } - - /// There is some jquery work around stuff here that isn't needed in Ext Core. - function addListener(el, ename, fn, task, wrap, scope){ - el = Ext.getDom(el); - var id = getId(el), - es = Ext.elCache[id].events, - wfn; - - wfn = E.on(el, ename, wrap); - es[ename] = es[ename] || []; - - /* 0 = Original Function, - 1 = Event Manager Wrapped Function, - 2 = Scope, - 3 = Adapter Wrapped Function, - 4 = Buffered Task - */ - es[ename].push([fn, wrap, scope, wfn, task]); - - // this is a workaround for jQuery and should somehow be removed from Ext Core in the future - // without breaking ExtJS. - - // workaround for jQuery - if(el.addEventListener && ename == "mousewheel"){ - var args = ["DOMMouseScroll", wrap, false]; - el.addEventListener.apply(el, args); - Ext.EventManager.addListener(WINDOW, 'unload', function(){ - el.removeEventListener.apply(el, args); - }); - } - - // fix stopped mousedowns on the document - if(el == DOC && ename == "mousedown"){ - Ext.EventManager.stoppedMouseDownEvent.addListener(wrap); - } - } - - function doScrollChk(){ - /* Notes: - 'doScroll' will NOT work in a IFRAME/FRAMESET. - The method succeeds but, a DOM query done immediately after -- FAILS. - */ - if(window != top){ - return false; - } - - try{ - DOC.documentElement.doScroll('left'); - }catch(e){ - return false; - } - - fireDocReady(); - return true; - } - /** - * @return {Boolean} True if the document is in a 'complete' state (or was determined to - * be true by other means). If false, the state is evaluated again until canceled. - */ - function checkReadyState(e){ - - if(Ext.isIE && doScrollChk()){ - return true; - } - if(DOC.readyState == COMPLETE){ - fireDocReady(); - return true; - } - docReadyState || (docReadyProcId = setTimeout(arguments.callee, 2)); - return false; - } - - var styles; - function checkStyleSheets(e){ - styles || (styles = Ext.query('style, link[rel=stylesheet]')); - if(styles.length == DOC.styleSheets.length){ - fireDocReady(); - return true; - } - docReadyState || (docReadyProcId = setTimeout(arguments.callee, 2)); - return false; - } - - function OperaDOMContentLoaded(e){ - DOC.removeEventListener(DOMCONTENTLOADED, arguments.callee, false); - checkStyleSheets(); - } - - function fireDocReady(e){ - if(!docReadyState){ - docReadyState = true; //only attempt listener removal once - - if(docReadyProcId){ - clearTimeout(docReadyProcId); - } - if(DETECT_NATIVE) { - DOC.removeEventListener(DOMCONTENTLOADED, fireDocReady, false); - } - if(Ext.isIE && checkReadyState.bindIE){ //was this was actually set ?? - DOC.detachEvent('onreadystatechange', checkReadyState); - } - E.un(WINDOW, "load", arguments.callee); - } - if(docReadyEvent && !Ext.isReady){ - Ext.isReady = true; - docReadyEvent.fire(); - docReadyEvent.listeners = []; - } - - } - - function initDocReady(){ - docReadyEvent || (docReadyEvent = new Ext.util.Event()); - if (DETECT_NATIVE) { - DOC.addEventListener(DOMCONTENTLOADED, fireDocReady, false); - } - /* - * Handle additional (exceptional) detection strategies here - */ - if (Ext.isIE){ - //Use readystatechange as a backup AND primary detection mechanism for a FRAME/IFRAME - //See if page is already loaded - if(!checkReadyState()){ - checkReadyState.bindIE = true; - DOC.attachEvent('onreadystatechange', checkReadyState); - } - - }else if(Ext.isOpera ){ - /* Notes: - Opera needs special treatment needed here because CSS rules are NOT QUITE - available after DOMContentLoaded is raised. - */ - - //See if page is already loaded and all styleSheets are in place - (DOC.readyState == COMPLETE && checkStyleSheets()) || - DOC.addEventListener(DOMCONTENTLOADED, OperaDOMContentLoaded, false); - - }else if (Ext.isWebKit){ - //Fallback for older Webkits without DOMCONTENTLOADED support - checkReadyState(); - } - // no matter what, make sure it fires on load - E.on(WINDOW, "load", fireDocReady); - } - - function createTargeted(h, o){ - return function(){ - var args = Ext.toArray(arguments); - if(o.target == Ext.EventObject.setEvent(args[0]).target){ - h.apply(this, args); - } - }; - } - - function createBuffered(h, o, task){ - return function(e){ - // create new event object impl so new events don't wipe out properties - task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]); - }; - } - - function createSingle(h, el, ename, fn, scope){ - return function(e){ - Ext.EventManager.removeListener(el, ename, fn, scope); - h(e); - }; - } - - function createDelayed(h, o, fn){ - return function(e){ - var task = new Ext.util.DelayedTask(h); - if(!fn.tasks) { - fn.tasks = []; - } - fn.tasks.push(task); - task.delay(o.delay || 10, h, null, [new Ext.EventObjectImpl(e)]); - }; - } - - function listen(element, ename, opt, fn, scope){ - var o = (!opt || typeof opt == "boolean") ? {} : opt, - el = Ext.getDom(element), task; - - fn = fn || o.fn; - scope = scope || o.scope; - - if(!el){ - throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; - } - function h(e){ - // prevent errors while unload occurring - if(!Ext){// !window[xname]){ ==> can't we do this? - return; - } - e = Ext.EventObject.setEvent(e); - var t; - if (o.delegate) { - if(!(t = e.getTarget(o.delegate, el))){ - return; - } - } else { - t = e.target; - } - if (o.stopEvent) { - e.stopEvent(); - } - if (o.preventDefault) { - e.preventDefault(); - } - if (o.stopPropagation) { - e.stopPropagation(); - } - if (o.normalized === false) { - e = e.browserEvent; - } - - fn.call(scope || el, e, t, o); - } - if(o.target){ - h = createTargeted(h, o); - } - if(o.delay){ - h = createDelayed(h, o, fn); - } - if(o.single){ - h = createSingle(h, el, ename, fn, scope); - } - if(o.buffer){ - task = new Ext.util.DelayedTask(h); - h = createBuffered(h, o, task); - } - - addListener(el, ename, fn, task, h, scope); - return h; - } - - var pub = { - /** - * Appends an event handler to an element. The shorthand version {@link #on} is equivalent. Typically you will - * use {@link Ext.Element#addListener} directly on an Element in favor of calling this version. - * @param {String/HTMLElement} el The html element or id to assign the event handler to. - * @param {String} eventName The name of the event to listen for. - * @param {Function} handler The handler function the event invokes. This function is passed - * the following parameters:
        - *
      • evt : EventObject
        The {@link Ext.EventObject EventObject} describing the event.
      • - *
      • t : Element
        The {@link Ext.Element Element} which was the target of the event. - * Note that this may be filtered by using the delegate option.
      • - *
      • o : Object
        The options object from the addListener call.
      • - *
      - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. Defaults to the Element. - * @param {Object} options (optional) An object containing handler configuration properties. - * This may contain any of the following properties:
        - *
      • scope : Object
        The scope (this reference) in which the handler function is executed. Defaults to the Element.
      • - *
      • delegate : String
        A simple selector to filter the target or look for a descendant of the target
      • - *
      • stopEvent : Boolean
        True to stop the event. That is stop propagation, and prevent the default action.
      • - *
      • preventDefault : Boolean
        True to prevent the default action
      • - *
      • stopPropagation : Boolean
        True to prevent event propagation
      • - *
      • normalized : Boolean
        False to pass a browser event to the handler function instead of an Ext.EventObject
      • - *
      • delay : Number
        The number of milliseconds to delay the invocation of the handler after te event fires.
      • - *
      • single : Boolean
        True to add a handler to handle just the next firing of the event, and then remove itself.
      • - *
      • buffer : Number
        Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed - * by the specified number of milliseconds. If the event fires again within that time, the original - * handler is not invoked, but the new handler is scheduled in its place.
      • - *
      • target : Element
        Only call the handler if the event was fired on the target Element, not if the event was bubbled up from a child node.
      • - *

      - *

      See {@link Ext.Element#addListener} for examples of how to use these options.

      - */ - addListener : function(element, eventName, fn, scope, options){ - if(typeof eventName == 'object'){ - var o = eventName, e, val; - for(e in o){ - val = o[e]; - if(!propRe.test(e)){ - if(Ext.isFunction(val)){ - // shared options - listen(element, e, o, val, o.scope); - }else{ - // individual options - listen(element, e, val); - } - } - } - } else { - listen(element, eventName, options, fn, scope); - } - }, - - /** - * Removes an event handler from an element. The shorthand version {@link #un} is equivalent. Typically - * you will use {@link Ext.Element#removeListener} directly on an Element in favor of calling this version. - * @param {String/HTMLElement} el The id or html element from which to remove the listener. - * @param {String} eventName The name of the event. - * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #addListener} call. - * @param {Object} scope If a scope (this reference) was specified when the listener was added, - * then this must refer to the same object. - */ - removeListener : function(el, eventName, fn, scope){ - el = Ext.getDom(el); - var id = getId(el), - f = el && (Ext.elCache[id].events)[eventName] || [], - wrap, i, l, k, len, fnc; - - for (i = 0, len = f.length; i < len; i++) { - - /* 0 = Original Function, - 1 = Event Manager Wrapped Function, - 2 = Scope, - 3 = Adapter Wrapped Function, - 4 = Buffered Task - */ - if (Ext.isArray(fnc = f[i]) && fnc[0] == fn && (!scope || fnc[2] == scope)) { - if(fnc[4]) { - fnc[4].cancel(); - } - k = fn.tasks && fn.tasks.length; - if(k) { - while(k--) { - fn.tasks[k].cancel(); - } - delete fn.tasks; - } - wrap = fnc[1]; - E.un(el, eventName, E.extAdapter ? fnc[3] : wrap); - - // jQuery workaround that should be removed from Ext Core - if(wrap && el.addEventListener && eventName == "mousewheel"){ - el.removeEventListener("DOMMouseScroll", wrap, false); - } - - // fix stopped mousedowns on the document - if(wrap && el == DOC && eventName == "mousedown"){ - Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); - } - - f.splice(i, 1); - if (f.length === 0) { - delete Ext.elCache[id].events[eventName]; - } - for (k in Ext.elCache[id].events) { - return false; - } - Ext.elCache[id].events = {}; - return false; - } - } - }, - - /** - * Removes all event handers from an element. Typically you will use {@link Ext.Element#removeAllListeners} - * directly on an Element in favor of calling this version. - * @param {String/HTMLElement} el The id or html element from which to remove all event handlers. - */ - removeAll : function(el){ - el = Ext.getDom(el); - var id = getId(el), - ec = Ext.elCache[id] || {}, - es = ec.events || {}, - f, i, len, ename, fn, k, wrap; - - for(ename in es){ - if(es.hasOwnProperty(ename)){ - f = es[ename]; - /* 0 = Original Function, - 1 = Event Manager Wrapped Function, - 2 = Scope, - 3 = Adapter Wrapped Function, - 4 = Buffered Task - */ - for (i = 0, len = f.length; i < len; i++) { - fn = f[i]; - if(fn[4]) { - fn[4].cancel(); - } - if(fn[0].tasks && (k = fn[0].tasks.length)) { - while(k--) { - fn[0].tasks[k].cancel(); - } - delete fn.tasks; - } - wrap = fn[1]; - E.un(el, ename, E.extAdapter ? fn[3] : wrap); - - // jQuery workaround that should be removed from Ext Core - if(el.addEventListener && wrap && ename == "mousewheel"){ - el.removeEventListener("DOMMouseScroll", wrap, false); - } - - // fix stopped mousedowns on the document - if(wrap && el == DOC && ename == "mousedown"){ - Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); - } - } - } - } - if (Ext.elCache[id]) { - Ext.elCache[id].events = {}; - } - }, - - getListeners : function(el, eventName) { - el = Ext.getDom(el); - var id = getId(el), - ec = Ext.elCache[id] || {}, - es = ec.events || {}, - results = []; - if (es && es[eventName]) { - return es[eventName]; - } else { - return null; - } - }, - - purgeElement : function(el, recurse, eventName) { - el = Ext.getDom(el); - var id = getId(el), - ec = Ext.elCache[id] || {}, - es = ec.events || {}, - i, f, len; - if (eventName) { - if (es && es.hasOwnProperty(eventName)) { - f = es[eventName]; - for (i = 0, len = f.length; i < len; i++) { - Ext.EventManager.removeListener(el, eventName, f[i][0]); - } - } - } else { - Ext.EventManager.removeAll(el); - } - if (recurse && el && el.childNodes) { - for (i = 0, len = el.childNodes.length; i < len; i++) { - Ext.EventManager.purgeElement(el.childNodes[i], recurse, eventName); - } - } - }, - - _unload : function() { - var el; - for (el in Ext.elCache) { - Ext.EventManager.removeAll(el); - } - delete Ext.elCache; - delete Ext.Element._flyweights; - - // Abort any outstanding Ajax requests - var c, - conn, - tid, - ajax = Ext.lib.Ajax; - (typeof ajax.conn == 'object') ? conn = ajax.conn : conn = {}; - for (tid in conn) { - c = conn[tid]; - if (c) { - ajax.abort({conn: c, tId: tid}); - } - } - }, - /** - * Adds a listener to be notified when the document is ready (before onload and before images are loaded). Can be - * accessed shorthanded as Ext.onReady(). - * @param {Function} fn The method the event invokes. - * @param {Object} scope (optional) The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {boolean} options (optional) Options object as passed to {@link Ext.Element#addListener}. It is recommended that the options - * {single: true} be used so that the handler is removed on first invocation. - */ - onDocumentReady : function(fn, scope, options){ - if (Ext.isReady) { // if it already fired or document.body is present - docReadyEvent || (docReadyEvent = new Ext.util.Event()); - docReadyEvent.addListener(fn, scope, options); - docReadyEvent.fire(); - docReadyEvent.listeners = []; - } else { - if (!docReadyEvent) { - initDocReady(); - } - options = options || {}; - options.delay = options.delay || 1; - docReadyEvent.addListener(fn, scope, options); - } - }, - - /** - * Forces a document ready state transition for the framework. Used when Ext is loaded - * into a DOM structure AFTER initial page load (Google API or other dynamic load scenario. - * Any pending 'onDocumentReady' handlers will be fired (if not already handled). - */ - fireDocReady : fireDocReady - }; - /** - * Appends an event handler to an element. Shorthand for {@link #addListener}. - * @param {String/HTMLElement} el The html element or id to assign the event handler to - * @param {String} eventName The name of the event to listen for. - * @param {Function} handler The handler function the event invokes. - * @param {Object} scope (optional) (this reference) in which the handler function executes. Defaults to the Element. - * @param {Object} options (optional) An object containing standard {@link #addListener} options - * @member Ext.EventManager - * @method on - */ - pub.on = pub.addListener; - /** - * Removes an event handler from an element. Shorthand for {@link #removeListener}. - * @param {String/HTMLElement} el The id or html element from which to remove the listener. - * @param {String} eventName The name of the event. - * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #on} call. - * @param {Object} scope If a scope (this reference) was specified when the listener was added, - * then this must refer to the same object. - * @member Ext.EventManager - * @method un - */ - pub.un = pub.removeListener; - - pub.stoppedMouseDownEvent = new Ext.util.Event(); - return pub; -}(); -/** - * Adds a listener to be notified when the document is ready (before onload and before images are loaded). Shorthand of {@link Ext.EventManager#onDocumentReady}. - * @param {Function} fn The method the event invokes. - * @param {Object} scope (optional) The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {boolean} options (optional) Options object as passed to {@link Ext.Element#addListener}. It is recommended that the options - * {single: true} be used so that the handler is removed on first invocation. - * @member Ext - * @method onReady - */ -Ext.onReady = Ext.EventManager.onDocumentReady; - - -//Initialize doc classes -(function(){ - var initExtCss = function() { - // find the body element - var bd = document.body || document.getElementsByTagName('body')[0]; - if (!bd) { - return false; - } - - var cls = [' ', - Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : (Ext.isIE8 ? 'ext-ie8' : 'ext-ie9'))) - : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') - : Ext.isOpera ? "ext-opera" - : Ext.isWebKit ? "ext-webkit" : ""]; - - if (Ext.isSafari) { - cls.push("ext-safari " + (Ext.isSafari2 ? 'ext-safari2' : (Ext.isSafari3 ? 'ext-safari3' : 'ext-safari4'))); - } else if(Ext.isChrome) { - cls.push("ext-chrome"); - } - - if (Ext.isMac) { - cls.push("ext-mac"); - } - if (Ext.isLinux) { - cls.push("ext-linux"); - } - - // add to the parent to allow for selectors like ".ext-strict .ext-ie" - if (Ext.isStrict || Ext.isBorderBox) { - var p = bd.parentNode; - if (p) { - if (!Ext.isStrict) { - Ext.fly(p, '_internal').addClass('x-quirks'); - if (Ext.isIE && !Ext.isStrict) { - Ext.isIEQuirks = true; - } - } - Ext.fly(p, '_internal').addClass(((Ext.isStrict && Ext.isIE ) || (!Ext.enableForcedBoxModel && !Ext.isIE)) ? ' ext-strict' : ' ext-border-box'); - } - } - // Forced border box model class applied to all elements. Bypassing javascript based box model adjustments - // in favor of css. This is for non-IE browsers. - if (Ext.enableForcedBoxModel && !Ext.isIE) { - Ext.isForcedBorderBox = true; - cls.push("ext-forced-border-box"); - } - - Ext.fly(bd, '_internal').addClass(cls); - return true; - }; - - if (!initExtCss()) { - Ext.onReady(initExtCss); - } -})(); - -/** - * Code used to detect certain browser feature/quirks/bugs at startup. - */ -(function(){ - var supports = Ext.apply(Ext.supports, { - /** - * In Webkit, there is an issue with getting the margin right property, see - * https://bugs.webkit.org/show_bug.cgi?id=13343 - */ - correctRightMargin: true, - - /** - * Webkit browsers return rgba(0, 0, 0) when a transparent color is used - */ - correctTransparentColor: true, - - /** - * IE uses styleFloat, not cssFloat for the float property. - */ - cssFloat: true - }); - - var supportTests = function(){ - var div = document.createElement('div'), - doc = document, - view, - last; - - div.innerHTML = '
      '; - doc.body.appendChild(div); - last = div.lastChild; - - if((view = doc.defaultView)){ - if(view.getComputedStyle(div.firstChild.firstChild, null).marginRight != '0px'){ - supports.correctRightMargin = false; - } - if(view.getComputedStyle(last, null).backgroundColor != 'transparent'){ - supports.correctTransparentColor = false; - } - } - supports.cssFloat = !!last.style.cssFloat; - doc.body.removeChild(div); - }; - - if (Ext.isReady) { - supportTests(); - } else { - Ext.onReady(supportTests); - } -})(); - - -/** - * @class Ext.EventObject - * Just as {@link Ext.Element} wraps around a native DOM node, Ext.EventObject - * wraps the browser's native event-object normalizing cross-browser differences, - * such as which mouse button is clicked, keys pressed, mechanisms to stop - * event-propagation along with a method to prevent default actions from taking place. - *

      For example:

      - *
      
      -function handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject
      -    e.preventDefault();
      -    var target = e.getTarget(); // same as t (the target HTMLElement)
      -    ...
      -}
      -var myDiv = {@link Ext#get Ext.get}("myDiv");  // get reference to an {@link Ext.Element}
      -myDiv.on(         // 'on' is shorthand for addListener
      -    "click",      // perform an action on click of myDiv
      -    handleClick   // reference to the action handler
      -);
      -// other methods to do the same:
      -Ext.EventManager.on("myDiv", 'click', handleClick);
      -Ext.EventManager.addListener("myDiv", 'click', handleClick);
      - 
      - * @singleton - */ -Ext.EventObject = function(){ - var E = Ext.lib.Event, - clickRe = /(dbl)?click/, - // safari keypress events for special keys return bad keycodes - safariKeys = { - 3 : 13, // enter - 63234 : 37, // left - 63235 : 39, // right - 63232 : 38, // up - 63233 : 40, // down - 63276 : 33, // page up - 63277 : 34, // page down - 63272 : 46, // delete - 63273 : 36, // home - 63275 : 35 // end - }, - // normalize button clicks - btnMap = Ext.isIE ? {1:0,4:1,2:2} : {0:0,1:1,2:2}; - - Ext.EventObjectImpl = function(e){ - if(e){ - this.setEvent(e.browserEvent || e); - } - }; - - Ext.EventObjectImpl.prototype = { - /** @private */ - setEvent : function(e){ - var me = this; - if(e == me || (e && e.browserEvent)){ // already wrapped - return e; - } - me.browserEvent = e; - if(e){ - // normalize buttons - me.button = e.button ? btnMap[e.button] : (e.which ? e.which - 1 : -1); - if(clickRe.test(e.type) && me.button == -1){ - me.button = 0; - } - me.type = e.type; - me.shiftKey = e.shiftKey; - // mac metaKey behaves like ctrlKey - me.ctrlKey = e.ctrlKey || e.metaKey || false; - me.altKey = e.altKey; - // in getKey these will be normalized for the mac - me.keyCode = e.keyCode; - me.charCode = e.charCode; - // cache the target for the delayed and or buffered events - me.target = E.getTarget(e); - // same for XY - me.xy = E.getXY(e); - }else{ - me.button = -1; - me.shiftKey = false; - me.ctrlKey = false; - me.altKey = false; - me.keyCode = 0; - me.charCode = 0; - me.target = null; - me.xy = [0, 0]; - } - return me; - }, - - /** - * Stop the event (preventDefault and stopPropagation) - */ - stopEvent : function(){ - var me = this; - if(me.browserEvent){ - if(me.browserEvent.type == 'mousedown'){ - Ext.EventManager.stoppedMouseDownEvent.fire(me); - } - E.stopEvent(me.browserEvent); - } - }, - - /** - * Prevents the browsers default handling of the event. - */ - preventDefault : function(){ - if(this.browserEvent){ - E.preventDefault(this.browserEvent); - } - }, - - /** - * Cancels bubbling of the event. - */ - stopPropagation : function(){ - var me = this; - if(me.browserEvent){ - if(me.browserEvent.type == 'mousedown'){ - Ext.EventManager.stoppedMouseDownEvent.fire(me); - } - E.stopPropagation(me.browserEvent); - } - }, - - /** - * Gets the character code for the event. - * @return {Number} - */ - getCharCode : function(){ - return this.charCode || this.keyCode; - }, - - /** - * Returns a normalized keyCode for the event. - * @return {Number} The key code - */ - getKey : function(){ - return this.normalizeKey(this.keyCode || this.charCode); - }, - - // private - normalizeKey: function(k){ - return Ext.isSafari ? (safariKeys[k] || k) : k; - }, - - /** - * Gets the x coordinate of the event. - * @return {Number} - */ - getPageX : function(){ - return this.xy[0]; - }, - - /** - * Gets the y coordinate of the event. - * @return {Number} - */ - getPageY : function(){ - return this.xy[1]; - }, - - /** - * Gets the page coordinates of the event. - * @return {Array} The xy values like [x, y] - */ - getXY : function(){ - return this.xy; - }, - - /** - * Gets the target for the event. - * @param {String} selector (optional) A simple selector to filter the target or look for an ancestor of the target - * @param {Number/Mixed} maxDepth (optional) The max depth to - search as a number or element (defaults to 10 || document.body) - * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node - * @return {HTMLelement} - */ - getTarget : function(selector, maxDepth, returnEl){ - return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target); - }, - - /** - * Gets the related target. - * @return {HTMLElement} - */ - getRelatedTarget : function(){ - return this.browserEvent ? E.getRelatedTarget(this.browserEvent) : null; - }, - - /** - * Normalizes mouse wheel delta across browsers - * @return {Number} The delta - */ - getWheelDelta : function(){ - var e = this.browserEvent; - var delta = 0; - if(e.wheelDelta){ /* IE/Opera. */ - delta = e.wheelDelta/120; - }else if(e.detail){ /* Mozilla case. */ - delta = -e.detail/3; - } - return delta; - }, - - /** - * Returns true if the target of this event is a child of el. Unless the allowEl parameter is set, it will return false if if the target is el. - * Example usage:
      
      -        // Handle click on any child of an element
      -        Ext.getBody().on('click', function(e){
      -            if(e.within('some-el')){
      -                alert('Clicked on a child of some-el!');
      -            }
      -        });
      -
      -        // Handle click directly on an element, ignoring clicks on child nodes
      -        Ext.getBody().on('click', function(e,t){
      -            if((t.id == 'some-el') && !e.within(t, true)){
      -                alert('Clicked directly on some-el!');
      -            }
      -        });
      -        
      - * @param {Mixed} el The id, DOM element or Ext.Element to check - * @param {Boolean} related (optional) true to test if the related target is within el instead of the target - * @param {Boolean} allowEl {optional} true to also check if the passed element is the target or related target - * @return {Boolean} - */ - within : function(el, related, allowEl){ - if(el){ - var t = this[related ? "getRelatedTarget" : "getTarget"](); - return t && ((allowEl ? (t == Ext.getDom(el)) : false) || Ext.fly(el).contains(t)); - } - return false; - } - }; - - return new Ext.EventObjectImpl(); -}();/** - * @class Ext.Loader - * @singleton - * Simple class to help load JavaScript files on demand - */ -Ext.Loader = Ext.apply({}, { - /** - * Loads a given set of .js files. Calls the callback function when all files have been loaded - * Set preserveOrder to true to ensure non-parallel loading of files if load order is important - * @param {Array} fileList Array of all files to load - * @param {Function} callback Callback to call after all files have been loaded - * @param {Object} scope The scope to call the callback in - * @param {Boolean} preserveOrder True to make files load in serial, one after the other (defaults to false) - */ - load: function(fileList, callback, scope, preserveOrder) { - var scope = scope || this, - head = document.getElementsByTagName("head")[0], - fragment = document.createDocumentFragment(), - numFiles = fileList.length, - loadedFiles = 0, - me = this; - - /** - * Loads a particular file from the fileList by index. This is used when preserving order - */ - var loadFileIndex = function(index) { - head.appendChild( - me.buildScriptTag(fileList[index], onFileLoaded) - ); - }; - - /** - * Callback function which is called after each file has been loaded. This calls the callback - * passed to load once the final file in the fileList has been loaded - */ - var onFileLoaded = function() { - loadedFiles ++; - - //if this was the last file, call the callback, otherwise load the next file - if (numFiles == loadedFiles && typeof callback == 'function') { - callback.call(scope); - } else { - if (preserveOrder === true) { - loadFileIndex(loadedFiles); - } - } - }; - - if (preserveOrder === true) { - loadFileIndex.call(this, 0); - } else { - //load each file (most browsers will do this in parallel) - Ext.each(fileList, function(file, index) { - fragment.appendChild( - this.buildScriptTag(file, onFileLoaded) - ); - }, this); - - head.appendChild(fragment); - } - }, - - /** - * @private - * Creates and returns a script tag, but does not place it into the document. If a callback function - * is passed, this is called when the script has been loaded - * @param {String} filename The name of the file to create a script tag for - * @param {Function} callback Optional callback, which is called when the script has been loaded - * @return {Element} The new script ta - */ - buildScriptTag: function(filename, callback) { - var script = document.createElement('script'); - script.type = "text/javascript"; - script.src = filename; - - //IE has a different way of handling <script> loads, so we need to check for it here - if (script.readyState) { - script.onreadystatechange = function() { - if (script.readyState == "loaded" || script.readyState == "complete") { - script.onreadystatechange = null; - callback(); - } - }; - } else { - script.onload = callback; - } - - return script; - } -}); diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/ext-core.js b/web-client/src/main/resources/apps/js/ext/pkgs/ext-core.js deleted file mode 100644 index a5da19d3f4a..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/ext-core.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -(function(){var h=Ext.util,j=Ext.each,g=true,i=false;h.Observable=function(){var k=this,l=k.events;if(k.listeners){k.on(k.listeners);delete k.listeners}k.events=l||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var k=Array.prototype.slice.call(arguments,0),m=k[0].toLowerCase(),n=this,l=g,p=n.events[m],s,o,r;if(n.eventsSuspended===g){if(o=n.eventQueue){o.push(k)}}else{if(typeof p=="object"){if(p.bubble){if(p.fire.apply(p,k.slice(1))===i){return i}r=n.getBubbleTarget&&n.getBubbleTarget();if(r&&r.enableBubble){s=r.events[m];if(!s||typeof s!="object"||!s.bubble){r.enableBubble(m)}return r.fireEvent.apply(r,k)}}else{k.shift();l=p.fire.apply(p,k)}}}return l},addListener:function(k,m,l,r){var n=this,q,s,p;if(typeof k=="object"){r=k;for(q in r){s=r[q];if(!n.filterOptRe.test(q)){n.addListener(q,s.fn||s,s.scope||r.scope,s.fn?s:r)}}}else{k=k.toLowerCase();p=n.events[k]||g;if(typeof p=="boolean"){n.events[k]=p=new h.Event(n,k)}p.addListener(m,l,typeof r=="object"?r:{})}},removeListener:function(k,m,l){var n=this.events[k.toLowerCase()];if(typeof n=="object"){n.removeListener(m,l)}},purgeListeners:function(){var m=this.events,k,l;for(l in m){k=m[l];if(typeof k=="object"){k.clearListeners()}}},addEvents:function(n){var m=this;m.events=m.events||{};if(typeof n=="string"){var k=arguments,l=k.length;while(l--){m.events[k[l]]=m.events[k[l]]||g}}else{Ext.applyIf(m.events,n)}},hasListener:function(k){var l=this.events[k.toLowerCase()];return typeof l=="object"&&l.listeners.length>0},suspendEvents:function(k){this.eventsSuspended=g;if(k&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var k=this,l=k.eventQueue||[];k.eventsSuspended=i;delete k.eventQueue;j(l,function(m){k.fireEvent.apply(k,m)})}};var d=h.Observable.prototype;d.on=d.addListener;d.un=d.removeListener;h.Observable.releaseCapture=function(k){k.fireEvent=d.fireEvent};function e(l,m,k){return function(){if(m.target==arguments[0]){l.apply(k,Array.prototype.slice.call(arguments,0))}}}function b(n,p,k,m){k.task=new h.DelayedTask();return function(){k.task.delay(p.buffer,n,m,Array.prototype.slice.call(arguments,0))}}function c(m,n,l,k){return function(){n.removeListener(l,k);return m.apply(k,arguments)}}function a(n,p,k,m){return function(){var l=new h.DelayedTask(),o=Array.prototype.slice.call(arguments,0);if(!k.tasks){k.tasks=[]}k.tasks.push(l);l.delay(p.delay||10,function(){k.tasks.remove(l);n.apply(m,o)},m)}}h.Event=function(l,k){this.name=k;this.obj=l;this.listeners=[]};h.Event.prototype={addListener:function(o,n,m){var p=this,k;n=n||p.obj;if(!p.isListening(o,n)){k=p.createListener(o,n,m);if(p.firing){p.listeners=p.listeners.slice(0)}p.listeners.push(k)}},createListener:function(p,n,q){q=q||{};n=n||this.obj;var k={fn:p,scope:n,options:q},m=p;if(q.target){m=e(m,q,n)}if(q.delay){m=a(m,q,k,n)}if(q.single){m=c(m,this,p,n)}if(q.buffer){m=b(m,q,k,n)}k.fireFn=m;return k},findListener:function(o,n){var p=this.listeners,m=p.length,k;n=n||this.obj;while(m--){k=p[m];if(k){if(k.fn==o&&k.scope==n){return m}}}return -1},isListening:function(l,k){return this.findListener(l,k)!=-1},removeListener:function(r,q){var p,m,n,s=this,o=i;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel()}delete m.tasks}s.listeners.splice(p,1);o=g}return o},clearListeners:function(){var n=this,k=n.listeners,m=k.length;while(m--){n.removeListener(k[m].fn,k[m].scope)}},fire:function(){var q=this,p=q.listeners,k=p.length,o=0,m;if(k>0){q.firing=g;var n=Array.prototype.slice.call(arguments,0);for(;o",i="",b=a+"",j=""+i,l=b+"",w=""+j;function h(B,D,C,E,A,y){var z=r.insertHtml(E,Ext.getDom(B),u(D));return C?Ext.get(z,true):z}function u(D){var z="",y,C,B,E;if(typeof D=="string"){z=D}else{if(Ext.isArray(D)){for(var A=0;A"}}}return z}function g(F,C,B,D){x.innerHTML=[C,B,D].join("");var y=-1,A=x,z;while(++y "'+D+'"'},insertBefore:function(y,A,z){return h(y,A,z,c)},insertAfter:function(y,A,z){return h(y,A,z,p,"nextSibling")},insertFirst:function(y,A,z){return h(y,A,z,n,"firstChild")},append:function(y,A,z){return h(y,A,z,q,"",true)},overwrite:function(y,A,z){y=Ext.getDom(y);y.innerHTML=u(A);return z?Ext.get(y.firstChild):y.firstChild},createHtml:u};return r}();Ext.Template=function(h){var j=this,c=arguments,e=[],d;if(Ext.isArray(h)){h=h.join("")}else{if(c.length>1){for(var g=0,b=c.length;g+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{var cs=root.querySelectorAll(path);return Ext.toArray(cs)}catch(ex){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?(["']?)(.*?)\4)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{5}", "{3}", "{1}");'},{re:/^#([\w\-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};(function(){var h=document;Ext.Element=function(l,m){var n=typeof l=="string"?h.getElementById(l):l,o;if(!n){return null}o=n.id;if(!m&&o&&Ext.elCache[o]){return Ext.elCache[o].el}this.dom=n;this.id=o||Ext.id(n)};var d=Ext.DomHelper,e=Ext.Element,a=Ext.elCache;e.prototype={set:function(q,m){var n=this.dom,l,p,m=(m!==false)&&!!n.setAttribute;for(l in q){if(q.hasOwnProperty(l)){p=q[l];if(l=="style"){d.applyStyles(n,p)}else{if(l=="cls"){n.className=p}else{if(m){n.setAttribute(l,p)}else{n[l]=p}}}}}return this},defaultUnit:"px",is:function(l){return Ext.DomQuery.is(this.dom,l)},focus:function(o,n){var l=this,n=n||l.dom;try{if(Number(o)){l.focus.defer(o,null,[null,n])}else{n.focus()}}catch(m){}return l},blur:function(){try{this.dom.blur()}catch(l){}return this},getValue:function(l){var m=this.dom.value;return l?parseInt(m,10):m},addListener:function(l,o,n,m){Ext.EventManager.on(this.dom,l,o,n||this,m);return this},removeListener:function(l,n,m){Ext.EventManager.removeListener(this.dom,l,n,m||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this},addUnits:function(l){if(l===""||l=="auto"||l===undefined){l=l||""}else{if(!isNaN(l)||!i.test(l)){l=l+(this.defaultUnit||"px")}}return l},load:function(m,n,l){Ext.Ajax.request(Ext.apply({params:n,url:m.url||m,callback:l,el:this.dom,indicatorText:m.indicatorText||""},Ext.isObject(m)?m:{}));return this},isBorderBox:function(){return Ext.isBorderBox||Ext.isForcedBorderBox||g[(this.dom.tagName||"").toLowerCase()]},remove:function(){var l=this,m=l.dom;if(m){delete l.dom;Ext.removeNode(m)}},hover:function(m,l,o,n){var p=this;p.on("mouseenter",m,o||p.dom,n);p.on("mouseleave",l,o||p.dom,n);return p},contains:function(l){return !l?false:Ext.lib.Dom.isAncestor(this.dom,l.dom?l.dom:l)},getAttributeNS:function(m,l){return this.getAttribute(l,m)},getAttribute:(function(){var p=document.createElement("table"),o=false,m="getAttribute" in p,l=/undefined|unknown/;if(m){try{p.getAttribute("ext:qtip")}catch(n){o=true}return function(q,s){var r=this.dom,t;if(r.getAttributeNS){t=r.getAttributeNS(s,q)||null}if(t==null){if(s){if(o&&r.tagName.toUpperCase()=="TABLE"){try{t=r.getAttribute(s+":"+q)}catch(u){t=""}}else{t=r.getAttribute(s+":"+q)}}else{t=r.getAttribute(q)||r[q]}}return t||""}}else{return function(q,s){var r=this.om,u,t;if(s){t=r[s+":"+q];u=l.test(typeof t)?undefined:t}else{u=r[q]}return u||""}}p=null})(),update:function(l){if(this.dom){this.dom.innerHTML=l}return this}};var k=e.prototype;e.addMethods=function(l){Ext.apply(k,l)};k.on=k.addListener;k.un=k.removeListener;k.autoBoxAdjust=true;var i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;e.get=function(m){var l,p,o;if(!m){return null}if(typeof m=="string"){if(!(p=h.getElementById(m))){return null}if(a[m]&&a[m].el){l=a[m].el;l.dom=p}else{l=e.addToCache(new e(p))}return l}else{if(m.tagName){if(!(o=m.id)){o=Ext.id(m)}if(a[o]&&a[o].el){l=a[o].el;l.dom=m}else{l=e.addToCache(new e(m))}return l}else{if(m instanceof e){if(m!=c){if(Ext.isIE&&(m.id==undefined||m.id=="")){m.dom=m.dom}else{m.dom=h.getElementById(m.id)||m.dom}}return m}else{if(m.isComposite){return m}else{if(Ext.isArray(m)){return e.select(m)}else{if(m==h){if(!c){var n=function(){};n.prototype=e.prototype;c=new n();c.dom=h}return c}}}}}}return null};e.addToCache=function(l,m){m=m||l.id;a[m]={el:l,data:{},events:{}};return l};e.data=function(m,l,n){m=e.get(m);if(!m){return null}var o=a[m.id].data;if(arguments.length==2){return o[l]}else{return(o[l]=n)}};function j(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var l,n,q,p;for(l in a){p=a[l];if(p.skipGC){continue}n=p.el;q=n.dom;if(!q||!q.parentNode||(!q.offsetParent&&!h.getElementById(l))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(q)}delete a[l]}}if(Ext.isIE){var m={};for(l in a){m[l]=a[l]}a=Ext.elCache=m}}}e.collectorThreadId=setInterval(j,30000);var b=function(){};b.prototype=e.prototype;e.Flyweight=function(l){this.dom=l};e.Flyweight.prototype=new b();e.Flyweight.prototype.isFlyweight=true;e._flyweights={};e.fly=function(n,l){var m=null;l=l||"_global";if(n=Ext.getDom(n)){(e._flyweights[l]=e._flyweights[l]||new e.Flyweight()).dom=n;m=e._flyweights[l]}return m};Ext.get=e.get;Ext.fly=e.fly;var g=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){g.button=1}})();Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(m,l,h){var j=this.dom,g=document.body,k=0,i;if(Ext.isGecko&&Object.prototype.toString.call(j)=="[object XULElement]"){return null}l=l||50;if(isNaN(l)){i=Ext.getDom(l);l=Number.MAX_VALUE}while(j&&j.nodeType==1&&k "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j}j=j[h]}return null}}}());Ext.Element.addMethods(function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{appendChild:function(d){return a(d).appendTo(this)},appendTo:function(d){c(d).appendChild(this.dom);return this},insertBefore:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d);return this},insertAfter:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d.nextSibling);return this},insertFirst:function(e,d){e=e||{};if(e.nodeType||e.dom||typeof e=="string"){e=c(e);this.dom.insertBefore(e,this.dom.firstChild);return !d?a(e):e}else{return this.createChild(e,this.dom.firstChild,d)}},replace:function(d){d=a(d);this.insertBefore(d);d.remove();return this},replaceWith:function(d){var e=this;if(d.nodeType||d.dom||typeof d=="string"){d=c(d);e.dom.parentNode.insertBefore(d,e.dom)}else{d=b.insertBefore(e.dom,d)}delete Ext.elCache[e.id];Ext.removeNode(e.dom);e.id=Ext.id(e.dom=d);Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e);return e},createChild:function(e,d,g){e=e||{tag:"div"};return d?b.insertBefore(d,e,g!==true):b[!this.dom.firstChild?"overwrite":"append"](this.dom,e,g!==true)},wrap:function(d,e){var g=b.insertBefore(this.dom,d||{tag:"div"},!e);g.dom?g.dom.appendChild(this.dom):g.appendChild(this.dom);return g},insertHtml:function(e,g,d){var h=b.insertHtml(e,this.dom,g);return d?Ext.get(h):h}}}());Ext.Element.addMethods(function(){var A=Ext.supports,h={},x=/(-[a-z])/gi,s=document.defaultView,D=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,B=Ext.Element,u=/\s+/,b=/\w/g,d="padding",c="margin",y="border",t="-left",q="-right",w="-top",o="-bottom",j="-width",r=Math,z="hidden",e="isClipped",k="overflow",n="overflow-x",m="overflow-y",C="originalClip",i={l:y+t+j,r:y+q+j,t:y+w+j,b:y+o+j},g={l:d+t,r:d+q,t:d+w,b:d+o},a={l:c+t,r:c+q,t:c+w,b:c+o},E=Ext.Element.data;function p(F,G){return G.charAt(1).toUpperCase()}function v(F){return h[F]||(h[F]=F=="float"?(A.cssFloat?"cssFloat":"styleFloat"):F.replace(x,p))}return{adjustWidth:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("lr")+G.getPadding("lr"))}return(H&&F<0)?0:F},adjustHeight:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("tb")+G.getPadding("tb"))}return(H&&F<0)?0:F},addClass:function(J){var K=this,I,F,H,G=[];if(!Ext.isArray(J)){if(typeof J=="string"&&!this.hasClass(J)){K.dom.className+=" "+J}}else{for(I=0,F=J.length;I5?H.toLowerCase():G)},setStyle:function(I,H){var F,G;if(typeof I!="object"){F={};F[I]=H;I=F}for(G in I){H=I[G];G=="opacity"?this.setOpacity(H):this.dom.style[v(G)]=H}return this},setOpacity:function(G,F){var J=this,H=J.dom.style;if(!F||!J.anim){if(Ext.isIE){var I=G<1?"alpha(opacity="+G*100+")":"",K=H.filter.replace(D,"").replace(l,"");H.zoom=1;H.filter=K+(K.length>0?" ":"")+I}else{H.opacity=G}}else{J.anim({opacity:{to:G}},J.preanim(arguments,1),null,0.35,"easeIn")}return J},clearOpacity:function(){var F=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(F.filter)){F.filter=F.filter.replace(D,"").replace(l,"")}}else{F.opacity=F["-moz-opacity"]=F["-khtml-opacity"]=""}return this},getHeight:function(H){var G=this,J=G.dom,I=Ext.isIE&&G.isStyle("display","none"),F=r.max(J.offsetHeight,I?0:J.clientHeight)||0;F=!H?F:F-G.getBorderWidth("tb")-G.getPadding("tb");return F<0?0:F},getWidth:function(G){var H=this,J=H.dom,I=Ext.isIE&&H.isStyle("display","none"),F=r.max(J.offsetWidth,I?0:J.clientWidth)||0;F=!G?F:F-H.getBorderWidth("lr")-H.getPadding("lr");return F<0?0:F},setWidth:function(G,F){var H=this;G=H.adjustWidth(G);!F||!H.anim?H.dom.style.width=H.addUnits(G):H.anim({width:{to:G}},H.preanim(arguments,1));return H},setHeight:function(F,G){var H=this;F=H.adjustHeight(F);!G||!H.anim?H.dom.style.height=H.addUnits(F):H.anim({height:{to:F}},H.preanim(arguments,1));return H},getBorderWidth:function(F){return this.addStyles(F,i)},getPadding:function(F){return this.addStyles(F,g)},clip:function(){var F=this,G=F.dom;if(!E(G,e)){E(G,e,true);E(G,C,{o:F.getStyle(k),x:F.getStyle(n),y:F.getStyle(m)});F.setStyle(k,z);F.setStyle(n,z);F.setStyle(m,z)}return F},unclip:function(){var F=this,H=F.dom;if(E(H,e)){E(H,e,false);var G=E(H,C);if(G.o){F.setStyle(k,G.o)}if(G.x){F.setStyle(n,G.x)}if(G.y){F.setStyle(m,G.y)}}return F},addStyles:function(M,L){var J=0,K=M.match(b),I,H,G,F=K.length;for(G=0;Ga.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.OFFSETS=3;Ext.Element.ASCLASS=4;Ext.Element.visibilityCls="x-hide-nosize";Ext.Element.addMethods(function(){var e=Ext.Element,p="opacity",j="visibility",g="display",d="hidden",n="offsets",k="asclass",m="none",a="nosize",b="originalDisplay",c="visibilityMode",h="isVisible",i=e.data,l=function(r){var q=i(r,b);if(q===undefined){i(r,b,q="")}return q},o=function(r){var q=i(r,c);if(q===undefined){i(r,c,q=1)}return q};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(q){i(this.dom,c,q);return this},animate:function(r,t,s,u,q){this.anim(r,{duration:t,callback:s,easing:u},q);return this},anim:function(t,u,r,w,s,q){r=r||"run";u=u||{};var v=this,x=Ext.lib.Anim[r](v.dom,t,(u.duration||w)||0.35,(u.easing||s)||"easeOut",function(){if(q){q.call(v)}if(u.callback){u.callback.call(u.scope||v,v,u)}},v);u.anim=x;return x},preanim:function(q,r){return !q[r]?false:(typeof q[r]=="object"?q[r]:{duration:q[r+1],callback:q[r+2],easing:q[r+3]})},isVisible:function(){var q=this,s=q.dom,r=i(s,h);if(typeof r=="boolean"){return r}r=!q.isStyle(j,d)&&!q.isStyle(g,m)&&!((o(s)==e.ASCLASS)&&q.hasClass(q.visibilityCls||e.visibilityCls));i(s,h,r);return r},setVisible:function(t,q){var w=this,r,y,x,v,u=w.dom,s=o(u);if(typeof q=="string"){switch(q){case g:s=e.DISPLAY;break;case j:s=e.VISIBILITY;break;case n:s=e.OFFSETS;break;case a:case k:s=e.ASCLASS;break}w.setVisibilityMode(s);q=false}if(!q||!w.anim){if(s==e.ASCLASS){w[t?"removeClass":"addClass"](w.visibilityCls||e.visibilityCls)}else{if(s==e.DISPLAY){return w.setDisplayed(t)}else{if(s==e.OFFSETS){if(!t){w.hideModeStyles={position:w.getStyle("position"),top:w.getStyle("top"),left:w.getStyle("left")};w.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{w.applyStyles(w.hideModeStyles||{position:"",top:"",left:""});delete w.hideModeStyles}}else{w.fixDisplay();u.style.visibility=t?"visible":d}}}}else{if(t){w.setOpacity(0.01);w.setVisible(true)}w.anim({opacity:{to:(t?1:0)}},w.preanim(arguments,1),null,0.35,"easeIn",function(){t||w.setVisible(false).setOpacity(1)})}i(u,h,t);return w},hasMetrics:function(){var q=this.dom;return this.isVisible()||(o(q)==e.VISIBILITY)},toggle:function(q){var r=this;r.setVisible(!r.isVisible(),r.preanim(arguments,0));return r},setDisplayed:function(q){if(typeof q=="boolean"){q=q?l(this.dom):m}this.setStyle(g,q);return this},fixDisplay:function(){var q=this;if(q.isStyle(g,m)){q.setStyle(j,d);q.setStyle(g,l(this.dom));if(q.isStyle(g,m)){q.setStyle(g,"block")}}},hide:function(q){if(typeof q=="string"){this.setVisible(false,q);return this}this.setVisible(false,this.preanim(arguments,0));return this},show:function(q){if(typeof q=="string"){this.setVisible(true,q);return this}this.setVisible(true,this.preanim(arguments,0));return this}}}());(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{}},p=function(B){d.dom=B;d.id=Ext.id(B);return d},c=function(B){if(!v[B]){v[B]=[]}return v[B]},b=function(C,B){v[C]=B};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C])},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E)}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z)}R[ac]=R[ab]="0";if(aa){Y.width=aa}if(W){Y.height=W}if(T){Y.points=T}return Y}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P)});return J},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D)}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R}if(T){P[T]=Q}return P}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M)});return H},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H)}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I)});return F},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F)}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G)}).defer(100)})});return D},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H)}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I)});return F},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K)};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx()}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H)}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop()}}}I()});return D},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({})},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({})}}});return this},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity()}p(C).afterFx(D)})});return B},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity()}p(D).afterFx(E)})});return C},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]}}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]}}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D)})});return this},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C)}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M]},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L)});return G},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k)}else{b(E,[])}}}return C},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k}return t}return k},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block},queueFx:function(E,B){var C=p(this.dom);if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx()}}else{B.call(C)}}return C},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY()}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative")}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B)}}return C},fxUnwrap:function(C,F,E){var D=this.dom;p(D).clearPositioning();p(D).setPositioning(F);if(!E.wrap){var B=p(C).dom.parentNode;B.insertBefore(D,C);p(C).remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(C){var B=this.dom,D=B.id;if(C.afterStyle){p(B).setStyle(C.afterStyle)}if(C.afterCls){p(B).addClass(C.afterCls)}if(C.remove==k){p(B).remove()}if(C.callback){C.callback.call(C.scope,p(B))}if(!C.concurrent){c(D).shift();p(B).nextFx()}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(typeof d=="string"){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;Ext.CompositeElementLite.importElementMethods=function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(typeof b[c]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}};Ext.CompositeElementLite.importElementMethods();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var b="beforerequest",e="requestcomplete",d="requestexception",h=undefined,c="load",i="POST",a="GET",g=window;Ext.data.Connection=function(j){Ext.apply(this,j);this.addEvents(b,e,d);Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(n){var s=this;if(s.fireEvent(b,s,n)){if(n.el){if(!Ext.isEmpty(n.indicatorText)){s.indicatorText='
      '+n.indicatorText+"
      "}if(s.indicatorText){Ext.getDom(n.el).innerHTML=s.indicatorText}n.success=(Ext.isFunction(n.success)?n.success:function(){}).createInterceptor(function(o){Ext.getDom(n.el).innerHTML=o.responseText})}var l=n.params,k=n.url||s.url,j,q={success:s.handleResponse,failure:s.handleFailure,scope:s,argument:{options:n},timeout:Ext.num(n.timeout,s.timeout)},m,t;if(Ext.isFunction(l)){l=l.call(n.scope||g,n)}l=Ext.urlEncode(s.extraParams,Ext.isObject(l)?Ext.urlEncode(l):l);if(Ext.isFunction(k)){k=k.call(n.scope||g,n)}if((m=Ext.getDom(n.form))){k=k||m.action;if(n.isUpload||(/multipart\/form-data/i.test(m.getAttribute("enctype")))){return s.doFormUpload.call(s,n,l,k)}t=Ext.lib.Ajax.serializeForm(m);l=l?(l+"&"+t):t}j=n.method||s.method||((l||n.xmlData||n.jsonData)?i:a);if(j===a&&(s.disableCaching&&n.disableCaching!==false)||n.disableCaching===true){var r=n.disableCachingParam||s.disableCachingParam;k=Ext.urlAppend(k,r+"="+(new Date().getTime()))}n.headers=Ext.applyIf(n.headers||{},s.defaultHeaders||{});if(n.autoAbort===true||s.autoAbort){s.abort()}if((j==a||n.xmlData||n.jsonData)&&l){k=Ext.urlAppend(k,l);l=""}return(s.transId=Ext.lib.Ajax.request(j,k,q,l,n))}else{return n.callback?n.callback.apply(n.scope,[n,h,h]):null}},isLoading:function(j){return j?Ext.lib.Ajax.isCallInProgress(j):!!this.transId},abort:function(j){if(j||this.isLoading()){Ext.lib.Ajax.abort(j||this.transId)}},handleResponse:function(j){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(e,this,j,k);if(k.success){k.success.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,true,j)}},handleFailure:function(j,l){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(d,this,j,k,l);if(k.failure){k.failure.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,false,j)}},doFormUpload:function(q,j,k){var l=Ext.id(),v=document,r=v.createElement("iframe"),m=Ext.getDom(q.form),u=[],t,p="multipart/form-data",n={target:m.target,method:m.method,encoding:m.encoding,enctype:m.enctype,action:m.action};Ext.fly(r).set({id:l,name:l,cls:"x-hidden",src:Ext.SSL_SECURE_URL});v.body.appendChild(r);if(Ext.isIE){document.frames[l].name=l}Ext.fly(m).set({target:l,method:i,enctype:p,encoding:p,action:k||n.action});Ext.iterate(Ext.urlDecode(j,false),function(w,o){t=v.createElement("input");Ext.fly(t).set({type:"hidden",value:o,name:w});m.appendChild(t);u.push(t)});function s(){var x=this,w={responseText:"",responseXML:null,argument:q.argument},A,z;try{A=r.contentWindow.document||r.contentDocument||g.frames[l].document;if(A){if(A.body){if(/textarea/i.test((z=A.body.firstChild||{}).tagName)){w.responseText=z.value}else{w.responseText=A.body.innerHTML}}w.responseXML=A.XMLDocument||A}}catch(y){}Ext.EventManager.removeListener(r,c,s,x);x.fireEvent(e,x,w,q);function o(D,C,B){if(Ext.isFunction(D)){D.apply(C,B)}}o(q.success,q.scope,[w,q]);o(q.callback,q.scope,[q,true,w]);if(!x.debugUploads){setTimeout(function(){Ext.removeNode(r)},100)}}Ext.EventManager.on(r,c,s,this);m.submit();Ext.fly(m).set(n);Ext.each(u,function(o){Ext.removeNode(o)})}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return json?eval("("+json+")"):""},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.util.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!o.getElementsByTagName){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(doEncode(i),":",v===null?"null":doEncode(v));b=true}}}}a.push("}");return a.join("")}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'},encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i
      ';e.body.appendChild(g);d=g.lastChild;if((c=e.defaultView)){if(c.getComputedStyle(g.firstChild.firstChild,null).marginRight!="0px"){b.correctRightMargin=false}if(c.getComputedStyle(d,null).backgroundColor!="transparent"){b.correctTransparentColor=false}}b.cssFloat=!!d.style.cssFloat;e.body.removeChild(g)};if(Ext.isReady){a()}else{Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,c=/(dbl)?click/,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},d=Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2};Ext.EventObjectImpl=function(g){if(g){this.setEvent(g.browserEvent||g)}};Ext.EventObjectImpl.prototype={setEvent:function(h){var g=this;if(h==g||(h&&h.browserEvent)){return h}g.browserEvent=h;if(h){g.button=h.button?d[h.button]:(h.which?h.which-1:-1);if(c.test(h.type)&&g.button==-1){g.button=0}g.type=h.type;g.shiftKey=h.shiftKey;g.ctrlKey=h.ctrlKey||h.metaKey||false;g.altKey=h.altKey;g.keyCode=h.keyCode;g.charCode=h.charCode;g.target=b.getTarget(h);g.xy=b.getXY(h)}else{g.button=-1;g.shiftKey=false;g.ctrlKey=false;g.altKey=false;g.keyCode=0;g.charCode=0;g.target=null;g.xy=[0,0]}return g},stopEvent:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopEvent(e.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopPropagation(e.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(e){return Ext.isSafari?(a[e]||e):e},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(g,h,e){return g?Ext.fly(this.target).findParent(g,h,e):(e?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var g=this.browserEvent;var h=0;if(g.wheelDelta){h=g.wheelDelta/120}else{if(g.detail){h=-g.detail/3}}return h},within:function(h,i,e){if(h){var g=this[i?"getRelatedTarget":"getTarget"]();return g&&((e?(g==Ext.getDom(h)):false)||Ext.fly(h).contains(g))}return false}};return new Ext.EventObjectImpl()}();Ext.Loader=Ext.apply({},{load:function(j,i,k,c){var k=k||this,g=document.getElementsByTagName("head")[0],b=document.createDocumentFragment(),a=j.length,h=0,e=this;var l=function(m){g.appendChild(e.buildScriptTag(j[m],d))};var d=function(){h++;if(a==h&&typeof i=="function"){i.call(k)}else{if(c===true){l(h)}}};if(c===true){l.call(this,0)}else{Ext.each(j,function(n,m){b.appendChild(this.buildScriptTag(n,d))},this);g.appendChild(b)}},buildScriptTag:function(b,c){var a=document.createElement("script");a.type="text/javascript";a.src=b;if(a.readyState){a.onreadystatechange=function(){if(a.readyState=="loaded"||a.readyState=="complete"){a.onreadystatechange=null;c()}}}else{a.onload=c}return a}}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/ext-dd-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/ext-dd-debug.js deleted file mode 100644 index 0a549839dac..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/ext-dd-debug.js +++ /dev/null @@ -1,4820 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/* - * These classes are derivatives of the similarly named classes in the YUI Library. - * The original license: - * Copyright (c) 2006, Yahoo! Inc. All rights reserved. - * Code licensed under the BSD License: - * http://developer.yahoo.net/yui/license.txt - */ - -(function() { - -var Event=Ext.EventManager; -var Dom=Ext.lib.Dom; - -/** - * @class Ext.dd.DragDrop - * Defines the interface and base operation of items that that can be - * dragged or can be drop targets. It was designed to be extended, overriding - * the event handlers for startDrag, onDrag, onDragOver and onDragOut. - * Up to three html elements can be associated with a DragDrop instance: - *
        - *
      • linked element: the element that is passed into the constructor. - * This is the element which defines the boundaries for interaction with - * other DragDrop objects.
      • - *
      • handle element(s): The drag operation only occurs if the element that - * was clicked matches a handle element. By default this is the linked - * element, but there are times that you will want only a portion of the - * linked element to initiate the drag operation, and the setHandleElId() - * method provides a way to define this.
      • - *
      • drag element: this represents the element that would be moved along - * with the cursor during a drag operation. By default, this is the linked - * element itself as in {@link Ext.dd.DD}. setDragElId() lets you define - * a separate element that would be moved, as in {@link Ext.dd.DDProxy}. - *
      • - *
      - * This class should not be instantiated until the onload event to ensure that - * the associated elements are available. - * The following would define a DragDrop obj that would interact with any - * other DragDrop obj in the "group1" group: - *
      - *  dd = new Ext.dd.DragDrop("div1", "group1");
      - * 
      - * Since none of the event handlers have been implemented, nothing would - * actually happen if you were to run the code above. Normally you would - * override this class or one of the default implementations, but you can - * also override the methods you want on an instance of the class... - *
      - *  dd.onDragDrop = function(e, id) {
      - *    alert("dd was dropped on " + id);
      - *  }
      - * 
      - * @constructor - * @param {String} id of the element that is linked to this instance - * @param {String} sGroup the group of related DragDrop objects - * @param {object} config an object containing configurable attributes - * Valid properties for DragDrop: - * padding, isTarget, maintainOffset, primaryButtonOnly - */ -Ext.dd.DragDrop = function(id, sGroup, config) { - if(id) { - this.init(id, sGroup, config); - } -}; - -Ext.dd.DragDrop.prototype = { - - /** - * Set to false to enable a DragDrop object to fire drag events while dragging - * over its own Element. Defaults to true - DragDrop objects do not by default - * fire drag events to themselves. - * @property ignoreSelf - * @type Boolean - */ - - /** - * The id of the element associated with this object. This is what we - * refer to as the "linked element" because the size and position of - * this element is used to determine when the drag and drop objects have - * interacted. - * @property id - * @type String - */ - id: null, - - /** - * Configuration attributes passed into the constructor - * @property config - * @type object - */ - config: null, - - /** - * The id of the element that will be dragged. By default this is same - * as the linked element, but could be changed to another element. Ex: - * Ext.dd.DDProxy - * @property dragElId - * @type String - * @private - */ - dragElId: null, - - /** - * The ID of the element that initiates the drag operation. By default - * this is the linked element, but could be changed to be a child of this - * element. This lets us do things like only starting the drag when the - * header element within the linked html element is clicked. - * @property handleElId - * @type String - * @private - */ - handleElId: null, - - /** - * An object who's property names identify HTML tags to be considered invalid as drag handles. - * A non-null property value identifies the tag as invalid. Defaults to the - * following value which prevents drag operations from being initiated by <a> elements:
      
      -{
      -    A: "A"
      -}
      - * @property invalidHandleTypes - * @type Object - */ - invalidHandleTypes: null, - - /** - * An object who's property names identify the IDs of elements to be considered invalid as drag handles. - * A non-null property value identifies the ID as invalid. For example, to prevent - * dragging from being initiated on element ID "foo", use:
      
      -{
      -    foo: true
      -}
      - * @property invalidHandleIds - * @type Object - */ - invalidHandleIds: null, - - /** - * An Array of CSS class names for elements to be considered in valid as drag handles. - * @property invalidHandleClasses - * @type Array - */ - invalidHandleClasses: null, - - /** - * The linked element's absolute X position at the time the drag was - * started - * @property startPageX - * @type int - * @private - */ - startPageX: 0, - - /** - * The linked element's absolute X position at the time the drag was - * started - * @property startPageY - * @type int - * @private - */ - startPageY: 0, - - /** - * The group defines a logical collection of DragDrop objects that are - * related. Instances only get events when interacting with other - * DragDrop object in the same group. This lets us define multiple - * groups using a single DragDrop subclass if we want. - * @property groups - * @type object An object in the format {'group1':true, 'group2':true} - */ - groups: null, - - /** - * Individual drag/drop instances can be locked. This will prevent - * onmousedown start drag. - * @property locked - * @type boolean - * @private - */ - locked: false, - - /** - * Lock this instance - * @method lock - */ - lock: function() { - this.locked = true; - }, - - /** - * When set to true, other DD objects in cooperating DDGroups do not receive - * notification events when this DD object is dragged over them. Defaults to false. - * @property moveOnly - * @type boolean - */ - moveOnly: false, - - /** - * Unlock this instace - * @method unlock - */ - unlock: function() { - this.locked = false; - }, - - /** - * By default, all instances can be a drop target. This can be disabled by - * setting isTarget to false. - * @property isTarget - * @type boolean - */ - isTarget: true, - - /** - * The padding configured for this drag and drop object for calculating - * the drop zone intersection with this object. - * @property padding - * @type int[] An array containing the 4 padding values: [top, right, bottom, left] - */ - padding: null, - - /** - * Cached reference to the linked element - * @property _domRef - * @private - */ - _domRef: null, - - /** - * Internal typeof flag - * @property __ygDragDrop - * @private - */ - __ygDragDrop: true, - - /** - * Set to true when horizontal contraints are applied - * @property constrainX - * @type boolean - * @private - */ - constrainX: false, - - /** - * Set to true when vertical contraints are applied - * @property constrainY - * @type boolean - * @private - */ - constrainY: false, - - /** - * The left constraint - * @property minX - * @type int - * @private - */ - minX: 0, - - /** - * The right constraint - * @property maxX - * @type int - * @private - */ - maxX: 0, - - /** - * The up constraint - * @property minY - * @type int - * @private - */ - minY: 0, - - /** - * The down constraint - * @property maxY - * @type int - * @private - */ - maxY: 0, - - /** - * Maintain offsets when we resetconstraints. Set to true when you want - * the position of the element relative to its parent to stay the same - * when the page changes - * - * @property maintainOffset - * @type boolean - */ - maintainOffset: false, - - /** - * Array of pixel locations the element will snap to if we specified a - * horizontal graduation/interval. This array is generated automatically - * when you define a tick interval. - * @property xTicks - * @type int[] - */ - xTicks: null, - - /** - * Array of pixel locations the element will snap to if we specified a - * vertical graduation/interval. This array is generated automatically - * when you define a tick interval. - * @property yTicks - * @type int[] - */ - yTicks: null, - - /** - * By default the drag and drop instance will only respond to the primary - * button click (left button for a right-handed mouse). Set to true to - * allow drag and drop to start with any mouse click that is propogated - * by the browser - * @property primaryButtonOnly - * @type boolean - */ - primaryButtonOnly: true, - - /** - * The available property is false until the linked dom element is accessible. - * @property available - * @type boolean - */ - available: false, - - /** - * By default, drags can only be initiated if the mousedown occurs in the - * region the linked element is. This is done in part to work around a - * bug in some browsers that mis-report the mousedown if the previous - * mouseup happened outside of the window. This property is set to true - * if outer handles are defined. - * - * @property hasOuterHandles - * @type boolean - * @default false - */ - hasOuterHandles: false, - - /** - * Code that executes immediately before the startDrag event - * @method b4StartDrag - * @private - */ - b4StartDrag: function(x, y) { }, - - /** - * Abstract method called after a drag/drop object is clicked - * and the drag or mousedown time thresholds have beeen met. - * @method startDrag - * @param {int} X click location - * @param {int} Y click location - */ - startDrag: function(x, y) { /* override this */ }, - - /** - * Code that executes immediately before the onDrag event - * @method b4Drag - * @private - */ - b4Drag: function(e) { }, - - /** - * Abstract method called during the onMouseMove event while dragging an - * object. - * @method onDrag - * @param {Event} e the mousemove event - */ - onDrag: function(e) { /* override this */ }, - - /** - * Abstract method called when this element fist begins hovering over - * another DragDrop obj - * @method onDragEnter - * @param {Event} e the mousemove event - * @param {String|DragDrop[]} id In POINT mode, the element - * id this is hovering over. In INTERSECT mode, an array of one or more - * dragdrop items being hovered over. - */ - onDragEnter: function(e, id) { /* override this */ }, - - /** - * Code that executes immediately before the onDragOver event - * @method b4DragOver - * @private - */ - b4DragOver: function(e) { }, - - /** - * Abstract method called when this element is hovering over another - * DragDrop obj - * @method onDragOver - * @param {Event} e the mousemove event - * @param {String|DragDrop[]} id In POINT mode, the element - * id this is hovering over. In INTERSECT mode, an array of dd items - * being hovered over. - */ - onDragOver: function(e, id) { /* override this */ }, - - /** - * Code that executes immediately before the onDragOut event - * @method b4DragOut - * @private - */ - b4DragOut: function(e) { }, - - /** - * Abstract method called when we are no longer hovering over an element - * @method onDragOut - * @param {Event} e the mousemove event - * @param {String|DragDrop[]} id In POINT mode, the element - * id this was hovering over. In INTERSECT mode, an array of dd items - * that the mouse is no longer over. - */ - onDragOut: function(e, id) { /* override this */ }, - - /** - * Code that executes immediately before the onDragDrop event - * @method b4DragDrop - * @private - */ - b4DragDrop: function(e) { }, - - /** - * Abstract method called when this item is dropped on another DragDrop - * obj - * @method onDragDrop - * @param {Event} e the mouseup event - * @param {String|DragDrop[]} id In POINT mode, the element - * id this was dropped on. In INTERSECT mode, an array of dd items this - * was dropped on. - */ - onDragDrop: function(e, id) { /* override this */ }, - - /** - * Abstract method called when this item is dropped on an area with no - * drop target - * @method onInvalidDrop - * @param {Event} e the mouseup event - */ - onInvalidDrop: function(e) { /* override this */ }, - - /** - * Code that executes immediately before the endDrag event - * @method b4EndDrag - * @private - */ - b4EndDrag: function(e) { }, - - /** - * Fired when we are done dragging the object - * @method endDrag - * @param {Event} e the mouseup event - */ - endDrag: function(e) { /* override this */ }, - - /** - * Code executed immediately before the onMouseDown event - * @method b4MouseDown - * @param {Event} e the mousedown event - * @private - */ - b4MouseDown: function(e) { }, - - /** - * Event handler that fires when a drag/drop obj gets a mousedown - * @method onMouseDown - * @param {Event} e the mousedown event - */ - onMouseDown: function(e) { /* override this */ }, - - /** - * Event handler that fires when a drag/drop obj gets a mouseup - * @method onMouseUp - * @param {Event} e the mouseup event - */ - onMouseUp: function(e) { /* override this */ }, - - /** - * Override the onAvailable method to do what is needed after the initial - * position was determined. - * @method onAvailable - */ - onAvailable: function () { - }, - - /** - * Provides default constraint padding to "constrainTo" elements (defaults to {left: 0, right:0, top:0, bottom:0}). - * @type Object - */ - defaultPadding : {left:0, right:0, top:0, bottom:0}, - - /** - * Initializes the drag drop object's constraints to restrict movement to a certain element. - * - * Usage: -
      
      - var dd = new Ext.dd.DDProxy("dragDiv1", "proxytest",
      -                { dragElId: "existingProxyDiv" });
      - dd.startDrag = function(){
      -     this.constrainTo("parent-id");
      - };
      - 
      - * Or you can initalize it using the {@link Ext.Element} object: -
      
      - Ext.get("dragDiv1").initDDProxy("proxytest", {dragElId: "existingProxyDiv"}, {
      -     startDrag : function(){
      -         this.constrainTo("parent-id");
      -     }
      - });
      - 
      - * @param {Mixed} constrainTo The element to constrain to. - * @param {Object/Number} pad (optional) Pad provides a way to specify "padding" of the constraints, - * and can be either a number for symmetrical padding (4 would be equal to {left:4, right:4, top:4, bottom:4}) or - * an object containing the sides to pad. For example: {right:10, bottom:10} - * @param {Boolean} inContent (optional) Constrain the draggable in the content box of the element (inside padding and borders) - */ - constrainTo : function(constrainTo, pad, inContent){ - if(Ext.isNumber(pad)){ - pad = {left: pad, right:pad, top:pad, bottom:pad}; - } - pad = pad || this.defaultPadding; - var b = Ext.get(this.getEl()).getBox(), - ce = Ext.get(constrainTo), - s = ce.getScroll(), - c, - cd = ce.dom; - if(cd == document.body){ - c = { x: s.left, y: s.top, width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()}; - }else{ - var xy = ce.getXY(); - c = {x : xy[0], y: xy[1], width: cd.clientWidth, height: cd.clientHeight}; - } - - - var topSpace = b.y - c.y, - leftSpace = b.x - c.x; - - this.resetConstraints(); - this.setXConstraint(leftSpace - (pad.left||0), // left - c.width - leftSpace - b.width - (pad.right||0), //right - this.xTickSize - ); - this.setYConstraint(topSpace - (pad.top||0), //top - c.height - topSpace - b.height - (pad.bottom||0), //bottom - this.yTickSize - ); - }, - - /** - * Returns a reference to the linked element - * @method getEl - * @return {HTMLElement} the html element - */ - getEl: function() { - if (!this._domRef) { - this._domRef = Ext.getDom(this.id); - } - - return this._domRef; - }, - - /** - * Returns a reference to the actual element to drag. By default this is - * the same as the html element, but it can be assigned to another - * element. An example of this can be found in Ext.dd.DDProxy - * @method getDragEl - * @return {HTMLElement} the html element - */ - getDragEl: function() { - return Ext.getDom(this.dragElId); - }, - - /** - * Sets up the DragDrop object. Must be called in the constructor of any - * Ext.dd.DragDrop subclass - * @method init - * @param id the id of the linked element - * @param {String} sGroup the group of related items - * @param {object} config configuration attributes - */ - init: function(id, sGroup, config) { - this.initTarget(id, sGroup, config); - Event.on(this.id, "mousedown", this.handleMouseDown, this); - // Event.on(this.id, "selectstart", Event.preventDefault); - }, - - /** - * Initializes Targeting functionality only... the object does not - * get a mousedown handler. - * @method initTarget - * @param id the id of the linked element - * @param {String} sGroup the group of related items - * @param {object} config configuration attributes - */ - initTarget: function(id, sGroup, config) { - - // configuration attributes - this.config = config || {}; - - // create a local reference to the drag and drop manager - this.DDM = Ext.dd.DDM; - // initialize the groups array - this.groups = {}; - - // assume that we have an element reference instead of an id if the - // parameter is not a string - if (typeof id !== "string") { - id = Ext.id(id); - } - - // set the id - this.id = id; - - // add to an interaction group - this.addToGroup((sGroup) ? sGroup : "default"); - - // We don't want to register this as the handle with the manager - // so we just set the id rather than calling the setter. - this.handleElId = id; - - // the linked element is the element that gets dragged by default - this.setDragElId(id); - - // by default, clicked anchors will not start drag operations. - this.invalidHandleTypes = { A: "A" }; - this.invalidHandleIds = {}; - this.invalidHandleClasses = []; - - this.applyConfig(); - - this.handleOnAvailable(); - }, - - /** - * Applies the configuration parameters that were passed into the constructor. - * This is supposed to happen at each level through the inheritance chain. So - * a DDProxy implentation will execute apply config on DDProxy, DD, and - * DragDrop in order to get all of the parameters that are available in - * each object. - * @method applyConfig - */ - applyConfig: function() { - - // configurable properties: - // padding, isTarget, maintainOffset, primaryButtonOnly - this.padding = this.config.padding || [0, 0, 0, 0]; - this.isTarget = (this.config.isTarget !== false); - this.maintainOffset = (this.config.maintainOffset); - this.primaryButtonOnly = (this.config.primaryButtonOnly !== false); - - }, - - /** - * Executed when the linked element is available - * @method handleOnAvailable - * @private - */ - handleOnAvailable: function() { - this.available = true; - this.resetConstraints(); - this.onAvailable(); - }, - - /** - * Configures the padding for the target zone in px. Effectively expands - * (or reduces) the virtual object size for targeting calculations. - * Supports css-style shorthand; if only one parameter is passed, all sides - * will have that padding, and if only two are passed, the top and bottom - * will have the first param, the left and right the second. - * @method setPadding - * @param {int} iTop Top pad - * @param {int} iRight Right pad - * @param {int} iBot Bot pad - * @param {int} iLeft Left pad - */ - setPadding: function(iTop, iRight, iBot, iLeft) { - // this.padding = [iLeft, iRight, iTop, iBot]; - if (!iRight && 0 !== iRight) { - this.padding = [iTop, iTop, iTop, iTop]; - } else if (!iBot && 0 !== iBot) { - this.padding = [iTop, iRight, iTop, iRight]; - } else { - this.padding = [iTop, iRight, iBot, iLeft]; - } - }, - - /** - * Stores the initial placement of the linked element. - * @method setInitPosition - * @param {int} diffX the X offset, default 0 - * @param {int} diffY the Y offset, default 0 - */ - setInitPosition: function(diffX, diffY) { - var el = this.getEl(); - - if (!this.DDM.verifyEl(el)) { - return; - } - - var dx = diffX || 0; - var dy = diffY || 0; - - var p = Dom.getXY( el ); - - this.initPageX = p[0] - dx; - this.initPageY = p[1] - dy; - - this.lastPageX = p[0]; - this.lastPageY = p[1]; - - this.setStartPosition(p); - }, - - /** - * Sets the start position of the element. This is set when the obj - * is initialized, the reset when a drag is started. - * @method setStartPosition - * @param pos current position (from previous lookup) - * @private - */ - setStartPosition: function(pos) { - var p = pos || Dom.getXY( this.getEl() ); - this.deltaSetXY = null; - - this.startPageX = p[0]; - this.startPageY = p[1]; - }, - - /** - * Add this instance to a group of related drag/drop objects. All - * instances belong to at least one group, and can belong to as many - * groups as needed. - * @method addToGroup - * @param sGroup {string} the name of the group - */ - addToGroup: function(sGroup) { - this.groups[sGroup] = true; - this.DDM.regDragDrop(this, sGroup); - }, - - /** - * Remove's this instance from the supplied interaction group - * @method removeFromGroup - * @param {string} sGroup The group to drop - */ - removeFromGroup: function(sGroup) { - if (this.groups[sGroup]) { - delete this.groups[sGroup]; - } - - this.DDM.removeDDFromGroup(this, sGroup); - }, - - /** - * Allows you to specify that an element other than the linked element - * will be moved with the cursor during a drag - * @method setDragElId - * @param id {string} the id of the element that will be used to initiate the drag - */ - setDragElId: function(id) { - this.dragElId = id; - }, - - /** - * Allows you to specify a child of the linked element that should be - * used to initiate the drag operation. An example of this would be if - * you have a content div with text and links. Clicking anywhere in the - * content area would normally start the drag operation. Use this method - * to specify that an element inside of the content div is the element - * that starts the drag operation. - * @method setHandleElId - * @param id {string} the id of the element that will be used to - * initiate the drag. - */ - setHandleElId: function(id) { - if (typeof id !== "string") { - id = Ext.id(id); - } - this.handleElId = id; - this.DDM.regHandle(this.id, id); - }, - - /** - * Allows you to set an element outside of the linked element as a drag - * handle - * @method setOuterHandleElId - * @param id the id of the element that will be used to initiate the drag - */ - setOuterHandleElId: function(id) { - if (typeof id !== "string") { - id = Ext.id(id); - } - Event.on(id, "mousedown", - this.handleMouseDown, this); - this.setHandleElId(id); - - this.hasOuterHandles = true; - }, - - /** - * Remove all drag and drop hooks for this element - * @method unreg - */ - unreg: function() { - Event.un(this.id, "mousedown", - this.handleMouseDown); - this._domRef = null; - this.DDM._remove(this); - }, - - destroy : function(){ - this.unreg(); - }, - - /** - * Returns true if this instance is locked, or the drag drop mgr is locked - * (meaning that all drag/drop is disabled on the page.) - * @method isLocked - * @return {boolean} true if this obj or all drag/drop is locked, else - * false - */ - isLocked: function() { - return (this.DDM.isLocked() || this.locked); - }, - - /** - * Fired when this object is clicked - * @method handleMouseDown - * @param {Event} e - * @param {Ext.dd.DragDrop} oDD the clicked dd object (this dd obj) - * @private - */ - handleMouseDown: function(e, oDD){ - if (this.primaryButtonOnly && e.button != 0) { - return; - } - - if (this.isLocked()) { - return; - } - - this.DDM.refreshCache(this.groups); - - var pt = new Ext.lib.Point(Ext.lib.Event.getPageX(e), Ext.lib.Event.getPageY(e)); - if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) ) { - } else { - if (this.clickValidator(e)) { - - // set the initial element position - this.setStartPosition(); - - this.b4MouseDown(e); - this.onMouseDown(e); - - this.DDM.handleMouseDown(e, this); - - this.DDM.stopEvent(e); - } else { - - - } - } - }, - - clickValidator: function(e) { - var target = e.getTarget(); - return ( this.isValidHandleChild(target) && - (this.id == this.handleElId || - this.DDM.handleWasClicked(target, this.id)) ); - }, - - /** - * Allows you to specify a tag name that should not start a drag operation - * when clicked. This is designed to facilitate embedding links within a - * drag handle that do something other than start the drag. - * @method addInvalidHandleType - * @param {string} tagName the type of element to exclude - */ - addInvalidHandleType: function(tagName) { - var type = tagName.toUpperCase(); - this.invalidHandleTypes[type] = type; - }, - - /** - * Lets you to specify an element id for a child of a drag handle - * that should not initiate a drag - * @method addInvalidHandleId - * @param {string} id the element id of the element you wish to ignore - */ - addInvalidHandleId: function(id) { - if (typeof id !== "string") { - id = Ext.id(id); - } - this.invalidHandleIds[id] = id; - }, - - /** - * Lets you specify a css class of elements that will not initiate a drag - * @method addInvalidHandleClass - * @param {string} cssClass the class of the elements you wish to ignore - */ - addInvalidHandleClass: function(cssClass) { - this.invalidHandleClasses.push(cssClass); - }, - - /** - * Unsets an excluded tag name set by addInvalidHandleType - * @method removeInvalidHandleType - * @param {string} tagName the type of element to unexclude - */ - removeInvalidHandleType: function(tagName) { - var type = tagName.toUpperCase(); - // this.invalidHandleTypes[type] = null; - delete this.invalidHandleTypes[type]; - }, - - /** - * Unsets an invalid handle id - * @method removeInvalidHandleId - * @param {string} id the id of the element to re-enable - */ - removeInvalidHandleId: function(id) { - if (typeof id !== "string") { - id = Ext.id(id); - } - delete this.invalidHandleIds[id]; - }, - - /** - * Unsets an invalid css class - * @method removeInvalidHandleClass - * @param {string} cssClass the class of the element(s) you wish to - * re-enable - */ - removeInvalidHandleClass: function(cssClass) { - for (var i=0, len=this.invalidHandleClasses.length; i= this.minX; i = i - iTickSize) { - if (!tickMap[i]) { - this.xTicks[this.xTicks.length] = i; - tickMap[i] = true; - } - } - - for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) { - if (!tickMap[i]) { - this.xTicks[this.xTicks.length] = i; - tickMap[i] = true; - } - } - - this.xTicks.sort(this.DDM.numericSort) ; - }, - - /** - * Create the array of vertical tick marks if an interval was specified in - * setYConstraint(). - * @method setYTicks - * @private - */ - setYTicks: function(iStartY, iTickSize) { - this.yTicks = []; - this.yTickSize = iTickSize; - - var tickMap = {}; - - for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) { - if (!tickMap[i]) { - this.yTicks[this.yTicks.length] = i; - tickMap[i] = true; - } - } - - for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) { - if (!tickMap[i]) { - this.yTicks[this.yTicks.length] = i; - tickMap[i] = true; - } - } - - this.yTicks.sort(this.DDM.numericSort) ; - }, - - /** - * By default, the element can be dragged any place on the screen. Use - * this method to limit the horizontal travel of the element. Pass in - * 0,0 for the parameters if you want to lock the drag to the y axis. - * @method setXConstraint - * @param {int} iLeft the number of pixels the element can move to the left - * @param {int} iRight the number of pixels the element can move to the - * right - * @param {int} iTickSize optional parameter for specifying that the - * element - * should move iTickSize pixels at a time. - */ - setXConstraint: function(iLeft, iRight, iTickSize) { - this.leftConstraint = iLeft; - this.rightConstraint = iRight; - - this.minX = this.initPageX - iLeft; - this.maxX = this.initPageX + iRight; - if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); } - - this.constrainX = true; - }, - - /** - * Clears any constraints applied to this instance. Also clears ticks - * since they can't exist independent of a constraint at this time. - * @method clearConstraints - */ - clearConstraints: function() { - this.constrainX = false; - this.constrainY = false; - this.clearTicks(); - }, - - /** - * Clears any tick interval defined for this instance - * @method clearTicks - */ - clearTicks: function() { - this.xTicks = null; - this.yTicks = null; - this.xTickSize = 0; - this.yTickSize = 0; - }, - - /** - * By default, the element can be dragged any place on the screen. Set - * this to limit the vertical travel of the element. Pass in 0,0 for the - * parameters if you want to lock the drag to the x axis. - * @method setYConstraint - * @param {int} iUp the number of pixels the element can move up - * @param {int} iDown the number of pixels the element can move down - * @param {int} iTickSize optional parameter for specifying that the - * element should move iTickSize pixels at a time. - */ - setYConstraint: function(iUp, iDown, iTickSize) { - this.topConstraint = iUp; - this.bottomConstraint = iDown; - - this.minY = this.initPageY - iUp; - this.maxY = this.initPageY + iDown; - if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); } - - this.constrainY = true; - - }, - - /** - * resetConstraints must be called if you manually reposition a dd element. - * @method resetConstraints - * @param {boolean} maintainOffset - */ - resetConstraints: function() { - // Maintain offsets if necessary - if (this.initPageX || this.initPageX === 0) { - // figure out how much this thing has moved - var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0; - var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0; - - this.setInitPosition(dx, dy); - - // This is the first time we have detected the element's position - } else { - this.setInitPosition(); - } - - if (this.constrainX) { - this.setXConstraint( this.leftConstraint, - this.rightConstraint, - this.xTickSize ); - } - - if (this.constrainY) { - this.setYConstraint( this.topConstraint, - this.bottomConstraint, - this.yTickSize ); - } - }, - - /** - * Normally the drag element is moved pixel by pixel, but we can specify - * that it move a number of pixels at a time. This method resolves the - * location when we have it set up like this. - * @method getTick - * @param {int} val where we want to place the object - * @param {int[]} tickArray sorted array of valid points - * @return {int} the closest tick - * @private - */ - getTick: function(val, tickArray) { - if (!tickArray) { - // If tick interval is not defined, it is effectively 1 pixel, - // so we return the value passed to us. - return val; - } else if (tickArray[0] >= val) { - // The value is lower than the first tick, so we return the first - // tick. - return tickArray[0]; - } else { - for (var i=0, len=tickArray.length; i= val) { - var diff1 = val - tickArray[i]; - var diff2 = tickArray[next] - val; - return (diff2 > diff1) ? tickArray[i] : tickArray[next]; - } - } - - // The value is larger than the last tick, so we return the last - // tick. - return tickArray[tickArray.length - 1]; - } - }, - - /** - * toString method - * @method toString - * @return {string} string representation of the dd obj - */ - toString: function() { - return ("DragDrop " + this.id); - } - -}; - -})(); -/* - * The drag and drop utility provides a framework for building drag and drop - * applications. In addition to enabling drag and drop for specific elements, - * the drag and drop elements are tracked by the manager class, and the - * interactions between the various elements are tracked during the drag and - * the implementing code is notified about these important moments. - */ - -// Only load the library once. Rewriting the manager class would orphan -// existing drag and drop instances. -if (!Ext.dd.DragDropMgr) { - -/** - * @class Ext.dd.DragDropMgr - * DragDropMgr is a singleton that tracks the element interaction for - * all DragDrop items in the window. Generally, you will not call - * this class directly, but it does have helper methods that could - * be useful in your DragDrop implementations. - * @singleton - */ -Ext.dd.DragDropMgr = function() { - - var Event = Ext.EventManager; - - return { - - /** - * Two dimensional Array of registered DragDrop objects. The first - * dimension is the DragDrop item group, the second the DragDrop - * object. - * @property ids - * @type String[] - * @private - * @static - */ - ids: {}, - - /** - * Array of element ids defined as drag handles. Used to determine - * if the element that generated the mousedown event is actually the - * handle and not the html element itself. - * @property handleIds - * @type String[] - * @private - * @static - */ - handleIds: {}, - - /** - * the DragDrop object that is currently being dragged - * @property dragCurrent - * @type DragDrop - * @private - * @static - **/ - dragCurrent: null, - - /** - * the DragDrop object(s) that are being hovered over - * @property dragOvers - * @type Array - * @private - * @static - */ - dragOvers: {}, - - /** - * the X distance between the cursor and the object being dragged - * @property deltaX - * @type int - * @private - * @static - */ - deltaX: 0, - - /** - * the Y distance between the cursor and the object being dragged - * @property deltaY - * @type int - * @private - * @static - */ - deltaY: 0, - - /** - * Flag to determine if we should prevent the default behavior of the - * events we define. By default this is true, but this can be set to - * false if you need the default behavior (not recommended) - * @property preventDefault - * @type boolean - * @static - */ - preventDefault: true, - - /** - * Flag to determine if we should stop the propagation of the events - * we generate. This is true by default but you may want to set it to - * false if the html element contains other features that require the - * mouse click. - * @property stopPropagation - * @type boolean - * @static - */ - stopPropagation: true, - - /** - * Internal flag that is set to true when drag and drop has been - * intialized - * @property initialized - * @private - * @static - */ - initialized: false, - - /** - * All drag and drop can be disabled. - * @property locked - * @private - * @static - */ - locked: false, - - /** - * Called the first time an element is registered. - * @method init - * @private - * @static - */ - init: function() { - this.initialized = true; - }, - - /** - * In point mode, drag and drop interaction is defined by the - * location of the cursor during the drag/drop - * @property POINT - * @type int - * @static - */ - POINT: 0, - - /** - * In intersect mode, drag and drop interaction is defined by the - * overlap of two or more drag and drop objects. - * @property INTERSECT - * @type int - * @static - */ - INTERSECT: 1, - - /** - * The current drag and drop mode. Default: POINT - * @property mode - * @type int - * @static - */ - mode: 0, - - /** - * Runs method on all drag and drop objects - * @method _execOnAll - * @private - * @static - */ - _execOnAll: function(sMethod, args) { - for (var i in this.ids) { - for (var j in this.ids[i]) { - var oDD = this.ids[i][j]; - if (! this.isTypeOfDD(oDD)) { - continue; - } - oDD[sMethod].apply(oDD, args); - } - } - }, - - /** - * Drag and drop initialization. Sets up the global event handlers - * @method _onLoad - * @private - * @static - */ - _onLoad: function() { - - this.init(); - - - Event.on(document, "mouseup", this.handleMouseUp, this, true); - Event.on(document, "mousemove", this.handleMouseMove, this, true); - Event.on(window, "unload", this._onUnload, this, true); - Event.on(window, "resize", this._onResize, this, true); - // Event.on(window, "mouseout", this._test); - - }, - - /** - * Reset constraints on all drag and drop objs - * @method _onResize - * @private - * @static - */ - _onResize: function(e) { - this._execOnAll("resetConstraints", []); - }, - - /** - * Lock all drag and drop functionality - * @method lock - * @static - */ - lock: function() { this.locked = true; }, - - /** - * Unlock all drag and drop functionality - * @method unlock - * @static - */ - unlock: function() { this.locked = false; }, - - /** - * Is drag and drop locked? - * @method isLocked - * @return {boolean} True if drag and drop is locked, false otherwise. - * @static - */ - isLocked: function() { return this.locked; }, - - /** - * Location cache that is set for all drag drop objects when a drag is - * initiated, cleared when the drag is finished. - * @property locationCache - * @private - * @static - */ - locationCache: {}, - - /** - * Set useCache to false if you want to force object the lookup of each - * drag and drop linked element constantly during a drag. - * @property useCache - * @type boolean - * @static - */ - useCache: true, - - /** - * The number of pixels that the mouse needs to move after the - * mousedown before the drag is initiated. Default=3; - * @property clickPixelThresh - * @type int - * @static - */ - clickPixelThresh: 3, - - /** - * The number of milliseconds after the mousedown event to initiate the - * drag if we don't get a mouseup event. Default=350 - * @property clickTimeThresh - * @type int - * @static - */ - clickTimeThresh: 350, - - /** - * Flag that indicates that either the drag pixel threshold or the - * mousdown time threshold has been met - * @property dragThreshMet - * @type boolean - * @private - * @static - */ - dragThreshMet: false, - - /** - * Timeout used for the click time threshold - * @property clickTimeout - * @type Object - * @private - * @static - */ - clickTimeout: null, - - /** - * The X position of the mousedown event stored for later use when a - * drag threshold is met. - * @property startX - * @type int - * @private - * @static - */ - startX: 0, - - /** - * The Y position of the mousedown event stored for later use when a - * drag threshold is met. - * @property startY - * @type int - * @private - * @static - */ - startY: 0, - - /** - * Each DragDrop instance must be registered with the DragDropMgr. - * This is executed in DragDrop.init() - * @method regDragDrop - * @param {DragDrop} oDD the DragDrop object to register - * @param {String} sGroup the name of the group this element belongs to - * @static - */ - regDragDrop: function(oDD, sGroup) { - if (!this.initialized) { this.init(); } - - if (!this.ids[sGroup]) { - this.ids[sGroup] = {}; - } - this.ids[sGroup][oDD.id] = oDD; - }, - - /** - * Removes the supplied dd instance from the supplied group. Executed - * by DragDrop.removeFromGroup, so don't call this function directly. - * @method removeDDFromGroup - * @private - * @static - */ - removeDDFromGroup: function(oDD, sGroup) { - if (!this.ids[sGroup]) { - this.ids[sGroup] = {}; - } - - var obj = this.ids[sGroup]; - if (obj && obj[oDD.id]) { - delete obj[oDD.id]; - } - }, - - /** - * Unregisters a drag and drop item. This is executed in - * DragDrop.unreg, use that method instead of calling this directly. - * @method _remove - * @private - * @static - */ - _remove: function(oDD) { - for (var g in oDD.groups) { - if (g && this.ids[g] && this.ids[g][oDD.id]) { - delete this.ids[g][oDD.id]; - } - } - delete this.handleIds[oDD.id]; - }, - - /** - * Each DragDrop handle element must be registered. This is done - * automatically when executing DragDrop.setHandleElId() - * @method regHandle - * @param {String} sDDId the DragDrop id this element is a handle for - * @param {String} sHandleId the id of the element that is the drag - * handle - * @static - */ - regHandle: function(sDDId, sHandleId) { - if (!this.handleIds[sDDId]) { - this.handleIds[sDDId] = {}; - } - this.handleIds[sDDId][sHandleId] = sHandleId; - }, - - /** - * Utility function to determine if a given element has been - * registered as a drag drop item. - * @method isDragDrop - * @param {String} id the element id to check - * @return {boolean} true if this element is a DragDrop item, - * false otherwise - * @static - */ - isDragDrop: function(id) { - return ( this.getDDById(id) ) ? true : false; - }, - - /** - * Returns the drag and drop instances that are in all groups the - * passed in instance belongs to. - * @method getRelated - * @param {DragDrop} p_oDD the obj to get related data for - * @param {boolean} bTargetsOnly if true, only return targetable objs - * @return {DragDrop[]} the related instances - * @static - */ - getRelated: function(p_oDD, bTargetsOnly) { - var oDDs = []; - for (var i in p_oDD.groups) { - for (var j in this.ids[i]) { - var dd = this.ids[i][j]; - if (! this.isTypeOfDD(dd)) { - continue; - } - if (!bTargetsOnly || dd.isTarget) { - oDDs[oDDs.length] = dd; - } - } - } - - return oDDs; - }, - - /** - * Returns true if the specified dd target is a legal target for - * the specifice drag obj - * @method isLegalTarget - * @param {DragDrop} oDD the drag obj - * @param {DragDrop} oTargetDD the target - * @return {boolean} true if the target is a legal target for the - * dd obj - * @static - */ - isLegalTarget: function (oDD, oTargetDD) { - var targets = this.getRelated(oDD, true); - for (var i=0, len=targets.length;i this.clickPixelThresh || - diffY > this.clickPixelThresh) { - this.startDrag(this.startX, this.startY); - } - } - - if (this.dragThreshMet) { - this.dragCurrent.b4Drag(e); - this.dragCurrent.onDrag(e); - if(!this.dragCurrent.moveOnly){ - this.fireEvents(e, false); - } - } - - this.stopEvent(e); - - return true; - }, - - /** - * Iterates over all of the DragDrop elements to find ones we are - * hovering over or dropping on - * @method fireEvents - * @param {Event} e the event - * @param {boolean} isDrop is this a drop op or a mouseover op? - * @private - * @static - */ - fireEvents: function(e, isDrop) { - var dc = this.dragCurrent; - - // If the user did the mouse up outside of the window, we could - // get here even though we have ended the drag. - if (!dc || dc.isLocked()) { - return; - } - - var pt = e.getPoint(); - - // cache the previous dragOver array - var oldOvers = []; - - var outEvts = []; - var overEvts = []; - var dropEvts = []; - var enterEvts = []; - - // Check to see if the object(s) we were hovering over is no longer - // being hovered over so we can fire the onDragOut event - for (var i in this.dragOvers) { - - var ddo = this.dragOvers[i]; - - if (! this.isTypeOfDD(ddo)) { - continue; - } - - if (! this.isOverTarget(pt, ddo, this.mode)) { - outEvts.push( ddo ); - } - - oldOvers[i] = true; - delete this.dragOvers[i]; - } - - for (var sGroup in dc.groups) { - - if ("string" != typeof sGroup) { - continue; - } - - for (i in this.ids[sGroup]) { - var oDD = this.ids[sGroup][i]; - if (! this.isTypeOfDD(oDD)) { - continue; - } - - if (oDD.isTarget && !oDD.isLocked() && ((oDD != dc) || (dc.ignoreSelf === false))) { - if (this.isOverTarget(pt, oDD, this.mode)) { - // look for drop interactions - if (isDrop) { - dropEvts.push( oDD ); - // look for drag enter and drag over interactions - } else { - - // initial drag over: dragEnter fires - if (!oldOvers[oDD.id]) { - enterEvts.push( oDD ); - // subsequent drag overs: dragOver fires - } else { - overEvts.push( oDD ); - } - - this.dragOvers[oDD.id] = oDD; - } - } - } - } - } - - if (this.mode) { - if (outEvts.length) { - dc.b4DragOut(e, outEvts); - dc.onDragOut(e, outEvts); - } - - if (enterEvts.length) { - dc.onDragEnter(e, enterEvts); - } - - if (overEvts.length) { - dc.b4DragOver(e, overEvts); - dc.onDragOver(e, overEvts); - } - - if (dropEvts.length) { - dc.b4DragDrop(e, dropEvts); - dc.onDragDrop(e, dropEvts); - } - - } else { - // fire dragout events - var len = 0; - for (i=0, len=outEvts.length; i - * Ext.dd.DragDropMgr.refreshCache(ddinstance.groups); - *
      - * Alternatively: - * - * Ext.dd.DragDropMgr.refreshCache({group1:true, group2:true}); - * - * @TODO this really should be an indexed array. Alternatively this - * method could accept both. - * @method refreshCache - * @param {Object} groups an associative array of groups to refresh - * @static - */ - refreshCache: function(groups) { - for (var sGroup in groups) { - if ("string" != typeof sGroup) { - continue; - } - for (var i in this.ids[sGroup]) { - var oDD = this.ids[sGroup][i]; - - if (this.isTypeOfDD(oDD)) { - // if (this.isTypeOfDD(oDD) && oDD.isTarget) { - var loc = this.getLocation(oDD); - if (loc) { - this.locationCache[oDD.id] = loc; - } else { - delete this.locationCache[oDD.id]; - // this will unregister the drag and drop object if - // the element is not in a usable state - // oDD.unreg(); - } - } - } - } - }, - - /** - * This checks to make sure an element exists and is in the DOM. The - * main purpose is to handle cases where innerHTML is used to remove - * drag and drop objects from the DOM. IE provides an 'unspecified - * error' when trying to access the offsetParent of such an element - * @method verifyEl - * @param {HTMLElement} el the element to check - * @return {boolean} true if the element looks usable - * @static - */ - verifyEl: function(el) { - if (el) { - var parent; - if(Ext.isIE){ - try{ - parent = el.offsetParent; - }catch(e){} - }else{ - parent = el.offsetParent; - } - if (parent) { - return true; - } - } - - return false; - }, - - /** - * Returns a Region object containing the drag and drop element's position - * and size, including the padding configured for it - * @method getLocation - * @param {DragDrop} oDD the drag and drop object to get the - * location for - * @return {Ext.lib.Region} a Region object representing the total area - * the element occupies, including any padding - * the instance is configured for. - * @static - */ - getLocation: function(oDD) { - if (! this.isTypeOfDD(oDD)) { - return null; - } - - var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l, region; - - try { - pos= Ext.lib.Dom.getXY(el); - } catch (e) { } - - if (!pos) { - return null; - } - - x1 = pos[0]; - x2 = x1 + el.offsetWidth; - y1 = pos[1]; - y2 = y1 + el.offsetHeight; - - t = y1 - oDD.padding[0]; - r = x2 + oDD.padding[1]; - b = y2 + oDD.padding[2]; - l = x1 - oDD.padding[3]; - - region = new Ext.lib.Region( t, r, b, l ); - /* - * The code below is to ensure that large scrolling elements will - * only have their visible area recognized as a drop target, otherwise it - * can potentially erronously register as a target when the element scrolls - * over the top of something below it. - */ - el = Ext.get(el.parentNode); - while (el && region) { - if (el.isScrollable()) { - // check whether our element is visible in the view port: - region = region.intersect(el.getRegion()); - } - el = el.parent(); - } - return region; - }, - - /** - * Checks the cursor location to see if it over the target - * @method isOverTarget - * @param {Ext.lib.Point} pt The point to evaluate - * @param {DragDrop} oTarget the DragDrop object we are inspecting - * @return {boolean} true if the mouse is over the target - * @private - * @static - */ - isOverTarget: function(pt, oTarget, intersect) { - // use cache if available - var loc = this.locationCache[oTarget.id]; - if (!loc || !this.useCache) { - loc = this.getLocation(oTarget); - this.locationCache[oTarget.id] = loc; - - } - - if (!loc) { - return false; - } - - oTarget.cursorIsOver = loc.contains( pt ); - - // DragDrop is using this as a sanity check for the initial mousedown - // in this case we are done. In POINT mode, if the drag obj has no - // contraints, we are also done. Otherwise we need to evaluate the - // location of the target as related to the actual location of the - // dragged element. - var dc = this.dragCurrent; - if (!dc || !dc.getTargetCoord || - (!intersect && !dc.constrainX && !dc.constrainY)) { - return oTarget.cursorIsOver; - } - - oTarget.overlap = null; - - // Get the current location of the drag element, this is the - // location of the mouse event less the delta that represents - // where the original mousedown happened on the element. We - // need to consider constraints and ticks as well. - var pos = dc.getTargetCoord(pt.x, pt.y); - - var el = dc.getDragEl(); - var curRegion = new Ext.lib.Region( pos.y, - pos.x + el.offsetWidth, - pos.y + el.offsetHeight, - pos.x ); - - var overlap = curRegion.intersect(loc); - - if (overlap) { - oTarget.overlap = overlap; - return (intersect) ? true : oTarget.cursorIsOver; - } else { - return false; - } - }, - - /** - * unload event handler - * @method _onUnload - * @private - * @static - */ - _onUnload: function(e, me) { - Event.removeListener(document, "mouseup", this.handleMouseUp, this); - Event.removeListener(document, "mousemove", this.handleMouseMove, this); - Event.removeListener(window, "resize", this._onResize, this); - Ext.dd.DragDropMgr.unregAll(); - }, - - /** - * Cleans up the drag and drop events and objects. - * @method unregAll - * @private - * @static - */ - unregAll: function() { - - if (this.dragCurrent) { - this.stopDrag(); - this.dragCurrent = null; - } - - this._execOnAll("unreg", []); - - for (var i in this.elementCache) { - delete this.elementCache[i]; - } - - this.elementCache = {}; - this.ids = {}; - }, - - /** - * A cache of DOM elements - * @property elementCache - * @private - * @static - */ - elementCache: {}, - - /** - * Get the wrapper for the DOM element specified - * @method getElWrapper - * @param {String} id the id of the element to get - * @return {Ext.dd.DDM.ElementWrapper} the wrapped element - * @private - * @deprecated This wrapper isn't that useful - * @static - */ - getElWrapper: function(id) { - var oWrapper = this.elementCache[id]; - if (!oWrapper || !oWrapper.el) { - oWrapper = this.elementCache[id] = - new this.ElementWrapper(Ext.getDom(id)); - } - return oWrapper; - }, - - /** - * Returns the actual DOM element - * @method getElement - * @param {String} id the id of the elment to get - * @return {Object} The element - * @deprecated use Ext.lib.Ext.getDom instead - * @static - */ - getElement: function(id) { - return Ext.getDom(id); - }, - - /** - * Returns the style property for the DOM element (i.e., - * document.getElById(id).style) - * @method getCss - * @param {String} id the id of the elment to get - * @return {Object} The style property of the element - * @deprecated use Ext.lib.Dom instead - * @static - */ - getCss: function(id) { - var el = Ext.getDom(id); - return (el) ? el.style : null; - }, - - /** - * Inner class for cached elements - * @class Ext.dd.DragDropMgr.ElementWrapper - * @for DragDropMgr - * @private - * @deprecated - */ - ElementWrapper: function(el) { - /** - * The element - * @property el - */ - this.el = el || null; - /** - * The element id - * @property id - */ - this.id = this.el && el.id; - /** - * A reference to the style property - * @property css - */ - this.css = this.el && el.style; - }, - - /** - * Returns the X position of an html element - * @method getPosX - * @param el the element for which to get the position - * @return {int} the X coordinate - * @for DragDropMgr - * @deprecated use Ext.lib.Dom.getX instead - * @static - */ - getPosX: function(el) { - return Ext.lib.Dom.getX(el); - }, - - /** - * Returns the Y position of an html element - * @method getPosY - * @param el the element for which to get the position - * @return {int} the Y coordinate - * @deprecated use Ext.lib.Dom.getY instead - * @static - */ - getPosY: function(el) { - return Ext.lib.Dom.getY(el); - }, - - /** - * Swap two nodes. In IE, we use the native method, for others we - * emulate the IE behavior - * @method swapNode - * @param n1 the first node to swap - * @param n2 the other node to swap - * @static - */ - swapNode: function(n1, n2) { - if (n1.swapNode) { - n1.swapNode(n2); - } else { - var p = n2.parentNode; - var s = n2.nextSibling; - - if (s == n1) { - p.insertBefore(n1, n2); - } else if (n2 == n1.nextSibling) { - p.insertBefore(n2, n1); - } else { - n1.parentNode.replaceChild(n2, n1); - p.insertBefore(n1, s); - } - } - }, - - /** - * Returns the current scroll position - * @method getScroll - * @private - * @static - */ - getScroll: function () { - var t, l, dde=document.documentElement, db=document.body; - if (dde && (dde.scrollTop || dde.scrollLeft)) { - t = dde.scrollTop; - l = dde.scrollLeft; - } else if (db) { - t = db.scrollTop; - l = db.scrollLeft; - } else { - - } - return { top: t, left: l }; - }, - - /** - * Returns the specified element style property - * @method getStyle - * @param {HTMLElement} el the element - * @param {string} styleProp the style property - * @return {string} The value of the style property - * @deprecated use Ext.lib.Dom.getStyle - * @static - */ - getStyle: function(el, styleProp) { - return Ext.fly(el).getStyle(styleProp); - }, - - /** - * Gets the scrollTop - * @method getScrollTop - * @return {int} the document's scrollTop - * @static - */ - getScrollTop: function () { - return this.getScroll().top; - }, - - /** - * Gets the scrollLeft - * @method getScrollLeft - * @return {int} the document's scrollTop - * @static - */ - getScrollLeft: function () { - return this.getScroll().left; - }, - - /** - * Sets the x/y position of an element to the location of the - * target element. - * @method moveToEl - * @param {HTMLElement} moveEl The element to move - * @param {HTMLElement} targetEl The position reference element - * @static - */ - moveToEl: function (moveEl, targetEl) { - var aCoord = Ext.lib.Dom.getXY(targetEl); - Ext.lib.Dom.setXY(moveEl, aCoord); - }, - - /** - * Numeric array sort function - * @method numericSort - * @static - */ - numericSort: function(a, b) { - return (a - b); - }, - - /** - * Internal counter - * @property _timeoutCount - * @private - * @static - */ - _timeoutCount: 0, - - /** - * Trying to make the load order less important. Without this we get - * an error if this file is loaded before the Event Utility. - * @method _addListeners - * @private - * @static - */ - _addListeners: function() { - var DDM = Ext.dd.DDM; - if ( Ext.lib.Event && document ) { - DDM._onLoad(); - } else { - if (DDM._timeoutCount > 2000) { - } else { - setTimeout(DDM._addListeners, 10); - if (document && document.body) { - DDM._timeoutCount += 1; - } - } - } - }, - - /** - * Recursively searches the immediate parent and all child nodes for - * the handle element in order to determine wheter or not it was - * clicked. - * @method handleWasClicked - * @param node the html element to inspect - * @static - */ - handleWasClicked: function(node, id) { - if (this.isHandle(id, node.id)) { - return true; - } else { - // check to see if this is a text node child of the one we want - var p = node.parentNode; - - while (p) { - if (this.isHandle(id, p.id)) { - return true; - } else { - p = p.parentNode; - } - } - } - - return false; - } - - }; - -}(); - -// shorter alias, save a few bytes -Ext.dd.DDM = Ext.dd.DragDropMgr; -Ext.dd.DDM._addListeners(); - -} - -/** - * @class Ext.dd.DD - * A DragDrop implementation where the linked element follows the - * mouse cursor during a drag. - * @extends Ext.dd.DragDrop - * @constructor - * @param {String} id the id of the linked element - * @param {String} sGroup the group of related DragDrop items - * @param {object} config an object containing configurable attributes - * Valid properties for DD: - * scroll - */ -Ext.dd.DD = function(id, sGroup, config) { - if (id) { - this.init(id, sGroup, config); - } -}; - -Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, { - - /** - * When set to true, the utility automatically tries to scroll the browser - * window when a drag and drop element is dragged near the viewport boundary. - * Defaults to true. - * @property scroll - * @type boolean - */ - scroll: true, - - /** - * Sets the pointer offset to the distance between the linked element's top - * left corner and the location the element was clicked - * @method autoOffset - * @param {int} iPageX the X coordinate of the click - * @param {int} iPageY the Y coordinate of the click - */ - autoOffset: function(iPageX, iPageY) { - var x = iPageX - this.startPageX; - var y = iPageY - this.startPageY; - this.setDelta(x, y); - }, - - /** - * Sets the pointer offset. You can call this directly to force the - * offset to be in a particular location (e.g., pass in 0,0 to set it - * to the center of the object) - * @method setDelta - * @param {int} iDeltaX the distance from the left - * @param {int} iDeltaY the distance from the top - */ - setDelta: function(iDeltaX, iDeltaY) { - this.deltaX = iDeltaX; - this.deltaY = iDeltaY; - }, - - /** - * Sets the drag element to the location of the mousedown or click event, - * maintaining the cursor location relative to the location on the element - * that was clicked. Override this if you want to place the element in a - * location other than where the cursor is. - * @method setDragElPos - * @param {int} iPageX the X coordinate of the mousedown or drag event - * @param {int} iPageY the Y coordinate of the mousedown or drag event - */ - setDragElPos: function(iPageX, iPageY) { - // the first time we do this, we are going to check to make sure - // the element has css positioning - - var el = this.getDragEl(); - this.alignElWithMouse(el, iPageX, iPageY); - }, - - /** - * Sets the element to the location of the mousedown or click event, - * maintaining the cursor location relative to the location on the element - * that was clicked. Override this if you want to place the element in a - * location other than where the cursor is. - * @method alignElWithMouse - * @param {HTMLElement} el the element to move - * @param {int} iPageX the X coordinate of the mousedown or drag event - * @param {int} iPageY the Y coordinate of the mousedown or drag event - */ - alignElWithMouse: function(el, iPageX, iPageY) { - var oCoord = this.getTargetCoord(iPageX, iPageY); - var fly = el.dom ? el : Ext.fly(el, '_dd'); - if (!this.deltaSetXY) { - var aCoord = [oCoord.x, oCoord.y]; - fly.setXY(aCoord); - var newLeft = fly.getLeft(true); - var newTop = fly.getTop(true); - this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ]; - } else { - fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]); - } - - this.cachePosition(oCoord.x, oCoord.y); - this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth); - return oCoord; - }, - - /** - * Saves the most recent position so that we can reset the constraints and - * tick marks on-demand. We need to know this so that we can calculate the - * number of pixels the element is offset from its original position. - * @method cachePosition - * @param iPageX the current x position (optional, this just makes it so we - * don't have to look it up again) - * @param iPageY the current y position (optional, this just makes it so we - * don't have to look it up again) - */ - cachePosition: function(iPageX, iPageY) { - if (iPageX) { - this.lastPageX = iPageX; - this.lastPageY = iPageY; - } else { - var aCoord = Ext.lib.Dom.getXY(this.getEl()); - this.lastPageX = aCoord[0]; - this.lastPageY = aCoord[1]; - } - }, - - /** - * Auto-scroll the window if the dragged object has been moved beyond the - * visible window boundary. - * @method autoScroll - * @param {int} x the drag element's x position - * @param {int} y the drag element's y position - * @param {int} h the height of the drag element - * @param {int} w the width of the drag element - * @private - */ - autoScroll: function(x, y, h, w) { - - if (this.scroll) { - // The client height - var clientH = Ext.lib.Dom.getViewHeight(); - - // The client width - var clientW = Ext.lib.Dom.getViewWidth(); - - // The amt scrolled down - var st = this.DDM.getScrollTop(); - - // The amt scrolled right - var sl = this.DDM.getScrollLeft(); - - // Location of the bottom of the element - var bot = h + y; - - // Location of the right of the element - var right = w + x; - - // The distance from the cursor to the bottom of the visible area, - // adjusted so that we don't scroll if the cursor is beyond the - // element drag constraints - var toBot = (clientH + st - y - this.deltaY); - - // The distance from the cursor to the right of the visible area - var toRight = (clientW + sl - x - this.deltaX); - - - // How close to the edge the cursor must be before we scroll - // var thresh = (document.all) ? 100 : 40; - var thresh = 40; - - // How many pixels to scroll per autoscroll op. This helps to reduce - // clunky scrolling. IE is more sensitive about this ... it needs this - // value to be higher. - var scrAmt = (document.all) ? 80 : 30; - - // Scroll down if we are near the bottom of the visible page and the - // obj extends below the crease - if ( bot > clientH && toBot < thresh ) { - window.scrollTo(sl, st + scrAmt); - } - - // Scroll up if the window is scrolled down and the top of the object - // goes above the top border - if ( y < st && st > 0 && y - st < thresh ) { - window.scrollTo(sl, st - scrAmt); - } - - // Scroll right if the obj is beyond the right border and the cursor is - // near the border. - if ( right > clientW && toRight < thresh ) { - window.scrollTo(sl + scrAmt, st); - } - - // Scroll left if the window has been scrolled to the right and the obj - // extends past the left border - if ( x < sl && sl > 0 && x - sl < thresh ) { - window.scrollTo(sl - scrAmt, st); - } - } - }, - - /** - * Finds the location the element should be placed if we want to move - * it to where the mouse location less the click offset would place us. - * @method getTargetCoord - * @param {int} iPageX the X coordinate of the click - * @param {int} iPageY the Y coordinate of the click - * @return an object that contains the coordinates (Object.x and Object.y) - * @private - */ - getTargetCoord: function(iPageX, iPageY) { - var x = iPageX - this.deltaX; - var y = iPageY - this.deltaY; - - if (this.constrainX) { - if (x < this.minX) { x = this.minX; } - if (x > this.maxX) { x = this.maxX; } - } - - if (this.constrainY) { - if (y < this.minY) { y = this.minY; } - if (y > this.maxY) { y = this.maxY; } - } - - x = this.getTick(x, this.xTicks); - y = this.getTick(y, this.yTicks); - - - return {x:x, y:y}; - }, - - /** - * Sets up config options specific to this class. Overrides - * Ext.dd.DragDrop, but all versions of this method through the - * inheritance chain are called - */ - applyConfig: function() { - Ext.dd.DD.superclass.applyConfig.call(this); - this.scroll = (this.config.scroll !== false); - }, - - /** - * Event that fires prior to the onMouseDown event. Overrides - * Ext.dd.DragDrop. - */ - b4MouseDown: function(e) { - // this.resetConstraints(); - this.autoOffset(e.getPageX(), - e.getPageY()); - }, - - /** - * Event that fires prior to the onDrag event. Overrides - * Ext.dd.DragDrop. - */ - b4Drag: function(e) { - this.setDragElPos(e.getPageX(), - e.getPageY()); - }, - - toString: function() { - return ("DD " + this.id); - } - - ////////////////////////////////////////////////////////////////////////// - // Debugging ygDragDrop events that can be overridden - ////////////////////////////////////////////////////////////////////////// - /* - startDrag: function(x, y) { - }, - - onDrag: function(e) { - }, - - onDragEnter: function(e, id) { - }, - - onDragOver: function(e, id) { - }, - - onDragOut: function(e, id) { - }, - - onDragDrop: function(e, id) { - }, - - endDrag: function(e) { - } - - */ - -}); -/** - * @class Ext.dd.DDProxy - * A DragDrop implementation that inserts an empty, bordered div into - * the document that follows the cursor during drag operations. At the time of - * the click, the frame div is resized to the dimensions of the linked html - * element, and moved to the exact location of the linked element. - * - * References to the "frame" element refer to the single proxy element that - * was created to be dragged in place of all DDProxy elements on the - * page. - * - * @extends Ext.dd.DD - * @constructor - * @param {String} id the id of the linked html element - * @param {String} sGroup the group of related DragDrop objects - * @param {object} config an object containing configurable attributes - * Valid properties for DDProxy in addition to those in DragDrop: - * resizeFrame, centerFrame, dragElId - */ -Ext.dd.DDProxy = function(id, sGroup, config) { - if (id) { - this.init(id, sGroup, config); - this.initFrame(); - } -}; - -/** - * The default drag frame div id - * @property Ext.dd.DDProxy.dragElId - * @type String - * @static - */ -Ext.dd.DDProxy.dragElId = "ygddfdiv"; - -Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, { - - /** - * By default we resize the drag frame to be the same size as the element - * we want to drag (this is to get the frame effect). We can turn it off - * if we want a different behavior. - * @property resizeFrame - * @type boolean - */ - resizeFrame: true, - - /** - * By default the frame is positioned exactly where the drag element is, so - * we use the cursor offset provided by Ext.dd.DD. Another option that works only if - * you do not have constraints on the obj is to have the drag frame centered - * around the cursor. Set centerFrame to true for this effect. - * @property centerFrame - * @type boolean - */ - centerFrame: false, - - /** - * Creates the proxy element if it does not yet exist - * @method createFrame - */ - createFrame: function() { - var self = this; - var body = document.body; - - if (!body || !body.firstChild) { - setTimeout( function() { self.createFrame(); }, 50 ); - return; - } - - var div = this.getDragEl(); - - if (!div) { - div = document.createElement("div"); - div.id = this.dragElId; - var s = div.style; - - s.position = "absolute"; - s.visibility = "hidden"; - s.cursor = "move"; - s.border = "2px solid #aaa"; - s.zIndex = 999; - - // appendChild can blow up IE if invoked prior to the window load event - // while rendering a table. It is possible there are other scenarios - // that would cause this to happen as well. - body.insertBefore(div, body.firstChild); - } - }, - - /** - * Initialization for the drag frame element. Must be called in the - * constructor of all subclasses - * @method initFrame - */ - initFrame: function() { - this.createFrame(); - }, - - applyConfig: function() { - Ext.dd.DDProxy.superclass.applyConfig.call(this); - - this.resizeFrame = (this.config.resizeFrame !== false); - this.centerFrame = (this.config.centerFrame); - this.setDragElId(this.config.dragElId || Ext.dd.DDProxy.dragElId); - }, - - /** - * Resizes the drag frame to the dimensions of the clicked object, positions - * it over the object, and finally displays it - * @method showFrame - * @param {int} iPageX X click position - * @param {int} iPageY Y click position - * @private - */ - showFrame: function(iPageX, iPageY) { - var el = this.getEl(); - var dragEl = this.getDragEl(); - var s = dragEl.style; - - this._resizeProxy(); - - if (this.centerFrame) { - this.setDelta( Math.round(parseInt(s.width, 10)/2), - Math.round(parseInt(s.height, 10)/2) ); - } - - this.setDragElPos(iPageX, iPageY); - - Ext.fly(dragEl).show(); - }, - - /** - * The proxy is automatically resized to the dimensions of the linked - * element when a drag is initiated, unless resizeFrame is set to false - * @method _resizeProxy - * @private - */ - _resizeProxy: function() { - if (this.resizeFrame) { - var el = this.getEl(); - Ext.fly(this.getDragEl()).setSize(el.offsetWidth, el.offsetHeight); - } - }, - - // overrides Ext.dd.DragDrop - b4MouseDown: function(e) { - var x = e.getPageX(); - var y = e.getPageY(); - this.autoOffset(x, y); - this.setDragElPos(x, y); - }, - - // overrides Ext.dd.DragDrop - b4StartDrag: function(x, y) { - // show the drag frame - this.showFrame(x, y); - }, - - // overrides Ext.dd.DragDrop - b4EndDrag: function(e) { - Ext.fly(this.getDragEl()).hide(); - }, - - // overrides Ext.dd.DragDrop - // By default we try to move the element to the last location of the frame. - // This is so that the default behavior mirrors that of Ext.dd.DD. - endDrag: function(e) { - - var lel = this.getEl(); - var del = this.getDragEl(); - - // Show the drag frame briefly so we can get its position - del.style.visibility = ""; - - this.beforeMove(); - // Hide the linked element before the move to get around a Safari - // rendering bug. - lel.style.visibility = "hidden"; - Ext.dd.DDM.moveToEl(lel, del); - del.style.visibility = "hidden"; - lel.style.visibility = ""; - - this.afterDrag(); - }, - - beforeMove : function(){ - - }, - - afterDrag : function(){ - - }, - - toString: function() { - return ("DDProxy " + this.id); - } - -}); -/** - * @class Ext.dd.DDTarget - * A DragDrop implementation that does not move, but can be a drop - * target. You would get the same result by simply omitting implementation - * for the event callbacks, but this way we reduce the processing cost of the - * event listener and the callbacks. - * @extends Ext.dd.DragDrop - * @constructor - * @param {String} id the id of the element that is a drop target - * @param {String} sGroup the group of related DragDrop objects - * @param {object} config an object containing configurable attributes - * Valid properties for DDTarget in addition to those in - * DragDrop: - * none - */ -Ext.dd.DDTarget = function(id, sGroup, config) { - if (id) { - this.initTarget(id, sGroup, config); - } -}; - -// Ext.dd.DDTarget.prototype = new Ext.dd.DragDrop(); -Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, { - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - getDragEl: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - isValidHandleChild: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - startDrag: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - endDrag: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - onDrag: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - onDragDrop: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - onDragEnter: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - onDragOut: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - onDragOver: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - onInvalidDrop: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - onMouseDown: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - onMouseUp: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - setXConstraint: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - setYConstraint: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - resetConstraints: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - clearConstraints: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - clearTicks: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - setInitPosition: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - setDragElId: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - setHandleElId: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - setOuterHandleElId: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - addInvalidHandleClass: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - addInvalidHandleId: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - addInvalidHandleType: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - removeInvalidHandleClass: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - removeInvalidHandleId: Ext.emptyFn, - /** - * @hide - * Overridden and disabled. A DDTarget does not support being dragged. - * @method - */ - removeInvalidHandleType: Ext.emptyFn, - - toString: function() { - return ("DDTarget " + this.id); - } -});/** - * @class Ext.dd.DragTracker - * @extends Ext.util.Observable - * A DragTracker listens for drag events on an Element and fires events at the start and end of the drag, - * as well as during the drag. This is useful for components such as {@link Ext.slider.MultiSlider}, where there is - * an element that can be dragged around to change the Slider's value. - * DragTracker provides a series of template methods that should be overridden to provide functionality - * in response to detected drag operations. These are onBeforeStart, onStart, onDrag and onEnd. - * See {@link Ext.slider.MultiSlider}'s initEvents function for an example implementation. - */ -Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { - /** - * @cfg {Boolean} active - * Defaults to false. - */ - active: false, - /** - * @cfg {Number} tolerance - * Number of pixels the drag target must be moved before dragging is considered to have started. Defaults to 5. - */ - tolerance: 5, - /** - * @cfg {Boolean/Number} autoStart - * Defaults to false. Specify true to defer trigger start by 1000 ms. - * Specify a Number for the number of milliseconds to defer trigger start. - */ - autoStart: false, - - constructor : function(config){ - Ext.apply(this, config); - this.addEvents( - /** - * @event mousedown - * @param {Object} this - * @param {Object} e event object - */ - 'mousedown', - /** - * @event mouseup - * @param {Object} this - * @param {Object} e event object - */ - 'mouseup', - /** - * @event mousemove - * @param {Object} this - * @param {Object} e event object - */ - 'mousemove', - /** - * @event dragstart - * @param {Object} this - * @param {Object} e event object - */ - 'dragstart', - /** - * @event dragend - * @param {Object} this - * @param {Object} e event object - */ - 'dragend', - /** - * @event drag - * @param {Object} this - * @param {Object} e event object - */ - 'drag' - ); - - this.dragRegion = new Ext.lib.Region(0,0,0,0); - - if(this.el){ - this.initEl(this.el); - } - Ext.dd.DragTracker.superclass.constructor.call(this, config); - }, - - initEl: function(el){ - this.el = Ext.get(el); - el.on('mousedown', this.onMouseDown, this, - this.delegate ? {delegate: this.delegate} : undefined); - }, - - destroy : function(){ - this.el.un('mousedown', this.onMouseDown, this); - delete this.el; - }, - - onMouseDown: function(e, target){ - if(this.fireEvent('mousedown', this, e) !== false && this.onBeforeStart(e) !== false){ - this.startXY = this.lastXY = e.getXY(); - this.dragTarget = this.delegate ? target : this.el.dom; - if(this.preventDefault !== false){ - e.preventDefault(); - } - Ext.getDoc().on({ - scope: this, - mouseup: this.onMouseUp, - mousemove: this.onMouseMove, - selectstart: this.stopSelect - }); - if(this.autoStart){ - this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this, [e]); - } - } - }, - - onMouseMove: function(e, target){ - // HACK: IE hack to see if button was released outside of window. */ - if(this.active && Ext.isIE && !e.browserEvent.button){ - e.preventDefault(); - this.onMouseUp(e); - return; - } - - e.preventDefault(); - var xy = e.getXY(), s = this.startXY; - this.lastXY = xy; - if(!this.active){ - if(Math.abs(s[0]-xy[0]) > this.tolerance || Math.abs(s[1]-xy[1]) > this.tolerance){ - this.triggerStart(e); - }else{ - return; - } - } - this.fireEvent('mousemove', this, e); - this.onDrag(e); - this.fireEvent('drag', this, e); - }, - - onMouseUp: function(e) { - var doc = Ext.getDoc(), - wasActive = this.active; - - doc.un('mousemove', this.onMouseMove, this); - doc.un('mouseup', this.onMouseUp, this); - doc.un('selectstart', this.stopSelect, this); - e.preventDefault(); - this.clearStart(); - this.active = false; - delete this.elRegion; - this.fireEvent('mouseup', this, e); - if(wasActive){ - this.onEnd(e); - this.fireEvent('dragend', this, e); - } - }, - - triggerStart: function(e) { - this.clearStart(); - this.active = true; - this.onStart(e); - this.fireEvent('dragstart', this, e); - }, - - clearStart : function() { - if(this.timer){ - clearTimeout(this.timer); - delete this.timer; - } - }, - - stopSelect : function(e) { - e.stopEvent(); - return false; - }, - - /** - * Template method which should be overridden by each DragTracker instance. Called when the user first clicks and - * holds the mouse button down. Return false to disallow the drag - * @param {Ext.EventObject} e The event object - */ - onBeforeStart : function(e) { - - }, - - /** - * Template method which should be overridden by each DragTracker instance. Called when a drag operation starts - * (e.g. the user has moved the tracked element beyond the specified tolerance) - * @param {Ext.EventObject} e The event object - */ - onStart : function(xy) { - - }, - - /** - * Template method which should be overridden by each DragTracker instance. Called whenever a drag has been detected. - * @param {Ext.EventObject} e The event object - */ - onDrag : function(e) { - - }, - - /** - * Template method which should be overridden by each DragTracker instance. Called when a drag operation has been completed - * (e.g. the user clicked and held the mouse down, dragged the element and then released the mouse button) - * @param {Ext.EventObject} e The event object - */ - onEnd : function(e) { - - }, - - /** - * Returns the drag target - * @return {Ext.Element} The element currently being tracked - */ - getDragTarget : function(){ - return this.dragTarget; - }, - - getDragCt : function(){ - return this.el; - }, - - getXY : function(constrain){ - return constrain ? - this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY; - }, - - getOffset : function(constrain){ - var xy = this.getXY(constrain), - s = this.startXY; - return [s[0]-xy[0], s[1]-xy[1]]; - }, - - constrainModes: { - 'point' : function(xy){ - - if(!this.elRegion){ - this.elRegion = this.getDragCt().getRegion(); - } - - var dr = this.dragRegion; - - dr.left = xy[0]; - dr.top = xy[1]; - dr.right = xy[0]; - dr.bottom = xy[1]; - - dr.constrainTo(this.elRegion); - - return [dr.left, dr.top]; - } - } -});/** - * @class Ext.dd.ScrollManager - *

      Provides automatic scrolling of overflow regions in the page during drag operations.

      - *

      The ScrollManager configs will be used as the defaults for any scroll container registered with it, - * but you can also override most of the configs per scroll container by adding a - * ddScrollConfig object to the target element that contains these properties: {@link #hthresh}, - * {@link #vthresh}, {@link #increment} and {@link #frequency}. Example usage: - *

      
      -var el = Ext.get('scroll-ct');
      -el.ddScrollConfig = {
      -    vthresh: 50,
      -    hthresh: -1,
      -    frequency: 100,
      -    increment: 200
      -};
      -Ext.dd.ScrollManager.register(el);
      -
      - * Note: This class uses "Point Mode" and is untested in "Intersect Mode". - * @singleton - */ -Ext.dd.ScrollManager = function(){ - var ddm = Ext.dd.DragDropMgr; - var els = {}; - var dragEl = null; - var proc = {}; - - var onStop = function(e){ - dragEl = null; - clearProc(); - }; - - var triggerRefresh = function(){ - if(ddm.dragCurrent){ - ddm.refreshCache(ddm.dragCurrent.groups); - } - }; - - var doScroll = function(){ - if(ddm.dragCurrent){ - var dds = Ext.dd.ScrollManager; - var inc = proc.el.ddScrollConfig ? - proc.el.ddScrollConfig.increment : dds.increment; - if(!dds.animate){ - if(proc.el.scroll(proc.dir, inc)){ - triggerRefresh(); - } - }else{ - proc.el.scroll(proc.dir, inc, true, dds.animDuration, triggerRefresh); - } - } - }; - - var clearProc = function(){ - if(proc.id){ - clearInterval(proc.id); - } - proc.id = 0; - proc.el = null; - proc.dir = ""; - }; - - var startProc = function(el, dir){ - clearProc(); - proc.el = el; - proc.dir = dir; - var group = el.ddScrollConfig ? el.ddScrollConfig.ddGroup : undefined, - freq = (el.ddScrollConfig && el.ddScrollConfig.frequency) - ? el.ddScrollConfig.frequency - : Ext.dd.ScrollManager.frequency; - - if (group === undefined || ddm.dragCurrent.ddGroup == group) { - proc.id = setInterval(doScroll, freq); - } - }; - - var onFire = function(e, isDrop){ - if(isDrop || !ddm.dragCurrent){ return; } - var dds = Ext.dd.ScrollManager; - if(!dragEl || dragEl != ddm.dragCurrent){ - dragEl = ddm.dragCurrent; - // refresh regions on drag start - dds.refreshCache(); - } - - var xy = Ext.lib.Event.getXY(e); - var pt = new Ext.lib.Point(xy[0], xy[1]); - for(var id in els){ - var el = els[id], r = el._region; - var c = el.ddScrollConfig ? el.ddScrollConfig : dds; - if(r && r.contains(pt) && el.isScrollable()){ - if(r.bottom - pt.y <= c.vthresh){ - if(proc.el != el){ - startProc(el, "down"); - } - return; - }else if(r.right - pt.x <= c.hthresh){ - if(proc.el != el){ - startProc(el, "left"); - } - return; - }else if(pt.y - r.top <= c.vthresh){ - if(proc.el != el){ - startProc(el, "up"); - } - return; - }else if(pt.x - r.left <= c.hthresh){ - if(proc.el != el){ - startProc(el, "right"); - } - return; - } - } - } - clearProc(); - }; - - ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm); - ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm); - - return { - /** - * Registers new overflow element(s) to auto scroll - * @param {Mixed/Array} el The id of or the element to be scrolled or an array of either - */ - register : function(el){ - if(Ext.isArray(el)){ - for(var i = 0, len = el.length; i < len; i++) { - this.register(el[i]); - } - }else{ - el = Ext.get(el); - els[el.id] = el; - } - }, - - /** - * Unregisters overflow element(s) so they are no longer scrolled - * @param {Mixed/Array} el The id of or the element to be removed or an array of either - */ - unregister : function(el){ - if(Ext.isArray(el)){ - for(var i = 0, len = el.length; i < len; i++) { - this.unregister(el[i]); - } - }else{ - el = Ext.get(el); - delete els[el.id]; - } - }, - - /** - * The number of pixels from the top or bottom edge of a container the pointer needs to be to - * trigger scrolling (defaults to 25) - * @type Number - */ - vthresh : 25, - /** - * The number of pixels from the right or left edge of a container the pointer needs to be to - * trigger scrolling (defaults to 25) - * @type Number - */ - hthresh : 25, - - /** - * The number of pixels to scroll in each scroll increment (defaults to 100) - * @type Number - */ - increment : 100, - - /** - * The frequency of scrolls in milliseconds (defaults to 500) - * @type Number - */ - frequency : 500, - - /** - * True to animate the scroll (defaults to true) - * @type Boolean - */ - animate: true, - - /** - * The animation duration in seconds - - * MUST BE less than Ext.dd.ScrollManager.frequency! (defaults to .4) - * @type Number - */ - animDuration: .4, - - /** - * The named drag drop {@link Ext.dd.DragSource#ddGroup group} to which this container belongs (defaults to undefined). - * If a ddGroup is specified, then container scrolling will only occur when a dragged object is in the same ddGroup. - * @type String - */ - ddGroup: undefined, - - /** - * Manually trigger a cache refresh. - */ - refreshCache : function(){ - for(var id in els){ - if(typeof els[id] == 'object'){ // for people extending the object prototype - els[id]._region = els[id].getRegion(); - } - } - } - }; -}();/** - * @class Ext.dd.Registry - * Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either - * directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target. - * @singleton - */ -Ext.dd.Registry = function(){ - var elements = {}; - var handles = {}; - var autoIdSeed = 0; - - var getId = function(el, autogen){ - if(typeof el == "string"){ - return el; - } - var id = el.id; - if(!id && autogen !== false){ - id = "extdd-" + (++autoIdSeed); - el.id = id; - } - return id; - }; - - return { - /** - * Resgister a drag drop element - * @param {String/HTMLElement} element The id or DOM node to register - * @param {Object} data (optional) An custom data object that will be passed between the elements that are involved - * in drag drop operations. You can populate this object with any arbitrary properties that your own code - * knows how to interpret, plus there are some specific properties known to the Registry that should be - * populated in the data object (if applicable): - *
      -Value      Description
      ---------- ------------------------------------------
      -handles Array of DOM nodes that trigger dragging
      - for the element being registered
      -isHandle True if the element passed in triggers
      - dragging itself, else false -
      - */ - register : function(el, data){ - data = data || {}; - if(typeof el == "string"){ - el = document.getElementById(el); - } - data.ddel = el; - elements[getId(el)] = data; - if(data.isHandle !== false){ - handles[data.ddel.id] = data; - } - if(data.handles){ - var hs = data.handles; - for(var i = 0, len = hs.length; i < len; i++){ - handles[getId(hs[i])] = data; - } - } - }, - - /** - * Unregister a drag drop element - * @param {String/HTMLElement} element The id or DOM node to unregister - */ - unregister : function(el){ - var id = getId(el, false); - var data = elements[id]; - if(data){ - delete elements[id]; - if(data.handles){ - var hs = data.handles; - for(var i = 0, len = hs.length; i < len; i++){ - delete handles[getId(hs[i], false)]; - } - } - } - }, - - /** - * Returns the handle registered for a DOM Node by id - * @param {String/HTMLElement} id The DOM node or id to look up - * @return {Object} handle The custom handle data - */ - getHandle : function(id){ - if(typeof id != "string"){ // must be element? - id = id.id; - } - return handles[id]; - }, - - /** - * Returns the handle that is registered for the DOM node that is the target of the event - * @param {Event} e The event - * @return {Object} handle The custom handle data - */ - getHandleFromEvent : function(e){ - var t = Ext.lib.Event.getTarget(e); - return t ? handles[t.id] : null; - }, - - /** - * Returns a custom data object that is registered for a DOM node by id - * @param {String/HTMLElement} id The DOM node or id to look up - * @return {Object} data The custom data - */ - getTarget : function(id){ - if(typeof id != "string"){ // must be element? - id = id.id; - } - return elements[id]; - }, - - /** - * Returns a custom data object that is registered for the DOM node that is the target of the event - * @param {Event} e The event - * @return {Object} data The custom data - */ - getTargetFromEvent : function(e){ - var t = Ext.lib.Event.getTarget(e); - return t ? elements[t.id] || handles[t.id] : null; - } - }; -}();/** - * @class Ext.dd.StatusProxy - * A specialized drag proxy that supports a drop status icon, {@link Ext.Layer} styles and auto-repair. This is the - * default drag proxy used by all Ext.dd components. - * @constructor - * @param {Object} config - */ -Ext.dd.StatusProxy = function(config){ - Ext.apply(this, config); - this.id = this.id || Ext.id(); - this.el = new Ext.Layer({ - dh: { - id: this.id, tag: "div", cls: "x-dd-drag-proxy "+this.dropNotAllowed, children: [ - {tag: "div", cls: "x-dd-drop-icon"}, - {tag: "div", cls: "x-dd-drag-ghost"} - ] - }, - shadow: !config || config.shadow !== false - }); - this.ghost = Ext.get(this.el.dom.childNodes[1]); - this.dropStatus = this.dropNotAllowed; -}; - -Ext.dd.StatusProxy.prototype = { - /** - * @cfg {String} dropAllowed - * The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok"). - */ - dropAllowed : "x-dd-drop-ok", - /** - * @cfg {String} dropNotAllowed - * The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop"). - */ - dropNotAllowed : "x-dd-drop-nodrop", - - /** - * Updates the proxy's visual element to indicate the status of whether or not drop is allowed - * over the current target element. - * @param {String} cssClass The css class for the new drop status indicator image - */ - setStatus : function(cssClass){ - cssClass = cssClass || this.dropNotAllowed; - if(this.dropStatus != cssClass){ - this.el.replaceClass(this.dropStatus, cssClass); - this.dropStatus = cssClass; - } - }, - - /** - * Resets the status indicator to the default dropNotAllowed value - * @param {Boolean} clearGhost True to also remove all content from the ghost, false to preserve it - */ - reset : function(clearGhost){ - this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed; - this.dropStatus = this.dropNotAllowed; - if(clearGhost){ - this.ghost.update(""); - } - }, - - /** - * Updates the contents of the ghost element - * @param {String/HTMLElement} html The html that will replace the current innerHTML of the ghost element, or a - * DOM node to append as the child of the ghost element (in which case the innerHTML will be cleared first). - */ - update : function(html){ - if(typeof html == "string"){ - this.ghost.update(html); - }else{ - this.ghost.update(""); - html.style.margin = "0"; - this.ghost.dom.appendChild(html); - } - var el = this.ghost.dom.firstChild; - if(el){ - Ext.fly(el).setStyle('float', 'none'); - } - }, - - /** - * Returns the underlying proxy {@link Ext.Layer} - * @return {Ext.Layer} el - */ - getEl : function(){ - return this.el; - }, - - /** - * Returns the ghost element - * @return {Ext.Element} el - */ - getGhost : function(){ - return this.ghost; - }, - - /** - * Hides the proxy - * @param {Boolean} clear True to reset the status and clear the ghost contents, false to preserve them - */ - hide : function(clear){ - this.el.hide(); - if(clear){ - this.reset(true); - } - }, - - /** - * Stops the repair animation if it's currently running - */ - stop : function(){ - if(this.anim && this.anim.isAnimated && this.anim.isAnimated()){ - this.anim.stop(); - } - }, - - /** - * Displays this proxy - */ - show : function(){ - this.el.show(); - }, - - /** - * Force the Layer to sync its shadow and shim positions to the element - */ - sync : function(){ - this.el.sync(); - }, - - /** - * Causes the proxy to return to its position of origin via an animation. Should be called after an - * invalid drop operation by the item being dragged. - * @param {Array} xy The XY position of the element ([x, y]) - * @param {Function} callback The function to call after the repair is complete. - * @param {Object} scope The scope (this reference) in which the callback function is executed. Defaults to the browser window. - */ - repair : function(xy, callback, scope){ - this.callback = callback; - this.scope = scope; - if(xy && this.animRepair !== false){ - this.el.addClass("x-dd-drag-repair"); - this.el.hideUnders(true); - this.anim = this.el.shift({ - duration: this.repairDuration || .5, - easing: 'easeOut', - xy: xy, - stopFx: true, - callback: this.afterRepair, - scope: this - }); - }else{ - this.afterRepair(); - } - }, - - // private - afterRepair : function(){ - this.hide(true); - if(typeof this.callback == "function"){ - this.callback.call(this.scope || this); - } - this.callback = null; - this.scope = null; - }, - - destroy: function(){ - Ext.destroy(this.ghost, this.el); - } -};/** - * @class Ext.dd.DragSource - * @extends Ext.dd.DDProxy - * A simple class that provides the basic implementation needed to make any element draggable. - * @constructor - * @param {Mixed} el The container element - * @param {Object} config - */ -Ext.dd.DragSource = function(el, config){ - this.el = Ext.get(el); - if(!this.dragData){ - this.dragData = {}; - } - - Ext.apply(this, config); - - if(!this.proxy){ - this.proxy = new Ext.dd.StatusProxy(); - } - Ext.dd.DragSource.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, - {dragElId : this.proxy.id, resizeFrame: false, isTarget: false, scroll: this.scroll === true}); - - this.dragging = false; -}; - -Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, { - /** - * @cfg {String} ddGroup - * A named drag drop group to which this object belongs. If a group is specified, then this object will only - * interact with other drag drop objects in the same group (defaults to undefined). - */ - /** - * @cfg {String} dropAllowed - * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok"). - */ - dropAllowed : "x-dd-drop-ok", - /** - * @cfg {String} dropNotAllowed - * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop"). - */ - dropNotAllowed : "x-dd-drop-nodrop", - - /** - * Returns the data object associated with this drag source - * @return {Object} data An object containing arbitrary data - */ - getDragData : function(e){ - return this.dragData; - }, - - // private - onDragEnter : function(e, id){ - var target = Ext.dd.DragDropMgr.getDDById(id); - this.cachedTarget = target; - if(this.beforeDragEnter(target, e, id) !== false){ - if(target.isNotifyTarget){ - var status = target.notifyEnter(this, e, this.dragData); - this.proxy.setStatus(status); - }else{ - this.proxy.setStatus(this.dropAllowed); - } - - if(this.afterDragEnter){ - /** - * An empty function by default, but provided so that you can perform a custom action - * when the dragged item enters the drop target by providing an implementation. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dragged element - * @method afterDragEnter - */ - this.afterDragEnter(target, e, id); - } - } - }, - - /** - * An empty function by default, but provided so that you can perform a custom action - * before the dragged item enters the drop target and optionally cancel the onDragEnter. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dragged element - * @return {Boolean} isValid True if the drag event is valid, else false to cancel - */ - beforeDragEnter : function(target, e, id){ - return true; - }, - - // private - alignElWithMouse: function() { - Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments); - this.proxy.sync(); - }, - - // private - onDragOver : function(e, id){ - var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); - if(this.beforeDragOver(target, e, id) !== false){ - if(target.isNotifyTarget){ - var status = target.notifyOver(this, e, this.dragData); - this.proxy.setStatus(status); - } - - if(this.afterDragOver){ - /** - * An empty function by default, but provided so that you can perform a custom action - * while the dragged item is over the drop target by providing an implementation. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dragged element - * @method afterDragOver - */ - this.afterDragOver(target, e, id); - } - } - }, - - /** - * An empty function by default, but provided so that you can perform a custom action - * while the dragged item is over the drop target and optionally cancel the onDragOver. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dragged element - * @return {Boolean} isValid True if the drag event is valid, else false to cancel - */ - beforeDragOver : function(target, e, id){ - return true; - }, - - // private - onDragOut : function(e, id){ - var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); - if(this.beforeDragOut(target, e, id) !== false){ - if(target.isNotifyTarget){ - target.notifyOut(this, e, this.dragData); - } - this.proxy.reset(); - if(this.afterDragOut){ - /** - * An empty function by default, but provided so that you can perform a custom action - * after the dragged item is dragged out of the target without dropping. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dragged element - * @method afterDragOut - */ - this.afterDragOut(target, e, id); - } - } - this.cachedTarget = null; - }, - - /** - * An empty function by default, but provided so that you can perform a custom action before the dragged - * item is dragged out of the target without dropping, and optionally cancel the onDragOut. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dragged element - * @return {Boolean} isValid True if the drag event is valid, else false to cancel - */ - beforeDragOut : function(target, e, id){ - return true; - }, - - // private - onDragDrop : function(e, id){ - var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); - if(this.beforeDragDrop(target, e, id) !== false){ - if(target.isNotifyTarget){ - if(target.notifyDrop(this, e, this.dragData)){ // valid drop? - this.onValidDrop(target, e, id); - }else{ - this.onInvalidDrop(target, e, id); - } - }else{ - this.onValidDrop(target, e, id); - } - - if(this.afterDragDrop){ - /** - * An empty function by default, but provided so that you can perform a custom action - * after a valid drag drop has occurred by providing an implementation. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dropped element - * @method afterDragDrop - */ - this.afterDragDrop(target, e, id); - } - } - delete this.cachedTarget; - }, - - /** - * An empty function by default, but provided so that you can perform a custom action before the dragged - * item is dropped onto the target and optionally cancel the onDragDrop. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dragged element - * @return {Boolean} isValid True if the drag drop event is valid, else false to cancel - */ - beforeDragDrop : function(target, e, id){ - return true; - }, - - // private - onValidDrop : function(target, e, id){ - this.hideProxy(); - if(this.afterValidDrop){ - /** - * An empty function by default, but provided so that you can perform a custom action - * after a valid drop has occurred by providing an implementation. - * @param {Object} target The target DD - * @param {Event} e The event object - * @param {String} id The id of the dropped element - * @method afterInvalidDrop - */ - this.afterValidDrop(target, e, id); - } - }, - - // private - getRepairXY : function(e, data){ - return this.el.getXY(); - }, - - // private - onInvalidDrop : function(target, e, id){ - this.beforeInvalidDrop(target, e, id); - if(this.cachedTarget){ - if(this.cachedTarget.isNotifyTarget){ - this.cachedTarget.notifyOut(this, e, this.dragData); - } - this.cacheTarget = null; - } - this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this); - - if(this.afterInvalidDrop){ - /** - * An empty function by default, but provided so that you can perform a custom action - * after an invalid drop has occurred by providing an implementation. - * @param {Event} e The event object - * @param {String} id The id of the dropped element - * @method afterInvalidDrop - */ - this.afterInvalidDrop(e, id); - } - }, - - // private - afterRepair : function(){ - if(Ext.enableFx){ - this.el.highlight(this.hlColor || "c3daf9"); - } - this.dragging = false; - }, - - /** - * An empty function by default, but provided so that you can perform a custom action after an invalid - * drop has occurred. - * @param {Ext.dd.DragDrop} target The drop target - * @param {Event} e The event object - * @param {String} id The id of the dragged element - * @return {Boolean} isValid True if the invalid drop should proceed, else false to cancel - */ - beforeInvalidDrop : function(target, e, id){ - return true; - }, - - // private - handleMouseDown : function(e){ - if(this.dragging) { - return; - } - var data = this.getDragData(e); - if(data && this.onBeforeDrag(data, e) !== false){ - this.dragData = data; - this.proxy.stop(); - Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments); - } - }, - - /** - * An empty function by default, but provided so that you can perform a custom action before the initial - * drag event begins and optionally cancel it. - * @param {Object} data An object containing arbitrary data to be shared with drop targets - * @param {Event} e The event object - * @return {Boolean} isValid True if the drag event is valid, else false to cancel - */ - onBeforeDrag : function(data, e){ - return true; - }, - - /** - * An empty function by default, but provided so that you can perform a custom action once the initial - * drag event has begun. The drag cannot be canceled from this function. - * @param {Number} x The x position of the click on the dragged object - * @param {Number} y The y position of the click on the dragged object - */ - onStartDrag : Ext.emptyFn, - - // private override - startDrag : function(x, y){ - this.proxy.reset(); - this.dragging = true; - this.proxy.update(""); - this.onInitDrag(x, y); - this.proxy.show(); - }, - - // private - onInitDrag : function(x, y){ - var clone = this.el.dom.cloneNode(true); - clone.id = Ext.id(); // prevent duplicate ids - this.proxy.update(clone); - this.onStartDrag(x, y); - return true; - }, - - /** - * Returns the drag source's underlying {@link Ext.dd.StatusProxy} - * @return {Ext.dd.StatusProxy} proxy The StatusProxy - */ - getProxy : function(){ - return this.proxy; - }, - - /** - * Hides the drag source's {@link Ext.dd.StatusProxy} - */ - hideProxy : function(){ - this.proxy.hide(); - this.proxy.reset(true); - this.dragging = false; - }, - - // private - triggerCacheRefresh : function(){ - Ext.dd.DDM.refreshCache(this.groups); - }, - - // private - override to prevent hiding - b4EndDrag: function(e) { - }, - - // private - override to prevent moving - endDrag : function(e){ - this.onEndDrag(this.dragData, e); - }, - - // private - onEndDrag : function(data, e){ - }, - - // private - pin to cursor - autoOffset : function(x, y) { - this.setDelta(-12, -20); - }, - - destroy: function(){ - Ext.dd.DragSource.superclass.destroy.call(this); - Ext.destroy(this.proxy); - } -});/** - * @class Ext.dd.DropTarget - * @extends Ext.dd.DDTarget - * A simple class that provides the basic implementation needed to make any element a drop target that can have - * draggable items dropped onto it. The drop has no effect until an implementation of notifyDrop is provided. - * @constructor - * @param {Mixed} el The container element - * @param {Object} config - */ -Ext.dd.DropTarget = Ext.extend(Ext.dd.DDTarget, { - - constructor : function(el, config){ - this.el = Ext.get(el); - - Ext.apply(this, config); - - if(this.containerScroll){ - Ext.dd.ScrollManager.register(this.el); - } - - Ext.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, - {isTarget: true}); - }, - - /** - * @cfg {String} ddGroup - * A named drag drop group to which this object belongs. If a group is specified, then this object will only - * interact with other drag drop objects in the same group (defaults to undefined). - */ - /** - * @cfg {String} overClass - * The CSS class applied to the drop target element while the drag source is over it (defaults to ""). - */ - /** - * @cfg {String} dropAllowed - * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok"). - */ - dropAllowed : "x-dd-drop-ok", - /** - * @cfg {String} dropNotAllowed - * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop"). - */ - dropNotAllowed : "x-dd-drop-nodrop", - - // private - isTarget : true, - - // private - isNotifyTarget : true, - - /** - * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source is now over the - * target. This default implementation adds the CSS class specified by overClass (if any) to the drop element - * and returns the dropAllowed config value. This method should be overridden if drop validation is required. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {String} status The CSS class that communicates the drop status back to the source so that the - * underlying {@link Ext.dd.StatusProxy} can be updated - */ - notifyEnter : function(dd, e, data){ - if(this.overClass){ - this.el.addClass(this.overClass); - } - return this.dropAllowed; - }, - - /** - * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the target. - * This method will be called on every mouse movement while the drag source is over the drop target. - * This default implementation simply returns the dropAllowed config value. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {String} status The CSS class that communicates the drop status back to the source so that the - * underlying {@link Ext.dd.StatusProxy} can be updated - */ - notifyOver : function(dd, e, data){ - return this.dropAllowed; - }, - - /** - * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source has been dragged - * out of the target without dropping. This default implementation simply removes the CSS class specified by - * overClass (if any) from the drop element. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - */ - notifyOut : function(dd, e, data){ - if(this.overClass){ - this.el.removeClass(this.overClass); - } - }, - - /** - * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the dragged item has - * been dropped on it. This method has no default implementation and returns false, so you must provide an - * implementation that does something to process the drop event and returns true so that the drag source's - * repair action does not run. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {Boolean} True if the drop was valid, else false - */ - notifyDrop : function(dd, e, data){ - return false; - }, - - destroy : function(){ - Ext.dd.DropTarget.superclass.destroy.call(this); - if(this.containerScroll){ - Ext.dd.ScrollManager.unregister(this.el); - } - } -});/** - * @class Ext.dd.DragZone - * @extends Ext.dd.DragSource - *

      This class provides a container DD instance that allows dragging of multiple child source nodes.

      - *

      This class does not move the drag target nodes, but a proxy element which may contain - * any DOM structure you wish. The DOM element to show in the proxy is provided by either a - * provided implementation of {@link #getDragData}, or by registered draggables registered with {@link Ext.dd.Registry}

      - *

      If you wish to provide draggability for an arbitrary number of DOM nodes, each of which represent some - * application object (For example nodes in a {@link Ext.DataView DataView}) then use of this class - * is the most efficient way to "activate" those nodes.

      - *

      By default, this class requires that draggable child nodes are registered with {@link Ext.dd.Registry}. - * However a simpler way to allow a DragZone to manage any number of draggable elements is to configure - * the DragZone with an implementation of the {@link #getDragData} method which interrogates the passed - * mouse event to see if it has taken place within an element, or class of elements. This is easily done - * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a - * {@link Ext.DomQuery} selector. For example, to make the nodes of a DataView draggable, use the following - * technique. Knowledge of the use of the DataView is required:

      
      -myDataView.on('render', function(v) {
      -    myDataView.dragZone = new Ext.dd.DragZone(v.getEl(), {
      -
      -//      On receipt of a mousedown event, see if it is within a DataView node.
      -//      Return a drag data object if so.
      -        getDragData: function(e) {
      -
      -//          Use the DataView's own itemSelector (a mandatory property) to
      -//          test if the mousedown is within one of the DataView's nodes.
      -            var sourceEl = e.getTarget(v.itemSelector, 10);
      -
      -//          If the mousedown is within a DataView node, clone the node to produce
      -//          a ddel element for use by the drag proxy. Also add application data
      -//          to the returned data object.
      -            if (sourceEl) {
      -                d = sourceEl.cloneNode(true);
      -                d.id = Ext.id();
      -                return {
      -                    ddel: d,
      -                    sourceEl: sourceEl,
      -                    repairXY: Ext.fly(sourceEl).getXY(),
      -                    sourceStore: v.store,
      -                    draggedRecord: v.{@link Ext.DataView#getRecord getRecord}(sourceEl)
      -                }
      -            }
      -        },
      -
      -//      Provide coordinates for the proxy to slide back to on failed drag.
      -//      This is the original XY coordinates of the draggable element captured
      -//      in the getDragData method.
      -        getRepairXY: function() {
      -            return this.dragData.repairXY;
      -        }
      -    });
      -});
      - * See the {@link Ext.dd.DropZone DropZone} documentation for details about building a DropZone which - * cooperates with this DragZone. - * @constructor - * @param {Mixed} el The container element - * @param {Object} config - */ -Ext.dd.DragZone = Ext.extend(Ext.dd.DragSource, { - - constructor : function(el, config){ - Ext.dd.DragZone.superclass.constructor.call(this, el, config); - if(this.containerScroll){ - Ext.dd.ScrollManager.register(this.el); - } - }, - - /** - * This property contains the data representing the dragged object. This data is set up by the implementation - * of the {@link #getDragData} method. It must contain a ddel property, but can contain - * any other data according to the application's needs. - * @type Object - * @property dragData - */ - /** - * @cfg {Boolean} containerScroll True to register this container with the Scrollmanager - * for auto scrolling during drag operations. - */ - /** - * @cfg {String} hlColor The color to use when visually highlighting the drag source in the afterRepair - * method after a failed drop (defaults to "c3daf9" - light blue) - */ - - /** - * Called when a mousedown occurs in this container. Looks in {@link Ext.dd.Registry} - * for a valid target to drag based on the mouse down. Override this method - * to provide your own lookup logic (e.g. finding a child by class name). Make sure your returned - * object has a "ddel" attribute (with an HTML Element) for other functions to work. - * @param {EventObject} e The mouse down event - * @return {Object} The dragData - */ - getDragData : function(e){ - return Ext.dd.Registry.getHandleFromEvent(e); - }, - - /** - * Called once drag threshold has been reached to initialize the proxy element. By default, it clones the - * this.dragData.ddel - * @param {Number} x The x position of the click on the dragged object - * @param {Number} y The y position of the click on the dragged object - * @return {Boolean} true to continue the drag, false to cancel - */ - onInitDrag : function(x, y){ - this.proxy.update(this.dragData.ddel.cloneNode(true)); - this.onStartDrag(x, y); - return true; - }, - - /** - * Called after a repair of an invalid drop. By default, highlights this.dragData.ddel - */ - afterRepair : function(){ - if(Ext.enableFx){ - Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9"); - } - this.dragging = false; - }, - - /** - * Called before a repair of an invalid drop to get the XY to animate to. By default returns - * the XY of this.dragData.ddel - * @param {EventObject} e The mouse up event - * @return {Array} The xy location (e.g. [100, 200]) - */ - getRepairXY : function(e){ - return Ext.Element.fly(this.dragData.ddel).getXY(); - }, - - destroy : function(){ - Ext.dd.DragZone.superclass.destroy.call(this); - if(this.containerScroll){ - Ext.dd.ScrollManager.unregister(this.el); - } - } -});/** - * @class Ext.dd.DropZone - * @extends Ext.dd.DropTarget - *

      This class provides a container DD instance that allows dropping on multiple child target nodes.

      - *

      By default, this class requires that child nodes accepting drop are registered with {@link Ext.dd.Registry}. - * However a simpler way to allow a DropZone to manage any number of target elements is to configure the - * DropZone with an implementation of {@link #getTargetFromEvent} which interrogates the passed - * mouse event to see if it has taken place within an element, or class of elements. This is easily done - * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a - * {@link Ext.DomQuery} selector.

      - *

      Once the DropZone has detected through calling getTargetFromEvent, that the mouse is over - * a drop target, that target is passed as the first parameter to {@link #onNodeEnter}, {@link #onNodeOver}, - * {@link #onNodeOut}, {@link #onNodeDrop}. You may configure the instance of DropZone with implementations - * of these methods to provide application-specific behaviour for these events to update both - * application state, and UI state.

      - *

      For example to make a GridPanel a cooperating target with the example illustrated in - * {@link Ext.dd.DragZone DragZone}, the following technique might be used:

      
      -myGridPanel.on('render', function() {
      -    myGridPanel.dropZone = new Ext.dd.DropZone(myGridPanel.getView().scroller, {
      -
      -//      If the mouse is over a grid row, return that node. This is
      -//      provided as the "target" parameter in all "onNodeXXXX" node event handling functions
      -        getTargetFromEvent: function(e) {
      -            return e.getTarget(myGridPanel.getView().rowSelector);
      -        },
      -
      -//      On entry into a target node, highlight that node.
      -        onNodeEnter : function(target, dd, e, data){ 
      -            Ext.fly(target).addClass('my-row-highlight-class');
      -        },
      -
      -//      On exit from a target node, unhighlight that node.
      -        onNodeOut : function(target, dd, e, data){ 
      -            Ext.fly(target).removeClass('my-row-highlight-class');
      -        },
      -
      -//      While over a target node, return the default drop allowed class which
      -//      places a "tick" icon into the drag proxy.
      -        onNodeOver : function(target, dd, e, data){ 
      -            return Ext.dd.DropZone.prototype.dropAllowed;
      -        },
      -
      -//      On node drop we can interrogate the target to find the underlying
      -//      application object that is the real target of the dragged data.
      -//      In this case, it is a Record in the GridPanel's Store.
      -//      We can use the data set up by the DragZone's getDragData method to read
      -//      any data we decided to attach in the DragZone's getDragData method.
      -        onNodeDrop : function(target, dd, e, data){
      -            var rowIndex = myGridPanel.getView().findRowIndex(target);
      -            var r = myGridPanel.getStore().getAt(rowIndex);
      -            Ext.Msg.alert('Drop gesture', 'Dropped Record id ' + data.draggedRecord.id +
      -                ' on Record id ' + r.id);
      -            return true;
      -        }
      -    });
      -}
      -
      - * See the {@link Ext.dd.DragZone DragZone} documentation for details about building a DragZone which - * cooperates with this DropZone. - * @constructor - * @param {Mixed} el The container element - * @param {Object} config - */ -Ext.dd.DropZone = function(el, config){ - Ext.dd.DropZone.superclass.constructor.call(this, el, config); -}; - -Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, { - /** - * Returns a custom data object associated with the DOM node that is the target of the event. By default - * this looks up the event target in the {@link Ext.dd.Registry}, although you can override this method to - * provide your own custom lookup. - * @param {Event} e The event - * @return {Object} data The custom data - */ - getTargetFromEvent : function(e){ - return Ext.dd.Registry.getTargetFromEvent(e); - }, - - /** - * Called when the DropZone determines that a {@link Ext.dd.DragSource} has entered a drop node - * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}. - * This method has no default implementation and should be overridden to provide - * node-specific processing if necessary. - * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from - * {@link #getTargetFromEvent} for this node) - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - */ - onNodeEnter : function(n, dd, e, data){ - - }, - - /** - * Called while the DropZone determines that a {@link Ext.dd.DragSource} is over a drop node - * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}. - * The default implementation returns this.dropNotAllowed, so it should be - * overridden to provide the proper feedback. - * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from - * {@link #getTargetFromEvent} for this node) - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {String} status The CSS class that communicates the drop status back to the source so that the - * underlying {@link Ext.dd.StatusProxy} can be updated - */ - onNodeOver : function(n, dd, e, data){ - return this.dropAllowed; - }, - - /** - * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dragged out of - * the drop node without dropping. This method has no default implementation and should be overridden to provide - * node-specific processing if necessary. - * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from - * {@link #getTargetFromEvent} for this node) - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - */ - onNodeOut : function(n, dd, e, data){ - - }, - - /** - * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped onto - * the drop node. The default implementation returns false, so it should be overridden to provide the - * appropriate processing of the drop event and return true so that the drag source's repair action does not run. - * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from - * {@link #getTargetFromEvent} for this node) - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {Boolean} True if the drop was valid, else false - */ - onNodeDrop : function(n, dd, e, data){ - return false; - }, - - /** - * Called while the DropZone determines that a {@link Ext.dd.DragSource} is being dragged over it, - * but not over any of its registered drop nodes. The default implementation returns this.dropNotAllowed, so - * it should be overridden to provide the proper feedback if necessary. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {String} status The CSS class that communicates the drop status back to the source so that the - * underlying {@link Ext.dd.StatusProxy} can be updated - */ - onContainerOver : function(dd, e, data){ - return this.dropNotAllowed; - }, - - /** - * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped on it, - * but not on any of its registered drop nodes. The default implementation returns false, so it should be - * overridden to provide the appropriate processing of the drop event if you need the drop zone itself to - * be able to accept drops. It should return true when valid so that the drag source's repair action does not run. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {Boolean} True if the drop was valid, else false - */ - onContainerDrop : function(dd, e, data){ - return false; - }, - - /** - * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source is now over - * the zone. The default implementation returns this.dropNotAllowed and expects that only registered drop - * nodes can process drag drop operations, so if you need the drop zone itself to be able to process drops - * you should override this method and provide a custom implementation. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {String} status The CSS class that communicates the drop status back to the source so that the - * underlying {@link Ext.dd.StatusProxy} can be updated - */ - notifyEnter : function(dd, e, data){ - return this.dropNotAllowed; - }, - - /** - * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the drop zone. - * This method will be called on every mouse movement while the drag source is over the drop zone. - * It will call {@link #onNodeOver} while the drag source is over a registered node, and will also automatically - * delegate to the appropriate node-specific methods as necessary when the drag source enters and exits - * registered nodes ({@link #onNodeEnter}, {@link #onNodeOut}). If the drag source is not currently over a - * registered node, it will call {@link #onContainerOver}. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {String} status The CSS class that communicates the drop status back to the source so that the - * underlying {@link Ext.dd.StatusProxy} can be updated - */ - notifyOver : function(dd, e, data){ - var n = this.getTargetFromEvent(e); - if(!n){ // not over valid drop target - if(this.lastOverNode){ - this.onNodeOut(this.lastOverNode, dd, e, data); - this.lastOverNode = null; - } - return this.onContainerOver(dd, e, data); - } - if(this.lastOverNode != n){ - if(this.lastOverNode){ - this.onNodeOut(this.lastOverNode, dd, e, data); - } - this.onNodeEnter(n, dd, e, data); - this.lastOverNode = n; - } - return this.onNodeOver(n, dd, e, data); - }, - - /** - * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source has been dragged - * out of the zone without dropping. If the drag source is currently over a registered node, the notification - * will be delegated to {@link #onNodeOut} for node-specific handling, otherwise it will be ignored. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag zone - */ - notifyOut : function(dd, e, data){ - if(this.lastOverNode){ - this.onNodeOut(this.lastOverNode, dd, e, data); - this.lastOverNode = null; - } - }, - - /** - * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the dragged item has - * been dropped on it. The drag zone will look up the target node based on the event passed in, and if there - * is a node registered for that event, it will delegate to {@link #onNodeDrop} for node-specific handling, - * otherwise it will call {@link #onContainerDrop}. - * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone - * @param {Event} e The event - * @param {Object} data An object containing arbitrary data supplied by the drag source - * @return {Boolean} True if the drop was valid, else false - */ - notifyDrop : function(dd, e, data){ - if(this.lastOverNode){ - this.onNodeOut(this.lastOverNode, dd, e, data); - this.lastOverNode = null; - } - var n = this.getTargetFromEvent(e); - return n ? - this.onNodeDrop(n, dd, e, data) : - this.onContainerDrop(dd, e, data); - }, - - // private - triggerCacheRefresh : function(){ - Ext.dd.DDM.refreshCache(this.groups); - } -});/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Initializes a {@link Ext.dd.DD} drag drop object for this element. - * @param {String} group The group the DD object is member of - * @param {Object} config The DD config object - * @param {Object} overrides An object containing methods to override/implement on the DD object - * @return {Ext.dd.DD} The DD object - */ - initDD : function(group, config, overrides){ - var dd = new Ext.dd.DD(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - }, - - /** - * Initializes a {@link Ext.dd.DDProxy} object for this element. - * @param {String} group The group the DDProxy object is member of - * @param {Object} config The DDProxy config object - * @param {Object} overrides An object containing methods to override/implement on the DDProxy object - * @return {Ext.dd.DDProxy} The DDProxy object - */ - initDDProxy : function(group, config, overrides){ - var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - }, - - /** - * Initializes a {@link Ext.dd.DDTarget} object for this element. - * @param {String} group The group the DDTarget object is member of - * @param {Object} config The DDTarget config object - * @param {Object} overrides An object containing methods to override/implement on the DDTarget object - * @return {Ext.dd.DDTarget} The DDTarget object - */ - initDDTarget : function(group, config, overrides){ - var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - } -}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/ext-dd.js b/web-client/src/main/resources/apps/js/ext/pkgs/ext-dd.js deleted file mode 100644 index 1933513f2fb..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/ext-dd.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(Ext.isNumber(g)){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox(),d=Ext.get(i),m=d.getScroll(),j,e=d.dom;if(e==document.body){j={x:m.left,y:m.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var l=d.getXY();j={x:l[0],y:l[1],width:e.clientWidth,height:e.clientHeight}}var h=k.y-j.y,f=k.x-j.x;this.resetConstraints();this.setXConstraint(f-(g.left||0),j.width-f-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,f,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!f&&0!==f){this.padding=[e,c,e,c]}else{this.padding=[e,c,f,d]}}},setInitPosition:function(f,e){var g=this.getEl();if(!this.DDM.verifyEl(g)){return}var d=f||0;var c=e||0;var h=b.getXY(g);this.initPageX=h[0]-d;this.initPageY=h[1]-c;this.lastPageX=h[0];this.lastPageY=h[1];this.setStartPosition(h)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(f,d){if(this.primaryButtonOnly&&f.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(f),Ext.lib.Event.getPageY(f));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(f)){this.setStartPosition();this.b4MouseDown(f);this.onMouseDown(f);this.DDM.handleMouseDown(f,this);this.DDM.stopEvent(f)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(f,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(j,f){if(!f){return j}else{if(f[0]>=j){return f[0]}else{for(var d=0,c=f.length;d=j){var h=j-f[d];var g=f[e]-j;return(g>h)?f[d]:f[e]}}return f[f.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var f=this.ids[e][b];if(!this.isTypeOfDD(f)){continue}f[d].apply(f,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&this.ids[b][c.id]){delete this.ids[b][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,b){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][b]=b},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(g,c){var f=[];for(var e in g.groups){for(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){f[f.length]=b}}}return f},isLegalTarget:function(f,e){var c=this.getRelated(f,true);for(var d=0,b=c.length;dthis.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(m,n){var p=this.dragCurrent;if(!p||p.isLocked()){return}var q=m.getPoint();var b=[];var f=[];var k=[];var h=[];var d=[];for(var g in this.dragOvers){var c=this.dragOvers[g];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(q,c,this.mode)){f.push(c)}b[g]=true;delete this.dragOvers[g]}for(var o in p.groups){if("string"!=typeof o){continue}for(g in this.ids[o]){var j=this.ids[o][g];if(!this.isTypeOfDD(j)){continue}if(j.isTarget&&!j.isLocked()&&((j!=p)||(p.ignoreSelf===false))){if(this.isOverTarget(q,j,this.mode)){if(n){h.push(j)}else{if(!b[j.id]){d.push(j)}else{k.push(j)}this.dragOvers[j.id]=j}}}}}if(this.mode){if(f.length){p.b4DragOut(m,f);p.onDragOut(m,f)}if(d.length){p.onDragEnter(m,d)}if(k.length){p.b4DragOver(m,k);p.onDragOver(m,k)}if(h.length){p.b4DragDrop(m,h);p.onDragDrop(m,h)}}else{var l=0;for(g=0,l=f.length;g2000){}else{setTimeout(b._addListeners,10);if(document&&document.body){b._timeoutCount+=1}}}},handleWasClicked:function(b,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,g,f){var e=this.getTargetCoord(g,f);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var h=[e.x,e.y];b.setXY(h);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(k,j,e,l){if(this.scroll){var m=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var o=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var i=e+j;var n=l+k;var g=(m+o-j-this.deltaY);var f=(b+d-k-this.deltaX);var c=40;var a=(document.all)?80:30;if(i>m&&g0&&j-ob&&f0&&k-dthis.maxX){a=this.maxX}}if(this.constrainY){if(dthis.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=Ext.extend(Ext.util.Observable,{active:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}Ext.dd.DragTracker.superclass.constructor.call(this,a)},initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this);delete this.el},onMouseDown:function(b,a){if(this.fireEvent("mousedown",this,b)!==false&&this.onBeforeStart(b)!==false){this.startXY=this.lastXY=b.getXY();this.dragTarget=this.delegate?a:this.el.dom;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this,[b])}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart(d)}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var h={};var g=function(k){b=null;a()};var i=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var k=Ext.dd.ScrollManager;var l=h.el.ddScrollConfig?h.el.ddScrollConfig.increment:k.increment;if(!k.animate){if(h.el.scroll(h.dir,l)){i()}}else{h.el.scroll(h.dir,l,true,k.animDuration,i)}}};var a=function(){if(h.id){clearInterval(h.id)}h.id=0;h.el=null;h.dir=""};var f=function(l,k){a();h.el=l;h.dir=k;var n=l.ddScrollConfig?l.ddScrollConfig.ddGroup:undefined,m=(l.ddScrollConfig&&l.ddScrollConfig.frequency)?l.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;if(n===undefined||c.dragCurrent.ddGroup==n){h.id=setInterval(d,m)}};var j=function(n,p){if(p||!c.dragCurrent){return}var q=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;q.refreshCache()}var s=Ext.lib.Event.getXY(n);var t=new Ext.lib.Point(s[0],s[1]);for(var l in e){var m=e[l],k=m._region;var o=m.ddScrollConfig?m.ddScrollConfig:q;if(k&&k.contains(t)&&m.isScrollable()){if(k.bottom-t.y<=o.vthresh){if(h.el!=m){f(m,"down")}return}else{if(k.right-t.x<=o.hthresh){if(h.el!=m){f(m,"left")}return}else{if(t.y-k.top<=o.vthresh){if(h.el!=m){f(m,"up")}return}else{if(t.x-k.left<=o.hthresh){if(h.el!=m){f(m,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(j,c);c.stopDrag=c.stopDrag.createSequence(g,c);return{register:function(m){if(Ext.isArray(m)){for(var l=0,k=m.length;lUtility method for returning a default value if the passed value is empty.

      - *

      The value is deemed to be empty if it is

        - *
      • null
      • - *
      • undefined
      • - *
      • an empty array
      • - *
      • a zero length string (Unless the allowBlank parameter is true)
      • - *
      - * @param {Mixed} value The value to test - * @param {Mixed} defaultValue The value to return if the original value is empty - * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false) - * @return {Mixed} value, if non-empty, else defaultValue - */ - value : function(v, defaultValue, allowBlank){ - return Ext.isEmpty(v, allowBlank) ? defaultValue : v; - }, - - /** - * Escapes the passed string for use in a regular expression - * @param {String} str - * @return {String} - */ - escapeRe : function(s) { - return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1"); - }, - - sequence : function(o, name, fn, scope){ - o[name] = o[name].createSequence(fn, scope); - }, - - /** - * Applies event listeners to elements by selectors when the document is ready. - * The event name is specified with an @ suffix. - *
      
      -Ext.addBehaviors({
      -    // add a listener for click on all anchors in element with id foo
      -    '#foo a@click' : function(e, t){
      -        // do something
      -    },
      -
      -    // add the same listener to multiple selectors (separated by comma BEFORE the @)
      -    '#foo a, #bar span.some-class@mouseover' : function(){
      -        // do something
      -    }
      -});
      -         * 
      - * @param {Object} obj The list of behaviors to apply - */ - addBehaviors : function(o){ - if(!Ext.isReady){ - Ext.onReady(function(){ - Ext.addBehaviors(o); - }); - } else { - var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times - parts, - b, - s; - for (b in o) { - if ((parts = b.split('@'))[1]) { // for Object prototype breakers - s = parts[0]; - if(!cache[s]){ - cache[s] = Ext.select(s); - } - cache[s].on(parts[1], o[b]); - } - } - cache = null; - } - }, - - /** - * Utility method for getting the width of the browser scrollbar. This can differ depending on - * operating system settings, such as the theme or font size. - * @param {Boolean} force (optional) true to force a recalculation of the value. - * @return {Number} The width of the scrollbar. - */ - getScrollBarWidth: function(force){ - if(!Ext.isReady){ - return 0; - } - - if(force === true || scrollWidth === null){ - // Append our div, do our calculation and then remove it - var div = Ext.getBody().createChild('
      '), - child = div.child('div', true); - var w1 = child.offsetWidth; - div.setStyle('overflow', (Ext.isWebKit || Ext.isGecko) ? 'auto' : 'scroll'); - var w2 = child.offsetWidth; - div.remove(); - // Need to add 2 to ensure we leave enough space - scrollWidth = w1 - w2 + 2; - } - return scrollWidth; - }, - - - // deprecated - combine : function(){ - var as = arguments, l = as.length, r = []; - for(var i = 0; i < l; i++){ - var a = as[i]; - if(Ext.isArray(a)){ - r = r.concat(a); - }else if(a.length !== undefined && !a.substr){ - r = r.concat(Array.prototype.slice.call(a, 0)); - }else{ - r.push(a); - } - } - return r; - }, - - /** - * Copies a set of named properties fom the source object to the destination object. - *

      example:

      
      -ImageComponent = Ext.extend(Ext.BoxComponent, {
      -    initComponent: function() {
      -        this.autoEl = { tag: 'img' };
      -        MyComponent.superclass.initComponent.apply(this, arguments);
      -        this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
      -    }
      -});
      -         * 
      - * @param {Object} dest The destination object. - * @param {Object} source The source object. - * @param {Array/String} names Either an Array of property names, or a comma-delimited list - * of property names to copy. - * @return {Object} The modified object. - */ - copyTo : function(dest, source, names){ - if(typeof names == 'string'){ - names = names.split(/[,;\s]/); - } - Ext.each(names, function(name){ - if(source.hasOwnProperty(name)){ - dest[name] = source[name]; - } - }, this); - return dest; - }, - - /** - * Attempts to destroy any objects passed to it by removing all event listeners, removing them from the - * DOM (if applicable) and calling their destroy functions (if available). This method is primarily - * intended for arguments of type {@link Ext.Element} and {@link Ext.Component}, but any subclass of - * {@link Ext.util.Observable} can be passed in. Any number of elements and/or components can be - * passed into this function in a single call as separate arguments. - * @param {Mixed} arg1 An {@link Ext.Element}, {@link Ext.Component}, or an Array of either of these to destroy - * @param {Mixed} arg2 (optional) - * @param {Mixed} etc... (optional) - */ - destroy : function(){ - Ext.each(arguments, function(arg){ - if(arg){ - if(Ext.isArray(arg)){ - this.destroy.apply(this, arg); - }else if(typeof arg.destroy == 'function'){ - arg.destroy(); - }else if(arg.dom){ - arg.remove(); - } - } - }, this); - }, - - /** - * Attempts to destroy and then remove a set of named properties of the passed object. - * @param {Object} o The object (most likely a Component) who's properties you wish to destroy. - * @param {Mixed} arg1 The name of the property to destroy and remove from the object. - * @param {Mixed} etc... More property names to destroy and remove. - */ - destroyMembers : function(o, arg1, arg2, etc){ - for(var i = 1, a = arguments, len = a.length; i < len; i++) { - Ext.destroy(o[a[i]]); - delete o[a[i]]; - } - }, - - /** - * Creates a copy of the passed Array with falsy values removed. - * @param {Array/NodeList} arr The Array from which to remove falsy values. - * @return {Array} The new, compressed Array. - */ - clean : function(arr){ - var ret = []; - Ext.each(arr, function(v){ - if(!!v){ - ret.push(v); - } - }); - return ret; - }, - - /** - * Creates a copy of the passed Array, filtered to contain only unique values. - * @param {Array} arr The Array to filter - * @return {Array} The new Array containing unique values. - */ - unique : function(arr){ - var ret = [], - collect = {}; - - Ext.each(arr, function(v) { - if(!collect[v]){ - ret.push(v); - } - collect[v] = true; - }); - return ret; - }, - - /** - * Recursively flattens into 1-d Array. Injects Arrays inline. - * @param {Array} arr The array to flatten - * @return {Array} The new, flattened array. - */ - flatten : function(arr){ - var worker = []; - function rFlatten(a) { - Ext.each(a, function(v) { - if(Ext.isArray(v)){ - rFlatten(v); - }else{ - worker.push(v); - } - }); - return worker; - } - return rFlatten(arr); - }, - - /** - * Returns the minimum value in the Array. - * @param {Array|NodeList} arr The Array from which to select the minimum value. - * @param {Function} comp (optional) a function to perform the comparision which determines minimization. - * If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1 - * @return {Object} The minimum value in the Array. - */ - min : function(arr, comp){ - var ret = arr[0]; - comp = comp || function(a,b){ return a < b ? -1 : 1; }; - Ext.each(arr, function(v) { - ret = comp(ret, v) == -1 ? ret : v; - }); - return ret; - }, - - /** - * Returns the maximum value in the Array - * @param {Array|NodeList} arr The Array from which to select the maximum value. - * @param {Function} comp (optional) a function to perform the comparision which determines maximization. - * If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1 - * @return {Object} The maximum value in the Array. - */ - max : function(arr, comp){ - var ret = arr[0]; - comp = comp || function(a,b){ return a > b ? 1 : -1; }; - Ext.each(arr, function(v) { - ret = comp(ret, v) == 1 ? ret : v; - }); - return ret; - }, - - /** - * Calculates the mean of the Array - * @param {Array} arr The Array to calculate the mean value of. - * @return {Number} The mean. - */ - mean : function(arr){ - return arr.length > 0 ? Ext.sum(arr) / arr.length : undefined; - }, - - /** - * Calculates the sum of the Array - * @param {Array} arr The Array to calculate the sum value of. - * @return {Number} The sum. - */ - sum : function(arr){ - var ret = 0; - Ext.each(arr, function(v) { - ret += v; - }); - return ret; - }, - - /** - * Partitions the set into two sets: a true set and a false set. - * Example: - * Example2: - *
      
      -// Example 1:
      -Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
      -
      -// Example 2:
      -Ext.partition(
      -    Ext.query("p"),
      -    function(val){
      -        return val.className == "class1"
      -    }
      -);
      -// true are those paragraph elements with a className of "class1",
      -// false set are those that do not have that className.
      -         * 
      - * @param {Array|NodeList} arr The array to partition - * @param {Function} truth (optional) a function to determine truth. If this is omitted the element - * itself must be able to be evaluated for its truthfulness. - * @return {Array} [true,false] - */ - partition : function(arr, truth){ - var ret = [[],[]]; - Ext.each(arr, function(v, i, a) { - ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v); - }); - return ret; - }, - - /** - * Invokes a method on each item in an Array. - *
      
      -// Example:
      -Ext.invoke(Ext.query("p"), "getAttribute", "id");
      -// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
      -         * 
      - * @param {Array|NodeList} arr The Array of items to invoke the method on. - * @param {String} methodName The method name to invoke. - * @param {...*} args Arguments to send into the method invocation. - * @return {Array} The results of invoking the method on each item in the array. - */ - invoke : function(arr, methodName){ - var ret = [], - args = Array.prototype.slice.call(arguments, 2); - Ext.each(arr, function(v,i) { - if (v && typeof v[methodName] == 'function') { - ret.push(v[methodName].apply(v, args)); - } else { - ret.push(undefined); - } - }); - return ret; - }, - - /** - * Plucks the value of a property from each item in the Array - *
      
      -// Example:
      -Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
      -         * 
      - * @param {Array|NodeList} arr The Array of items to pluck the value from. - * @param {String} prop The property name to pluck from each element. - * @return {Array} The value from each item in the Array. - */ - pluck : function(arr, prop){ - var ret = []; - Ext.each(arr, function(v) { - ret.push( v[prop] ); - }); - return ret; - }, - - /** - *

      Zips N sets together.

      - *
      
      -// Example 1:
      -Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
      -// Example 2:
      -Ext.zip(
      -    [ "+", "-", "+"],
      -    [  12,  10,  22],
      -    [  43,  15,  96],
      -    function(a, b, c){
      -        return "$" + a + "" + b + "." + c
      -    }
      -); // ["$+12.43", "$-10.15", "$+22.96"]
      -         * 
      - * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values. - * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together. - * @return {Array} The zipped set. - */ - zip : function(){ - var parts = Ext.partition(arguments, function( val ){ return typeof val != 'function'; }), - arrs = parts[0], - fn = parts[1][0], - len = Ext.max(Ext.pluck(arrs, "length")), - ret = []; - - for (var i = 0; i < len; i++) { - ret[i] = []; - if(fn){ - ret[i] = fn.apply(fn, Ext.pluck(arrs, i)); - }else{ - for (var j = 0, aLen = arrs.length; j < aLen; j++){ - ret[i].push( arrs[j][i] ); - } - } - } - return ret; - }, - - /** - * This is shorthand reference to {@link Ext.ComponentMgr#get}. - * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id} - * @param {String} id The component {@link Ext.Component#id id} - * @return Ext.Component The Component, undefined if not found, or null if a - * Class was found. - */ - getCmp : function(id){ - return Ext.ComponentMgr.get(id); - }, - - /** - * By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash, - * you may want to set this to true. - * @type Boolean - */ - useShims: E.isIE6 || (E.isMac && E.isGecko2), - - // inpired by a similar function in mootools library - /** - * Returns the type of object that is passed in. If the object passed in is null or undefined it - * return false otherwise it returns one of the following values:
        - *
      • string: If the object passed is a string
      • - *
      • number: If the object passed is a number
      • - *
      • boolean: If the object passed is a boolean value
      • - *
      • date: If the object passed is a Date object
      • - *
      • function: If the object passed is a function reference
      • - *
      • object: If the object passed is an object
      • - *
      • array: If the object passed is an array
      • - *
      • regexp: If the object passed is a regular expression
      • - *
      • element: If the object passed is a DOM Element
      • - *
      • nodelist: If the object passed is a DOM NodeList
      • - *
      • textnode: If the object passed is a DOM text node and contains something other than whitespace
      • - *
      • whitespace: If the object passed is a DOM text node and contains only whitespace
      • - *
      - * @param {Mixed} object - * @return {String} - */ - type : function(o){ - if(o === undefined || o === null){ - return false; - } - if(o.htmlElement){ - return 'element'; - } - var t = typeof o; - if(t == 'object' && o.nodeName) { - switch(o.nodeType) { - case 1: return 'element'; - case 3: return (/\S/).test(o.nodeValue) ? 'textnode' : 'whitespace'; - } - } - if(t == 'object' || t == 'function') { - switch(o.constructor) { - case Array: return 'array'; - case RegExp: return 'regexp'; - case Date: return 'date'; - } - if(typeof o.length == 'number' && typeof o.item == 'function') { - return 'nodelist'; - } - } - return t; - }, - - intercept : function(o, name, fn, scope){ - o[name] = o[name].createInterceptor(fn, scope); - }, - - // internal - callback : function(cb, scope, args, delay){ - if(typeof cb == 'function'){ - if(delay){ - cb.defer(delay, scope, args || []); - }else{ - cb.apply(scope, args || []); - } - } - } - }; -}()); - -/** - * @class Function - * These functions are available on every Function object (any JavaScript function). - */ -Ext.apply(Function.prototype, { - /** - * Create a combined function call sequence of the original function + the passed function. - * The resulting function returns the results of the original function. - * The passed fcn is called with the parameters of the original function. Example usage: - *
      
      -var sayHi = function(name){
      -    alert('Hi, ' + name);
      -}
      -
      -sayHi('Fred'); // alerts "Hi, Fred"
      -
      -var sayGoodbye = sayHi.createSequence(function(name){
      -    alert('Bye, ' + name);
      -});
      -
      -sayGoodbye('Fred'); // both alerts show
      -
      - * @param {Function} fcn The function to sequence - * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. - * If omitted, defaults to the scope in which the original function is called or the browser window. - * @return {Function} The new function - */ - createSequence : function(fcn, scope){ - var method = this; - return (typeof fcn != 'function') ? - this : - function(){ - var retval = method.apply(this || window, arguments); - fcn.apply(scope || this || window, arguments); - return retval; - }; - } -}); - - -/** - * @class String - * These functions are available as static methods on the JavaScript String object. - */ -Ext.applyIf(String, { - - /** - * Escapes the passed string for ' and \ - * @param {String} string The string to escape - * @return {String} The escaped string - * @static - */ - escape : function(string) { - return string.replace(/('|\\)/g, "\\$1"); - }, - - /** - * Pads the left side of a string with a specified character. This is especially useful - * for normalizing number and date strings. Example usage: - *
      
      -var s = String.leftPad('123', 5, '0');
      -// s now contains the string: '00123'
      -     * 
      - * @param {String} string The original string - * @param {Number} size The total length of the output string - * @param {String} char (optional) The character with which to pad the original string (defaults to empty string " ") - * @return {String} The padded string - * @static - */ - leftPad : function (val, size, ch) { - var result = String(val); - if(!ch) { - ch = " "; - } - while (result.length < size) { - result = ch + result; - } - return result; - } -}); - -/** - * Utility function that allows you to easily switch a string between two alternating values. The passed value - * is compared to the current string, and if they are equal, the other value that was passed in is returned. If - * they are already different, the first value passed in is returned. Note that this method returns the new value - * but does not change the current string. - *
      
      -// alternate sort directions
      -sort = sort.toggle('ASC', 'DESC');
      -
      -// instead of conditional logic:
      -sort = (sort == 'ASC' ? 'DESC' : 'ASC');
      -
      - * @param {String} value The value to compare to the current string - * @param {String} other The new value to use if the string already equals the first value passed in - * @return {String} The new value - */ -String.prototype.toggle = function(value, other){ - return this == value ? other : value; -}; - -/** - * Trims whitespace from either end of a string, leaving spaces within the string intact. Example: - *
      
      -var s = '  foo bar  ';
      -alert('-' + s + '-');         //alerts "- foo bar -"
      -alert('-' + s.trim() + '-');  //alerts "-foo bar-"
      -
      - * @return {String} The trimmed string - */ -String.prototype.trim = function(){ - var re = /^\s+|\s+$/g; - return function(){ return this.replace(re, ""); }; -}(); - -// here to prevent dependency on Date.js -/** - Returns the number of milliseconds between this date and date - @param {Date} date (optional) Defaults to now - @return {Number} The diff in milliseconds - @member Date getElapsed - */ -Date.prototype.getElapsed = function(date) { - return Math.abs((date || new Date()).getTime()-this.getTime()); -}; - - -/** - * @class Number - */ -Ext.applyIf(Number.prototype, { - /** - * Checks whether or not the current number is within a desired range. If the number is already within the - * range it is returned, otherwise the min or max value is returned depending on which side of the range is - * exceeded. Note that this method returns the constrained value but does not change the current number. - * @param {Number} min The minimum number in the range - * @param {Number} max The maximum number in the range - * @return {Number} The constrained value if outside the range, otherwise the current value - */ - constrain : function(min, max){ - return Math.min(Math.max(this, min), max); - } -}); -Ext.lib.Dom.getRegion = function(el) { - return Ext.lib.Region.getRegion(el); -}; Ext.lib.Region = function(t, r, b, l) { - var me = this; - me.top = t; - me[1] = t; - me.right = r; - me.bottom = b; - me.left = l; - me[0] = l; - }; - - Ext.lib.Region.prototype = { - contains : function(region) { - var me = this; - return ( region.left >= me.left && - region.right <= me.right && - region.top >= me.top && - region.bottom <= me.bottom ); - - }, - - getArea : function() { - var me = this; - return ( (me.bottom - me.top) * (me.right - me.left) ); - }, - - intersect : function(region) { - var me = this, - t = Math.max(me.top, region.top), - r = Math.min(me.right, region.right), - b = Math.min(me.bottom, region.bottom), - l = Math.max(me.left, region.left); - - if (b >= t && r >= l) { - return new Ext.lib.Region(t, r, b, l); - } - }, - - union : function(region) { - var me = this, - t = Math.min(me.top, region.top), - r = Math.max(me.right, region.right), - b = Math.max(me.bottom, region.bottom), - l = Math.min(me.left, region.left); - - return new Ext.lib.Region(t, r, b, l); - }, - - constrainTo : function(r) { - var me = this; - me.top = me.top.constrain(r.top, r.bottom); - me.bottom = me.bottom.constrain(r.top, r.bottom); - me.left = me.left.constrain(r.left, r.right); - me.right = me.right.constrain(r.left, r.right); - return me; - }, - - adjust : function(t, l, b, r) { - var me = this; - me.top += t; - me.left += l; - me.right += r; - me.bottom += b; - return me; - } - }; - - Ext.lib.Region.getRegion = function(el) { - var p = Ext.lib.Dom.getXY(el), - t = p[1], - r = p[0] + el.offsetWidth, - b = p[1] + el.offsetHeight, - l = p[0]; - - return new Ext.lib.Region(t, r, b, l); - }; Ext.lib.Point = function(x, y) { - if (Ext.isArray(x)) { - y = x[1]; - x = x[0]; - } - var me = this; - me.x = me.right = me.left = me[0] = x; - me.y = me.top = me.bottom = me[1] = y; - }; - - Ext.lib.Point.prototype = new Ext.lib.Region(); -/** - * @class Ext.DomHelper - */ -Ext.apply(Ext.DomHelper, -function(){ - var pub, - afterbegin = 'afterbegin', - afterend = 'afterend', - beforebegin = 'beforebegin', - beforeend = 'beforeend', - confRe = /tag|children|cn|html$/i; - - // private - function doInsert(el, o, returnElement, pos, sibling, append){ - el = Ext.getDom(el); - var newNode; - if (pub.useDom) { - newNode = createDom(o, null); - if (append) { - el.appendChild(newNode); - } else { - (sibling == 'firstChild' ? el : el.parentNode).insertBefore(newNode, el[sibling] || el); - } - } else { - newNode = Ext.DomHelper.insertHtml(pos, el, Ext.DomHelper.createHtml(o)); - } - return returnElement ? Ext.get(newNode, true) : newNode; - } - - // build as dom - /** @ignore */ - function createDom(o, parentNode){ - var el, - doc = document, - useSet, - attr, - val, - cn; - - if (Ext.isArray(o)) { // Allow Arrays of siblings to be inserted - el = doc.createDocumentFragment(); // in one shot using a DocumentFragment - for (var i = 0, l = o.length; i < l; i++) { - createDom(o[i], el); - } - } else if (typeof o == 'string') { // Allow a string as a child spec. - el = doc.createTextNode(o); - } else { - el = doc.createElement( o.tag || 'div' ); - useSet = !!el.setAttribute; // In IE some elements don't have setAttribute - for (var attr in o) { - if(!confRe.test(attr)){ - val = o[attr]; - if(attr == 'cls'){ - el.className = val; - }else{ - if(useSet){ - el.setAttribute(attr, val); - }else{ - el[attr] = val; - } - } - } - } - Ext.DomHelper.applyStyles(el, o.style); - - if ((cn = o.children || o.cn)) { - createDom(cn, el); - } else if (o.html) { - el.innerHTML = o.html; - } - } - if(parentNode){ - parentNode.appendChild(el); - } - return el; - } - - pub = { - /** - * Creates a new Ext.Template from the DOM object spec. - * @param {Object} o The DOM object spec (and children) - * @return {Ext.Template} The new template - */ - createTemplate : function(o){ - var html = Ext.DomHelper.createHtml(o); - return new Ext.Template(html); - }, - - /** True to force the use of DOM instead of html fragments @type Boolean */ - useDom : false, - - /** - * Creates new DOM element(s) and inserts them before el. - * @param {Mixed} el The context element - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - * @hide (repeat) - */ - insertBefore : function(el, o, returnElement){ - return doInsert(el, o, returnElement, beforebegin); - }, - - /** - * Creates new DOM element(s) and inserts them after el. - * @param {Mixed} el The context element - * @param {Object} o The DOM object spec (and children) - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - * @hide (repeat) - */ - insertAfter : function(el, o, returnElement){ - return doInsert(el, o, returnElement, afterend, 'nextSibling'); - }, - - /** - * Creates new DOM element(s) and inserts them as the first child of el. - * @param {Mixed} el The context element - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - * @hide (repeat) - */ - insertFirst : function(el, o, returnElement){ - return doInsert(el, o, returnElement, afterbegin, 'firstChild'); - }, - - /** - * Creates new DOM element(s) and appends them to el. - * @param {Mixed} el The context element - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @param {Boolean} returnElement (optional) true to return a Ext.Element - * @return {HTMLElement/Ext.Element} The new node - * @hide (repeat) - */ - append: function(el, o, returnElement){ - return doInsert(el, o, returnElement, beforeend, '', true); - }, - - /** - * Creates new DOM element(s) without inserting them to the document. - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @return {HTMLElement} The new uninserted node - */ - createDom: createDom - }; - return pub; -}()); -/** - * @class Ext.Template - */ -Ext.apply(Ext.Template.prototype, { - /** - * @cfg {Boolean} disableFormats Specify true to disable format - * functions in the template. If the template does not contain - * {@link Ext.util.Format format functions}, setting disableFormats - * to true will reduce {@link #apply} time. Defaults to false. - *
      
      -var t = new Ext.Template(
      -    '<div name="{id}">',
      -        '<span class="{cls}">{name} {value}</span>',
      -    '</div>',
      -    {
      -        compiled: true,      // {@link #compile} immediately
      -        disableFormats: true // reduce {@link #apply} time since no formatting
      -    }
      -);
      -     * 
      - * For a list of available format functions, see {@link Ext.util.Format}. - */ - disableFormats : false, - /** - * See {@link #disableFormats}. - * @type Boolean - * @property disableFormats - */ - - /** - * The regular expression used to match template variables - * @type RegExp - * @property - * @hide repeat doc - */ - re : /\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, - argsRe : /^\s*['"](.*)["']\s*$/, - compileARe : /\\/g, - compileBRe : /(\r\n|\n)/g, - compileCRe : /'/g, - - /** - * Returns an HTML fragment of this template with the specified values applied. - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @return {String} The HTML fragment - * @hide repeat doc - */ - applyTemplate : function(values){ - var me = this, - useF = me.disableFormats !== true, - fm = Ext.util.Format, - tpl = me; - - if(me.compiled){ - return me.compiled(values); - } - function fn(m, name, format, args){ - if (format && useF) { - if (format.substr(0, 5) == "this.") { - return tpl.call(format.substr(5), values[name], values); - } else { - if (args) { - // quoted values are required for strings in compiled templates, - // but for non compiled we need to strip them - // quoted reversed for jsmin - var re = me.argsRe; - args = args.split(','); - for(var i = 0, len = args.length; i < len; i++){ - args[i] = args[i].replace(re, "$1"); - } - args = [values[name]].concat(args); - } else { - args = [values[name]]; - } - return fm[format].apply(fm, args); - } - } else { - return values[name] !== undefined ? values[name] : ""; - } - } - return me.html.replace(me.re, fn); - }, - - /** - * Compiles the template into an internal function, eliminating the RegEx overhead. - * @return {Ext.Template} this - * @hide repeat doc - */ - compile : function(){ - var me = this, - fm = Ext.util.Format, - useF = me.disableFormats !== true, - sep = Ext.isGecko ? "+" : ",", - body; - - function fn(m, name, format, args){ - if(format && useF){ - args = args ? ',' + args : ""; - if(format.substr(0, 5) != "this."){ - format = "fm." + format + '('; - }else{ - format = 'this.call("'+ format.substr(5) + '", '; - args = ", values"; - } - }else{ - args= ''; format = "(values['" + name + "'] == undefined ? '' : "; - } - return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'"; - } - - // branched to use + in gecko and [].join() in others - if(Ext.isGecko){ - body = "this.compiled = function(values){ return '" + - me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn) + - "';};"; - }else{ - body = ["this.compiled = function(values){ return ['"]; - body.push(me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn)); - body.push("'].join('');};"); - body = body.join(''); - } - eval(body); - return me; - }, - - // private function used to call members - call : function(fnName, value, allValues){ - return this[fnName](value, allValues); - } -}); -Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; -/** - * @class Ext.util.Functions - * @singleton - */ -Ext.util.Functions = { - /** - * Creates an interceptor function. The passed function is called before the original one. If it returns false, - * the original one is not called. The resulting function returns the results of the original function. - * The passed function is called with the parameters of the original function. Example usage: - *
      
      -var sayHi = function(name){
      -    alert('Hi, ' + name);
      -}
      -
      -sayHi('Fred'); // alerts "Hi, Fred"
      -
      -// create a new function that validates input without
      -// directly modifying the original function:
      -var sayHiToFriend = Ext.createInterceptor(sayHi, function(name){
      -    return name == 'Brian';
      -});
      -
      -sayHiToFriend('Fred');  // no alert
      -sayHiToFriend('Brian'); // alerts "Hi, Brian"
      -       
      - * @param {Function} origFn The original function. - * @param {Function} newFn The function to call before the original - * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. - * If omitted, defaults to the scope in which the original function is called or the browser window. - * @return {Function} The new function - */ - createInterceptor: function(origFn, newFn, scope) { - var method = origFn; - if (!Ext.isFunction(newFn)) { - return origFn; - } - else { - return function() { - var me = this, - args = arguments; - newFn.target = me; - newFn.method = origFn; - return (newFn.apply(scope || me || window, args) !== false) ? - origFn.apply(me || window, args) : - null; - }; - } - }, - - /** - * Creates a delegate (callback) that sets the scope to obj. - * Call directly on any function. Example: Ext.createDelegate(this.myFunction, this, [arg1, arg2]) - * Will create a function that is automatically scoped to obj so that the this variable inside the - * callback points to obj. Example usage: - *
      
      -var sayHi = function(name){
      -    // Note this use of "this.text" here.  This function expects to
      -    // execute within a scope that contains a text property.  In this
      -    // example, the "this" variable is pointing to the btn object that
      -    // was passed in createDelegate below.
      -    alert('Hi, ' + name + '. You clicked the "' + this.text + '" button.');
      -}
      -
      -var btn = new Ext.Button({
      -    text: 'Say Hi',
      -    renderTo: Ext.getBody()
      -});
      -
      -// This callback will execute in the scope of the
      -// button instance. Clicking the button alerts
      -// "Hi, Fred. You clicked the "Say Hi" button."
      -btn.on('click', Ext.createDelegate(sayHi, btn, ['Fred']));
      -       
      - * @param {Function} fn The function to delegate. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. - * If omitted, defaults to the browser window. - * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) - * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, - * if a number the args are inserted at the specified position - * @return {Function} The new function - */ - createDelegate: function(fn, obj, args, appendArgs) { - if (!Ext.isFunction(fn)) { - return fn; - } - return function() { - var callArgs = args || arguments; - if (appendArgs === true) { - callArgs = Array.prototype.slice.call(arguments, 0); - callArgs = callArgs.concat(args); - } - else if (Ext.isNumber(appendArgs)) { - callArgs = Array.prototype.slice.call(arguments, 0); - // copy arguments first - var applyArgs = [appendArgs, 0].concat(args); - // create method call params - Array.prototype.splice.apply(callArgs, applyArgs); - // splice them in - } - return fn.apply(obj || window, callArgs); - }; - }, - - /** - * Calls this function after the number of millseconds specified, optionally in a specific scope. Example usage: - *
      
      -var sayHi = function(name){
      -    alert('Hi, ' + name);
      -}
      -
      -// executes immediately:
      -sayHi('Fred');
      -
      -// executes after 2 seconds:
      -Ext.defer(sayHi, 2000, this, ['Fred']);
      -
      -// this syntax is sometimes useful for deferring
      -// execution of an anonymous function:
      -Ext.defer(function(){
      -    alert('Anonymous');
      -}, 100);
      -       
      - * @param {Function} fn The function to defer. - * @param {Number} millis The number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately) - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. - * If omitted, defaults to the browser window. - * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) - * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, - * if a number the args are inserted at the specified position - * @return {Number} The timeout id that can be used with clearTimeout - */ - defer: function(fn, millis, obj, args, appendArgs) { - fn = Ext.util.Functions.createDelegate(fn, obj, args, appendArgs); - if (millis > 0) { - return setTimeout(fn, millis); - } - fn(); - return 0; - }, - - - /** - * Create a combined function call sequence of the original function + the passed function. - * The resulting function returns the results of the original function. - * The passed fcn is called with the parameters of the original function. Example usage: - * - -var sayHi = function(name){ - alert('Hi, ' + name); -} - -sayHi('Fred'); // alerts "Hi, Fred" - -var sayGoodbye = Ext.createSequence(sayHi, function(name){ - alert('Bye, ' + name); -}); - -sayGoodbye('Fred'); // both alerts show - - * @param {Function} origFn The original function. - * @param {Function} newFn The function to sequence - * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. - * If omitted, defaults to the scope in which the original function is called or the browser window. - * @return {Function} The new function - */ - createSequence: function(origFn, newFn, scope) { - if (!Ext.isFunction(newFn)) { - return origFn; - } - else { - return function() { - var retval = origFn.apply(this || window, arguments); - newFn.apply(scope || this || window, arguments); - return retval; - }; - } - } -}; - -/** - * Shorthand for {@link Ext.util.Functions#defer} - * @param {Function} fn The function to defer. - * @param {Number} millis The number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately) - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. - * If omitted, defaults to the browser window. - * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) - * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, - * if a number the args are inserted at the specified position - * @return {Number} The timeout id that can be used with clearTimeout - * @member Ext - * @method defer - */ - -Ext.defer = Ext.util.Functions.defer; - -/** - * Shorthand for {@link Ext.util.Functions#createInterceptor} - * @param {Function} origFn The original function. - * @param {Function} newFn The function to call before the original - * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. - * If omitted, defaults to the scope in which the original function is called or the browser window. - * @return {Function} The new function - * @member Ext - * @method defer - */ - -Ext.createInterceptor = Ext.util.Functions.createInterceptor; - -/** - * Shorthand for {@link Ext.util.Functions#createSequence} - * @param {Function} origFn The original function. - * @param {Function} newFn The function to sequence - * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. - * If omitted, defaults to the scope in which the original function is called or the browser window. - * @return {Function} The new function - * @member Ext - * @method defer - */ - -Ext.createSequence = Ext.util.Functions.createSequence; - -/** - * Shorthand for {@link Ext.util.Functions#createDelegate} - * @param {Function} fn The function to delegate. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. - * If omitted, defaults to the browser window. - * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) - * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, - * if a number the args are inserted at the specified position - * @return {Function} The new function - * @member Ext - * @method defer - */ -Ext.createDelegate = Ext.util.Functions.createDelegate; -/** - * @class Ext.util.Observable - */ -Ext.apply(Ext.util.Observable.prototype, function(){ - // this is considered experimental (along with beforeMethod, afterMethod, removeMethodListener?) - // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call - // private - function getMethodEvent(method){ - var e = (this.methodEvents = this.methodEvents || - {})[method], returnValue, v, cancel, obj = this; - - if (!e) { - this.methodEvents[method] = e = {}; - e.originalFn = this[method]; - e.methodName = method; - e.before = []; - e.after = []; - - var makeCall = function(fn, scope, args){ - if((v = fn.apply(scope || obj, args)) !== undefined){ - if (typeof v == 'object') { - if(v.returnValue !== undefined){ - returnValue = v.returnValue; - }else{ - returnValue = v; - } - cancel = !!v.cancel; - } - else - if (v === false) { - cancel = true; - } - else { - returnValue = v; - } - } - }; - - this[method] = function(){ - var args = Array.prototype.slice.call(arguments, 0), - b; - returnValue = v = undefined; - cancel = false; - - for(var i = 0, len = e.before.length; i < len; i++){ - b = e.before[i]; - makeCall(b.fn, b.scope, args); - if (cancel) { - return returnValue; - } - } - - if((v = e.originalFn.apply(obj, args)) !== undefined){ - returnValue = v; - } - - for(var i = 0, len = e.after.length; i < len; i++){ - b = e.after[i]; - makeCall(b.fn, b.scope, args); - if (cancel) { - return returnValue; - } - } - return returnValue; - }; - } - return e; - } - - return { - // these are considered experimental - // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call - // adds an 'interceptor' called before the original method - beforeMethod : function(method, fn, scope){ - getMethodEvent.call(this, method).before.push({ - fn: fn, - scope: scope - }); - }, - - // adds a 'sequence' called after the original method - afterMethod : function(method, fn, scope){ - getMethodEvent.call(this, method).after.push({ - fn: fn, - scope: scope - }); - }, - - removeMethodListener: function(method, fn, scope){ - var e = this.getMethodEvent(method); - for(var i = 0, len = e.before.length; i < len; i++){ - if(e.before[i].fn == fn && e.before[i].scope == scope){ - e.before.splice(i, 1); - return; - } - } - for(var i = 0, len = e.after.length; i < len; i++){ - if(e.after[i].fn == fn && e.after[i].scope == scope){ - e.after.splice(i, 1); - return; - } - } - }, - - /** - * Relays selected events from the specified Observable as if the events were fired by this. - * @param {Object} o The Observable whose events this object is to relay. - * @param {Array} events Array of event names to relay. - */ - relayEvents : function(o, events){ - var me = this; - function createHandler(ename){ - return function(){ - return me.fireEvent.apply(me, [ename].concat(Array.prototype.slice.call(arguments, 0))); - }; - } - for(var i = 0, len = events.length; i < len; i++){ - var ename = events[i]; - me.events[ename] = me.events[ename] || true; - o.on(ename, createHandler(ename), me); - } - }, - - /** - *

      Enables events fired by this Observable to bubble up an owner hierarchy by calling - * this.getBubbleTarget() if present. There is no implementation in the Observable base class.

      - *

      This is commonly used by Ext.Components to bubble events to owner Containers. See {@link Ext.Component.getBubbleTarget}. The default - * implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to - * access the required target more quickly.

      - *

      Example:

      
      -Ext.override(Ext.form.Field, {
      -    //  Add functionality to Field's initComponent to enable the change event to bubble
      -    initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
      -        this.enableBubble('change');
      -    }),
      -
      -    //  We know that we want Field's events to bubble directly to the FormPanel.
      -    getBubbleTarget : function() {
      -        if (!this.formPanel) {
      -            this.formPanel = this.findParentByType('form');
      -        }
      -        return this.formPanel;
      -    }
      -});
      -
      -var myForm = new Ext.formPanel({
      -    title: 'User Details',
      -    items: [{
      -        ...
      -    }],
      -    listeners: {
      -        change: function() {
      -            // Title goes red if form has been modified.
      -            myForm.header.setStyle('color', 'red');
      -        }
      -    }
      -});
      -
      - * @param {String/Array} events The event name to bubble, or an Array of event names. - */ - enableBubble : function(events){ - var me = this; - if(!Ext.isEmpty(events)){ - events = Ext.isArray(events) ? events : Array.prototype.slice.call(arguments, 0); - for(var i = 0, len = events.length; i < len; i++){ - var ename = events[i]; - ename = ename.toLowerCase(); - var ce = me.events[ename] || true; - if (typeof ce == 'boolean') { - ce = new Ext.util.Event(me, ename); - me.events[ename] = ce; - } - ce.bubble = true; - } - } - } - }; -}()); - - -/** - * Starts capture on the specified Observable. All events will be passed - * to the supplied function with the event name + standard signature of the event - * before the event is fired. If the supplied function returns false, - * the event will not fire. - * @param {Observable} o The Observable to capture events from. - * @param {Function} fn The function to call when an event is fired. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the Observable firing the event. - * @static - */ -Ext.util.Observable.capture = function(o, fn, scope){ - o.fireEvent = o.fireEvent.createInterceptor(fn, scope); -}; - - -/** - * Sets observability on the passed class constructor.

      - *

      This makes any event fired on any instance of the passed class also fire a single event through - * the class allowing for central handling of events on many instances at once.

      - *

      Usage:

      
      -Ext.util.Observable.observeClass(Ext.data.Connection);
      -Ext.data.Connection.on('beforerequest', function(con, options) {
      -    console.log('Ajax request made to ' + options.url);
      -});
      - * @param {Function} c The class constructor to make observable. - * @param {Object} listeners An object containing a series of listeners to add. See {@link #addListener}. - * @static - */ -Ext.util.Observable.observeClass = function(c, listeners){ - if(c){ - if(!c.fireEvent){ - Ext.apply(c, new Ext.util.Observable()); - Ext.util.Observable.capture(c.prototype, c.fireEvent, c); - } - if(typeof listeners == 'object'){ - c.on(listeners); - } - return c; - } -}; -/** -* @class Ext.EventManager -*/ -Ext.apply(Ext.EventManager, function(){ - var resizeEvent, - resizeTask, - textEvent, - textSize, - D = Ext.lib.Dom, - propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, - unload = Ext.EventManager._unload, - curWidth = 0, - curHeight = 0, - // note 1: IE fires ONLY the keydown event on specialkey autorepeat - // note 2: Safari < 3.1, Gecko (Mac/Linux) & Opera fire only the keypress event on specialkey autorepeat - // (research done by @Jan Wolter at http://unixpapa.com/js/key.html) - useKeydown = Ext.isWebKit ? - Ext.num(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1]) >= 525 : - !((Ext.isGecko && !Ext.isWindows) || Ext.isOpera); - - return { - _unload: function(){ - Ext.EventManager.un(window, "resize", this.fireWindowResize, this); - unload.call(Ext.EventManager); - }, - - // private - doResizeEvent: function(){ - var h = D.getViewHeight(), - w = D.getViewWidth(); - - //whacky problem in IE where the resize event will fire even though the w/h are the same. - if(curHeight != h || curWidth != w){ - resizeEvent.fire(curWidth = w, curHeight = h); - } - }, - - /** - * Adds a listener to be notified when the browser window is resized and provides resize event buffering (100 milliseconds), - * passes new viewport width and height to handlers. - * @param {Function} fn The handler function the window resize event invokes. - * @param {Object} scope The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {boolean} options Options object as passed to {@link Ext.Element#addListener} - */ - onWindowResize : function(fn, scope, options){ - if(!resizeEvent){ - resizeEvent = new Ext.util.Event(); - resizeTask = new Ext.util.DelayedTask(this.doResizeEvent); - Ext.EventManager.on(window, "resize", this.fireWindowResize, this); - } - resizeEvent.addListener(fn, scope, options); - }, - - // exposed only to allow manual firing - fireWindowResize : function(){ - if(resizeEvent){ - resizeTask.delay(100); - } - }, - - /** - * Adds a listener to be notified when the user changes the active text size. Handler gets called with 2 params, the old size and the new size. - * @param {Function} fn The function the event invokes. - * @param {Object} scope The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {boolean} options Options object as passed to {@link Ext.Element#addListener} - */ - onTextResize : function(fn, scope, options){ - if(!textEvent){ - textEvent = new Ext.util.Event(); - var textEl = new Ext.Element(document.createElement('div')); - textEl.dom.className = 'x-text-resize'; - textEl.dom.innerHTML = 'X'; - textEl.appendTo(document.body); - textSize = textEl.dom.offsetHeight; - setInterval(function(){ - if(textEl.dom.offsetHeight != textSize){ - textEvent.fire(textSize, textSize = textEl.dom.offsetHeight); - } - }, this.textResizeInterval); - } - textEvent.addListener(fn, scope, options); - }, - - /** - * Removes the passed window resize listener. - * @param {Function} fn The method the event invokes - * @param {Object} scope The scope of handler - */ - removeResizeListener : function(fn, scope){ - if(resizeEvent){ - resizeEvent.removeListener(fn, scope); - } - }, - - // private - fireResize : function(){ - if(resizeEvent){ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - } - }, - - /** - * The frequency, in milliseconds, to check for text resize events (defaults to 50) - */ - textResizeInterval : 50, - - /** - * Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL) - */ - ieDeferSrc : false, - - // protected, short accessor for useKeydown - getKeyEvent : function(){ - return useKeydown ? 'keydown' : 'keypress'; - }, - - // protected for use inside the framework - // detects whether we should use keydown or keypress based on the browser. - useKeydown: useKeydown - }; -}()); - -Ext.EventManager.on = Ext.EventManager.addListener; - - -Ext.apply(Ext.EventObjectImpl.prototype, { - /** Key constant @type Number */ - BACKSPACE: 8, - /** Key constant @type Number */ - TAB: 9, - /** Key constant @type Number */ - NUM_CENTER: 12, - /** Key constant @type Number */ - ENTER: 13, - /** Key constant @type Number */ - RETURN: 13, - /** Key constant @type Number */ - SHIFT: 16, - /** Key constant @type Number */ - CTRL: 17, - CONTROL : 17, // legacy - /** Key constant @type Number */ - ALT: 18, - /** Key constant @type Number */ - PAUSE: 19, - /** Key constant @type Number */ - CAPS_LOCK: 20, - /** Key constant @type Number */ - ESC: 27, - /** Key constant @type Number */ - SPACE: 32, - /** Key constant @type Number */ - PAGE_UP: 33, - PAGEUP : 33, // legacy - /** Key constant @type Number */ - PAGE_DOWN: 34, - PAGEDOWN : 34, // legacy - /** Key constant @type Number */ - END: 35, - /** Key constant @type Number */ - HOME: 36, - /** Key constant @type Number */ - LEFT: 37, - /** Key constant @type Number */ - UP: 38, - /** Key constant @type Number */ - RIGHT: 39, - /** Key constant @type Number */ - DOWN: 40, - /** Key constant @type Number */ - PRINT_SCREEN: 44, - /** Key constant @type Number */ - INSERT: 45, - /** Key constant @type Number */ - DELETE: 46, - /** Key constant @type Number */ - ZERO: 48, - /** Key constant @type Number */ - ONE: 49, - /** Key constant @type Number */ - TWO: 50, - /** Key constant @type Number */ - THREE: 51, - /** Key constant @type Number */ - FOUR: 52, - /** Key constant @type Number */ - FIVE: 53, - /** Key constant @type Number */ - SIX: 54, - /** Key constant @type Number */ - SEVEN: 55, - /** Key constant @type Number */ - EIGHT: 56, - /** Key constant @type Number */ - NINE: 57, - /** Key constant @type Number */ - A: 65, - /** Key constant @type Number */ - B: 66, - /** Key constant @type Number */ - C: 67, - /** Key constant @type Number */ - D: 68, - /** Key constant @type Number */ - E: 69, - /** Key constant @type Number */ - F: 70, - /** Key constant @type Number */ - G: 71, - /** Key constant @type Number */ - H: 72, - /** Key constant @type Number */ - I: 73, - /** Key constant @type Number */ - J: 74, - /** Key constant @type Number */ - K: 75, - /** Key constant @type Number */ - L: 76, - /** Key constant @type Number */ - M: 77, - /** Key constant @type Number */ - N: 78, - /** Key constant @type Number */ - O: 79, - /** Key constant @type Number */ - P: 80, - /** Key constant @type Number */ - Q: 81, - /** Key constant @type Number */ - R: 82, - /** Key constant @type Number */ - S: 83, - /** Key constant @type Number */ - T: 84, - /** Key constant @type Number */ - U: 85, - /** Key constant @type Number */ - V: 86, - /** Key constant @type Number */ - W: 87, - /** Key constant @type Number */ - X: 88, - /** Key constant @type Number */ - Y: 89, - /** Key constant @type Number */ - Z: 90, - /** Key constant @type Number */ - CONTEXT_MENU: 93, - /** Key constant @type Number */ - NUM_ZERO: 96, - /** Key constant @type Number */ - NUM_ONE: 97, - /** Key constant @type Number */ - NUM_TWO: 98, - /** Key constant @type Number */ - NUM_THREE: 99, - /** Key constant @type Number */ - NUM_FOUR: 100, - /** Key constant @type Number */ - NUM_FIVE: 101, - /** Key constant @type Number */ - NUM_SIX: 102, - /** Key constant @type Number */ - NUM_SEVEN: 103, - /** Key constant @type Number */ - NUM_EIGHT: 104, - /** Key constant @type Number */ - NUM_NINE: 105, - /** Key constant @type Number */ - NUM_MULTIPLY: 106, - /** Key constant @type Number */ - NUM_PLUS: 107, - /** Key constant @type Number */ - NUM_MINUS: 109, - /** Key constant @type Number */ - NUM_PERIOD: 110, - /** Key constant @type Number */ - NUM_DIVISION: 111, - /** Key constant @type Number */ - F1: 112, - /** Key constant @type Number */ - F2: 113, - /** Key constant @type Number */ - F3: 114, - /** Key constant @type Number */ - F4: 115, - /** Key constant @type Number */ - F5: 116, - /** Key constant @type Number */ - F6: 117, - /** Key constant @type Number */ - F7: 118, - /** Key constant @type Number */ - F8: 119, - /** Key constant @type Number */ - F9: 120, - /** Key constant @type Number */ - F10: 121, - /** Key constant @type Number */ - F11: 122, - /** Key constant @type Number */ - F12: 123, - - /** @private */ - isNavKeyPress : function(){ - var me = this, - k = this.normalizeKey(me.keyCode); - return (k >= 33 && k <= 40) || // Page Up/Down, End, Home, Left, Up, Right, Down - k == me.RETURN || - k == me.TAB || - k == me.ESC; - }, - - isSpecialKey : function(){ - var k = this.normalizeKey(this.keyCode); - return (this.type == 'keypress' && this.ctrlKey) || - this.isNavKeyPress() || - (k == this.BACKSPACE) || // Backspace - (k >= 16 && k <= 20) || // Shift, Ctrl, Alt, Pause, Caps Lock - (k >= 44 && k <= 46); // Print Screen, Insert, Delete - }, - - getPoint : function(){ - return new Ext.lib.Point(this.xy[0], this.xy[1]); - }, - - /** - * Returns true if the control, meta, shift or alt key was pressed during this event. - * @return {Boolean} - */ - hasModifier : function(){ - return ((this.ctrlKey || this.altKey) || this.shiftKey); - } -});/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Stops the specified event(s) from bubbling and optionally prevents the default action - * @param {String/Array} eventName an event / array of events to stop from bubbling - * @param {Boolean} preventDefault (optional) true to prevent the default action too - * @return {Ext.Element} this - */ - swallowEvent : function(eventName, preventDefault) { - var me = this; - function fn(e) { - e.stopPropagation(); - if (preventDefault) { - e.preventDefault(); - } - } - - if (Ext.isArray(eventName)) { - Ext.each(eventName, function(e) { - me.on(e, fn); - }); - return me; - } - me.on(eventName, fn); - return me; - }, - - /** - * Create an event handler on this element such that when the event fires and is handled by this element, - * it will be relayed to another object (i.e., fired again as if it originated from that object instead). - * @param {String} eventName The type of event to relay - * @param {Object} object Any object that extends {@link Ext.util.Observable} that will provide the context - * for firing the relayed event - */ - relayEvent : function(eventName, observable) { - this.on(eventName, function(e) { - observable.fireEvent(eventName, e); - }); - }, - - /** - * Removes worthless text nodes - * @param {Boolean} forceReclean (optional) By default the element - * keeps track if it has been cleaned already so - * you can call this over and over. However, if you update the element and - * need to force a reclean, you can pass true. - */ - clean : function(forceReclean) { - var me = this, - dom = me.dom, - n = dom.firstChild, - ni = -1; - - if (Ext.Element.data(dom, 'isCleaned') && forceReclean !== true) { - return me; - } - - while (n) { - var nx = n.nextSibling; - if (n.nodeType == 3 && !(/\S/.test(n.nodeValue))) { - dom.removeChild(n); - } else { - n.nodeIndex = ++ni; - } - n = nx; - } - - Ext.Element.data(dom, 'isCleaned', true); - return me; - }, - - /** - * Direct access to the Updater {@link Ext.Updater#update} method. The method takes the same object - * parameter as {@link Ext.Updater#update} - * @return {Ext.Element} this - */ - load : function() { - var updateManager = this.getUpdater(); - updateManager.update.apply(updateManager, arguments); - - return this; - }, - - /** - * Gets this element's {@link Ext.Updater Updater} - * @return {Ext.Updater} The Updater - */ - getUpdater : function() { - return this.updateManager || (this.updateManager = new Ext.Updater(this)); - }, - - /** - * Update the innerHTML of this element, optionally searching for and processing scripts - * @param {String} html The new HTML - * @param {Boolean} loadScripts (optional) True to look for and process scripts (defaults to false) - * @param {Function} callback (optional) For async script loading you can be notified when the update completes - * @return {Ext.Element} this - */ - update : function(html, loadScripts, callback) { - if (!this.dom) { - return this; - } - html = html || ""; - - if (loadScripts !== true) { - this.dom.innerHTML = html; - if (typeof callback == 'function') { - callback(); - } - return this; - } - - var id = Ext.id(), - dom = this.dom; - - html += ''; - - Ext.lib.Event.onAvailable(id, function() { - var DOC = document, - hd = DOC.getElementsByTagName("head")[0], - re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig, - srcRe = /\ssrc=([\'\"])(.*?)\1/i, - typeRe = /\stype=([\'\"])(.*?)\1/i, - match, - attrs, - srcMatch, - typeMatch, - el, - s; - - while ((match = re.exec(html))) { - attrs = match[1]; - srcMatch = attrs ? attrs.match(srcRe) : false; - if (srcMatch && srcMatch[2]) { - s = DOC.createElement("script"); - s.src = srcMatch[2]; - typeMatch = attrs.match(typeRe); - if (typeMatch && typeMatch[2]) { - s.type = typeMatch[2]; - } - hd.appendChild(s); - } else if (match[2] && match[2].length > 0) { - if (window.execScript) { - window.execScript(match[2]); - } else { - window.eval(match[2]); - } - } - } - - el = DOC.getElementById(id); - if (el) { - Ext.removeNode(el); - } - - if (typeof callback == 'function') { - callback(); - } - }); - dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); - return this; - }, - - // inherit docs, overridden so we can add removeAnchor - removeAllListeners : function() { - this.removeAnchor(); - Ext.EventManager.removeAll(this.dom); - return this; - }, - - /** - * Creates a proxy element of this element - * @param {String/Object} config The class name of the proxy element or a DomHelper config object - * @param {String/HTMLElement} renderTo (optional) The element or element id to render the proxy to (defaults to document.body) - * @param {Boolean} matchBox (optional) True to align and size the proxy to this element now (defaults to false) - * @return {Ext.Element} The new proxy element - */ - createProxy : function(config, renderTo, matchBox) { - config = (typeof config == 'object') ? config : {tag : "div", cls: config}; - - var me = this, - proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) : - Ext.DomHelper.insertBefore(me.dom, config, true); - - if (matchBox && me.setBox && me.getBox) { // check to make sure Element.position.js is loaded - proxy.setBox(me.getBox()); - } - return proxy; - } -}); - -Ext.Element.prototype.getUpdateManager = Ext.Element.prototype.getUpdater; -/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Gets the x,y coordinates specified by the anchor position on the element. - * @param {String} anchor (optional) The specified anchor position (defaults to "c"). See {@link #alignTo} - * for details on supported anchor positions. - * @param {Boolean} local (optional) True to get the local (element top/left-relative) anchor position instead - * of page coordinates - * @param {Object} size (optional) An object containing the size to use for calculating anchor position - * {width: (target width), height: (target height)} (defaults to the element's current size) - * @return {Array} [x, y] An array containing the element's x and y coordinates - */ - getAnchorXY : function(anchor, local, s){ - //Passing a different size is useful for pre-calculating anchors, - //especially for anchored animations that change the el size. - anchor = (anchor || "tl").toLowerCase(); - s = s || {}; - - var me = this, - vp = me.dom == document.body || me.dom == document, - w = s.width || vp ? Ext.lib.Dom.getViewWidth() : me.getWidth(), - h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(), - xy, - r = Math.round, - o = me.getXY(), - scroll = me.getScroll(), - extraX = vp ? scroll.left : !local ? o[0] : 0, - extraY = vp ? scroll.top : !local ? o[1] : 0, - hash = { - c : [r(w * 0.5), r(h * 0.5)], - t : [r(w * 0.5), 0], - l : [0, r(h * 0.5)], - r : [w, r(h * 0.5)], - b : [r(w * 0.5), h], - tl : [0, 0], - bl : [0, h], - br : [w, h], - tr : [w, 0] - }; - - xy = hash[anchor]; - return [xy[0] + extraX, xy[1] + extraY]; - }, - - /** - * Anchors an element to another element and realigns it when the window is resized. - * @param {Mixed} element The element to align to. - * @param {String} position The position to align to. - * @param {Array} offsets (optional) Offset the positioning by [x, y] - * @param {Boolean/Object} animate (optional) True for the default animation or a standard Element animation config object - * @param {Boolean/Number} monitorScroll (optional) True to monitor body scroll and reposition. If this parameter - * is a number, it is used as the buffer delay (defaults to 50ms). - * @param {Function} callback The function to call after the animation finishes - * @return {Ext.Element} this - */ - anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){ - var me = this, - dom = me.dom, - scroll = !Ext.isEmpty(monitorScroll), - action = function(){ - Ext.fly(dom).alignTo(el, alignment, offsets, animate); - Ext.callback(callback, Ext.fly(dom)); - }, - anchor = this.getAnchor(); - - // previous listener anchor, remove it - this.removeAnchor(); - Ext.apply(anchor, { - fn: action, - scroll: scroll - }); - - Ext.EventManager.onWindowResize(action, null); - - if(scroll){ - Ext.EventManager.on(window, 'scroll', action, null, - {buffer: !isNaN(monitorScroll) ? monitorScroll : 50}); - } - action.call(me); // align immediately - return me; - }, - - /** - * Remove any anchor to this element. See {@link #anchorTo}. - * @return {Ext.Element} this - */ - removeAnchor : function(){ - var me = this, - anchor = this.getAnchor(); - - if(anchor && anchor.fn){ - Ext.EventManager.removeResizeListener(anchor.fn); - if(anchor.scroll){ - Ext.EventManager.un(window, 'scroll', anchor.fn); - } - delete anchor.fn; - } - return me; - }, - - // private - getAnchor : function(){ - var data = Ext.Element.data, - dom = this.dom; - if (!dom) { - return; - } - var anchor = data(dom, '_anchor'); - - if(!anchor){ - anchor = data(dom, '_anchor', {}); - } - return anchor; - }, - - /** - * Gets the x,y coordinates to align this element with another element. See {@link #alignTo} for more info on the - * supported position values. - * @param {Mixed} element The element to align to. - * @param {String} position (optional, defaults to "tl-bl?") The position to align to. - * @param {Array} offsets (optional) Offset the positioning by [x, y] - * @return {Array} [x, y] - */ - getAlignToXY : function(el, p, o){ - el = Ext.get(el); - - if(!el || !el.dom){ - throw "Element.alignToXY with an element that doesn't exist"; - } - - o = o || [0,0]; - p = (!p || p == "?" ? "tl-bl?" : (!(/-/).test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase(); - - var me = this, - d = me.dom, - a1, - a2, - x, - y, - //constrain the aligned el to viewport if necessary - w, - h, - r, - dw = Ext.lib.Dom.getViewWidth() -10, // 10px of margin for ie - dh = Ext.lib.Dom.getViewHeight()-10, // 10px of margin for ie - p1y, - p1x, - p2y, - p2x, - swapY, - swapX, - doc = document, - docElement = doc.documentElement, - docBody = doc.body, - scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0)+5, - scrollY = (docElement.scrollTop || docBody.scrollTop || 0)+5, - c = false, //constrain to viewport - p1 = "", - p2 = "", - m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); - - if(!m){ - throw "Element.alignTo with an invalid alignment " + p; - } - - p1 = m[1]; - p2 = m[2]; - c = !!m[3]; - - //Subtract the aligned el's internal xy from the target's offset xy - //plus custom offset to get the aligned el's new offset xy - a1 = me.getAnchorXY(p1, true); - a2 = el.getAnchorXY(p2, false); - - x = a2[0] - a1[0] + o[0]; - y = a2[1] - a1[1] + o[1]; - - if(c){ - w = me.getWidth(); - h = me.getHeight(); - r = el.getRegion(); - //If we are at a viewport boundary and the aligned el is anchored on a target border that is - //perpendicular to the vp border, allow the aligned el to slide on that border, - //otherwise swap the aligned el to the opposite border of the target. - p1y = p1.charAt(0); - p1x = p1.charAt(p1.length-1); - p2y = p2.charAt(0); - p2x = p2.charAt(p2.length-1); - swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); - swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); - - - if (x + w > dw + scrollX) { - x = swapX ? r.left-w : dw+scrollX-w; - } - if (x < scrollX) { - x = swapX ? r.right : scrollX; - } - if (y + h > dh + scrollY) { - y = swapY ? r.top-h : dh+scrollY-h; - } - if (y < scrollY){ - y = swapY ? r.bottom : scrollY; - } - } - return [x,y]; - }, - - /** - * Aligns this element with another element relative to the specified anchor points. If the other element is the - * document it aligns it to the viewport. - * The position parameter is optional, and can be specified in any one of the following formats: - *
        - *
      • Blank: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").
      • - *
      • One anchor (deprecated): The passed anchor position is used as the target element's anchor point. - * The element being aligned will position its top-left corner (tl) to that point. This method has been - * deprecated in favor of the newer two anchor syntax below.
      • - *
      • Two anchors: If two values from the table below are passed separated by a dash, the first value is used as the - * element's anchor point, and the second value is used as the target's anchor point.
      • - *
      - * In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of - * the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to - * the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than - * that specified in order to enforce the viewport constraints. - * Following are all of the supported anchor positions: -
      -Value  Description
      ------  -----------------------------
      -tl     The top left corner (default)
      -t      The center of the top edge
      -tr     The top right corner
      -l      The center of the left edge
      -c      In the center of the element
      -r      The center of the right edge
      -bl     The bottom left corner
      -b      The center of the bottom edge
      -br     The bottom right corner
      -
      -Example Usage: -
      
      -// align el to other-el using the default positioning ("tl-bl", non-constrained)
      -el.alignTo("other-el");
      -
      -// align the top left corner of el with the top right corner of other-el (constrained to viewport)
      -el.alignTo("other-el", "tr?");
      -
      -// align the bottom right corner of el with the center left edge of other-el
      -el.alignTo("other-el", "br-l?");
      -
      -// align the center of el with the bottom left corner of other-el and
      -// adjust the x position by -6 pixels (and the y position by 0)
      -el.alignTo("other-el", "c-bl", [-6, 0]);
      -
      - * @param {Mixed} element The element to align to. - * @param {String} position (optional, defaults to "tl-bl?") The position to align to. - * @param {Array} offsets (optional) Offset the positioning by [x, y] - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - alignTo : function(element, position, offsets, animate){ - var me = this; - return me.setXY(me.getAlignToXY(element, position, offsets), - me.preanim && !!animate ? me.preanim(arguments, 3) : false); - }, - - // private ==> used outside of core - adjustForConstraints : function(xy, parent, offsets){ - return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; - }, - - // private ==> used outside of core - getConstrainToXY : function(el, local, offsets, proposedXY){ - var os = {top:0, left:0, bottom:0, right: 0}; - - return function(el, local, offsets, proposedXY){ - el = Ext.get(el); - offsets = offsets ? Ext.applyIf(offsets, os) : os; - - var vw, vh, vx = 0, vy = 0; - if(el.dom == document.body || el.dom == document){ - vw =Ext.lib.Dom.getViewWidth(); - vh = Ext.lib.Dom.getViewHeight(); - }else{ - vw = el.dom.clientWidth; - vh = el.dom.clientHeight; - if(!local){ - var vxy = el.getXY(); - vx = vxy[0]; - vy = vxy[1]; - } - } - - var s = el.getScroll(); - - vx += offsets.left + s.left; - vy += offsets.top + s.top; - - vw -= offsets.right; - vh -= offsets.bottom; - - var vr = vx + vw, - vb = vy + vh, - xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]), - x = xy[0], y = xy[1], - offset = this.getConstrainOffset(), - w = this.dom.offsetWidth + offset, - h = this.dom.offsetHeight + offset; - - // only move it if it needs it - var moved = false; - - // first validate right/bottom - if((x + w) > vr){ - x = vr - w; - moved = true; - } - if((y + h) > vb){ - y = vb - h; - moved = true; - } - // then make sure top/left isn't negative - if(x < vx){ - x = vx; - moved = true; - } - if(y < vy){ - y = vy; - moved = true; - } - return moved ? [x, y] : false; - }; - }(), - - - -// el = Ext.get(el); -// offsets = Ext.applyIf(offsets || {}, {top : 0, left : 0, bottom : 0, right : 0}); - -// var me = this, -// doc = document, -// s = el.getScroll(), -// vxy = el.getXY(), -// vx = offsets.left + s.left, -// vy = offsets.top + s.top, -// vw = -offsets.right, -// vh = -offsets.bottom, -// vr, -// vb, -// xy = proposedXY || (!local ? me.getXY() : [me.getLeft(true), me.getTop(true)]), -// x = xy[0], -// y = xy[1], -// w = me.dom.offsetWidth, h = me.dom.offsetHeight, -// moved = false; // only move it if it needs it -// -// -// if(el.dom == doc.body || el.dom == doc){ -// vw += Ext.lib.Dom.getViewWidth(); -// vh += Ext.lib.Dom.getViewHeight(); -// }else{ -// vw += el.dom.clientWidth; -// vh += el.dom.clientHeight; -// if(!local){ -// vx += vxy[0]; -// vy += vxy[1]; -// } -// } - -// // first validate right/bottom -// if(x + w > vx + vw){ -// x = vx + vw - w; -// moved = true; -// } -// if(y + h > vy + vh){ -// y = vy + vh - h; -// moved = true; -// } -// // then make sure top/left isn't negative -// if(x < vx){ -// x = vx; -// moved = true; -// } -// if(y < vy){ -// y = vy; -// moved = true; -// } -// return moved ? [x, y] : false; -// }, - - // private, used internally - getConstrainOffset : function(){ - return 0; - }, - - /** - * Calculates the x, y to center this element on the screen - * @return {Array} The x, y values [x, y] - */ - getCenterXY : function(){ - return this.getAlignToXY(document, 'c-c'); - }, - - /** - * Centers the Element in either the viewport, or another Element. - * @param {Mixed} centerIn (optional) The element in which to center the element. - */ - center : function(centerIn){ - return this.alignTo(centerIn || document, 'c-c'); - } -}); -/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Creates a {@link Ext.CompositeElement} for child nodes based on the passed CSS selector (the selector should not contain an id). - * @param {String} selector The CSS selector - * @param {Boolean} unique (optional) True to create a unique Ext.Element for each child (defaults to false, which creates a single shared flyweight object) - * @return {CompositeElement/CompositeElementLite} The composite element - */ - select : function(selector, unique){ - return Ext.Element.select(selector, unique, this.dom); - } -});/** - * @class Ext.Element - */ -Ext.apply(Ext.Element.prototype, function() { - var GETDOM = Ext.getDom, - GET = Ext.get, - DH = Ext.DomHelper; - - return { - /** - * Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element - * @param {Mixed/Object/Array} el The id, element to insert or a DomHelper config to create and insert *or* an array of any of those. - * @param {String} where (optional) 'before' or 'after' defaults to before - * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element - * @return {Ext.Element} The inserted Element. If an array is passed, the last inserted element is returned. - */ - insertSibling: function(el, where, returnDom){ - var me = this, - rt, - isAfter = (where || 'before').toLowerCase() == 'after', - insertEl; - - if(Ext.isArray(el)){ - insertEl = me; - Ext.each(el, function(e) { - rt = Ext.fly(insertEl, '_internal').insertSibling(e, where, returnDom); - if(isAfter){ - insertEl = rt; - } - }); - return rt; - } - - el = el || {}; - - if(el.nodeType || el.dom){ - rt = me.dom.parentNode.insertBefore(GETDOM(el), isAfter ? me.dom.nextSibling : me.dom); - if (!returnDom) { - rt = GET(rt); - } - }else{ - if (isAfter && !me.dom.nextSibling) { - rt = DH.append(me.dom.parentNode, el, !returnDom); - } else { - rt = DH[isAfter ? 'insertAfter' : 'insertBefore'](me.dom, el, !returnDom); - } - } - return rt; - } - }; -}());/** - * @class Ext.Element - */ - -// special markup used throughout Ext when box wrapping elements -Ext.Element.boxMarkup = '
      '; - -Ext.Element.addMethods(function(){ - var INTERNAL = "_internal", - pxMatch = /(\d+\.?\d+)px/; - return { - /** - * More flexible version of {@link #setStyle} for setting style properties. - * @param {String/Object/Function} styles A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or - * a function which returns such a specification. - * @return {Ext.Element} this - */ - applyStyles : function(style){ - Ext.DomHelper.applyStyles(this.dom, style); - return this; - }, - - /** - * Returns an object with properties matching the styles requested. - * For example, el.getStyles('color', 'font-size', 'width') might return - * {'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}. - * @param {String} style1 A style name - * @param {String} style2 A style name - * @param {String} etc. - * @return {Object} The style object - */ - getStyles : function(){ - var ret = {}; - Ext.each(arguments, function(v) { - ret[v] = this.getStyle(v); - }, - this); - return ret; - }, - - // private ==> used by ext full - setOverflow : function(v){ - var dom = this.dom; - if(v=='auto' && Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug - dom.style.overflow = 'hidden'; - (function(){dom.style.overflow = 'auto';}).defer(1); - }else{ - dom.style.overflow = v; - } - }, - - /** - *

      Wraps the specified element with a special 9 element markup/CSS block that renders by default as - * a gray container with a gradient background, rounded corners and a 4-way shadow.

      - *

      This special markup is used throughout Ext when box wrapping elements ({@link Ext.Button}, - * {@link Ext.Panel} when {@link Ext.Panel#frame frame=true}, {@link Ext.Window}). The markup - * is of this form:

      - *
      
      -    Ext.Element.boxMarkup =
      -    '<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div>
      -     <div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div>
      -     <div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';
      -        * 
      - *

      Example usage:

      - *
      
      -    // Basic box wrap
      -    Ext.get("foo").boxWrap();
      -
      -    // You can also add a custom class and use CSS inheritance rules to customize the box look.
      -    // 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
      -    // for how to create a custom box wrap style.
      -    Ext.get("foo").boxWrap().addClass("x-box-blue");
      -        * 
      - * @param {String} class (optional) A base CSS class to apply to the containing wrapper element - * (defaults to 'x-box'). Note that there are a number of CSS rules that are dependent on - * this name to make the overall effect work, so if you supply an alternate base class, make sure you - * also supply all of the necessary rules. - * @return {Ext.Element} The outermost wrapping element of the created box structure. - */ - boxWrap : function(cls){ - cls = cls || 'x-box'; - var el = Ext.get(this.insertHtml("beforeBegin", "
      " + String.format(Ext.Element.boxMarkup, cls) + "
      ")); //String.format('
      '+Ext.Element.boxMarkup+'
      ', cls))); - Ext.DomQuery.selectNode('.' + cls + '-mc', el.dom).appendChild(this.dom); - return el; - }, - - /** - * Set the size of this Element. If animation is true, both width and height will be animated concurrently. - * @param {Mixed} width The new width. This may be one of:
        - *
      • A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS width style. Animation may not be used. - *
      • A size object in the format {width: widthValue, height: heightValue}.
      • - *
      - * @param {Mixed} height The new height. This may be one of:
        - *
      • A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS height style. Animation may not be used.
      • - *
      - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - setSize : function(width, height, animate){ - var me = this; - if(typeof width == 'object'){ // in case of object from getSize() - height = width.height; - width = width.width; - } - width = me.adjustWidth(width); - height = me.adjustHeight(height); - if(!animate || !me.anim){ - me.dom.style.width = me.addUnits(width); - me.dom.style.height = me.addUnits(height); - }else{ - me.anim({width: {to: width}, height: {to: height}}, me.preanim(arguments, 2)); - } - return me; - }, - - /** - * Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders - * when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements - * if a height has not been set using CSS. - * @return {Number} - */ - getComputedHeight : function(){ - var me = this, - h = Math.max(me.dom.offsetHeight, me.dom.clientHeight); - if(!h){ - h = parseFloat(me.getStyle('height')) || 0; - if(!me.isBorderBox()){ - h += me.getFrameWidth('tb'); - } - } - return h; - }, - - /** - * Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders - * when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements - * if a width has not been set using CSS. - * @return {Number} - */ - getComputedWidth : function(){ - var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth); - if(!w){ - w = parseFloat(this.getStyle('width')) || 0; - if(!this.isBorderBox()){ - w += this.getFrameWidth('lr'); - } - } - return w; - }, - - /** - * Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth() - for more information about the sides. - * @param {String} sides - * @return {Number} - */ - getFrameWidth : function(sides, onlyContentBox){ - return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); - }, - - /** - * Sets up event handlers to add and remove a css class when the mouse is over this element - * @param {String} className - * @return {Ext.Element} this - */ - addClassOnOver : function(className){ - this.hover( - function(){ - Ext.fly(this, INTERNAL).addClass(className); - }, - function(){ - Ext.fly(this, INTERNAL).removeClass(className); - } - ); - return this; - }, - - /** - * Sets up event handlers to add and remove a css class when this element has the focus - * @param {String} className - * @return {Ext.Element} this - */ - addClassOnFocus : function(className){ - this.on("focus", function(){ - Ext.fly(this, INTERNAL).addClass(className); - }, this.dom); - this.on("blur", function(){ - Ext.fly(this, INTERNAL).removeClass(className); - }, this.dom); - return this; - }, - - /** - * Sets up event handlers to add and remove a css class when the mouse is down and then up on this element (a click effect) - * @param {String} className - * @return {Ext.Element} this - */ - addClassOnClick : function(className){ - var dom = this.dom; - this.on("mousedown", function(){ - Ext.fly(dom, INTERNAL).addClass(className); - var d = Ext.getDoc(), - fn = function(){ - Ext.fly(dom, INTERNAL).removeClass(className); - d.removeListener("mouseup", fn); - }; - d.on("mouseup", fn); - }); - return this; - }, - - /** - *

      Returns the dimensions of the element available to lay content out in.

      - *

      If the element (or any ancestor element) has CSS style display : none, the dimensions will be zero.

      - * example:
      
      -        var vpSize = Ext.getBody().getViewSize();
      -
      -        // all Windows created afterwards will have a default value of 90% height and 95% width
      -        Ext.Window.override({
      -            width: vpSize.width * 0.9,
      -            height: vpSize.height * 0.95
      -        });
      -        // To handle window resizing you would have to hook onto onWindowResize.
      -        * 
      - * - * getViewSize utilizes clientHeight/clientWidth which excludes sizing of scrollbars. - * To obtain the size including scrollbars, use getStyleSize - * - * Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc. - */ - - getViewSize : function(){ - var doc = document, - d = this.dom, - isDoc = (d == doc || d == doc.body); - - // If the body, use Ext.lib.Dom - if (isDoc) { - var extdom = Ext.lib.Dom; - return { - width : extdom.getViewWidth(), - height : extdom.getViewHeight() - }; - - // Else use clientHeight/clientWidth - } else { - return { - width : d.clientWidth, - height : d.clientHeight - }; - } - }, - - /** - *

      Returns the dimensions of the element available to lay content out in.

      - * - * getStyleSize utilizes prefers style sizing if present, otherwise it chooses the larger of offsetHeight/clientHeight and offsetWidth/clientWidth. - * To obtain the size excluding scrollbars, use getViewSize - * - * Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc. - */ - - getStyleSize : function(){ - var me = this, - w, h, - doc = document, - d = this.dom, - isDoc = (d == doc || d == doc.body), - s = d.style; - - // If the body, use Ext.lib.Dom - if (isDoc) { - var extdom = Ext.lib.Dom; - return { - width : extdom.getViewWidth(), - height : extdom.getViewHeight() - }; - } - // Use Styles if they are set - if(s.width && s.width != 'auto'){ - w = parseFloat(s.width); - if(me.isBorderBox()){ - w -= me.getFrameWidth('lr'); - } - } - // Use Styles if they are set - if(s.height && s.height != 'auto'){ - h = parseFloat(s.height); - if(me.isBorderBox()){ - h -= me.getFrameWidth('tb'); - } - } - // Use getWidth/getHeight if style not set. - return {width: w || me.getWidth(true), height: h || me.getHeight(true)}; - }, - - /** - * Returns the size of the element. - * @param {Boolean} contentSize (optional) true to get the width/size minus borders and padding - * @return {Object} An object containing the element's size {width: (element width), height: (element height)} - */ - getSize : function(contentSize){ - return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)}; - }, - - /** - * Forces the browser to repaint this element - * @return {Ext.Element} this - */ - repaint : function(){ - var dom = this.dom; - this.addClass("x-repaint"); - setTimeout(function(){ - Ext.fly(dom).removeClass("x-repaint"); - }, 1); - return this; - }, - - /** - * Disables text selection for this element (normalized across browsers) - * @return {Ext.Element} this - */ - unselectable : function(){ - this.dom.unselectable = "on"; - return this.swallowEvent("selectstart", true). - applyStyles("-moz-user-select:none;-khtml-user-select:none;"). - addClass("x-unselectable"); - }, - - /** - * Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed, - * then it returns the calculated width of the sides (see getPadding) - * @param {String} sides (optional) Any combination of l, r, t, b to get the sum of those sides - * @return {Object/Number} - */ - getMargins : function(side){ - var me = this, - key, - hash = {t:"top", l:"left", r:"right", b: "bottom"}, - o = {}; - - if (!side) { - for (key in me.margins){ - o[hash[key]] = parseFloat(me.getStyle(me.margins[key])) || 0; - } - return o; - } else { - return me.addStyles.call(me, side, me.margins); - } - } - }; -}()); -/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently. - * @param {Object} box The box to fill {x, y, width, height} - * @param {Boolean} adjust (optional) Whether to adjust for box-model issues automatically - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - setBox : function(box, adjust, animate){ - var me = this, - w = box.width, - h = box.height; - if((adjust && !me.autoBoxAdjust) && !me.isBorderBox()){ - w -= (me.getBorderWidth("lr") + me.getPadding("lr")); - h -= (me.getBorderWidth("tb") + me.getPadding("tb")); - } - me.setBounds(box.x, box.y, w, h, me.animTest.call(me, arguments, animate, 2)); - return me; - }, - - /** - * Return an object defining the area of this Element which can be passed to {@link #setBox} to - * set another Element's size/location to match this element. - * @param {Boolean} contentBox (optional) If true a box for the content of the element is returned. - * @param {Boolean} local (optional) If true the element's left and top are returned instead of page x/y. - * @return {Object} box An object in the format

      
      -{
      -    x: <Element's X position>,
      -    y: <Element's Y position>,
      -    width: <Element's width>,
      -    height: <Element's height>,
      -    bottom: <Element's lower bound>,
      -    right: <Element's rightmost bound>
      -}
      -
      - * The returned object may also be addressed as an Array where index 0 contains the X position - * and index 1 contains the Y position. So the result may also be used for {@link #setXY} - */ - getBox : function(contentBox, local) { - var me = this, - xy, - left, - top, - getBorderWidth = me.getBorderWidth, - getPadding = me.getPadding, - l, - r, - t, - b; - if(!local){ - xy = me.getXY(); - }else{ - left = parseInt(me.getStyle("left"), 10) || 0; - top = parseInt(me.getStyle("top"), 10) || 0; - xy = [left, top]; - } - var el = me.dom, w = el.offsetWidth, h = el.offsetHeight, bx; - if(!contentBox){ - bx = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: w, height: h}; - }else{ - l = getBorderWidth.call(me, "l") + getPadding.call(me, "l"); - r = getBorderWidth.call(me, "r") + getPadding.call(me, "r"); - t = getBorderWidth.call(me, "t") + getPadding.call(me, "t"); - b = getBorderWidth.call(me, "b") + getPadding.call(me, "b"); - bx = {x: xy[0]+l, y: xy[1]+t, 0: xy[0]+l, 1: xy[1]+t, width: w-(l+r), height: h-(t+b)}; - } - bx.right = bx.x + bx.width; - bx.bottom = bx.y + bx.height; - return bx; - }, - - /** - * Move this element relative to its current position. - * @param {String} direction Possible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down"). - * @param {Number} distance How far to move the element in pixels - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - move : function(direction, distance, animate){ - var me = this, - xy = me.getXY(), - x = xy[0], - y = xy[1], - left = [x - distance, y], - right = [x + distance, y], - top = [x, y - distance], - bottom = [x, y + distance], - hash = { - l : left, - left : left, - r : right, - right : right, - t : top, - top : top, - up : top, - b : bottom, - bottom : bottom, - down : bottom - }; - - direction = direction.toLowerCase(); - me.moveTo(hash[direction][0], hash[direction][1], me.animTest.call(me, arguments, animate, 2)); - }, - - /** - * Quick set left and top adding default units - * @param {String} left The left CSS property value - * @param {String} top The top CSS property value - * @return {Ext.Element} this - */ - setLeftTop : function(left, top){ - var me = this, - style = me.dom.style; - style.left = me.addUnits(left); - style.top = me.addUnits(top); - return me; - }, - - /** - * Returns the region of the given element. - * The element must be part of the DOM tree to have a region (display:none or elements not appended return false). - * @return {Region} A Ext.lib.Region containing "top, left, bottom, right" member data. - */ - getRegion : function(){ - return Ext.lib.Dom.getRegion(this.dom); - }, - - /** - * Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently. - * @param {Number} x X value for new position (coordinates are page-based) - * @param {Number} y Y value for new position (coordinates are page-based) - * @param {Mixed} width The new width. This may be one of:
        - *
      • A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels)
      • - *
      • A String used to set the CSS width style. Animation may not be used. - *
      - * @param {Mixed} height The new height. This may be one of:
        - *
      • A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels)
      • - *
      • A String used to set the CSS height style. Animation may not be used.
      • - *
      - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - setBounds : function(x, y, width, height, animate){ - var me = this; - if (!animate || !me.anim) { - me.setSize(width, height); - me.setLocation(x, y); - } else { - me.anim({points: {to: [x, y]}, - width: {to: me.adjustWidth(width)}, - height: {to: me.adjustHeight(height)}}, - me.preanim(arguments, 4), - 'motion'); - } - return me; - }, - - /** - * Sets the element's position and size the specified region. If animation is true then width, height, x and y will be animated concurrently. - * @param {Ext.lib.Region} region The region to fill - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Ext.Element} this - */ - setRegion : function(region, animate) { - return this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.animTest.call(this, arguments, animate, 1)); - } -});/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll(). - * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values. - * @param {Number} value The new scroll value - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Element} this - */ - scrollTo : function(side, value, animate) { - //check if we're scrolling top or left - var top = /top/i.test(side), - me = this, - dom = me.dom, - prop; - if (!animate || !me.anim) { - // just setting the value, so grab the direction - prop = 'scroll' + (top ? 'Top' : 'Left'); - dom[prop] = value; - } - else { - // if scrolling top, we need to grab scrollLeft, if left, scrollTop - prop = 'scroll' + (top ? 'Left' : 'Top'); - me.anim({scroll: {to: top ? [dom[prop], value] : [value, dom[prop]]}}, me.preanim(arguments, 2), 'scroll'); - } - return me; - }, - - /** - * Scrolls this element into view within the passed container. - * @param {Mixed} container (optional) The container element to scroll (defaults to document.body). Should be a - * string (id), dom node, or Ext.Element. - * @param {Boolean} hscroll (optional) False to disable horizontal scroll (defaults to true) - * @return {Ext.Element} this - */ - scrollIntoView : function(container, hscroll) { - var c = Ext.getDom(container) || Ext.getBody().dom, - el = this.dom, - o = this.getOffsetsTo(c), - l = o[0] + c.scrollLeft, - t = o[1] + c.scrollTop, - b = t + el.offsetHeight, - r = l + el.offsetWidth, - ch = c.clientHeight, - ct = parseInt(c.scrollTop, 10), - cl = parseInt(c.scrollLeft, 10), - cb = ct + ch, - cr = cl + c.clientWidth; - - if (el.offsetHeight > ch || t < ct) { - c.scrollTop = t; - } - else if (b > cb) { - c.scrollTop = b-ch; - } - // corrects IE, other browsers will ignore - c.scrollTop = c.scrollTop; - - if (hscroll !== false) { - if (el.offsetWidth > c.clientWidth || l < cl) { - c.scrollLeft = l; - } - else if (r > cr) { - c.scrollLeft = r - c.clientWidth; - } - c.scrollLeft = c.scrollLeft; - } - return this; - }, - - // private - scrollChildIntoView : function(child, hscroll) { - Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); - }, - - /** - * Scrolls this element the specified direction. Does bounds checking to make sure the scroll is - * within this element's scrollable range. - * @param {String} direction Possible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down"). - * @param {Number} distance How far to scroll the element in pixels - * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object - * @return {Boolean} Returns true if a scroll was triggered or false if the element - * was scrolled as far as it could go. - */ - scroll : function(direction, distance, animate) { - if (!this.isScrollable()) { - return false; - } - var el = this.dom, - l = el.scrollLeft, t = el.scrollTop, - w = el.scrollWidth, h = el.scrollHeight, - cw = el.clientWidth, ch = el.clientHeight, - scrolled = false, v, - hash = { - l: Math.min(l + distance, w-cw), - r: v = Math.max(l - distance, 0), - t: Math.max(t - distance, 0), - b: Math.min(t + distance, h-ch) - }; - hash.d = hash.b; - hash.u = hash.t; - - direction = direction.substr(0, 1); - if ((v = hash[direction]) > -1) { - scrolled = true; - this.scrollTo(direction == 'l' || direction == 'r' ? 'left' : 'top', v, this.preanim(arguments, 2)); - } - return scrolled; - } -});/** - * @class Ext.Element - */ -Ext.Element.addMethods( - function() { - var VISIBILITY = "visibility", - DISPLAY = "display", - HIDDEN = "hidden", - NONE = "none", - XMASKED = "x-masked", - XMASKEDRELATIVE = "x-masked-relative", - data = Ext.Element.data; - - return { - /** - * Checks whether the element is currently visible using both visibility and display properties. - * @param {Boolean} deep (optional) True to walk the dom and see if parent elements are hidden (defaults to false) - * @return {Boolean} True if the element is currently visible, else false - */ - isVisible : function(deep) { - var vis = !this.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE), - p = this.dom.parentNode; - - if (deep !== true || !vis) { - return vis; - } - - while (p && !(/^body/i.test(p.tagName))) { - if (!Ext.fly(p, '_isVisible').isVisible()) { - return false; - } - p = p.parentNode; - } - return true; - }, - - /** - * Returns true if display is not "none" - * @return {Boolean} - */ - isDisplayed : function() { - return !this.isStyle(DISPLAY, NONE); - }, - - /** - * Convenience method for setVisibilityMode(Element.DISPLAY) - * @param {String} display (optional) What to set display to when visible - * @return {Ext.Element} this - */ - enableDisplayMode : function(display) { - this.setVisibilityMode(Ext.Element.DISPLAY); - - if (!Ext.isEmpty(display)) { - data(this.dom, 'originalDisplay', display); - } - - return this; - }, - - /** - * Puts a mask over this element to disable user interaction. Requires core.css. - * This method can only be applied to elements which accept child nodes. - * @param {String} msg (optional) A message to display in the mask - * @param {String} msgCls (optional) A css class to apply to the msg element - * @return {Element} The mask element - */ - mask : function(msg, msgCls) { - var me = this, - dom = me.dom, - dh = Ext.DomHelper, - EXTELMASKMSG = "ext-el-mask-msg", - el, - mask; - - if (!/^body/i.test(dom.tagName) && me.getStyle('position') == 'static') { - me.addClass(XMASKEDRELATIVE); - } - if (el = data(dom, 'maskMsg')) { - el.remove(); - } - if (el = data(dom, 'mask')) { - el.remove(); - } - - mask = dh.append(dom, {cls : "ext-el-mask"}, true); - data(dom, 'mask', mask); - - me.addClass(XMASKED); - mask.setDisplayed(true); - - if (typeof msg == 'string') { - var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true); - data(dom, 'maskMsg', mm); - mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG; - mm.dom.firstChild.innerHTML = msg; - mm.setDisplayed(true); - mm.center(me); - } - - // ie will not expand full height automatically - if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto') { - mask.setSize(undefined, me.getHeight()); - } - - return mask; - }, - - /** - * Removes a previously applied mask. - */ - unmask : function() { - var me = this, - dom = me.dom, - mask = data(dom, 'mask'), - maskMsg = data(dom, 'maskMsg'); - - if (mask) { - if (maskMsg) { - maskMsg.remove(); - data(dom, 'maskMsg', undefined); - } - - mask.remove(); - data(dom, 'mask', undefined); - me.removeClass([XMASKED, XMASKEDRELATIVE]); - } - }, - - /** - * Returns true if this element is masked - * @return {Boolean} - */ - isMasked : function() { - var m = data(this.dom, 'mask'); - return m && m.isVisible(); - }, - - /** - * Creates an iframe shim for this element to keep selects and other windowed objects from - * showing through. - * @return {Ext.Element} The new shim element - */ - createShim : function() { - var el = document.createElement('iframe'), - shim; - - el.frameBorder = '0'; - el.className = 'ext-shim'; - el.src = Ext.SSL_SECURE_URL; - shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); - shim.autoBoxAdjust = false; - return shim; - } - }; - }() -);/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Convenience method for constructing a KeyMap - * @param {Number/Array/Object/String} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options: - * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)} - * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope (this reference) in which the specified function is executed. Defaults to this Element. - * @return {Ext.KeyMap} The KeyMap created - */ - addKeyListener : function(key, fn, scope){ - var config; - if(typeof key != 'object' || Ext.isArray(key)){ - config = { - key: key, - fn: fn, - scope: scope - }; - }else{ - config = { - key : key.key, - shift : key.shift, - ctrl : key.ctrl, - alt : key.alt, - fn: fn, - scope: scope - }; - } - return new Ext.KeyMap(this, config); - }, - - /** - * Creates a KeyMap for this element - * @param {Object} config The KeyMap config. See {@link Ext.KeyMap} for more details - * @return {Ext.KeyMap} The KeyMap created - */ - addKeyMap : function(config){ - return new Ext.KeyMap(this, config); - } -}); - -//Import the newly-added Ext.Element functions into CompositeElementLite. We call this here because -//Element.keys.js is the last extra Ext.Element include in the ext-all.js build -Ext.CompositeElementLite.importElementMethods();/** - * @class Ext.CompositeElementLite - */ -Ext.apply(Ext.CompositeElementLite.prototype, { - addElements : function(els, root){ - if(!els){ - return this; - } - if(typeof els == "string"){ - els = Ext.Element.selectorFunction(els, root); - } - var yels = this.elements; - Ext.each(els, function(e) { - yels.push(Ext.get(e)); - }); - return this; - }, - - /** - * Returns the first Element - * @return {Ext.Element} - */ - first : function(){ - return this.item(0); - }, - - /** - * Returns the last Element - * @return {Ext.Element} - */ - last : function(){ - return this.item(this.getCount()-1); - }, - - /** - * Returns true if this composite contains the passed element - * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection. - * @return Boolean - */ - contains : function(el){ - return this.indexOf(el) != -1; - }, - - /** - * Removes the specified element(s). - * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite - * or an array of any of those. - * @param {Boolean} removeDom (optional) True to also remove the element from the document - * @return {CompositeElement} this - */ - removeElement : function(keys, removeDom){ - var me = this, - els = this.elements, - el; - Ext.each(keys, function(val){ - if ((el = (els[val] || els[val = me.indexOf(val)]))) { - if(removeDom){ - if(el.dom){ - el.remove(); - }else{ - Ext.removeNode(el); - } - } - els.splice(val, 1); - } - }); - return this; - } -}); -/** - * @class Ext.CompositeElement - * @extends Ext.CompositeElementLite - *

      This class encapsulates a collection of DOM elements, providing methods to filter - * members, or to perform collective actions upon the whole set.

      - *

      Although they are not listed, this class supports all of the methods of {@link Ext.Element} and - * {@link Ext.Fx}. The methods from these classes will be performed on all the elements in this collection.

      - *

      All methods return this and can be chained.

      - * Usage: -
      
      -var els = Ext.select("#some-el div.some-class", true);
      -// or select directly from an existing element
      -var el = Ext.get('some-el');
      -el.select('div.some-class', true);
      -
      -els.setWidth(100); // all elements become 100 width
      -els.hide(true); // all elements fade out and hide
      -// or
      -els.setWidth(100).hide(true);
      -
      - */ -Ext.CompositeElement = Ext.extend(Ext.CompositeElementLite, { - - constructor : function(els, root){ - this.elements = []; - this.add(els, root); - }, - - // private - getElement : function(el){ - // In this case just return it, since we already have a reference to it - return el; - }, - - // private - transformElement : function(el){ - return Ext.get(el); - } - - /** - * Adds elements to this composite. - * @param {String/Array} els A string CSS selector, an array of elements or an element - * @return {CompositeElement} this - */ - - /** - * Returns the Element object at the specified index - * @param {Number} index - * @return {Ext.Element} - */ - - /** - * Iterates each element in this composite - * calling the supplied function using {@link Ext#each}. - * @param {Function} fn The function to be called with each - * element. If the supplied function returns false, - * iteration stops. This function is called with the following arguments: - *
        - *
      • element : Ext.Element
        The element at the current index - * in the composite
      • - *
      • composite : Object
        This composite.
      • - *
      • index : Number
        The current index within the composite
      • - *
      - * @param {Object} scope (optional) The scope ( reference) in which the specified function is executed. - * Defaults to the element at the current index - * within the composite. - * @return {CompositeElement} this - */ -}); - -/** - * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods - * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or - * {@link Ext.CompositeElementLite CompositeElementLite} object. - * @param {String/Array} selector The CSS selector or an array of elements - * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object) - * @param {HTMLElement/String} root (optional) The root element of the query or id of the root - * @return {CompositeElementLite/CompositeElement} - * @member Ext.Element - * @method select - */ -Ext.Element.select = function(selector, unique, root){ - var els; - if(typeof selector == "string"){ - els = Ext.Element.selectorFunction(selector, root); - }else if(selector.length !== undefined){ - els = selector; - }else{ - throw "Invalid selector"; - } - - return (unique === true) ? new Ext.CompositeElement(els) : new Ext.CompositeElementLite(els); -}; - -/** - * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods - * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or - * {@link Ext.CompositeElementLite CompositeElementLite} object. - * @param {String/Array} selector The CSS selector or an array of elements - * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object) - * @param {HTMLElement/String} root (optional) The root element of the query or id of the root - * @return {CompositeElementLite/CompositeElement} - * @member Ext - * @method select - */ -Ext.select = Ext.Element.select;/** - * @class Ext.Updater - * @extends Ext.util.Observable - * Provides AJAX-style update capabilities for Element objects. Updater can be used to {@link #update} - * an {@link Ext.Element} once, or you can use {@link #startAutoRefresh} to set up an auto-updating - * {@link Ext.Element Element} on a specific interval.

      - * Usage:
      - *
      
      - * var el = Ext.get("foo"); // Get Ext.Element object
      - * var mgr = el.getUpdater();
      - * mgr.update({
      -        url: "http://myserver.com/index.php",
      -        params: {
      -            param1: "foo",
      -            param2: "bar"
      -        }
      - * });
      - * ...
      - * mgr.formUpdate("myFormId", "http://myserver.com/index.php");
      - * 
      - * // or directly (returns the same Updater instance) - * var mgr = new Ext.Updater("myElementId"); - * mgr.startAutoRefresh(60, "http://myserver.com/index.php"); - * mgr.on("update", myFcnNeedsToKnow); - *
      - * // short handed call directly from the element object - * Ext.get("foo").load({ - url: "bar.php", - scripts: true, - params: "param1=foo&param2=bar", - text: "Loading Foo..." - * }); - *
      - * @constructor - * Create new Updater directly. - * @param {Mixed} el The element to update - * @param {Boolean} forceNew (optional) By default the constructor checks to see if the passed element already - * has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class). - */ -Ext.UpdateManager = Ext.Updater = Ext.extend(Ext.util.Observable, -function() { - var BEFOREUPDATE = "beforeupdate", - UPDATE = "update", - FAILURE = "failure"; - - // private - function processSuccess(response){ - var me = this; - me.transaction = null; - if (response.argument.form && response.argument.reset) { - try { // put in try/catch since some older FF releases had problems with this - response.argument.form.reset(); - } catch(e){} - } - if (me.loadScripts) { - me.renderer.render(me.el, response, me, - updateComplete.createDelegate(me, [response])); - } else { - me.renderer.render(me.el, response, me); - updateComplete.call(me, response); - } - } - - // private - function updateComplete(response, type, success){ - this.fireEvent(type || UPDATE, this.el, response); - if(Ext.isFunction(response.argument.callback)){ - response.argument.callback.call(response.argument.scope, this.el, Ext.isEmpty(success) ? true : false, response, response.argument.options); - } - } - - // private - function processFailure(response){ - updateComplete.call(this, response, FAILURE, !!(this.transaction = null)); - } - - return { - constructor: function(el, forceNew){ - var me = this; - el = Ext.get(el); - if(!forceNew && el.updateManager){ - return el.updateManager; - } - /** - * The Element object - * @type Ext.Element - */ - me.el = el; - /** - * Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true. - * @type String - */ - me.defaultUrl = null; - - me.addEvents( - /** - * @event beforeupdate - * Fired before an update is made, return false from your handler and the update is cancelled. - * @param {Ext.Element} el - * @param {String/Object/Function} url - * @param {String/Object} params - */ - BEFOREUPDATE, - /** - * @event update - * Fired after successful update is made. - * @param {Ext.Element} el - * @param {Object} oResponseObject The response Object - */ - UPDATE, - /** - * @event failure - * Fired on update failure. - * @param {Ext.Element} el - * @param {Object} oResponseObject The response Object - */ - FAILURE - ); - - Ext.apply(me, Ext.Updater.defaults); - /** - * Blank page URL to use with SSL file uploads (defaults to {@link Ext.Updater.defaults#sslBlankUrl}). - * @property sslBlankUrl - * @type String - */ - /** - * Whether to append unique parameter on get request to disable caching (defaults to {@link Ext.Updater.defaults#disableCaching}). - * @property disableCaching - * @type Boolean - */ - /** - * Text for loading indicator (defaults to {@link Ext.Updater.defaults#indicatorText}). - * @property indicatorText - * @type String - */ - /** - * Whether to show indicatorText when loading (defaults to {@link Ext.Updater.defaults#showLoadIndicator}). - * @property showLoadIndicator - * @type String - */ - /** - * Timeout for requests or form posts in seconds (defaults to {@link Ext.Updater.defaults#timeout}). - * @property timeout - * @type Number - */ - /** - * True to process scripts in the output (defaults to {@link Ext.Updater.defaults#loadScripts}). - * @property loadScripts - * @type Boolean - */ - - /** - * Transaction object of the current executing transaction, or null if there is no active transaction. - */ - me.transaction = null; - /** - * Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments - * @type Function - */ - me.refreshDelegate = me.refresh.createDelegate(me); - /** - * Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments - * @type Function - */ - me.updateDelegate = me.update.createDelegate(me); - /** - * Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments - * @type Function - */ - me.formUpdateDelegate = (me.formUpdate || function(){}).createDelegate(me); - - /** - * The renderer for this Updater (defaults to {@link Ext.Updater.BasicRenderer}). - */ - me.renderer = me.renderer || me.getDefaultRenderer(); - - Ext.Updater.superclass.constructor.call(me); - }, - - /** - * Sets the content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details. - * @param {Object} renderer The object implementing the render() method - */ - setRenderer : function(renderer){ - this.renderer = renderer; - }, - - /** - * Returns the current content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details. - * @return {Object} - */ - getRenderer : function(){ - return this.renderer; - }, - - /** - * This is an overrideable method which returns a reference to a default - * renderer class if none is specified when creating the Ext.Updater. - * Defaults to {@link Ext.Updater.BasicRenderer} - */ - getDefaultRenderer: function() { - return new Ext.Updater.BasicRenderer(); - }, - - /** - * Sets the default URL used for updates. - * @param {String/Function} defaultUrl The url or a function to call to get the url - */ - setDefaultUrl : function(defaultUrl){ - this.defaultUrl = defaultUrl; - }, - - /** - * Get the Element this Updater is bound to - * @return {Ext.Element} The element - */ - getEl : function(){ - return this.el; - }, - - /** - * Performs an asynchronous request, updating this element with the response. - * If params are specified it uses POST, otherwise it uses GET.

      - * Note: Due to the asynchronous nature of remote server requests, the Element - * will not have been fully updated when the function returns. To post-process the returned - * data, use the callback option, or an update event handler. - * @param {Object} options A config object containing any of the following options:
        - *
      • url : String/Function

        The URL to request or a function which - * returns the URL (defaults to the value of {@link Ext.Ajax#url} if not specified).

      • - *
      • method : String

        The HTTP method to - * use. Defaults to POST if the params argument is present, otherwise GET.

      • - *
      • params : String/Object/Function

        The - * parameters to pass to the server (defaults to none). These may be specified as a url-encoded - * string, or as an object containing properties which represent parameters, - * or as a function, which returns such an object.

      • - *
      • scripts : Boolean

        If true - * any <script> tags embedded in the response text will be extracted - * and executed (defaults to {@link Ext.Updater.defaults#loadScripts}). If this option is specified, - * the callback will be called after the execution of the scripts.

      • - *
      • callback : Function

        A function to - * be called when the response from the server arrives. The following - * parameters are passed:

          - *
        • el : Ext.Element

          The Element being updated.

        • - *
        • success : Boolean

          True for success, false for failure.

        • - *
        • response : XMLHttpRequest

          The XMLHttpRequest which processed the update.

        • - *
        • options : Object

          The config object passed to the update call.

        - *

      • - *
      • scope : Object

        The scope in which - * to execute the callback (The callback's this reference.) If the - * params argument is a function, this scope is used for that function also.

      • - *
      • discardUrl : Boolean

        By default, the URL of this request becomes - * the default URL for this Updater object, and will be subsequently used in {@link #refresh} - * calls. To bypass this behavior, pass discardUrl:true (defaults to false).

      • - *
      • timeout : Number

        The number of seconds to wait for a response before - * timing out (defaults to {@link Ext.Updater.defaults#timeout}).

      • - *
      • text : String

        The text to use as the innerHTML of the - * {@link Ext.Updater.defaults#indicatorText} div (defaults to 'Loading...'). To replace the entire div, not - * just the text, override {@link Ext.Updater.defaults#indicatorText} directly.

      • - *
      • nocache : Boolean

        Only needed for GET - * requests, this option causes an extra, auto-generated parameter to be appended to the request - * to defeat caching (defaults to {@link Ext.Updater.defaults#disableCaching}).

      - *

      - * For example: -

      
      -    um.update({
      -        url: "your-url.php",
      -        params: {param1: "foo", param2: "bar"}, // or a URL encoded string
      -        callback: yourFunction,
      -        scope: yourObject, //(optional scope)
      -        discardUrl: true,
      -        nocache: true,
      -        text: "Loading...",
      -        timeout: 60,
      -        scripts: false // Save time by avoiding RegExp execution.
      -    });
      -    
      - */ - update : function(url, params, callback, discardUrl){ - var me = this, - cfg, - callerScope; - - if(me.fireEvent(BEFOREUPDATE, me.el, url, params) !== false){ - if(Ext.isObject(url)){ // must be config object - cfg = url; - url = cfg.url; - params = params || cfg.params; - callback = callback || cfg.callback; - discardUrl = discardUrl || cfg.discardUrl; - callerScope = cfg.scope; - if(!Ext.isEmpty(cfg.nocache)){me.disableCaching = cfg.nocache;}; - if(!Ext.isEmpty(cfg.text)){me.indicatorText = '
      '+cfg.text+"
      ";}; - if(!Ext.isEmpty(cfg.scripts)){me.loadScripts = cfg.scripts;}; - if(!Ext.isEmpty(cfg.timeout)){me.timeout = cfg.timeout;}; - } - me.showLoading(); - - if(!discardUrl){ - me.defaultUrl = url; - } - if(Ext.isFunction(url)){ - url = url.call(me); - } - - var o = Ext.apply({}, { - url : url, - params: (Ext.isFunction(params) && callerScope) ? params.createDelegate(callerScope) : params, - success: processSuccess, - failure: processFailure, - scope: me, - callback: undefined, - timeout: (me.timeout*1000), - disableCaching: me.disableCaching, - argument: { - "options": cfg, - "url": url, - "form": null, - "callback": callback, - "scope": callerScope || window, - "params": params - } - }, cfg); - - me.transaction = Ext.Ajax.request(o); - } - }, - - /** - *

      Performs an asynchronous form post, updating this element with the response. If the form has the attribute - * enctype="multipart/form-data", it assumes it's a file upload. - * Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.

      - *

      File uploads are not performed using normal "Ajax" techniques, that is they are not - * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the - * DOM <form> element temporarily modified to have its - * target set to refer - * to a dynamically generated, hidden <iframe> which is inserted into the document - * but removed after the return data has been gathered.

      - *

      Be aware that file upload packets, sent with the content type multipart/form-data - * and some server technologies (notably JEE) may require some custom processing in order to - * retrieve parameter names and parameter values from the packet content.

      - * @param {String/HTMLElement} form The form Id or form element - * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used. - * @param {Boolean} reset (optional) Whether to try to reset the form after the update - * @param {Function} callback (optional) Callback when transaction is complete. The following - * parameters are passed:
        - *
      • el : Ext.Element

        The Element being updated.

      • - *
      • success : Boolean

        True for success, false for failure.

      • - *
      • response : XMLHttpRequest

        The XMLHttpRequest which processed the update.

      - */ - formUpdate : function(form, url, reset, callback){ - var me = this; - if(me.fireEvent(BEFOREUPDATE, me.el, form, url) !== false){ - if(Ext.isFunction(url)){ - url = url.call(me); - } - form = Ext.getDom(form); - me.transaction = Ext.Ajax.request({ - form: form, - url:url, - success: processSuccess, - failure: processFailure, - scope: me, - timeout: (me.timeout*1000), - argument: { - "url": url, - "form": form, - "callback": callback, - "reset": reset - } - }); - me.showLoading.defer(1, me); - } - }, - - /** - * Set this element to auto refresh. Can be canceled by calling {@link #stopAutoRefresh}. - * @param {Number} interval How often to update (in seconds). - * @param {String/Object/Function} url (optional) The url for this request, a config object in the same format - * supported by {@link #load}, or a function to call to get the url (defaults to the last used url). Note that while - * the url used in a load call can be reused by this method, other load config options will not be reused and must be - * sepcified as part of a config object passed as this paramter if needed. - * @param {String/Object} params (optional) The parameters to pass as either a url encoded string - * "¶m1=1¶m2=2" or as an object {param1: 1, param2: 2} - * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) - * @param {Boolean} refreshNow (optional) Whether to execute the refresh now, or wait the interval - */ - startAutoRefresh : function(interval, url, params, callback, refreshNow){ - var me = this; - if(refreshNow){ - me.update(url || me.defaultUrl, params, callback, true); - } - if(me.autoRefreshProcId){ - clearInterval(me.autoRefreshProcId); - } - me.autoRefreshProcId = setInterval(me.update.createDelegate(me, [url || me.defaultUrl, params, callback, true]), interval * 1000); - }, - - /** - * Stop auto refresh on this element. - */ - stopAutoRefresh : function(){ - if(this.autoRefreshProcId){ - clearInterval(this.autoRefreshProcId); - delete this.autoRefreshProcId; - } - }, - - /** - * Returns true if the Updater is currently set to auto refresh its content (see {@link #startAutoRefresh}), otherwise false. - */ - isAutoRefreshing : function(){ - return !!this.autoRefreshProcId; - }, - - /** - * Display the element's "loading" state. By default, the element is updated with {@link #indicatorText}. This - * method may be overridden to perform a custom action while this Updater is actively updating its contents. - */ - showLoading : function(){ - if(this.showLoadIndicator){ - this.el.dom.innerHTML = this.indicatorText; - } - }, - - /** - * Aborts the currently executing transaction, if any. - */ - abort : function(){ - if(this.transaction){ - Ext.Ajax.abort(this.transaction); - } - }, - - /** - * Returns true if an update is in progress, otherwise false. - * @return {Boolean} - */ - isUpdating : function(){ - return this.transaction ? Ext.Ajax.isLoading(this.transaction) : false; - }, - - /** - * Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately - * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) - */ - refresh : function(callback){ - if(this.defaultUrl){ - this.update(this.defaultUrl, null, callback, true); - } - } - }; -}()); - -/** - * @class Ext.Updater.defaults - * The defaults collection enables customizing the default properties of Updater - */ -Ext.Updater.defaults = { - /** - * Timeout for requests or form posts in seconds (defaults to 30 seconds). - * @type Number - */ - timeout : 30, - /** - * True to append a unique parameter to GET requests to disable caching (defaults to false). - * @type Boolean - */ - disableCaching : false, - /** - * Whether or not to show {@link #indicatorText} during loading (defaults to true). - * @type Boolean - */ - showLoadIndicator : true, - /** - * Text for loading indicator (defaults to '<div class="loading-indicator">Loading...</div>'). - * @type String - */ - indicatorText : '
      Loading...
      ', - /** - * True to process scripts by default (defaults to false). - * @type Boolean - */ - loadScripts : false, - /** - * Blank page URL to use with SSL file uploads (defaults to {@link Ext#SSL_SECURE_URL} if set, or "javascript:false"). - * @type String - */ - sslBlankUrl : Ext.SSL_SECURE_URL -}; - - -/** - * Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}). - * Usage: - *
      Ext.Updater.updateElement("my-div", "stuff.php");
      - * @param {Mixed} el The element to update - * @param {String} url The url - * @param {String/Object} params (optional) Url encoded param string or an object of name/value pairs - * @param {Object} options (optional) A config object with any of the Updater properties you want to set - for - * example: {disableCaching:true, indicatorText: "Loading data..."} - * @static - * @deprecated - * @member Ext.Updater - */ -Ext.Updater.updateElement = function(el, url, params, options){ - var um = Ext.get(el).getUpdater(); - Ext.apply(um, options); - um.update(url, params, options ? options.callback : null); -}; - -/** - * @class Ext.Updater.BasicRenderer - *

      This class is a base class implementing a simple render method which updates an element using results from an Ajax request.

      - *

      The BasicRenderer updates the element's innerHTML with the responseText. To perform a custom render (i.e. XML or JSON processing), - * create an object with a conforming {@link #render} method and pass it to setRenderer on the Updater.

      - */ -Ext.Updater.BasicRenderer = function(){}; - -Ext.Updater.BasicRenderer.prototype = { - /** - * This method is called when an Ajax response is received, and an Element needs updating. - * @param {Ext.Element} el The element being rendered - * @param {Object} xhr The XMLHttpRequest object - * @param {Updater} updateManager The calling update manager - * @param {Function} callback A callback that will need to be called if loadScripts is true on the Updater - */ - render : function(el, response, updateManager, callback){ - el.update(response.responseText, updateManager.loadScripts, callback); - } -};/** - * @class Date - * - * The date parsing and formatting syntax contains a subset of - * PHP's date() function, and the formats that are - * supported will provide results equivalent to their PHP versions. - * - * The following is a list of all currently supported formats: - *
      -Format  Description                                                               Example returned values
      -------  -----------------------------------------------------------------------   -----------------------
      -  d     Day of the month, 2 digits with leading zeros                             01 to 31
      -  D     A short textual representation of the day of the week                     Mon to Sun
      -  j     Day of the month without leading zeros                                    1 to 31
      -  l     A full textual representation of the day of the week                      Sunday to Saturday
      -  N     ISO-8601 numeric representation of the day of the week                    1 (for Monday) through 7 (for Sunday)
      -  S     English ordinal suffix for the day of the month, 2 characters             st, nd, rd or th. Works well with j
      -  w     Numeric representation of the day of the week                             0 (for Sunday) to 6 (for Saturday)
      -  z     The day of the year (starting from 0)                                     0 to 364 (365 in leap years)
      -  W     ISO-8601 week number of year, weeks starting on Monday                    01 to 53
      -  F     A full textual representation of a month, such as January or March        January to December
      -  m     Numeric representation of a month, with leading zeros                     01 to 12
      -  M     A short textual representation of a month                                 Jan to Dec
      -  n     Numeric representation of a month, without leading zeros                  1 to 12
      -  t     Number of days in the given month                                         28 to 31
      -  L     Whether it's a leap year                                                  1 if it is a leap year, 0 otherwise.
      -  o     ISO-8601 year number (identical to (Y), but if the ISO week number (W)    Examples: 1998 or 2004
      -        belongs to the previous or next year, that year is used instead)
      -  Y     A full numeric representation of a year, 4 digits                         Examples: 1999 or 2003
      -  y     A two digit representation of a year                                      Examples: 99 or 03
      -  a     Lowercase Ante meridiem and Post meridiem                                 am or pm
      -  A     Uppercase Ante meridiem and Post meridiem                                 AM or PM
      -  g     12-hour format of an hour without leading zeros                           1 to 12
      -  G     24-hour format of an hour without leading zeros                           0 to 23
      -  h     12-hour format of an hour with leading zeros                              01 to 12
      -  H     24-hour format of an hour with leading zeros                              00 to 23
      -  i     Minutes, with leading zeros                                               00 to 59
      -  s     Seconds, with leading zeros                                               00 to 59
      -  u     Decimal fraction of a second                                              Examples:
      -        (minimum 1 digit, arbitrary number of digits allowed)                     001 (i.e. 0.001s) or
      -                                                                                  100 (i.e. 0.100s) or
      -                                                                                  999 (i.e. 0.999s) or
      -                                                                                  999876543210 (i.e. 0.999876543210s)
      -  O     Difference to Greenwich time (GMT) in hours and minutes                   Example: +1030
      -  P     Difference to Greenwich time (GMT) with colon between hours and minutes   Example: -08:00
      -  T     Timezone abbreviation of the machine running the code                     Examples: EST, MDT, PDT ...
      -  Z     Timezone offset in seconds (negative if west of UTC, positive if east)    -43200 to 50400
      -  c     ISO 8601 date
      -        Notes:                                                                    Examples:
      -        1) If unspecified, the month / day defaults to the current month / day,   1991 or
      -           the time defaults to midnight, while the timezone defaults to the      1992-10 or
      -           browser's timezone. If a time is specified, it must include both hours 1993-09-20 or
      -           and minutes. The "T" delimiter, seconds, milliseconds and timezone     1994-08-19T16:20+01:00 or
      -           are optional.                                                          1995-07-18T17:21:28-02:00 or
      -        2) The decimal fraction of a second, if specified, must contain at        1996-06-17T18:22:29.98765+03:00 or
      -           least 1 digit (there is no limit to the maximum number                 1997-05-16T19:23:30,12345-0400 or
      -           of digits allowed), and may be delimited by either a '.' or a ','      1998-04-15T20:24:31.2468Z or
      -        Refer to the examples on the right for the various levels of              1999-03-14T20:24:32Z or
      -        date-time granularity which are supported, or see                         2000-02-13T21:25:33
      -        http://www.w3.org/TR/NOTE-datetime for more info.                         2001-01-12 22:26:34
      -  U     Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)                1193432466 or -2138434463
      -  M$    Microsoft AJAX serialized dates                                           \/Date(1238606590509)\/ (i.e. UTC milliseconds since epoch) or
      -                                                                                  \/Date(1238606590509+0800)\/
      -
      - * - * Example usage (note that you must escape format specifiers with '\\' to render them as character literals): - *
      
      -// Sample date:
      -// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
      -
      -var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
      -document.write(dt.format('Y-m-d'));                           // 2007-01-10
      -document.write(dt.format('F j, Y, g:i a'));                   // January 10, 2007, 3:05 pm
      -document.write(dt.format('l, \\t\\he jS \\of F Y h:i:s A'));  // Wednesday, the 10th of January 2007 03:05:01 PM
      -
      - * - * Here are some standard date/time patterns that you might find helpful. They - * are not part of the source of Date.js, but to use them you can simply copy this - * block of code into any script that is included after Date.js and they will also become - * globally available on the Date object. Feel free to add or remove patterns as needed in your code. - *
      
      -Date.patterns = {
      -    ISO8601Long:"Y-m-d H:i:s",
      -    ISO8601Short:"Y-m-d",
      -    ShortDate: "n/j/Y",
      -    LongDate: "l, F d, Y",
      -    FullDateTime: "l, F d, Y g:i:s A",
      -    MonthDay: "F d",
      -    ShortTime: "g:i A",
      -    LongTime: "g:i:s A",
      -    SortableDateTime: "Y-m-d\\TH:i:s",
      -    UniversalSortableDateTime: "Y-m-d H:i:sO",
      -    YearMonth: "F, Y"
      -};
      -
      - * - * Example usage: - *
      
      -var dt = new Date();
      -document.write(dt.format(Date.patterns.ShortDate));
      -
      - *

      Developer-written, custom formats may be used by supplying both a formatting and a parsing function - * which perform to specialized requirements. The functions are stored in {@link #parseFunctions} and {@link #formatFunctions}.

      - */ - -/* - * Most of the date-formatting functions below are the excellent work of Baron Schwartz. - * (see http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/) - * They generate precompiled functions from format patterns instead of parsing and - * processing each pattern every time a date is formatted. These functions are available - * on every Date object. - */ - -(function() { - -/** - * Global flag which determines if strict date parsing should be used. - * Strict date parsing will not roll-over invalid dates, which is the - * default behaviour of javascript Date objects. - * (see {@link #parseDate} for more information) - * Defaults to false. - * @static - * @type Boolean -*/ -Date.useStrict = false; - - -// create private copy of Ext's String.format() method -// - to remove unnecessary dependency -// - to resolve namespace conflict with M$-Ajax's implementation -function xf(format) { - var args = Array.prototype.slice.call(arguments, 1); - return format.replace(/\{(\d+)\}/g, function(m, i) { - return args[i]; - }); -} - - -// private -Date.formatCodeToRegex = function(character, currentGroup) { - // Note: currentGroup - position in regex result array (see notes for Date.parseCodes below) - var p = Date.parseCodes[character]; - - if (p) { - p = typeof p == 'function'? p() : p; - Date.parseCodes[character] = p; // reassign function result to prevent repeated execution - } - - return p ? Ext.applyIf({ - c: p.c ? xf(p.c, currentGroup || "{0}") : p.c - }, p) : { - g:0, - c:null, - s:Ext.escapeRe(character) // treat unrecognised characters as literals - }; -}; - -// private shorthand for Date.formatCodeToRegex since we'll be using it fairly often -var $f = Date.formatCodeToRegex; - -Ext.apply(Date, { - /** - *

      An object hash in which each property is a date parsing function. The property name is the - * format string which that function parses.

      - *

      This object is automatically populated with date parsing functions as - * date formats are requested for Ext standard formatting strings.

      - *

      Custom parsing functions may be inserted into this object, keyed by a name which from then on - * may be used as a format string to {@link #parseDate}.

      - *

      Example:

      
      -Date.parseFunctions['x-date-format'] = myDateParser;
      -
      - *

      A parsing function should return a Date object, and is passed the following parameters:

        - *
      • date : String
        The date string to parse.
      • - *
      • strict : Boolean
        True to validate date strings while parsing - * (i.e. prevent javascript Date "rollover") (The default must be false). - * Invalid date strings should return null when parsed.
      • - *

      - *

      To enable Dates to also be formatted according to that format, a corresponding - * formatting function must be placed into the {@link #formatFunctions} property. - * @property parseFunctions - * @static - * @type Object - */ - parseFunctions: { - "M$": function(input, strict) { - // note: the timezone offset is ignored since the M$ Ajax server sends - // a UTC milliseconds-since-Unix-epoch value (negative values are allowed) - var re = new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/'); - var r = (input || '').match(re); - return r? new Date(((r[1] || '') + r[2]) * 1) : null; - } - }, - parseRegexes: [], - - /** - *

      An object hash in which each property is a date formatting function. The property name is the - * format string which corresponds to the produced formatted date string.

      - *

      This object is automatically populated with date formatting functions as - * date formats are requested for Ext standard formatting strings.

      - *

      Custom formatting functions may be inserted into this object, keyed by a name which from then on - * may be used as a format string to {@link #format}. Example:

      
      -Date.formatFunctions['x-date-format'] = myDateFormatter;
      -
      - *

      A formatting function should return a string representation of the passed Date object, and is passed the following parameters:

        - *
      • date : Date
        The Date to format.
      • - *

      - *

      To enable date strings to also be parsed according to that format, a corresponding - * parsing function must be placed into the {@link #parseFunctions} property. - * @property formatFunctions - * @static - * @type Object - */ - formatFunctions: { - "M$": function() { - // UTC milliseconds since Unix epoch (M$-AJAX serialized date format (MRSF)) - return '\\/Date(' + this.getTime() + ')\\/'; - } - }, - - y2kYear : 50, - - /** - * Date interval constant - * @static - * @type String - */ - MILLI : "ms", - - /** - * Date interval constant - * @static - * @type String - */ - SECOND : "s", - - /** - * Date interval constant - * @static - * @type String - */ - MINUTE : "mi", - - /** Date interval constant - * @static - * @type String - */ - HOUR : "h", - - /** - * Date interval constant - * @static - * @type String - */ - DAY : "d", - - /** - * Date interval constant - * @static - * @type String - */ - MONTH : "mo", - - /** - * Date interval constant - * @static - * @type String - */ - YEAR : "y", - - /** - *

      An object hash containing default date values used during date parsing.

      - *

      The following properties are available:

        - *
      • y : Number
        The default year value. (defaults to undefined)
      • - *
      • m : Number
        The default 1-based month value. (defaults to undefined)
      • - *
      • d : Number
        The default day value. (defaults to undefined)
      • - *
      • h : Number
        The default hour value. (defaults to undefined)
      • - *
      • i : Number
        The default minute value. (defaults to undefined)
      • - *
      • s : Number
        The default second value. (defaults to undefined)
      • - *
      • ms : Number
        The default millisecond value. (defaults to undefined)
      • - *

      - *

      Override these properties to customize the default date values used by the {@link #parseDate} method.

      - *

      Note: In countries which experience Daylight Saving Time (i.e. DST), the h, i, s - * and ms properties may coincide with the exact time in which DST takes effect. - * It is the responsiblity of the developer to account for this.

      - * Example Usage: - *
      
      -// set default day value to the first day of the month
      -Date.defaults.d = 1;
      -
      -// parse a February date string containing only year and month values.
      -// setting the default day value to 1 prevents weird date rollover issues
      -// when attempting to parse the following date string on, for example, March 31st 2009.
      -Date.parseDate('2009-02', 'Y-m'); // returns a Date object representing February 1st 2009
      -
      - * @property defaults - * @static - * @type Object - */ - defaults: {}, - - /** - * An array of textual day names. - * Override these values for international dates. - * Example: - *
      
      -Date.dayNames = [
      -    'SundayInYourLang',
      -    'MondayInYourLang',
      -    ...
      -];
      -
      - * @type Array - * @static - */ - dayNames : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - /** - * An array of textual month names. - * Override these values for international dates. - * Example: - *
      
      -Date.monthNames = [
      -    'JanInYourLang',
      -    'FebInYourLang',
      -    ...
      -];
      -
      - * @type Array - * @static - */ - monthNames : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - /** - * An object hash of zero-based javascript month numbers (with short month names as keys. note: keys are case-sensitive). - * Override these values for international dates. - * Example: - *
      
      -Date.monthNumbers = {
      -    'ShortJanNameInYourLang':0,
      -    'ShortFebNameInYourLang':1,
      -    ...
      -};
      -
      - * @type Object - * @static - */ - monthNumbers : { - Jan:0, - Feb:1, - Mar:2, - Apr:3, - May:4, - Jun:5, - Jul:6, - Aug:7, - Sep:8, - Oct:9, - Nov:10, - Dec:11 - }, - - /** - * Get the short month name for the given month number. - * Override this function for international dates. - * @param {Number} month A zero-based javascript month number. - * @return {String} The short month name. - * @static - */ - getShortMonthName : function(month) { - return Date.monthNames[month].substring(0, 3); - }, - - /** - * Get the short day name for the given day number. - * Override this function for international dates. - * @param {Number} day A zero-based javascript day number. - * @return {String} The short day name. - * @static - */ - getShortDayName : function(day) { - return Date.dayNames[day].substring(0, 3); - }, - - /** - * Get the zero-based javascript month number for the given short/full month name. - * Override this function for international dates. - * @param {String} name The short/full month name. - * @return {Number} The zero-based javascript month number. - * @static - */ - getMonthNumber : function(name) { - // handle camel casing for english month names (since the keys for the Date.monthNumbers hash are case sensitive) - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; - }, - - /** - * Checks if the specified format contains hour information - * @param {Object} format The format to check - * @return {Boolean} True if the format contains hour information - * @static - */ - formatContainsHourInfo : (function(){ - var stripEscapeRe = /(\\.)/g, - hourInfoRe = /([gGhHisucUOPZ]|M\$)/; - return function(format){ - return hourInfoRe.test(format.replace(stripEscapeRe, '')); - }; - })(), - - /** - * The base format-code to formatting-function hashmap used by the {@link #format} method. - * Formatting functions are strings (or functions which return strings) which - * will return the appropriate value when evaluated in the context of the Date object - * from which the {@link #format} method is called. - * Add to / override these mappings for custom date formatting. - * Note: Date.format() treats characters as literals if an appropriate mapping cannot be found. - * Example: - *
      
      -Date.formatCodes.x = "String.leftPad(this.getDate(), 2, '0')";
      -(new Date()).format("X"); // returns the current day of the month
      -
      - * @type Object - * @static - */ - formatCodes : { - d: "String.leftPad(this.getDate(), 2, '0')", - D: "Date.getShortDayName(this.getDay())", // get localised short day name - j: "this.getDate()", - l: "Date.dayNames[this.getDay()]", - N: "(this.getDay() ? this.getDay() : 7)", - S: "this.getSuffix()", - w: "this.getDay()", - z: "this.getDayOfYear()", - W: "String.leftPad(this.getWeekOfYear(), 2, '0')", - F: "Date.monthNames[this.getMonth()]", - m: "String.leftPad(this.getMonth() + 1, 2, '0')", - M: "Date.getShortMonthName(this.getMonth())", // get localised short month name - n: "(this.getMonth() + 1)", - t: "this.getDaysInMonth()", - L: "(this.isLeapYear() ? 1 : 0)", - o: "(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))", - Y: "String.leftPad(this.getFullYear(), 4, '0')", - y: "('' + this.getFullYear()).substring(2, 4)", - a: "(this.getHours() < 12 ? 'am' : 'pm')", - A: "(this.getHours() < 12 ? 'AM' : 'PM')", - g: "((this.getHours() % 12) ? this.getHours() % 12 : 12)", - G: "this.getHours()", - h: "String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')", - H: "String.leftPad(this.getHours(), 2, '0')", - i: "String.leftPad(this.getMinutes(), 2, '0')", - s: "String.leftPad(this.getSeconds(), 2, '0')", - u: "String.leftPad(this.getMilliseconds(), 3, '0')", - O: "this.getGMTOffset()", - P: "this.getGMTOffset(true)", - T: "this.getTimezone()", - Z: "(this.getTimezoneOffset() * -60)", - - c: function() { // ISO-8601 -- GMT format - for (var c = "Y-m-dTH:i:sP", code = [], i = 0, l = c.length; i < l; ++i) { - var e = c.charAt(i); - code.push(e == "T" ? "'T'" : Date.getFormatCode(e)); // treat T as a character literal - } - return code.join(" + "); - }, - /* - c: function() { // ISO-8601 -- UTC format - return [ - "this.getUTCFullYear()", "'-'", - "String.leftPad(this.getUTCMonth() + 1, 2, '0')", "'-'", - "String.leftPad(this.getUTCDate(), 2, '0')", - "'T'", - "String.leftPad(this.getUTCHours(), 2, '0')", "':'", - "String.leftPad(this.getUTCMinutes(), 2, '0')", "':'", - "String.leftPad(this.getUTCSeconds(), 2, '0')", - "'Z'" - ].join(" + "); - }, - */ - - U: "Math.round(this.getTime() / 1000)" - }, - - /** - * Checks if the passed Date parameters will cause a javascript Date "rollover". - * @param {Number} year 4-digit year - * @param {Number} month 1-based month-of-year - * @param {Number} day Day of month - * @param {Number} hour (optional) Hour - * @param {Number} minute (optional) Minute - * @param {Number} second (optional) Second - * @param {Number} millisecond (optional) Millisecond - * @return {Boolean} true if the passed parameters do not cause a Date "rollover", false otherwise. - * @static - */ - isValid : function(y, m, d, h, i, s, ms) { - // setup defaults - h = h || 0; - i = i || 0; - s = s || 0; - ms = ms || 0; - - // Special handling for year < 100 - var dt = new Date(y < 100 ? 100 : y, m - 1, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0); - - return y == dt.getFullYear() && - m == dt.getMonth() + 1 && - d == dt.getDate() && - h == dt.getHours() && - i == dt.getMinutes() && - s == dt.getSeconds() && - ms == dt.getMilliseconds(); - }, - - /** - * Parses the passed string using the specified date format. - * Note that this function expects normal calendar dates, meaning that months are 1-based (i.e. 1 = January). - * The {@link #defaults} hash will be used for any date value (i.e. year, month, day, hour, minute, second or millisecond) - * which cannot be found in the passed string. If a corresponding default date value has not been specified in the {@link #defaults} hash, - * the current date's year, month, day or DST-adjusted zero-hour time value will be used instead. - * Keep in mind that the input date string must precisely match the specified format string - * in order for the parse operation to be successful (failed parse operations return a null value). - *

      Example:

      
      -//dt = Fri May 25 2007 (current date)
      -var dt = new Date();
      -
      -//dt = Thu May 25 2006 (today's month/day in 2006)
      -dt = Date.parseDate("2006", "Y");
      -
      -//dt = Sun Jan 15 2006 (all date parts specified)
      -dt = Date.parseDate("2006-01-15", "Y-m-d");
      -
      -//dt = Sun Jan 15 2006 15:20:01
      -dt = Date.parseDate("2006-01-15 3:20:01 PM", "Y-m-d g:i:s A");
      -
      -// attempt to parse Sun Feb 29 2006 03:20:01 in strict mode
      -dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null
      -
      - * @param {String} input The raw date string. - * @param {String} format The expected date string format. - * @param {Boolean} strict (optional) True to validate date strings while parsing (i.e. prevents javascript Date "rollover") - (defaults to false). Invalid date strings will return null when parsed. - * @return {Date} The parsed Date. - * @static - */ - parseDate : function(input, format, strict) { - var p = Date.parseFunctions; - if (p[format] == null) { - Date.createParser(format); - } - return p[format](input, Ext.isDefined(strict) ? strict : Date.useStrict); - }, - - // private - getFormatCode : function(character) { - var f = Date.formatCodes[character]; - - if (f) { - f = typeof f == 'function'? f() : f; - Date.formatCodes[character] = f; // reassign function result to prevent repeated execution - } - - // note: unknown characters are treated as literals - return f || ("'" + String.escape(character) + "'"); - }, - - // private - createFormat : function(format) { - var code = [], - special = false, - ch = ''; - - for (var i = 0; i < format.length; ++i) { - ch = format.charAt(i); - if (!special && ch == "\\") { - special = true; - } else if (special) { - special = false; - code.push("'" + String.escape(ch) + "'"); - } else { - code.push(Date.getFormatCode(ch)); - } - } - Date.formatFunctions[format] = new Function("return " + code.join('+')); - }, - - // private - createParser : function() { - var code = [ - "var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,", - "def = Date.defaults,", - "results = String(input).match(Date.parseRegexes[{0}]);", // either null, or an array of matched strings - - "if(results){", - "{1}", - - "if(u != null){", // i.e. unix time is defined - "v = new Date(u * 1000);", // give top priority to UNIX time - "}else{", - // create Date object representing midnight of the current day; - // this will provide us with our date defaults - // (note: clearTime() handles Daylight Saving Time automatically) - "dt = (new Date()).clearTime();", - - // date calculations (note: these calculations create a dependency on Ext.num()) - "y = Ext.num(y, Ext.num(def.y, dt.getFullYear()));", - "m = Ext.num(m, Ext.num(def.m - 1, dt.getMonth()));", - "d = Ext.num(d, Ext.num(def.d, dt.getDate()));", - - // time calculations (note: these calculations create a dependency on Ext.num()) - "h = Ext.num(h, Ext.num(def.h, dt.getHours()));", - "i = Ext.num(i, Ext.num(def.i, dt.getMinutes()));", - "s = Ext.num(s, Ext.num(def.s, dt.getSeconds()));", - "ms = Ext.num(ms, Ext.num(def.ms, dt.getMilliseconds()));", - - "if(z >= 0 && y >= 0){", - // both the year and zero-based day of year are defined and >= 0. - // these 2 values alone provide sufficient info to create a full date object - - // create Date object representing January 1st for the given year - // handle years < 100 appropriately - "v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);", - - // then add day of year, checking for Date "rollover" if necessary - "v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);", - "}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){", // check for Date "rollover" - "v = null;", // invalid date, so return null - "}else{", - // plain old Date object - // handle years < 100 properly - "v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);", - "}", - "}", - "}", - - "if(v){", - // favour UTC offset over GMT offset - "if(zz != null){", - // reset to UTC, then add offset - "v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);", - "}else if(o){", - // reset to GMT, then add offset - "v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));", - "}", - "}", - - "return v;" - ].join('\n'); - - return function(format) { - var regexNum = Date.parseRegexes.length, - currentGroup = 1, - calc = [], - regex = [], - special = false, - ch = "", - i = 0, - obj, - last; - - for (; i < format.length; ++i) { - ch = format.charAt(i); - if (!special && ch == "\\") { - special = true; - } else if (special) { - special = false; - regex.push(String.escape(ch)); - } else { - obj = $f(ch, currentGroup); - currentGroup += obj.g; - regex.push(obj.s); - if (obj.g && obj.c) { - if (obj.calcLast) { - last = obj.c; - } else { - calc.push(obj.c); - } - } - } - } - - if (last) { - calc.push(last); - } - - Date.parseRegexes[regexNum] = new RegExp("^" + regex.join('') + "$", 'i'); - Date.parseFunctions[format] = new Function("input", "strict", xf(code, regexNum, calc.join(''))); - }; - }(), - - // private - parseCodes : { - /* - * Notes: - * g = {Number} calculation group (0 or 1. only group 1 contributes to date calculations.) - * c = {String} calculation method (required for group 1. null for group 0. {0} = currentGroup - position in regex result array) - * s = {String} regex pattern. all matches are stored in results[], and are accessible by the calculation mapped to 'c' - */ - d: { - g:1, - c:"d = parseInt(results[{0}], 10);\n", - s:"(\\d{2})" // day of month with leading zeroes (01 - 31) - }, - j: { - g:1, - c:"d = parseInt(results[{0}], 10);\n", - s:"(\\d{1,2})" // day of month without leading zeroes (1 - 31) - }, - D: function() { - for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); // get localised short day names - return { - g:0, - c:null, - s:"(?:" + a.join("|") +")" - }; - }, - l: function() { - return { - g:0, - c:null, - s:"(?:" + Date.dayNames.join("|") + ")" - }; - }, - N: { - g:0, - c:null, - s:"[1-7]" // ISO-8601 day number (1 (monday) - 7 (sunday)) - }, - S: { - g:0, - c:null, - s:"(?:st|nd|rd|th)" - }, - w: { - g:0, - c:null, - s:"[0-6]" // javascript day number (0 (sunday) - 6 (saturday)) - }, - z: { - g:1, - c:"z = parseInt(results[{0}], 10);\n", - s:"(\\d{1,3})" // day of the year (0 - 364 (365 in leap years)) - }, - W: { - g:0, - c:null, - s:"(?:\\d{2})" // ISO-8601 week number (with leading zero) - }, - F: function() { - return { - g:1, - c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n", // get localised month number - s:"(" + Date.monthNames.join("|") + ")" - }; - }, - M: function() { - for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); // get localised short month names - return Ext.applyIf({ - s:"(" + a.join("|") + ")" - }, $f("F")); - }, - m: { - g:1, - c:"m = parseInt(results[{0}], 10) - 1;\n", - s:"(\\d{2})" // month number with leading zeros (01 - 12) - }, - n: { - g:1, - c:"m = parseInt(results[{0}], 10) - 1;\n", - s:"(\\d{1,2})" // month number without leading zeros (1 - 12) - }, - t: { - g:0, - c:null, - s:"(?:\\d{2})" // no. of days in the month (28 - 31) - }, - L: { - g:0, - c:null, - s:"(?:1|0)" - }, - o: function() { - return $f("Y"); - }, - Y: { - g:1, - c:"y = parseInt(results[{0}], 10);\n", - s:"(\\d{4})" // 4-digit year - }, - y: { - g:1, - c:"var ty = parseInt(results[{0}], 10);\n" - + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", // 2-digit year - s:"(\\d{1,2})" - }, - /** - * In the am/pm parsing routines, we allow both upper and lower case - * even though it doesn't exactly match the spec. It gives much more flexibility - * in being able to specify case insensitive regexes. - */ - a: function(){ - return $f("A"); - }, - A: { - // We need to calculate the hour before we apply AM/PM when parsing - calcLast: true, - g:1, - c:"if (/(am)/i.test(results[{0}])) {\n" - + "if (!h || h == 12) { h = 0; }\n" - + "} else { if (!h || h < 12) { h = (h || 0) + 12; }}", - s:"(AM|PM|am|pm)" - }, - g: function() { - return $f("G"); - }, - G: { - g:1, - c:"h = parseInt(results[{0}], 10);\n", - s:"(\\d{1,2})" // 24-hr format of an hour without leading zeroes (0 - 23) - }, - h: function() { - return $f("H"); - }, - H: { - g:1, - c:"h = parseInt(results[{0}], 10);\n", - s:"(\\d{2})" // 24-hr format of an hour with leading zeroes (00 - 23) - }, - i: { - g:1, - c:"i = parseInt(results[{0}], 10);\n", - s:"(\\d{2})" // minutes with leading zeros (00 - 59) - }, - s: { - g:1, - c:"s = parseInt(results[{0}], 10);\n", - s:"(\\d{2})" // seconds with leading zeros (00 - 59) - }, - u: { - g:1, - c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n", - s:"(\\d+)" // decimal fraction of a second (minimum = 1 digit, maximum = unlimited) - }, - O: { - g:1, - c:[ - "o = results[{0}];", - "var sn = o.substring(0,1),", // get + / - sign - "hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),", // get hours (performs minutes-to-hour conversion also, just in case) - "mn = o.substring(3,5) % 60;", // get minutes - "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs - ].join("\n"), - s: "([+\-]\\d{4})" // GMT offset in hrs and mins - }, - P: { - g:1, - c:[ - "o = results[{0}];", - "var sn = o.substring(0,1),", // get + / - sign - "hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),", // get hours (performs minutes-to-hour conversion also, just in case) - "mn = o.substring(4,6) % 60;", // get minutes - "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs - ].join("\n"), - s: "([+\-]\\d{2}:\\d{2})" // GMT offset in hrs and mins (with colon separator) - }, - T: { - g:0, - c:null, - s:"[A-Z]{1,4}" // timezone abbrev. may be between 1 - 4 chars - }, - Z: { - g:1, - c:"zz = results[{0}] * 1;\n" // -43200 <= UTC offset <= 50400 - + "zz = (-43200 <= zz && zz <= 50400)? zz : null;\n", - s:"([+\-]?\\d{1,5})" // leading '+' sign is optional for UTC offset - }, - c: function() { - var calc = [], - arr = [ - $f("Y", 1), // year - $f("m", 2), // month - $f("d", 3), // day - $f("h", 4), // hour - $f("i", 5), // minute - $f("s", 6), // second - {c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // decimal fraction of a second (minimum = 1 digit, maximum = unlimited) - {c:[ // allow either "Z" (i.e. UTC) or "-0530" or "+08:00" (i.e. UTC offset) timezone delimiters. assumes local timezone if no timezone is specified - "if(results[8]) {", // timezone specified - "if(results[8] == 'Z'){", - "zz = 0;", // UTC - "}else if (results[8].indexOf(':') > -1){", - $f("P", 8).c, // timezone offset with colon separator - "}else{", - $f("O", 8).c, // timezone offset without colon separator - "}", - "}" - ].join('\n')} - ]; - - for (var i = 0, l = arr.length; i < l; ++i) { - calc.push(arr[i].c); - } - - return { - g:1, - c:calc.join(""), - s:[ - arr[0].s, // year (required) - "(?:", "-", arr[1].s, // month (optional) - "(?:", "-", arr[2].s, // day (optional) - "(?:", - "(?:T| )?", // time delimiter -- either a "T" or a single blank space - arr[3].s, ":", arr[4].s, // hour AND minute, delimited by a single colon (optional). MUST be preceded by either a "T" or a single blank space - "(?::", arr[5].s, ")?", // seconds (optional) - "(?:(?:\\.|,)(\\d+))?", // decimal fraction of a second (e.g. ",12345" or ".98765") (optional) - "(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?", // "Z" (UTC) or "-0530" (UTC offset without colon delimiter) or "+08:00" (UTC offset with colon delimiter) (optional) - ")?", - ")?", - ")?" - ].join("") - }; - }, - U: { - g:1, - c:"u = parseInt(results[{0}], 10);\n", - s:"(-?\\d+)" // leading minus sign indicates seconds before UNIX epoch - } - } -}); - -}()); - -Ext.apply(Date.prototype, { - // private - dateFormat : function(format) { - if (Date.formatFunctions[format] == null) { - Date.createFormat(format); - } - return Date.formatFunctions[format].call(this); - }, - - /** - * Get the timezone abbreviation of the current date (equivalent to the format specifier 'T'). - * - * Note: The date string returned by the javascript Date object's toString() method varies - * between browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America). - * For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)", - * getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses - * (which may or may not be present), failing which it proceeds to get the timezone abbreviation - * from the GMT offset portion of the date string. - * @return {String} The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...). - */ - getTimezone : function() { - // the following list shows the differences between date strings from different browsers on a WinXP SP2 machine from an Asian locale: - // - // Opera : "Thu, 25 Oct 2007 22:53:45 GMT+0800" -- shortest (weirdest) date string of the lot - // Safari : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone (same as FF) - // FF : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone - // IE : "Thu Oct 25 22:54:35 UTC+0800 2007" -- (Asian system setting) look for 3-4 letter timezone abbrev - // IE : "Thu Oct 25 17:06:37 PDT 2007" -- (American system setting) look for 3-4 letter timezone abbrev - // - // this crazy regex attempts to guess the correct timezone abbreviation despite these differences. - // step 1: (?:\((.*)\) -- find timezone in parentheses - // step 2: ([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?) -- if nothing was found in step 1, find timezone from timezone offset portion of date string - // step 3: remove all non uppercase characters found in step 1 and 2 - return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, ""); - }, - - /** - * Get the offset from GMT of the current date (equivalent to the format specifier 'O'). - * @param {Boolean} colon (optional) true to separate the hours and minutes with a colon (defaults to false). - * @return {String} The 4-character offset string prefixed with + or - (e.g. '-0600'). - */ - getGMTOffset : function(colon) { - return (this.getTimezoneOffset() > 0 ? "-" : "+") - + String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0") - + (colon ? ":" : "") - + String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0"); - }, - - /** - * Get the numeric day number of the year, adjusted for leap year. - * @return {Number} 0 to 364 (365 in leap years). - */ - getDayOfYear: function() { - var num = 0, - d = this.clone(), - m = this.getMonth(), - i; - - for (i = 0, d.setDate(1), d.setMonth(0); i < m; d.setMonth(++i)) { - num += d.getDaysInMonth(); - } - return num + this.getDate() - 1; - }, - - /** - * Get the numeric ISO-8601 week number of the year. - * (equivalent to the format specifier 'W', but without a leading zero). - * @return {Number} 1 to 53 - */ - getWeekOfYear : function() { - // adapted from http://www.merlyn.demon.co.uk/weekcalc.htm - var ms1d = 864e5, // milliseconds in a day - ms7d = 7 * ms1d; // milliseconds in a week - - return function() { // return a closure so constants get calculated only once - var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d, // an Absolute Day Number - AWN = Math.floor(DC3 / 7), // an Absolute Week Number - Wyr = new Date(AWN * ms7d).getUTCFullYear(); - - return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1; - }; - }(), - - /** - * Checks if the current date falls within a leap year. - * @return {Boolean} True if the current date falls within a leap year, false otherwise. - */ - isLeapYear : function() { - var year = this.getFullYear(); - return !!((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year))); - }, - - /** - * Get the first day of the current month, adjusted for leap year. The returned value - * is the numeric day index within the week (0-6) which can be used in conjunction with - * the {@link #monthNames} array to retrieve the textual day name. - * Example: - *
      
      -var dt = new Date('1/10/2007');
      -document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: 'Monday'
      -
      - * @return {Number} The day number (0-6). - */ - getFirstDayOfMonth : function() { - var day = (this.getDay() - (this.getDate() - 1)) % 7; - return (day < 0) ? (day + 7) : day; - }, - - /** - * Get the last day of the current month, adjusted for leap year. The returned value - * is the numeric day index within the week (0-6) which can be used in conjunction with - * the {@link #monthNames} array to retrieve the textual day name. - * Example: - *
      
      -var dt = new Date('1/10/2007');
      -document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday'
      -
      - * @return {Number} The day number (0-6). - */ - getLastDayOfMonth : function() { - return this.getLastDateOfMonth().getDay(); - }, - - - /** - * Get the date of the first day of the month in which this date resides. - * @return {Date} - */ - getFirstDateOfMonth : function() { - return new Date(this.getFullYear(), this.getMonth(), 1); - }, - - /** - * Get the date of the last day of the month in which this date resides. - * @return {Date} - */ - getLastDateOfMonth : function() { - return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth()); - }, - - /** - * Get the number of days in the current month, adjusted for leap year. - * @return {Number} The number of days in the month. - */ - getDaysInMonth: function() { - var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - return function() { // return a closure for efficiency - var m = this.getMonth(); - - return m == 1 && this.isLeapYear() ? 29 : daysInMonth[m]; - }; - }(), - - /** - * Get the English ordinal suffix of the current day (equivalent to the format specifier 'S'). - * @return {String} 'st, 'nd', 'rd' or 'th'. - */ - getSuffix : function() { - switch (this.getDate()) { - case 1: - case 21: - case 31: - return "st"; - case 2: - case 22: - return "nd"; - case 3: - case 23: - return "rd"; - default: - return "th"; - } - }, - - /** - * Creates and returns a new Date instance with the exact same date value as the called instance. - * Dates are copied and passed by reference, so if a copied date variable is modified later, the original - * variable will also be changed. When the intention is to create a new variable that will not - * modify the original instance, you should create a clone. - * - * Example of correctly cloning a date: - *
      
      -//wrong way:
      -var orig = new Date('10/1/2006');
      -var copy = orig;
      -copy.setDate(5);
      -document.write(orig);  //returns 'Thu Oct 05 2006'!
      -
      -//correct way:
      -var orig = new Date('10/1/2006');
      -var copy = orig.clone();
      -copy.setDate(5);
      -document.write(orig);  //returns 'Thu Oct 01 2006'
      -
      - * @return {Date} The new Date instance. - */ - clone : function() { - return new Date(this.getTime()); - }, - - /** - * Checks if the current date is affected by Daylight Saving Time (DST). - * @return {Boolean} True if the current date is affected by DST. - */ - isDST : function() { - // adapted from http://extjs.com/forum/showthread.php?p=247172#post247172 - // courtesy of @geoffrey.mcgill - return new Date(this.getFullYear(), 0, 1).getTimezoneOffset() != this.getTimezoneOffset(); - }, - - /** - * Attempts to clear all time information from this Date by setting the time to midnight of the same day, - * automatically adjusting for Daylight Saving Time (DST) where applicable. - * (note: DST timezone information for the browser's host operating system is assumed to be up-to-date) - * @param {Boolean} clone true to create a clone of this date, clear the time and return it (defaults to false). - * @return {Date} this or the clone. - */ - clearTime : function(clone) { - if (clone) { - return this.clone().clearTime(); - } - - // get current date before clearing time - var d = this.getDate(); - - // clear time - this.setHours(0); - this.setMinutes(0); - this.setSeconds(0); - this.setMilliseconds(0); - - if (this.getDate() != d) { // account for DST (i.e. day of month changed when setting hour = 0) - // note: DST adjustments are assumed to occur in multiples of 1 hour (this is almost always the case) - // refer to http://www.timeanddate.com/time/aboutdst.html for the (rare) exceptions to this rule - - // increment hour until cloned date == current date - for (var hr = 1, c = this.add(Date.HOUR, hr); c.getDate() != d; hr++, c = this.add(Date.HOUR, hr)); - - this.setDate(d); - this.setHours(c.getHours()); - } - - return this; - }, - - /** - * Provides a convenient method for performing basic date arithmetic. This method - * does not modify the Date instance being called - it creates and returns - * a new Date instance containing the resulting date value. - * - * Examples: - *
      
      -// Basic usage:
      -var dt = new Date('10/29/2006').add(Date.DAY, 5);
      -document.write(dt); //returns 'Fri Nov 03 2006 00:00:00'
      -
      -// Negative values will be subtracted:
      -var dt2 = new Date('10/1/2006').add(Date.DAY, -5);
      -document.write(dt2); //returns 'Tue Sep 26 2006 00:00:00'
      -
      -// You can even chain several calls together in one line:
      -var dt3 = new Date('10/1/2006').add(Date.DAY, 5).add(Date.HOUR, 8).add(Date.MINUTE, -30);
      -document.write(dt3); //returns 'Fri Oct 06 2006 07:30:00'
      -
      - * - * @param {String} interval A valid date interval enum value. - * @param {Number} value The amount to add to the current date. - * @return {Date} The new Date instance. - */ - add : function(interval, value) { - var d = this.clone(); - if (!interval || value === 0) return d; - - switch(interval.toLowerCase()) { - case Date.MILLI: - d.setMilliseconds(this.getMilliseconds() + value); - break; - case Date.SECOND: - d.setSeconds(this.getSeconds() + value); - break; - case Date.MINUTE: - d.setMinutes(this.getMinutes() + value); - break; - case Date.HOUR: - d.setHours(this.getHours() + value); - break; - case Date.DAY: - d.setDate(this.getDate() + value); - break; - case Date.MONTH: - var day = this.getDate(); - if (day > 28) { - day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate()); - } - d.setDate(day); - d.setMonth(this.getMonth() + value); - break; - case Date.YEAR: - d.setFullYear(this.getFullYear() + value); - break; - } - return d; - }, - - /** - * Checks if this date falls on or between the given start and end dates. - * @param {Date} start Start date - * @param {Date} end End date - * @return {Boolean} true if this date falls on or between the given start and end dates. - */ - between : function(start, end) { - var t = this.getTime(); - return start.getTime() <= t && t <= end.getTime(); - } -}); - - -/** - * Formats a date given the supplied format string. - * @param {String} format The format string. - * @return {String} The formatted date. - * @method format - */ -Date.prototype.format = Date.prototype.dateFormat; - - -// private -if (Ext.isSafari && (navigator.userAgent.match(/WebKit\/(\d+)/)[1] || NaN) < 420) { - Ext.apply(Date.prototype, { - _xMonth : Date.prototype.setMonth, - _xDate : Date.prototype.setDate, - - // Bug in Safari 1.3, 2.0 (WebKit build < 420) - // Date.setMonth does not work consistently if iMonth is not 0-11 - setMonth : function(num) { - if (num <= -1) { - var n = Math.ceil(-num), - back_year = Math.ceil(n / 12), - month = (n % 12) ? 12 - n % 12 : 0; - - this.setFullYear(this.getFullYear() - back_year); - - return this._xMonth(month); - } else { - return this._xMonth(num); - } - }, - - // Bug in setDate() method (resolved in WebKit build 419.3, so to be safe we target Webkit builds < 420) - // The parameter for Date.setDate() is converted to a signed byte integer in Safari - // http://brianary.blogspot.com/2006/03/safari-date-bug.html - setDate : function(d) { - // use setTime() to workaround setDate() bug - // subtract current day of month in milliseconds, then add desired day of month in milliseconds - return this.setTime(this.getTime() - (this.getDate() - d) * 864e5); - } - }); -} - - - -/* Some basic Date tests... (requires Firebug) - -Date.parseDate('', 'c'); // call Date.parseDate() once to force computation of regex string so we can console.log() it -console.log('Insane Regex for "c" format: %o', Date.parseCodes.c.s); // view the insane regex for the "c" format specifier - -// standard tests -console.group('Standard Date.parseDate() Tests'); - console.log('Date.parseDate("2009-01-05T11:38:56", "c") = %o', Date.parseDate("2009-01-05T11:38:56", "c")); // assumes browser's timezone setting - console.log('Date.parseDate("2009-02-04T12:37:55.001000", "c") = %o', Date.parseDate("2009-02-04T12:37:55.001000", "c")); // assumes browser's timezone setting - console.log('Date.parseDate("2009-03-03T13:36:54,101000Z", "c") = %o', Date.parseDate("2009-03-03T13:36:54,101000Z", "c")); // UTC - console.log('Date.parseDate("2009-04-02T14:35:53.901000-0530", "c") = %o', Date.parseDate("2009-04-02T14:35:53.901000-0530", "c")); // GMT-0530 - console.log('Date.parseDate("2009-05-01T15:34:52,9876000+08:00", "c") = %o', Date.parseDate("2009-05-01T15:34:52,987600+08:00", "c")); // GMT+08:00 -console.groupEnd(); - -// ISO-8601 format as specified in http://www.w3.org/TR/NOTE-datetime -// -- accepts ALL 6 levels of date-time granularity -console.group('ISO-8601 Granularity Test (see http://www.w3.org/TR/NOTE-datetime)'); - console.log('Date.parseDate("1997", "c") = %o', Date.parseDate("1997", "c")); // YYYY (e.g. 1997) - console.log('Date.parseDate("1997-07", "c") = %o', Date.parseDate("1997-07", "c")); // YYYY-MM (e.g. 1997-07) - console.log('Date.parseDate("1997-07-16", "c") = %o', Date.parseDate("1997-07-16", "c")); // YYYY-MM-DD (e.g. 1997-07-16) - console.log('Date.parseDate("1997-07-16T19:20+01:00", "c") = %o', Date.parseDate("1997-07-16T19:20+01:00", "c")); // YYYY-MM-DDThh:mmTZD (e.g. 1997-07-16T19:20+01:00) - console.log('Date.parseDate("1997-07-16T19:20:30+01:00", "c") = %o', Date.parseDate("1997-07-16T19:20:30+01:00", "c")); // YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:30+01:00) - console.log('Date.parseDate("1997-07-16T19:20:30.45+01:00", "c") = %o', Date.parseDate("1997-07-16T19:20:30.45+01:00", "c")); // YYYY-MM-DDThh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00) - console.log('Date.parseDate("1997-07-16 19:20:30.45+01:00", "c") = %o', Date.parseDate("1997-07-16 19:20:30.45+01:00", "c")); // YYYY-MM-DD hh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00) - console.log('Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)= %o', Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)); // strict date parsing with invalid month value -console.groupEnd(); - -*/ -/** - * @class Ext.util.MixedCollection - * @extends Ext.util.Observable - * A Collection class that maintains both numeric indexes and keys and exposes events. - * @constructor - * @param {Boolean} allowFunctions Specify true if the {@link #addAll} - * function should add function references to the collection. Defaults to - * false. - * @param {Function} keyFn A function that can accept an item of the type(s) stored in this MixedCollection - * and return the key value for that item. This is used when available to look up the key on items that - * were passed without an explicit key parameter to a MixedCollection method. Passing this parameter is - * equivalent to providing an implementation for the {@link #getKey} method. - */ -Ext.util.MixedCollection = function(allowFunctions, keyFn){ - this.items = []; - this.map = {}; - this.keys = []; - this.length = 0; - this.addEvents( - /** - * @event clear - * Fires when the collection is cleared. - */ - 'clear', - /** - * @event add - * Fires when an item is added to the collection. - * @param {Number} index The index at which the item was added. - * @param {Object} o The item added. - * @param {String} key The key associated with the added item. - */ - 'add', - /** - * @event replace - * Fires when an item is replaced in the collection. - * @param {String} key he key associated with the new added. - * @param {Object} old The item being replaced. - * @param {Object} new The new item. - */ - 'replace', - /** - * @event remove - * Fires when an item is removed from the collection. - * @param {Object} o The item being removed. - * @param {String} key (optional) The key associated with the removed item. - */ - 'remove', - 'sort' - ); - this.allowFunctions = allowFunctions === true; - if(keyFn){ - this.getKey = keyFn; - } - Ext.util.MixedCollection.superclass.constructor.call(this); -}; - -Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { - - /** - * @cfg {Boolean} allowFunctions Specify true if the {@link #addAll} - * function should add function references to the collection. Defaults to - * false. - */ - allowFunctions : false, - - /** - * Adds an item to the collection. Fires the {@link #add} event when complete. - * @param {String} key

      The key to associate with the item, or the new item.

      - *

      If a {@link #getKey} implementation was specified for this MixedCollection, - * or if the key of the stored items is in a property called id, - * the MixedCollection will be able to derive the key for the new item. - * In this case just pass the new item in this parameter.

      - * @param {Object} o The item to add. - * @return {Object} The item added. - */ - add : function(key, o){ - if(arguments.length == 1){ - o = arguments[0]; - key = this.getKey(o); - } - if(typeof key != 'undefined' && key !== null){ - var old = this.map[key]; - if(typeof old != 'undefined'){ - return this.replace(key, o); - } - this.map[key] = o; - } - this.length++; - this.items.push(o); - this.keys.push(key); - this.fireEvent('add', this.length-1, o, key); - return o; - }, - - /** - * MixedCollection has a generic way to fetch keys if you implement getKey. The default implementation - * simply returns item.id but you can provide your own implementation - * to return a different value as in the following examples:
      
      -// normal way
      -var mc = new Ext.util.MixedCollection();
      -mc.add(someEl.dom.id, someEl);
      -mc.add(otherEl.dom.id, otherEl);
      -//and so on
      -
      -// using getKey
      -var mc = new Ext.util.MixedCollection();
      -mc.getKey = function(el){
      -   return el.dom.id;
      -};
      -mc.add(someEl);
      -mc.add(otherEl);
      -
      -// or via the constructor
      -var mc = new Ext.util.MixedCollection(false, function(el){
      -   return el.dom.id;
      -});
      -mc.add(someEl);
      -mc.add(otherEl);
      -     * 
      - * @param {Object} item The item for which to find the key. - * @return {Object} The key for the passed item. - */ - getKey : function(o){ - return o.id; - }, - - /** - * Replaces an item in the collection. Fires the {@link #replace} event when complete. - * @param {String} key

      The key associated with the item to replace, or the replacement item.

      - *

      If you supplied a {@link #getKey} implementation for this MixedCollection, or if the key - * of your stored items is in a property called id, then the MixedCollection - * will be able to derive the key of the replacement item. If you want to replace an item - * with one having the same key value, then just pass the replacement item in this parameter.

      - * @param o {Object} o (optional) If the first parameter passed was a key, the item to associate - * with that key. - * @return {Object} The new item. - */ - replace : function(key, o){ - if(arguments.length == 1){ - o = arguments[0]; - key = this.getKey(o); - } - var old = this.map[key]; - if(typeof key == 'undefined' || key === null || typeof old == 'undefined'){ - return this.add(key, o); - } - var index = this.indexOfKey(key); - this.items[index] = o; - this.map[key] = o; - this.fireEvent('replace', key, old, o); - return o; - }, - - /** - * Adds all elements of an Array or an Object to the collection. - * @param {Object/Array} objs An Object containing properties which will be added - * to the collection, or an Array of values, each of which are added to the collection. - * Functions references will be added to the collection if {@link #allowFunctions} - * has been set to true. - */ - addAll : function(objs){ - if(arguments.length > 1 || Ext.isArray(objs)){ - var args = arguments.length > 1 ? arguments : objs; - for(var i = 0, len = args.length; i < len; i++){ - this.add(args[i]); - } - }else{ - for(var key in objs){ - if(this.allowFunctions || typeof objs[key] != 'function'){ - this.add(key, objs[key]); - } - } - } - }, - - /** - * Executes the specified function once for every item in the collection, passing the following arguments: - *
        - *
      • item : Mixed

        The collection item

      • - *
      • index : Number

        The item's index

      • - *
      • length : Number

        The total number of items in the collection

      • - *
      - * The function should return a boolean value. Returning false from the function will stop the iteration. - * @param {Function} fn The function to execute for each item. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the current item in the iteration. - */ - each : function(fn, scope){ - var items = [].concat(this.items); // each safe for removal - for(var i = 0, len = items.length; i < len; i++){ - if(fn.call(scope || items[i], items[i], i, len) === false){ - break; - } - } - }, - - /** - * Executes the specified function once for every key in the collection, passing each - * key, and its associated item as the first two parameters. - * @param {Function} fn The function to execute for each item. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the browser window. - */ - eachKey : function(fn, scope){ - for(var i = 0, len = this.keys.length; i < len; i++){ - fn.call(scope || window, this.keys[i], this.items[i], i, len); - } - }, - - /** - * Returns the first item in the collection which elicits a true return value from the - * passed selection function. - * @param {Function} fn The selection function to execute for each item. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the browser window. - * @return {Object} The first item in the collection which returned true from the selection function. - */ - find : function(fn, scope){ - for(var i = 0, len = this.items.length; i < len; i++){ - if(fn.call(scope || window, this.items[i], this.keys[i])){ - return this.items[i]; - } - } - return null; - }, - - /** - * Inserts an item at the specified index in the collection. Fires the {@link #add} event when complete. - * @param {Number} index The index to insert the item at. - * @param {String} key The key to associate with the new item, or the item itself. - * @param {Object} o (optional) If the second parameter was a key, the new item. - * @return {Object} The item inserted. - */ - insert : function(index, key, o){ - if(arguments.length == 2){ - o = arguments[1]; - key = this.getKey(o); - } - if(this.containsKey(key)){ - this.suspendEvents(); - this.removeKey(key); - this.resumeEvents(); - } - if(index >= this.length){ - return this.add(key, o); - } - this.length++; - this.items.splice(index, 0, o); - if(typeof key != 'undefined' && key !== null){ - this.map[key] = o; - } - this.keys.splice(index, 0, key); - this.fireEvent('add', index, o, key); - return o; - }, - - /** - * Remove an item from the collection. - * @param {Object} o The item to remove. - * @return {Object} The item removed or false if no item was removed. - */ - remove : function(o){ - return this.removeAt(this.indexOf(o)); - }, - - /** - * Remove an item from a specified index in the collection. Fires the {@link #remove} event when complete. - * @param {Number} index The index within the collection of the item to remove. - * @return {Object} The item removed or false if no item was removed. - */ - removeAt : function(index){ - if(index < this.length && index >= 0){ - this.length--; - var o = this.items[index]; - this.items.splice(index, 1); - var key = this.keys[index]; - if(typeof key != 'undefined'){ - delete this.map[key]; - } - this.keys.splice(index, 1); - this.fireEvent('remove', o, key); - return o; - } - return false; - }, - - /** - * Removed an item associated with the passed key fom the collection. - * @param {String} key The key of the item to remove. - * @return {Object} The item removed or false if no item was removed. - */ - removeKey : function(key){ - return this.removeAt(this.indexOfKey(key)); - }, - - /** - * Returns the number of items in the collection. - * @return {Number} the number of items in the collection. - */ - getCount : function(){ - return this.length; - }, - - /** - * Returns index within the collection of the passed Object. - * @param {Object} o The item to find the index of. - * @return {Number} index of the item. Returns -1 if not found. - */ - indexOf : function(o){ - return this.items.indexOf(o); - }, - - /** - * Returns index within the collection of the passed key. - * @param {String} key The key to find the index of. - * @return {Number} index of the key. - */ - indexOfKey : function(key){ - return this.keys.indexOf(key); - }, - - /** - * Returns the item associated with the passed key OR index. - * Key has priority over index. This is the equivalent - * of calling {@link #key} first, then if nothing matched calling {@link #itemAt}. - * @param {String/Number} key The key or index of the item. - * @return {Object} If the item is found, returns the item. If the item was not found, returns undefined. - * If an item was found, but is a Class, returns null. - */ - item : function(key){ - var mk = this.map[key], - item = mk !== undefined ? mk : (typeof key == 'number') ? this.items[key] : undefined; - return typeof item != 'function' || this.allowFunctions ? item : null; // for prototype! - }, - - /** - * Returns the item at the specified index. - * @param {Number} index The index of the item. - * @return {Object} The item at the specified index. - */ - itemAt : function(index){ - return this.items[index]; - }, - - /** - * Returns the item associated with the passed key. - * @param {String/Number} key The key of the item. - * @return {Object} The item associated with the passed key. - */ - key : function(key){ - return this.map[key]; - }, - - /** - * Returns true if the collection contains the passed Object as an item. - * @param {Object} o The Object to look for in the collection. - * @return {Boolean} True if the collection contains the Object as an item. - */ - contains : function(o){ - return this.indexOf(o) != -1; - }, - - /** - * Returns true if the collection contains the passed Object as a key. - * @param {String} key The key to look for in the collection. - * @return {Boolean} True if the collection contains the Object as a key. - */ - containsKey : function(key){ - return typeof this.map[key] != 'undefined'; - }, - - /** - * Removes all items from the collection. Fires the {@link #clear} event when complete. - */ - clear : function(){ - this.length = 0; - this.items = []; - this.keys = []; - this.map = {}; - this.fireEvent('clear'); - }, - - /** - * Returns the first item in the collection. - * @return {Object} the first item in the collection.. - */ - first : function(){ - return this.items[0]; - }, - - /** - * Returns the last item in the collection. - * @return {Object} the last item in the collection.. - */ - last : function(){ - return this.items[this.length-1]; - }, - - /** - * @private - * Performs the actual sorting based on a direction and a sorting function. Internally, - * this creates a temporary array of all items in the MixedCollection, sorts it and then writes - * the sorted array data back into this.items and this.keys - * @param {String} property Property to sort by ('key', 'value', or 'index') - * @param {String} dir (optional) Direction to sort 'ASC' or 'DESC'. Defaults to 'ASC'. - * @param {Function} fn (optional) Comparison function that defines the sort order. - * Defaults to sorting by numeric value. - */ - _sort : function(property, dir, fn){ - var i, len, - dsc = String(dir).toUpperCase() == 'DESC' ? -1 : 1, - - //this is a temporary array used to apply the sorting function - c = [], - keys = this.keys, - items = this.items; - - //default to a simple sorter function if one is not provided - fn = fn || function(a, b) { - return a - b; - }; - - //copy all the items into a temporary array, which we will sort - for(i = 0, len = items.length; i < len; i++){ - c[c.length] = { - key : keys[i], - value: items[i], - index: i - }; - } - - //sort the temporary array - c.sort(function(a, b){ - var v = fn(a[property], b[property]) * dsc; - if(v === 0){ - v = (a.index < b.index ? -1 : 1); - } - return v; - }); - - //copy the temporary array back into the main this.items and this.keys objects - for(i = 0, len = c.length; i < len; i++){ - items[i] = c[i].value; - keys[i] = c[i].key; - } - - this.fireEvent('sort', this); - }, - - /** - * Sorts this collection by item value with the passed comparison function. - * @param {String} direction (optional) 'ASC' or 'DESC'. Defaults to 'ASC'. - * @param {Function} fn (optional) Comparison function that defines the sort order. - * Defaults to sorting by numeric value. - */ - sort : function(dir, fn){ - this._sort('value', dir, fn); - }, - - /** - * Reorders each of the items based on a mapping from old index to new index. Internally this - * just translates into a sort. The 'sort' event is fired whenever reordering has occured. - * @param {Object} mapping Mapping from old item index to new item index - */ - reorder: function(mapping) { - this.suspendEvents(); - - var items = this.items, - index = 0, - length = items.length, - order = [], - remaining = [], - oldIndex; - - //object of {oldPosition: newPosition} reversed to {newPosition: oldPosition} - for (oldIndex in mapping) { - order[mapping[oldIndex]] = items[oldIndex]; - } - - for (index = 0; index < length; index++) { - if (mapping[index] == undefined) { - remaining.push(items[index]); - } - } - - for (index = 0; index < length; index++) { - if (order[index] == undefined) { - order[index] = remaining.shift(); - } - } - - this.clear(); - this.addAll(order); - - this.resumeEvents(); - this.fireEvent('sort', this); - }, - - /** - * Sorts this collection by keys. - * @param {String} direction (optional) 'ASC' or 'DESC'. Defaults to 'ASC'. - * @param {Function} fn (optional) Comparison function that defines the sort order. - * Defaults to sorting by case insensitive string. - */ - keySort : function(dir, fn){ - this._sort('key', dir, fn || function(a, b){ - var v1 = String(a).toUpperCase(), v2 = String(b).toUpperCase(); - return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0); - }); - }, - - /** - * Returns a range of items in this collection - * @param {Number} startIndex (optional) The starting index. Defaults to 0. - * @param {Number} endIndex (optional) The ending index. Defaults to the last item. - * @return {Array} An array of items - */ - getRange : function(start, end){ - var items = this.items; - if(items.length < 1){ - return []; - } - start = start || 0; - end = Math.min(typeof end == 'undefined' ? this.length-1 : end, this.length-1); - var i, r = []; - if(start <= end){ - for(i = start; i <= end; i++) { - r[r.length] = items[i]; - } - }else{ - for(i = start; i >= end; i--) { - r[r.length] = items[i]; - } - } - return r; - }, - - /** - * Filter the objects in this collection by a specific property. - * Returns a new collection that has been filtered. - * @param {String} property A property on your objects - * @param {String/RegExp} value Either string that the property values - * should start with or a RegExp to test against the property - * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning - * @param {Boolean} caseSensitive (optional) True for case sensitive comparison (defaults to False). - * @return {MixedCollection} The new filtered collection - */ - filter : function(property, value, anyMatch, caseSensitive){ - if(Ext.isEmpty(value, false)){ - return this.clone(); - } - value = this.createValueMatcher(value, anyMatch, caseSensitive); - return this.filterBy(function(o){ - return o && value.test(o[property]); - }); - }, - - /** - * Filter by a function. Returns a new collection that has been filtered. - * The passed function will be called with each object in the collection. - * If the function returns true, the value is included otherwise it is filtered. - * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key) - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to this MixedCollection. - * @return {MixedCollection} The new filtered collection - */ - filterBy : function(fn, scope){ - var r = new Ext.util.MixedCollection(); - r.getKey = this.getKey; - var k = this.keys, it = this.items; - for(var i = 0, len = it.length; i < len; i++){ - if(fn.call(scope||this, it[i], k[i])){ - r.add(k[i], it[i]); - } - } - return r; - }, - - /** - * Finds the index of the first matching object in this collection by a specific property/value. - * @param {String} property The name of a property on your objects. - * @param {String/RegExp} value A string that the property values - * should start with or a RegExp to test against the property. - * @param {Number} start (optional) The index to start searching at (defaults to 0). - * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning. - * @param {Boolean} caseSensitive (optional) True for case sensitive comparison. - * @return {Number} The matched index or -1 - */ - findIndex : function(property, value, start, anyMatch, caseSensitive){ - if(Ext.isEmpty(value, false)){ - return -1; - } - value = this.createValueMatcher(value, anyMatch, caseSensitive); - return this.findIndexBy(function(o){ - return o && value.test(o[property]); - }, null, start); - }, - - /** - * Find the index of the first matching object in this collection by a function. - * If the function returns true it is considered a match. - * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key). - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to this MixedCollection. - * @param {Number} start (optional) The index to start searching at (defaults to 0). - * @return {Number} The matched index or -1 - */ - findIndexBy : function(fn, scope, start){ - var k = this.keys, it = this.items; - for(var i = (start||0), len = it.length; i < len; i++){ - if(fn.call(scope||this, it[i], k[i])){ - return i; - } - } - return -1; - }, - - /** - * Returns a regular expression based on the given value and matching options. This is used internally for finding and filtering, - * and by Ext.data.Store#filter - * @private - * @param {String} value The value to create the regex for. This is escaped using Ext.escapeRe - * @param {Boolean} anyMatch True to allow any match - no regex start/end line anchors will be added. Defaults to false - * @param {Boolean} caseSensitive True to make the regex case sensitive (adds 'i' switch to regex). Defaults to false. - * @param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true. - */ - createValueMatcher : function(value, anyMatch, caseSensitive, exactMatch) { - if (!value.exec) { // not a regex - var er = Ext.escapeRe; - value = String(value); - - if (anyMatch === true) { - value = er(value); - } else { - value = '^' + er(value); - if (exactMatch === true) { - value += '$'; - } - } - value = new RegExp(value, caseSensitive ? '' : 'i'); - } - return value; - }, - - /** - * Creates a shallow copy of this collection - * @return {MixedCollection} - */ - clone : function(){ - var r = new Ext.util.MixedCollection(); - var k = this.keys, it = this.items; - for(var i = 0, len = it.length; i < len; i++){ - r.add(k[i], it[i]); - } - r.getKey = this.getKey; - return r; - } -}); -/** - * This method calls {@link #item item()}. - * Returns the item associated with the passed key OR index. Key has priority - * over index. This is the equivalent of calling {@link #key} first, then if - * nothing matched calling {@link #itemAt}. - * @param {String/Number} key The key or index of the item. - * @return {Object} If the item is found, returns the item. If the item was - * not found, returns undefined. If an item was found, but is a Class, - * returns null. - */ -Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item; -/** - * @class Ext.AbstractManager - * @extends Object - * Base Manager class - extended by ComponentMgr and PluginMgr - */ -Ext.AbstractManager = Ext.extend(Object, { - typeName: 'type', - - constructor: function(config) { - Ext.apply(this, config || {}); - - /** - * Contains all of the items currently managed - * @property all - * @type Ext.util.MixedCollection - */ - this.all = new Ext.util.MixedCollection(); - - this.types = {}; - }, - - /** - * Returns a component by {@link Ext.Component#id id}. - * For additional details see {@link Ext.util.MixedCollection#get}. - * @param {String} id The component {@link Ext.Component#id id} - * @return Ext.Component The Component, undefined if not found, or null if a - * Class was found. - */ - get : function(id){ - return this.all.get(id); - }, - - /** - * Registers an item to be managed - * @param {Mixed} item The item to register - */ - register: function(item) { - this.all.add(item); - }, - - /** - * Unregisters a component by removing it from this manager - * @param {Mixed} item The item to unregister - */ - unregister: function(item) { - this.all.remove(item); - }, - - /** - *

      Registers a new Component constructor, keyed by a new - * {@link Ext.Component#xtype}.

      - *

      Use this method (or its alias {@link Ext#reg Ext.reg}) to register new - * subclasses of {@link Ext.Component} so that lazy instantiation may be used when specifying - * child Components. - * see {@link Ext.Container#items}

      - * @param {String} xtype The mnemonic string by which the Component class may be looked up. - * @param {Constructor} cls The new Component class. - */ - registerType : function(type, cls){ - this.types[type] = cls; - cls[this.typeName] = type; - }, - - /** - * Checks if a Component type is registered. - * @param {Ext.Component} xtype The mnemonic string by which the Component class may be looked up - * @return {Boolean} Whether the type is registered. - */ - isRegistered : function(type){ - return this.types[type] !== undefined; - }, - - /** - * Creates and returns an instance of whatever this manager manages, based on the supplied type and config object - * @param {Object} config The config object - * @param {String} defaultType If no type is discovered in the config object, we fall back to this type - * @return {Mixed} The instance of whatever this manager is managing - */ - create: function(config, defaultType) { - var type = config[this.typeName] || config.type || defaultType, - Constructor = this.types[type]; - - if (Constructor == undefined) { - throw new Error(String.format("The '{0}' type has not been registered with this manager", type)); - } - - return new Constructor(config); - }, - - /** - * Registers a function that will be called when a Component with the specified id is added to the manager. This will happen on instantiation. - * @param {String} id The component {@link Ext.Component#id id} - * @param {Function} fn The callback function - * @param {Object} scope The scope (this reference) in which the callback is executed. Defaults to the Component. - */ - onAvailable : function(id, fn, scope){ - var all = this.all; - - all.on("add", function(index, o){ - if (o.id == id) { - fn.call(scope || o, o); - all.un("add", fn, scope); - } - }); - } -});/** - * @class Ext.util.Format - * Reusable data formatting functions - * @singleton - */ -Ext.util.Format = function() { - var trimRe = /^\s+|\s+$/g, - stripTagsRE = /<\/?[^>]+>/gi, - stripScriptsRe = /(?:)((\n|\r|.)*?)(?:<\/script>)/ig, - nl2brRe = /\r?\n/g; - - return { - /** - * Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length - * @param {String} value The string to truncate - * @param {Number} length The maximum length to allow before truncating - * @param {Boolean} word True to try to find a common work break - * @return {String} The converted text - */ - ellipsis : function(value, len, word) { - if (value && value.length > len) { - if (word) { - var vs = value.substr(0, len - 2), - index = Math.max(vs.lastIndexOf(' '), vs.lastIndexOf('.'), vs.lastIndexOf('!'), vs.lastIndexOf('?')); - if (index == -1 || index < (len - 15)) { - return value.substr(0, len - 3) + "..."; - } else { - return vs.substr(0, index) + "..."; - } - } else { - return value.substr(0, len - 3) + "..."; - } - } - return value; - }, - - /** - * Checks a reference and converts it to empty string if it is undefined - * @param {Mixed} value Reference to check - * @return {Mixed} Empty string if converted, otherwise the original value - */ - undef : function(value) { - return value !== undefined ? value : ""; - }, - - /** - * Checks a reference and converts it to the default value if it's empty - * @param {Mixed} value Reference to check - * @param {String} defaultValue The value to insert of it's undefined (defaults to "") - * @return {String} - */ - defaultValue : function(value, defaultValue) { - return value !== undefined && value !== '' ? value : defaultValue; - }, - - /** - * Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages. - * @param {String} value The string to encode - * @return {String} The encoded text - */ - htmlEncode : function(value) { - return !value ? value : String(value).replace(/&/g, "&").replace(/>/g, ">").replace(/, and ') from their HTML character equivalents. - * @param {String} value The string to decode - * @return {String} The decoded text - */ - htmlDecode : function(value) { - return !value ? value : String(value).replace(/>/g, ">").replace(/</g, "<").replace(/"/g, '"').replace(/&/g, "&"); - }, - - /** - * Trims any whitespace from either side of a string - * @param {String} value The text to trim - * @return {String} The trimmed text - */ - trim : function(value) { - return String(value).replace(trimRe, ""); - }, - - /** - * Returns a substring from within an original string - * @param {String} value The original text - * @param {Number} start The start index of the substring - * @param {Number} length The length of the substring - * @return {String} The substring - */ - substr : function(value, start, length) { - return String(value).substr(start, length); - }, - - /** - * Converts a string to all lower case letters - * @param {String} value The text to convert - * @return {String} The converted text - */ - lowercase : function(value) { - return String(value).toLowerCase(); - }, - - /** - * Converts a string to all upper case letters - * @param {String} value The text to convert - * @return {String} The converted text - */ - uppercase : function(value) { - return String(value).toUpperCase(); - }, - - /** - * Converts the first character only of a string to upper case - * @param {String} value The text to convert - * @return {String} The converted text - */ - capitalize : function(value) { - return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase(); - }, - - // private - call : function(value, fn) { - if (arguments.length > 2) { - var args = Array.prototype.slice.call(arguments, 2); - args.unshift(value); - return eval(fn).apply(window, args); - } else { - return eval(fn).call(window, value); - } - }, - - /** - * Format a number as US currency - * @param {Number/String} value The numeric value to format - * @return {String} The formatted currency string - */ - usMoney : function(v) { - v = (Math.round((v-0)*100))/100; - v = (v == Math.floor(v)) ? v + ".00" : ((v*10 == Math.floor(v*10)) ? v + "0" : v); - v = String(v); - var ps = v.split('.'), - whole = ps[0], - sub = ps[1] ? '.'+ ps[1] : '.00', - r = /(\d+)(\d{3})/; - while (r.test(whole)) { - whole = whole.replace(r, '$1' + ',' + '$2'); - } - v = whole + sub; - if (v.charAt(0) == '-') { - return '-$' + v.substr(1); - } - return "$" + v; - }, - - /** - * Parse a value into a formatted date using the specified format pattern. - * @param {String/Date} value The value to format (Strings must conform to the format expected by the javascript Date object's parse() method) - * @param {String} format (optional) Any valid date format string (defaults to 'm/d/Y') - * @return {String} The formatted date string - */ - date : function(v, format) { - if (!v) { - return ""; - } - if (!Ext.isDate(v)) { - v = new Date(Date.parse(v)); - } - return v.dateFormat(format || "m/d/Y"); - }, - - /** - * Returns a date rendering function that can be reused to apply a date format multiple times efficiently - * @param {String} format Any valid date format string - * @return {Function} The date formatting function - */ - dateRenderer : function(format) { - return function(v) { - return Ext.util.Format.date(v, format); - }; - }, - - /** - * Strips all HTML tags - * @param {Mixed} value The text from which to strip tags - * @return {String} The stripped text - */ - stripTags : function(v) { - return !v ? v : String(v).replace(stripTagsRE, ""); - }, - - /** - * Strips all script tags - * @param {Mixed} value The text from which to strip script tags - * @return {String} The stripped text - */ - stripScripts : function(v) { - return !v ? v : String(v).replace(stripScriptsRe, ""); - }, - - /** - * Simple format for a file size (xxx bytes, xxx KB, xxx MB) - * @param {Number/String} size The numeric value to format - * @return {String} The formatted file size - */ - fileSize : function(size) { - if (size < 1024) { - return size + " bytes"; - } else if (size < 1048576) { - return (Math.round(((size*10) / 1024))/10) + " KB"; - } else { - return (Math.round(((size*10) / 1048576))/10) + " MB"; - } - }, - - /** - * It does simple math for use in a template, for example:
      
      -         * var tpl = new Ext.Template('{value} * 10 = {value:math("* 10")}');
      -         * 
      - * @return {Function} A function that operates on the passed value. - */ - math : function(){ - var fns = {}; - - return function(v, a){ - if (!fns[a]) { - fns[a] = new Function('v', 'return v ' + a + ';'); - } - return fns[a](v); - }; - }(), - - /** - * Rounds the passed number to the required decimal precision. - * @param {Number/String} value The numeric value to round. - * @param {Number} precision The number of decimal places to which to round the first parameter's value. - * @return {Number} The rounded value. - */ - round : function(value, precision) { - var result = Number(value); - if (typeof precision == 'number') { - precision = Math.pow(10, precision); - result = Math.round(value * precision) / precision; - } - return result; - }, - - /** - * Formats the number according to the format string. - *
      examples (123456.789): - *
      - * 0 - (123456) show only digits, no precision
      - * 0.00 - (123456.78) show only digits, 2 precision
      - * 0.0000 - (123456.7890) show only digits, 4 precision
      - * 0,000 - (123,456) show comma and digits, no precision
      - * 0,000.00 - (123,456.78) show comma and digits, 2 precision
      - * 0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision
      - * To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end. - * For example: 0.000,00/i - *
      - * @param {Number} v The number to format. - * @param {String} format The way you would like to format this text. - * @return {String} The formatted number. - */ - number: function(v, format) { - if (!format) { - return v; - } - v = Ext.num(v, NaN); - if (isNaN(v)) { - return ''; - } - var comma = ',', - dec = '.', - i18n = false, - neg = v < 0; - - v = Math.abs(v); - if (format.substr(format.length - 2) == '/i') { - format = format.substr(0, format.length - 2); - i18n = true; - comma = '.'; - dec = ','; - } - - var hasComma = format.indexOf(comma) != -1, - psplit = (i18n ? format.replace(/[^\d\,]/g, '') : format.replace(/[^\d\.]/g, '')).split(dec); - - if (1 < psplit.length) { - v = v.toFixed(psplit[1].length); - } else if(2 < psplit.length) { - throw ('NumberFormatException: invalid format, formats should have no more than 1 period: ' + format); - } else { - v = v.toFixed(0); - } - - var fnum = v.toString(); - - psplit = fnum.split('.'); - - if (hasComma) { - var cnum = psplit[0], - parr = [], - j = cnum.length, - m = Math.floor(j / 3), - n = cnum.length % 3 || 3, - i; - - for (i = 0; i < j; i += n) { - if (i != 0) { - n = 3; - } - - parr[parr.length] = cnum.substr(i, n); - m -= 1; - } - fnum = parr.join(comma); - if (psplit[1]) { - fnum += dec + psplit[1]; - } - } else { - if (psplit[1]) { - fnum = psplit[0] + dec + psplit[1]; - } - } - - return (neg ? '-' : '') + format.replace(/[\d,?\.?]+/, fnum); - }, - - /** - * Returns a number rendering function that can be reused to apply a number format multiple times efficiently - * @param {String} format Any valid number format string for {@link #number} - * @return {Function} The number formatting function - */ - numberRenderer : function(format) { - return function(v) { - return Ext.util.Format.number(v, format); - }; - }, - - /** - * Selectively do a plural form of a word based on a numeric value. For example, in a template, - * {commentCount:plural("Comment")} would result in "1 Comment" if commentCount was 1 or would be "x Comments" - * if the value is 0 or greater than 1. - * @param {Number} value The value to compare against - * @param {String} singular The singular form of the word - * @param {String} plural (optional) The plural form of the word (defaults to the singular with an "s") - */ - plural : function(v, s, p) { - return v +' ' + (v == 1 ? s : (p ? p : s+'s')); - }, - - /** - * Converts newline characters to the HTML tag <br/> - * @param {String} The string value to format. - * @return {String} The string with embedded <br/> tags in place of newlines. - */ - nl2br : function(v) { - return Ext.isEmpty(v) ? '' : v.replace(nl2brRe, '
      '); - } - }; -}(); -/** - * @class Ext.XTemplate - * @extends Ext.Template - *

      A template class that supports advanced functionality like:

        - *
      • Autofilling arrays using templates and sub-templates
      • - *
      • Conditional processing with basic comparison operators
      • - *
      • Basic math function support
      • - *
      • Execute arbitrary inline code with special built-in template variables
      • - *
      • Custom member functions
      • - *
      • Many special tags and built-in operators that aren't defined as part of - * the API, but are supported in the templates that can be created
      • - *

      - *

      XTemplate provides the templating mechanism built into:

        - *
      • {@link Ext.DataView}
      • - *
      • {@link Ext.ListView}
      • - *
      • {@link Ext.form.ComboBox}
      • - *
      • {@link Ext.grid.TemplateColumn}
      • - *
      • {@link Ext.grid.GroupingView}
      • - *
      • {@link Ext.menu.Item}
      • - *
      • {@link Ext.layout.MenuLayout}
      • - *
      • {@link Ext.ColorPalette}
      • - *

      - * - *

      For example usage {@link #XTemplate see the constructor}.

      - * - * @constructor - * The {@link Ext.Template#Template Ext.Template constructor} describes - * the acceptable parameters to pass to the constructor. The following - * examples demonstrate all of the supported features.

      - * - *
        - * - *
      • Sample Data - *
        - *

        This is the data object used for reference in each code example:

        - *
        
        -var data = {
        -    name: 'Jack Slocum',
        -    title: 'Lead Developer',
        -    company: 'Ext JS, LLC',
        -    email: 'jack@extjs.com',
        -    address: '4 Red Bulls Drive',
        -    city: 'Cleveland',
        -    state: 'Ohio',
        -    zip: '44102',
        -    drinks: ['Red Bull', 'Coffee', 'Water'],
        -    kids: [{
        -        name: 'Sara Grace',
        -        age:3
        -    },{
        -        name: 'Zachary',
        -        age:2
        -    },{
        -        name: 'John James',
        -        age:0
        -    }]
        -};
        - * 
        - *
        - *
      • - * - * - *
      • Auto filling of arrays - *
        - *

        The tpl tag and the for operator are used - * to process the provided data object: - *

          - *
        • If the value specified in for is an array, it will auto-fill, - * repeating the template block inside the tpl tag for each item in the - * array.
        • - *
        • If for="." is specified, the data object provided is examined.
        • - *
        • While processing an array, the special variable {#} - * will provide the current array index + 1 (starts at 1, not 0).
        • - *
        - *

        - *
        
        -<tpl for=".">...</tpl>       // loop through array at root node
        -<tpl for="foo">...</tpl>     // loop through array at foo node
        -<tpl for="foo.bar">...</tpl> // loop through array at foo.bar node
        - * 
        - * Using the sample data above: - *
        
        -var tpl = new Ext.XTemplate(
        -    '<p>Kids: ',
        -    '<tpl for=".">',       // process the data.kids node
        -        '<p>{#}. {name}</p>',  // use current array index to autonumber
        -    '</tpl></p>'
        -);
        -tpl.overwrite(panel.body, data.kids); // pass the kids property of the data object
        - * 
        - *

        An example illustrating how the for property can be leveraged - * to access specified members of the provided data object to populate the template:

        - *
        
        -var tpl = new Ext.XTemplate(
        -    '<p>Name: {name}</p>',
        -    '<p>Title: {title}</p>',
        -    '<p>Company: {company}</p>',
        -    '<p>Kids: ',
        -    '<tpl for="kids">',     // interrogate the kids property within the data
        -        '<p>{name}</p>',
        -    '</tpl></p>'
        -);
        -tpl.overwrite(panel.body, data);  // pass the root node of the data object
        - * 
        - *

        Flat arrays that contain values (and not objects) can be auto-rendered - * using the special {.} variable inside a loop. This variable - * will represent the value of the array at the current index:

        - *
        
        -var tpl = new Ext.XTemplate(
        -    '<p>{name}\'s favorite beverages:</p>',
        -    '<tpl for="drinks">',
        -       '<div> - {.}</div>',
        -    '</tpl>'
        -);
        -tpl.overwrite(panel.body, data);
        - * 
        - *

        When processing a sub-template, for example while looping through a child array, - * you can access the parent object's members via the parent object:

        - *
        
        -var tpl = new Ext.XTemplate(
        -    '<p>Name: {name}</p>',
        -    '<p>Kids: ',
        -    '<tpl for="kids">',
        -        '<tpl if="age > 1">',
        -            '<p>{name}</p>',
        -            '<p>Dad: {parent.name}</p>',
        -        '</tpl>',
        -    '</tpl></p>'
        -);
        -tpl.overwrite(panel.body, data);
        - * 
        - *
        - *
      • - * - * - *
      • Conditional processing with basic comparison operators - *
        - *

        The tpl tag and the if operator are used - * to provide conditional checks for deciding whether or not to render specific - * parts of the template. Notes:

          - *
        • Double quotes must be encoded if used within the conditional
        • - *
        • There is no else operator — if needed, two opposite - * if statements should be used.
        • - *
        - *
        
        -<tpl if="age > 1 && age < 10">Child</tpl>
        -<tpl if="age >= 10 && age < 18">Teenager</tpl>
        -<tpl if="this.isGirl(name)">...</tpl>
        -<tpl if="id==\'download\'">...</tpl>
        -<tpl if="needsIcon"><img src="{icon}" class="{iconCls}"/></tpl>
        -// no good:
        -<tpl if="name == "Jack"">Hello</tpl>
        -// encode " if it is part of the condition, e.g.
        -<tpl if="name == &quot;Jack&quot;">Hello</tpl>
        - * 
        - * Using the sample data above: - *
        
        -var tpl = new Ext.XTemplate(
        -    '<p>Name: {name}</p>',
        -    '<p>Kids: ',
        -    '<tpl for="kids">',
        -        '<tpl if="age > 1">',
        -            '<p>{name}</p>',
        -        '</tpl>',
        -    '</tpl></p>'
        -);
        -tpl.overwrite(panel.body, data);
        - * 
        - *
        - *
      • - * - * - *
      • Basic math support - *
        - *

        The following basic math operators may be applied directly on numeric - * data values:

        - * + - * /
        - * 
        - * For example: - *
        
        -var tpl = new Ext.XTemplate(
        -    '<p>Name: {name}</p>',
        -    '<p>Kids: ',
        -    '<tpl for="kids">',
        -        '<tpl if="age &gt; 1">',  // <-- Note that the > is encoded
        -            '<p>{#}: {name}</p>',  // <-- Auto-number each item
        -            '<p>In 5 Years: {age+5}</p>',  // <-- Basic math
        -            '<p>Dad: {parent.name}</p>',
        -        '</tpl>',
        -    '</tpl></p>'
        -);
        -tpl.overwrite(panel.body, data);
        -
        - *
        - *
      • - * - * - *
      • Execute arbitrary inline code with special built-in template variables - *
        - *

        Anything between {[ ... ]} is considered code to be executed - * in the scope of the template. There are some special variables available in that code: - *

          - *
        • values: The values in the current scope. If you are using - * scope changing sub-templates, you can change what values is.
        • - *
        • parent: The scope (values) of the ancestor template.
        • - *
        • xindex: If you are in a looping template, the index of the - * loop you are in (1-based).
        • - *
        • xcount: If you are in a looping template, the total length - * of the array you are looping.
        • - *
        • fm: An alias for Ext.util.Format.
        • - *
        - * This example demonstrates basic row striping using an inline code block and the - * xindex variable:

        - *
        
        -var tpl = new Ext.XTemplate(
        -    '<p>Name: {name}</p>',
        -    '<p>Company: {[values.company.toUpperCase() + ", " + values.title]}</p>',
        -    '<p>Kids: ',
        -    '<tpl for="kids">',
        -       '<div class="{[xindex % 2 === 0 ? "even" : "odd"]}">',
        -        '{name}',
        -        '</div>',
        -    '</tpl></p>'
        -);
        -tpl.overwrite(panel.body, data);
        - * 
        - *
        - *
      • - * - *
      • Template member functions - *
        - *

        One or more member functions can be specified in a configuration - * object passed into the XTemplate constructor for more complex processing:

        - *
        
        -var tpl = new Ext.XTemplate(
        -    '<p>Name: {name}</p>',
        -    '<p>Kids: ',
        -    '<tpl for="kids">',
        -        '<tpl if="this.isGirl(name)">',
        -            '<p>Girl: {name} - {age}</p>',
        -        '</tpl>',
        -        // use opposite if statement to simulate 'else' processing:
        -        '<tpl if="this.isGirl(name) == false">',
        -            '<p>Boy: {name} - {age}</p>',
        -        '</tpl>',
        -        '<tpl if="this.isBaby(age)">',
        -            '<p>{name} is a baby!</p>',
        -        '</tpl>',
        -    '</tpl></p>',
        -    {
        -        // XTemplate configuration:
        -        compiled: true,
        -        disableFormats: true,
        -        // member functions:
        -        isGirl: function(name){
        -            return name == 'Sara Grace';
        -        },
        -        isBaby: function(age){
        -            return age < 1;
        -        }
        -    }
        -);
        -tpl.overwrite(panel.body, data);
        - * 
        - *
        - *
      • - * - *
      - * - * @param {Mixed} config - */ -Ext.XTemplate = function(){ - Ext.XTemplate.superclass.constructor.apply(this, arguments); - - var me = this, - s = me.html, - re = /]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/, - nameRe = /^]*?for="(.*?)"/, - ifRe = /^]*?if="(.*?)"/, - execRe = /^]*?exec="(.*?)"/, - m, - id = 0, - tpls = [], - VALUES = 'values', - PARENT = 'parent', - XINDEX = 'xindex', - XCOUNT = 'xcount', - RETURN = 'return ', - WITHVALUES = 'with(values){ '; - - s = ['', s, ''].join(''); - - while((m = s.match(re))){ - var m2 = m[0].match(nameRe), - m3 = m[0].match(ifRe), - m4 = m[0].match(execRe), - exp = null, - fn = null, - exec = null, - name = m2 && m2[1] ? m2[1] : ''; - - if (m3) { - exp = m3 && m3[1] ? m3[1] : null; - if(exp){ - fn = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES + RETURN +(Ext.util.Format.htmlDecode(exp))+'; }'); - } - } - if (m4) { - exp = m4 && m4[1] ? m4[1] : null; - if(exp){ - exec = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES +(Ext.util.Format.htmlDecode(exp))+'; }'); - } - } - if(name){ - switch(name){ - case '.': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + VALUES + '; }'); break; - case '..': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + PARENT + '; }'); break; - default: name = new Function(VALUES, PARENT, WITHVALUES + RETURN + name + '; }'); - } - } - tpls.push({ - id: id, - target: name, - exec: exec, - test: fn, - body: m[1]||'' - }); - s = s.replace(m[0], '{xtpl'+ id + '}'); - ++id; - } - for(var i = tpls.length-1; i >= 0; --i){ - me.compileTpl(tpls[i]); - } - me.master = tpls[tpls.length-1]; - me.tpls = tpls; -}; -Ext.extend(Ext.XTemplate, Ext.Template, { - // private - re : /\{([\w\-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g, - // private - codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g, - - // private - applySubTemplate : function(id, values, parent, xindex, xcount){ - var me = this, - len, - t = me.tpls[id], - vs, - buf = []; - if ((t.test && !t.test.call(me, values, parent, xindex, xcount)) || - (t.exec && t.exec.call(me, values, parent, xindex, xcount))) { - return ''; - } - vs = t.target ? t.target.call(me, values, parent) : values; - len = vs.length; - parent = t.target ? values : parent; - if(t.target && Ext.isArray(vs)){ - for(var i = 0, len = vs.length; i < len; i++){ - buf[buf.length] = t.compiled.call(me, vs[i], parent, i+1, len); - } - return buf.join(''); - } - return t.compiled.call(me, vs, parent, xindex, xcount); - }, - - // private - compileTpl : function(tpl){ - var fm = Ext.util.Format, - useF = this.disableFormats !== true, - sep = Ext.isGecko ? "+" : ",", - body; - - function fn(m, name, format, args, math){ - if(name.substr(0, 4) == 'xtpl'){ - return "'"+ sep +'this.applySubTemplate('+name.substr(4)+', values, parent, xindex, xcount)'+sep+"'"; - } - var v; - if(name === '.'){ - v = 'values'; - }else if(name === '#'){ - v = 'xindex'; - }else if(name.indexOf('.') != -1){ - v = name; - }else{ - v = "values['" + name + "']"; - } - if(math){ - v = '(' + v + math + ')'; - } - if (format && useF) { - args = args ? ',' + args : ""; - if(format.substr(0, 5) != "this."){ - format = "fm." + format + '('; - }else{ - format = 'this.call("'+ format.substr(5) + '", '; - args = ", values"; - } - } else { - args= ''; format = "("+v+" === undefined ? '' : "; - } - return "'"+ sep + format + v + args + ")"+sep+"'"; - } - - function codeFn(m, code){ - // Single quotes get escaped when the template is compiled, however we want to undo this when running code. - return "'" + sep + '(' + code.replace(/\\'/g, "'") + ')' + sep + "'"; - } - - // branched to use + in gecko and [].join() in others - if(Ext.isGecko){ - body = "tpl.compiled = function(values, parent, xindex, xcount){ return '" + - tpl.body.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn) + - "';};"; - }else{ - body = ["tpl.compiled = function(values, parent, xindex, xcount){ return ['"]; - body.push(tpl.body.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn)); - body.push("'].join('');};"); - body = body.join(''); - } - eval(body); - return this; - }, - - /** - * Returns an HTML fragment of this template with the specified values applied. - * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @return {String} The HTML fragment - */ - applyTemplate : function(values){ - return this.master.compiled.call(this, values, {}, 1, 1); - }, - - /** - * Compile the template to a function for optimized performance. Recommended if the template will be used frequently. - * @return {Function} The compiled function - */ - compile : function(){return this;} - - /** - * @property re - * @hide - */ - /** - * @property disableFormats - * @hide - */ - /** - * @method set - * @hide - */ - -}); -/** - * Alias for {@link #applyTemplate} - * Returns an HTML fragment of this template with the specified values applied. - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @return {String} The HTML fragment - * @member Ext.XTemplate - * @method apply - */ -Ext.XTemplate.prototype.apply = Ext.XTemplate.prototype.applyTemplate; - -/** - * Creates a template from the passed element's value (display:none textarea, preferred) or innerHTML. - * @param {String/HTMLElement} el A DOM element or its id - * @return {Ext.Template} The created template - * @static - */ -Ext.XTemplate.from = function(el){ - el = Ext.getDom(el); - return new Ext.XTemplate(el.value || el.innerHTML); -}; -/** - * @class Ext.util.CSS - * Utility class for manipulating CSS rules - * @singleton - */ -Ext.util.CSS = function(){ - var rules = null; - var doc = document; - - var camelRe = /(-[a-z])/gi; - var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; - - return { - /** - * Creates a stylesheet from a text blob of rules. - * These rules will be wrapped in a STYLE tag and appended to the HEAD of the document. - * @param {String} cssText The text containing the css rules - * @param {String} id An id to add to the stylesheet for later removal - * @return {StyleSheet} - */ - createStyleSheet : function(cssText, id){ - var ss; - var head = doc.getElementsByTagName("head")[0]; - var rules = doc.createElement("style"); - rules.setAttribute("type", "text/css"); - if(id){ - rules.setAttribute("id", id); - } - if(Ext.isIE){ - head.appendChild(rules); - ss = rules.styleSheet; - ss.cssText = cssText; - }else{ - try{ - rules.appendChild(doc.createTextNode(cssText)); - }catch(e){ - rules.cssText = cssText; - } - head.appendChild(rules); - ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]); - } - this.cacheStyleSheet(ss); - return ss; - }, - - /** - * Removes a style or link tag by id - * @param {String} id The id of the tag - */ - removeStyleSheet : function(id){ - var existing = doc.getElementById(id); - if(existing){ - existing.parentNode.removeChild(existing); - } - }, - - /** - * Dynamically swaps an existing stylesheet reference for a new one - * @param {String} id The id of an existing link tag to remove - * @param {String} url The href of the new stylesheet to include - */ - swapStyleSheet : function(id, url){ - this.removeStyleSheet(id); - var ss = doc.createElement("link"); - ss.setAttribute("rel", "stylesheet"); - ss.setAttribute("type", "text/css"); - ss.setAttribute("id", id); - ss.setAttribute("href", url); - doc.getElementsByTagName("head")[0].appendChild(ss); - }, - - /** - * Refresh the rule cache if you have dynamically added stylesheets - * @return {Object} An object (hash) of rules indexed by selector - */ - refreshCache : function(){ - return this.getRules(true); - }, - - // private - cacheStyleSheet : function(ss){ - if(!rules){ - rules = {}; - } - try{// try catch for cross domain access issue - var ssRules = ss.cssRules || ss.rules; - for(var j = ssRules.length-1; j >= 0; --j){ - rules[ssRules[j].selectorText.toLowerCase()] = ssRules[j]; - } - }catch(e){} - }, - - /** - * Gets all css rules for the document - * @param {Boolean} refreshCache true to refresh the internal cache - * @return {Object} An object (hash) of rules indexed by selector - */ - getRules : function(refreshCache){ - if(rules === null || refreshCache){ - rules = {}; - var ds = doc.styleSheets; - for(var i =0, len = ds.length; i < len; i++){ - try{ - this.cacheStyleSheet(ds[i]); - }catch(e){} - } - } - return rules; - }, - - /** - * Gets an an individual CSS rule by selector(s) - * @param {String/Array} selector The CSS selector or an array of selectors to try. The first selector that is found is returned. - * @param {Boolean} refreshCache true to refresh the internal cache if you have recently updated any rules or added styles dynamically - * @return {CSSRule} The CSS rule or null if one is not found - */ - getRule : function(selector, refreshCache){ - var rs = this.getRules(refreshCache); - if(!Ext.isArray(selector)){ - return rs[selector.toLowerCase()]; - } - for(var i = 0; i < selector.length; i++){ - if(rs[selector[i]]){ - return rs[selector[i].toLowerCase()]; - } - } - return null; - }, - - - /** - * Updates a rule property - * @param {String/Array} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found. - * @param {String} property The css property - * @param {String} value The new value for the property - * @return {Boolean} true If a rule was found and updated - */ - updateRule : function(selector, property, value){ - if(!Ext.isArray(selector)){ - var rule = this.getRule(selector); - if(rule){ - rule.style[property.replace(camelRe, camelFn)] = value; - return true; - } - }else{ - for(var i = 0; i < selector.length; i++){ - if(this.updateRule(selector[i], property, value)){ - return true; - } - } - } - return false; - } - }; -}();/** - @class Ext.util.ClickRepeater - @extends Ext.util.Observable - - A wrapper class which can be applied to any element. Fires a "click" event while the - mouse is pressed. The interval between firings may be specified in the config but - defaults to 20 milliseconds. - - Optionally, a CSS class may be applied to the element during the time it is pressed. - - @cfg {Mixed} el The element to act as a button. - @cfg {Number} delay The initial delay before the repeating event begins firing. - Similar to an autorepeat key delay. - @cfg {Number} interval The interval between firings of the "click" event. Default 20 ms. - @cfg {String} pressClass A CSS class name to be applied to the element while pressed. - @cfg {Boolean} accelerate True if autorepeating should start slowly and accelerate. - "interval" and "delay" are ignored. - @cfg {Boolean} preventDefault True to prevent the default click event - @cfg {Boolean} stopDefault True to stop the default click event - - @history - 2007-02-02 jvs Original code contributed by Nige "Animal" White - 2007-02-02 jvs Renamed to ClickRepeater - 2007-02-03 jvs Modifications for FF Mac and Safari - - @constructor - @param {Mixed} el The element to listen on - @param {Object} config - */ -Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, { - - constructor : function(el, config){ - this.el = Ext.get(el); - this.el.unselectable(); - - Ext.apply(this, config); - - this.addEvents( - /** - * @event mousedown - * Fires when the mouse button is depressed. - * @param {Ext.util.ClickRepeater} this - * @param {Ext.EventObject} e - */ - "mousedown", - /** - * @event click - * Fires on a specified interval during the time the element is pressed. - * @param {Ext.util.ClickRepeater} this - * @param {Ext.EventObject} e - */ - "click", - /** - * @event mouseup - * Fires when the mouse key is released. - * @param {Ext.util.ClickRepeater} this - * @param {Ext.EventObject} e - */ - "mouseup" - ); - - if(!this.disabled){ - this.disabled = true; - this.enable(); - } - - // allow inline handler - if(this.handler){ - this.on("click", this.handler, this.scope || this); - } - - Ext.util.ClickRepeater.superclass.constructor.call(this); - }, - - interval : 20, - delay: 250, - preventDefault : true, - stopDefault : false, - timer : 0, - - /** - * Enables the repeater and allows events to fire. - */ - enable: function(){ - if(this.disabled){ - this.el.on('mousedown', this.handleMouseDown, this); - if (Ext.isIE){ - this.el.on('dblclick', this.handleDblClick, this); - } - if(this.preventDefault || this.stopDefault){ - this.el.on('click', this.eventOptions, this); - } - } - this.disabled = false; - }, - - /** - * Disables the repeater and stops events from firing. - */ - disable: function(/* private */ force){ - if(force || !this.disabled){ - clearTimeout(this.timer); - if(this.pressClass){ - this.el.removeClass(this.pressClass); - } - Ext.getDoc().un('mouseup', this.handleMouseUp, this); - this.el.removeAllListeners(); - } - this.disabled = true; - }, - - /** - * Convenience function for setting disabled/enabled by boolean. - * @param {Boolean} disabled - */ - setDisabled: function(disabled){ - this[disabled ? 'disable' : 'enable'](); - }, - - eventOptions: function(e){ - if(this.preventDefault){ - e.preventDefault(); - } - if(this.stopDefault){ - e.stopEvent(); - } - }, - - // private - destroy : function() { - this.disable(true); - Ext.destroy(this.el); - this.purgeListeners(); - }, - - handleDblClick : function(e){ - clearTimeout(this.timer); - this.el.blur(); - - this.fireEvent("mousedown", this, e); - this.fireEvent("click", this, e); - }, - - // private - handleMouseDown : function(e){ - clearTimeout(this.timer); - this.el.blur(); - if(this.pressClass){ - this.el.addClass(this.pressClass); - } - this.mousedownTime = new Date(); - - Ext.getDoc().on("mouseup", this.handleMouseUp, this); - this.el.on("mouseout", this.handleMouseOut, this); - - this.fireEvent("mousedown", this, e); - this.fireEvent("click", this, e); - - // Do not honor delay or interval if acceleration wanted. - if (this.accelerate) { - this.delay = 400; - } - this.timer = this.click.defer(this.delay || this.interval, this, [e]); - }, - - // private - click : function(e){ - this.fireEvent("click", this, e); - this.timer = this.click.defer(this.accelerate ? - this.easeOutExpo(this.mousedownTime.getElapsed(), - 400, - -390, - 12000) : - this.interval, this, [e]); - }, - - easeOutExpo : function (t, b, c, d) { - return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; - }, - - // private - handleMouseOut : function(){ - clearTimeout(this.timer); - if(this.pressClass){ - this.el.removeClass(this.pressClass); - } - this.el.on("mouseover", this.handleMouseReturn, this); - }, - - // private - handleMouseReturn : function(){ - this.el.un("mouseover", this.handleMouseReturn, this); - if(this.pressClass){ - this.el.addClass(this.pressClass); - } - this.click(); - }, - - // private - handleMouseUp : function(e){ - clearTimeout(this.timer); - this.el.un("mouseover", this.handleMouseReturn, this); - this.el.un("mouseout", this.handleMouseOut, this); - Ext.getDoc().un("mouseup", this.handleMouseUp, this); - this.el.removeClass(this.pressClass); - this.fireEvent("mouseup", this, e); - } -});/** - * @class Ext.KeyNav - *

      Provides a convenient wrapper for normalized keyboard navigation. KeyNav allows you to bind - * navigation keys to function calls that will get called when the keys are pressed, providing an easy - * way to implement custom navigation schemes for any UI component.

      - *

      The following are all of the possible keys that can be implemented: enter, left, right, up, down, tab, esc, - * pageUp, pageDown, del, home, end. Usage:

      -
      
      -var nav = new Ext.KeyNav("my-element", {
      -    "left" : function(e){
      -        this.moveLeft(e.ctrlKey);
      -    },
      -    "right" : function(e){
      -        this.moveRight(e.ctrlKey);
      -    },
      -    "enter" : function(e){
      -        this.save();
      -    },
      -    scope : this
      -});
      -
      - * @constructor - * @param {Mixed} el The element to bind to - * @param {Object} config The config - */ -Ext.KeyNav = function(el, config){ - this.el = Ext.get(el); - Ext.apply(this, config); - if(!this.disabled){ - this.disabled = true; - this.enable(); - } -}; - -Ext.KeyNav.prototype = { - /** - * @cfg {Boolean} disabled - * True to disable this KeyNav instance (defaults to false) - */ - disabled : false, - /** - * @cfg {String} defaultEventAction - * The method to call on the {@link Ext.EventObject} after this KeyNav intercepts a key. Valid values are - * {@link Ext.EventObject#stopEvent}, {@link Ext.EventObject#preventDefault} and - * {@link Ext.EventObject#stopPropagation} (defaults to 'stopEvent') - */ - defaultEventAction: "stopEvent", - /** - * @cfg {Boolean} forceKeyDown - * Handle the keydown event instead of keypress (defaults to false). KeyNav automatically does this for IE since - * IE does not propagate special keys on keypress, but setting this to true will force other browsers to also - * handle keydown instead of keypress. - */ - forceKeyDown : false, - - // private - relay : function(e){ - var k = e.getKey(), - h = this.keyToHandler[k]; - if(h && this[h]){ - if(this.doRelay(e, this[h], h) !== true){ - e[this.defaultEventAction](); - } - } - }, - - // private - doRelay : function(e, h, hname){ - return h.call(this.scope || this, e, hname); - }, - - // possible handlers - enter : false, - left : false, - right : false, - up : false, - down : false, - tab : false, - esc : false, - pageUp : false, - pageDown : false, - del : false, - home : false, - end : false, - space : false, - - // quick lookup hash - keyToHandler : { - 37 : "left", - 39 : "right", - 38 : "up", - 40 : "down", - 33 : "pageUp", - 34 : "pageDown", - 46 : "del", - 36 : "home", - 35 : "end", - 13 : "enter", - 27 : "esc", - 9 : "tab", - 32 : "space" - }, - - stopKeyUp: function(e) { - var k = e.getKey(); - - if (k >= 37 && k <= 40) { - // *** bugfix - safari 2.x fires 2 keyup events on cursor keys - // *** (note: this bugfix sacrifices the "keyup" event originating from keyNav elements in Safari 2) - e.stopEvent(); - } - }, - - /** - * Destroy this KeyNav (this is the same as calling disable). - */ - destroy: function(){ - this.disable(); - }, - - /** - * Enable this KeyNav - */ - enable: function() { - if (this.disabled) { - if (Ext.isSafari2) { - // call stopKeyUp() on "keyup" event - this.el.on('keyup', this.stopKeyUp, this); - } - - this.el.on(this.isKeydown()? 'keydown' : 'keypress', this.relay, this); - this.disabled = false; - } - }, - - /** - * Disable this KeyNav - */ - disable: function() { - if (!this.disabled) { - if (Ext.isSafari2) { - // remove "keyup" event handler - this.el.un('keyup', this.stopKeyUp, this); - } - - this.el.un(this.isKeydown()? 'keydown' : 'keypress', this.relay, this); - this.disabled = true; - } - }, - - /** - * Convenience function for setting disabled/enabled by boolean. - * @param {Boolean} disabled - */ - setDisabled : function(disabled){ - this[disabled ? "disable" : "enable"](); - }, - - // private - isKeydown: function(){ - return this.forceKeyDown || Ext.EventManager.useKeydown; - } -}; -/** - * @class Ext.KeyMap - * Handles mapping keys to actions for an element. One key map can be used for multiple actions. - * The constructor accepts the same config object as defined by {@link #addBinding}. - * If you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key - * combination it will call the function with this signature (if the match is a multi-key - * combination the callback will still be called only once): (String key, Ext.EventObject e) - * A KeyMap can also handle a string representation of keys.
      - * Usage: -
      
      -// map one key by key code
      -var map = new Ext.KeyMap("my-element", {
      -    key: 13, // or Ext.EventObject.ENTER
      -    fn: myHandler,
      -    scope: myObject
      -});
      -
      -// map multiple keys to one action by string
      -var map = new Ext.KeyMap("my-element", {
      -    key: "a\r\n\t",
      -    fn: myHandler,
      -    scope: myObject
      -});
      -
      -// map multiple keys to multiple actions by strings and array of codes
      -var map = new Ext.KeyMap("my-element", [
      -    {
      -        key: [10,13],
      -        fn: function(){ alert("Return was pressed"); }
      -    }, {
      -        key: "abc",
      -        fn: function(){ alert('a, b or c was pressed'); }
      -    }, {
      -        key: "\t",
      -        ctrl:true,
      -        shift:true,
      -        fn: function(){ alert('Control + shift + tab was pressed.'); }
      -    }
      -]);
      -
      - * Note: A KeyMap starts enabled - * @constructor - * @param {Mixed} el The element to bind to - * @param {Object} config The config (see {@link #addBinding}) - * @param {String} eventName (optional) The event to bind to (defaults to "keydown") - */ -Ext.KeyMap = function(el, config, eventName){ - this.el = Ext.get(el); - this.eventName = eventName || "keydown"; - this.bindings = []; - if(config){ - this.addBinding(config); - } - this.enable(); -}; - -Ext.KeyMap.prototype = { - /** - * True to stop the event from bubbling and prevent the default browser action if the - * key was handled by the KeyMap (defaults to false) - * @type Boolean - */ - stopEvent : false, - - /** - * Add a new binding to this KeyMap. The following config object properties are supported: - *
      -Property    Type             Description
      -----------  ---------------  ----------------------------------------------------------------------
      -key         String/Array     A single keycode or an array of keycodes to handle
      -shift       Boolean          True to handle key only when shift is pressed, False to handle the key only when shift is not pressed (defaults to undefined)
      -ctrl        Boolean          True to handle key only when ctrl is pressed, False to handle the key only when ctrl is not pressed (defaults to undefined)
      -alt         Boolean          True to handle key only when alt is pressed, False to handle the key only when alt is not pressed (defaults to undefined)
      -handler     Function         The function to call when KeyMap finds the expected key combination
      -fn          Function         Alias of handler (for backwards-compatibility)
      -scope       Object           The scope of the callback function
      -stopEvent   Boolean          True to stop the event from bubbling and prevent the default browser action if the key was handled by the KeyMap (defaults to false)
      -
      - * - * Usage: - *
      
      -// Create a KeyMap
      -var map = new Ext.KeyMap(document, {
      -    key: Ext.EventObject.ENTER,
      -    fn: handleKey,
      -    scope: this
      -});
      -
      -//Add a new binding to the existing KeyMap later
      -map.addBinding({
      -    key: 'abc',
      -    shift: true,
      -    fn: handleKey,
      -    scope: this
      -});
      -
      - * @param {Object/Array} config A single KeyMap config or an array of configs - */ - addBinding : function(config){ - if(Ext.isArray(config)){ - Ext.each(config, function(c){ - this.addBinding(c); - }, this); - return; - } - var keyCode = config.key, - fn = config.fn || config.handler, - scope = config.scope; - - if (config.stopEvent) { - this.stopEvent = config.stopEvent; - } - - if(typeof keyCode == "string"){ - var ks = []; - var keyString = keyCode.toUpperCase(); - for(var j = 0, len = keyString.length; j < len; j++){ - ks.push(keyString.charCodeAt(j)); - } - keyCode = ks; - } - var keyArray = Ext.isArray(keyCode); - - var handler = function(e){ - if(this.checkModifiers(config, e)){ - var k = e.getKey(); - if(keyArray){ - for(var i = 0, len = keyCode.length; i < len; i++){ - if(keyCode[i] == k){ - if(this.stopEvent){ - e.stopEvent(); - } - fn.call(scope || window, k, e); - return; - } - } - }else{ - if(k == keyCode){ - if(this.stopEvent){ - e.stopEvent(); - } - fn.call(scope || window, k, e); - } - } - } - }; - this.bindings.push(handler); - }, - - // private - checkModifiers: function(config, e){ - var val, key, keys = ['shift', 'ctrl', 'alt']; - for (var i = 0, len = keys.length; i < len; ++i){ - key = keys[i]; - val = config[key]; - if(!(val === undefined || (val === e[key + 'Key']))){ - return false; - } - } - return true; - }, - - /** - * Shorthand for adding a single key listener - * @param {Number/Array/Object} key Either the numeric key code, array of key codes or an object with the - * following options: - * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)} - * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the browser window. - */ - on : function(key, fn, scope){ - var keyCode, shift, ctrl, alt; - if(typeof key == "object" && !Ext.isArray(key)){ - keyCode = key.key; - shift = key.shift; - ctrl = key.ctrl; - alt = key.alt; - }else{ - keyCode = key; - } - this.addBinding({ - key: keyCode, - shift: shift, - ctrl: ctrl, - alt: alt, - fn: fn, - scope: scope - }); - }, - - // private - handleKeyDown : function(e){ - if(this.enabled){ //just in case - var b = this.bindings; - for(var i = 0, len = b.length; i < len; i++){ - b[i].call(this, e); - } - } - }, - - /** - * Returns true if this KeyMap is enabled - * @return {Boolean} - */ - isEnabled : function(){ - return this.enabled; - }, - - /** - * Enables this KeyMap - */ - enable: function(){ - if(!this.enabled){ - this.el.on(this.eventName, this.handleKeyDown, this); - this.enabled = true; - } - }, - - /** - * Disable this KeyMap - */ - disable: function(){ - if(this.enabled){ - this.el.removeListener(this.eventName, this.handleKeyDown, this); - this.enabled = false; - } - }, - - /** - * Convenience function for setting disabled/enabled by boolean. - * @param {Boolean} disabled - */ - setDisabled : function(disabled){ - this[disabled ? "disable" : "enable"](); - } -};/** - * @class Ext.util.TextMetrics - * Provides precise pixel measurements for blocks of text so that you can determine exactly how high and - * wide, in pixels, a given block of text will be. Note that when measuring text, it should be plain text and - * should not contain any HTML, otherwise it may not be measured correctly. - * @singleton - */ -Ext.util.TextMetrics = function(){ - var shared; - return { - /** - * Measures the size of the specified text - * @param {String/HTMLElement} el The element, dom node or id from which to copy existing CSS styles - * that can affect the size of the rendered text - * @param {String} text The text to measure - * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width - * in order to accurately measure the text height - * @return {Object} An object containing the text's size {width: (width), height: (height)} - */ - measure : function(el, text, fixedWidth){ - if(!shared){ - shared = Ext.util.TextMetrics.Instance(el, fixedWidth); - } - shared.bind(el); - shared.setFixedWidth(fixedWidth || 'auto'); - return shared.getSize(text); - }, - - /** - * Return a unique TextMetrics instance that can be bound directly to an element and reused. This reduces - * the overhead of multiple calls to initialize the style properties on each measurement. - * @param {String/HTMLElement} el The element, dom node or id that the instance will be bound to - * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width - * in order to accurately measure the text height - * @return {Ext.util.TextMetrics.Instance} instance The new instance - */ - createInstance : function(el, fixedWidth){ - return Ext.util.TextMetrics.Instance(el, fixedWidth); - } - }; -}(); - -Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){ - var ml = new Ext.Element(document.createElement('div')); - document.body.appendChild(ml.dom); - ml.position('absolute'); - ml.setLeftTop(-1000, -1000); - ml.hide(); - - if(fixedWidth){ - ml.setWidth(fixedWidth); - } - - var instance = { - /** - *

      Only available on the instance returned from {@link #createInstance}, not on the singleton.

      - * Returns the size of the specified text based on the internal element's style and width properties - * @param {String} text The text to measure - * @return {Object} An object containing the text's size {width: (width), height: (height)} - */ - getSize : function(text){ - ml.update(text); - var s = ml.getSize(); - ml.update(''); - return s; - }, - - /** - *

      Only available on the instance returned from {@link #createInstance}, not on the singleton.

      - * Binds this TextMetrics instance to an element from which to copy existing CSS styles - * that can affect the size of the rendered text - * @param {String/HTMLElement} el The element, dom node or id - */ - bind : function(el){ - ml.setStyle( - Ext.fly(el).getStyles('font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing') - ); - }, - - /** - *

      Only available on the instance returned from {@link #createInstance}, not on the singleton.

      - * Sets a fixed width on the internal measurement element. If the text will be multiline, you have - * to set a fixed width in order to accurately measure the text height. - * @param {Number} width The width to set on the element - */ - setFixedWidth : function(width){ - ml.setWidth(width); - }, - - /** - *

      Only available on the instance returned from {@link #createInstance}, not on the singleton.

      - * Returns the measured width of the specified text - * @param {String} text The text to measure - * @return {Number} width The width in pixels - */ - getWidth : function(text){ - ml.dom.style.width = 'auto'; - return this.getSize(text).width; - }, - - /** - *

      Only available on the instance returned from {@link #createInstance}, not on the singleton.

      - * Returns the measured height of the specified text. For multiline text, be sure to call - * {@link #setFixedWidth} if necessary. - * @param {String} text The text to measure - * @return {Number} height The height in pixels - */ - getHeight : function(text){ - return this.getSize(text).height; - } - }; - - instance.bind(bindTo); - - return instance; -}; - -Ext.Element.addMethods({ - /** - * Returns the width in pixels of the passed text, or the width of the text in this Element. - * @param {String} text The text to measure. Defaults to the innerHTML of the element. - * @param {Number} min (Optional) The minumum value to return. - * @param {Number} max (Optional) The maximum value to return. - * @return {Number} The text width in pixels. - * @member Ext.Element getTextWidth - */ - getTextWidth : function(text, min, max){ - return (Ext.util.TextMetrics.measure(this.dom, Ext.value(text, this.dom.innerHTML, true)).width).constrain(min || 0, max || 1000000); - } -}); -/** - * @class Ext.util.Cookies - * Utility class for managing and interacting with cookies. - * @singleton - */ -Ext.util.Cookies = { - /** - * Create a cookie with the specified name and value. Additional settings - * for the cookie may be optionally specified (for example: expiration, - * access restriction, SSL). - * @param {String} name The name of the cookie to set. - * @param {Mixed} value The value to set for the cookie. - * @param {Object} expires (Optional) Specify an expiration date the - * cookie is to persist until. Note that the specified Date object will - * be converted to Greenwich Mean Time (GMT). - * @param {String} path (Optional) Setting a path on the cookie restricts - * access to pages that match that path. Defaults to all pages ('/'). - * @param {String} domain (Optional) Setting a domain restricts access to - * pages on a given domain (typically used to allow cookie access across - * subdomains). For example, "extjs.com" will create a cookie that can be - * accessed from any subdomain of extjs.com, including www.extjs.com, - * support.extjs.com, etc. - * @param {Boolean} secure (Optional) Specify true to indicate that the cookie - * should only be accessible via SSL on a page using the HTTPS protocol. - * Defaults to false. Note that this will only work if the page - * calling this code uses the HTTPS protocol, otherwise the cookie will be - * created with default options. - */ - set : function(name, value){ - var argv = arguments; - var argc = arguments.length; - var expires = (argc > 2) ? argv[2] : null; - var path = (argc > 3) ? argv[3] : '/'; - var domain = (argc > 4) ? argv[4] : null; - var secure = (argc > 5) ? argv[5] : false; - document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : ""); - }, - - /** - * Retrieves cookies that are accessible by the current page. If a cookie - * does not exist, get() returns null. The following - * example retrieves the cookie called "valid" and stores the String value - * in the variable validStatus. - *
      
      -     * var validStatus = Ext.util.Cookies.get("valid");
      -     * 
      - * @param {String} name The name of the cookie to get - * @return {Mixed} Returns the cookie value for the specified name; - * null if the cookie name does not exist. - */ - get : function(name){ - var arg = name + "="; - var alen = arg.length; - var clen = document.cookie.length; - var i = 0; - var j = 0; - while(i < clen){ - j = i + alen; - if(document.cookie.substring(i, j) == arg){ - return Ext.util.Cookies.getCookieVal(j); - } - i = document.cookie.indexOf(" ", i) + 1; - if(i === 0){ - break; - } - } - return null; - }, - - /** - * Removes a cookie with the provided name from the browser - * if found by setting its expiration date to sometime in the past. - * @param {String} name The name of the cookie to remove - */ - clear : function(name){ - if(Ext.util.Cookies.get(name)){ - document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; - } - }, - /** - * @private - */ - getCookieVal : function(offset){ - var endstr = document.cookie.indexOf(";", offset); - if(endstr == -1){ - endstr = document.cookie.length; - } - return unescape(document.cookie.substring(offset, endstr)); - } -};/** - * Framework-wide error-handler. Developers can override this method to provide - * custom exception-handling. Framework errors will often extend from the base - * Ext.Error class. - * @param {Object/Error} e The thrown exception object. - */ -Ext.handleError = function(e) { - throw e; -}; - -/** - * @class Ext.Error - * @extends Error - *

      A base error class. Future implementations are intended to provide more - * robust error handling throughout the framework (in the debug build only) - * to check for common errors and problems. The messages issued by this class - * will aid error checking. Error checks will be automatically removed in the - * production build so that performance is not negatively impacted.

      - *

      Some sample messages currently implemented:

      -"DataProxy attempted to execute an API-action but found an undefined
      -url / function. Please review your Proxy url/api-configuration."
      - * 
      -"Could not locate your "root" property in your server response.
      -Please review your JsonReader config to ensure the config-property
      -"root" matches the property your server-response.  See the JsonReader
      -docs for additional assistance."
      - * 
      - *

      An example of the code used for generating error messages:

      
      -try {
      -    generateError({
      -        foo: 'bar'
      -    });
      -}
      -catch (e) {
      -    console.error(e);
      -}
      -function generateError(data) {
      -    throw new Ext.Error('foo-error', data);
      -}
      - * 
      - * @param {String} message - */ -Ext.Error = function(message) { - // Try to read the message from Ext.Error.lang - this.message = (this.lang[message]) ? this.lang[message] : message; -}; - -Ext.Error.prototype = new Error(); -Ext.apply(Ext.Error.prototype, { - // protected. Extensions place their error-strings here. - lang: {}, - - name: 'Ext.Error', - /** - * getName - * @return {String} - */ - getName : function() { - return this.name; - }, - /** - * getMessage - * @return {String} - */ - getMessage : function() { - return this.message; - }, - /** - * toJson - * @return {String} - */ - toJson : function() { - return Ext.encode(this); - } -}); diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/ext-foundation.js b/web-client/src/main/resources/apps/js/ext/pkgs/ext-foundation.js deleted file mode 100644 index c9a40553c76..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/ext-foundation.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.ns("Ext.grid","Ext.list","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout.boxOverflow","Ext.app","Ext.ux","Ext.chart","Ext.direct","Ext.slider");Ext.apply(Ext,function(){var c=Ext,a=0,b=null;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7||Ext.isAir?"http://www.extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(d,e){return Ext.extend(d,e(d.prototype))},getDoc:function(){return Ext.get(document)},num:function(e,d){e=Number(Ext.isEmpty(e)||Ext.isArray(e)||typeof e=="boolean"||(typeof e=="string"&&e.trim().length==0)?NaN:e);return isNaN(e)?d:e},value:function(f,d,e){return Ext.isEmpty(f,e)?d:f},escapeRe:function(d){return d.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(g,d,f,e){g[d]=g[d].createSequence(f,e)},addBehaviors:function(h){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(h)})}else{var e={},g,d,f;for(d in h){if((g=d.split("@"))[1]){f=g[0];if(!e[f]){e[f]=Ext.select(f)}e[f].on(g[1],h[d])}}e=null}},getScrollBarWidth:function(f){if(!Ext.isReady){return 0}if(f===true||b===null){var h=Ext.getBody().createChild('
      '),g=h.child("div",true);var e=g.offsetWidth;h.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var d=g.offsetWidth;h.remove();b=e-d+2}return b},combine:function(){var f=arguments,e=f.length,h=[];for(var g=0;gg?1:-1};Ext.each(d,function(g){f=e(f,g)==1?f:g});return f},mean:function(d){return d.length>0?Ext.sum(d)/d.length:undefined},sum:function(d){var e=0;Ext.each(d,function(f){e+=f});return e},partition:function(d,e){var f=[[],[]];Ext.each(d,function(h,j,g){f[(e&&e(h,j,g))||(!e&&h)?0:1].push(h)});return f},invoke:function(d,e){var g=[],f=Array.prototype.slice.call(arguments,2);Ext.each(d,function(h,j){if(h&&typeof h[e]=="function"){g.push(h[e].apply(h,f))}else{g.push(undefined)}});return g},pluck:function(d,f){var e=[];Ext.each(d,function(g){e.push(g[f])});return e},zip:function(){var m=Ext.partition(arguments,function(i){return typeof i!="function"}),h=m[0],l=m[1][0],d=Ext.max(Ext.pluck(h,"length")),g=[];for(var k=0;k=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},getArea:function(){var a=this;return((a.bottom-a.top)*(a.right-a.left))},intersect:function(g){var f=this,d=Math.max(f.top,g.top),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.left,g.left);if(a>=d&&e>=c){return new Ext.lib.Region(d,e,a,c)}},union:function(g){var f=this,d=Math.min(f.top,g.top),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.left,g.left);return new Ext.lib.Region(d,e,a,c)},constrainTo:function(b){var a=this;a.top=a.top.constrain(b.top,b.bottom);a.bottom=a.bottom.constrain(b.top,b.bottom);a.left=a.left.constrain(b.left,b.right);a.right=a.right.constrain(b.left,b.right);return a},adjust:function(d,c,a,f){var e=this;e.top+=d;e.left+=c;e.right+=f;e.bottom+=a;return e}};Ext.lib.Region.getRegion=function(e){var g=Ext.lib.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new Ext.lib.Region(d,f,a,c)};Ext.lib.Point=function(a,c){if(Ext.isArray(a)){c=a[1];a=a[0]}var b=this;b.x=b.right=b.left=b[0]=a;b.y=b.top=b.bottom=b[1]=c};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.apply(Ext.DomHelper,function(){var e,a="afterbegin",g="afterend",h="beforebegin",d="beforeend",b=/tag|children|cn|html$/i;function f(l,n,m,p,k,i){l=Ext.getDom(l);var j;if(e.useDom){j=c(n,null);if(i){l.appendChild(j)}else{(k=="firstChild"?l:l.parentNode).insertBefore(j,l[k]||l)}}else{j=Ext.DomHelper.insertHtml(p,l,Ext.DomHelper.createHtml(n))}return m?Ext.get(j,true):j}function c(j,r){var k,u=document,p,s,m,t;if(Ext.isArray(j)){k=u.createDocumentFragment();for(var q=0,n=j.length;q0){return setTimeout(d,c)}d();return 0},createSequence:function(c,b,a){if(!Ext.isFunction(b)){return c}else{return function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}}};Ext.defer=Ext.util.Functions.defer;Ext.createInterceptor=Ext.util.Functions.createInterceptor;Ext.createSequence=Ext.util.Functions.createSequence;Ext.createDelegate=Ext.util.Functions.createDelegate;Ext.apply(Ext.util.Observable.prototype,function(){function a(i){var h=(this.methodEvents=this.methodEvents||{})[i],d,c,f,g=this;if(!h){this.methodEvents[i]=h={};h.originalFn=this[i];h.methodName=i;h.before=[];h.after=[];var b=function(k,j,e){if((c=k.apply(j||g,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}f=!!c.cancel}else{if(c===false){f=true}else{d=c}}}};this[i]=function(){var k=Array.prototype.slice.call(arguments,0),j;d=c=undefined;f=false;for(var l=0,e=h.before.length;l=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{_unload:function(){Ext.EventManager.un(window,"resize",this.fireWindowResize,this);c.call(Ext.EventManager)},doResizeEvent:function(){var l=a.getViewHeight(),k=a.getViewWidth();if(g!=l||h!=k){d.fire(h=k,g=l)}},onWindowResize:function(m,l,k){if(!d){d=new Ext.util.Event();j=new Ext.util.DelayedTask(this.doResizeEvent);Ext.EventManager.on(window,"resize",this.fireWindowResize,this)}d.addListener(m,l,k)},fireWindowResize:function(){if(d){j.delay(100)}},onTextResize:function(n,m,k){if(!f){f=new Ext.util.Event();var l=new Ext.Element(document.createElement("div"));l.dom.className="x-text-resize";l.dom.innerHTML="X";l.appendTo(document.body);b=l.dom.offsetHeight;setInterval(function(){if(l.dom.offsetHeight!=b){f.fire(b,b=l.dom.offsetHeight)}},this.textResizeInterval)}f.addListener(n,m,k)},removeResizeListener:function(l,k){if(d){d.removeListener(l,k)}},fireResize:function(){if(d){d.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,getKeyEvent:function(){return e?"keydown":"keypress"},useKeydown:e}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(f){f.stopPropagation();if(b){f.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(f){d.on(f,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,f=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(f){var a=f.nextSibling;if(f.nodeType==3&&!(/\S/.test(f.nodeValue))){e.removeChild(f)}else{f.nodeIndex=++c}f=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){if(!this.dom){return this}html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=Ext.id(),dom=this.dom;html+='';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(a,e,d){a=(typeof a=="object")?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.addMethods({getAnchorXY:function(e,k,p){e=(e||"tl").toLowerCase();p=p||{};var j=this,b=j.dom==document.body||j.dom==document,m=p.width||b?Ext.lib.Dom.getViewWidth():j.getWidth(),g=p.height||b?Ext.lib.Dom.getViewHeight():j.getHeight(),n,a=Math.round,c=j.getXY(),l=j.getScroll(),i=b?l.left:!k?c[0]:0,f=b?l.top:!k?c[1]:0,d={c:[a(m*0.5),a(g*0.5)],t:[a(m*0.5),0],l:[0,a(g*0.5)],r:[m,a(g*0.5)],b:[a(m*0.5),g],tl:[0,0],bl:[0,g],br:[m,g],tr:[m,0]};n=d[e];return[n[0]+i,n[1]+f]},anchorTo:function(b,g,c,a,j,k){var h=this,e=h.dom,i=!Ext.isEmpty(j),d=function(){Ext.fly(e).alignTo(b,g,c,a);Ext.callback(k,Ext.fly(e))},f=this.getAnchor();this.removeAnchor();Ext.apply(f,{fn:d,scroll:i});Ext.EventManager.onWindowResize(d,null);if(i){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(j)?j:50})}d.call(h);return h},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignToXY:function(f,z,A){f=Ext.get(f);if(!f||!f.dom){throw"Element.alignToXY with an element that doesn't exist"}A=A||[0,0];z=(!z||z=="?"?"tl-bl?":(!(/-/).test(z)&&z!==""?"tl-"+z:z||"tl-bl")).toLowerCase();var J=this,G=J.dom,L,K,l,k,q,E,u,s=Ext.lib.Dom.getViewWidth()-10,F=Ext.lib.Dom.getViewHeight()-10,b,g,i,j,t,v,M=document,I=M.documentElement,n=M.body,D=(I.scrollLeft||n.scrollLeft||0)+5,C=(I.scrollTop||n.scrollTop||0)+5,H=false,e="",a="",B=z.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!B){throw"Element.alignTo with an invalid alignment "+z}e=B[1];a=B[2];H=!!B[3];L=J.getAnchorXY(e,true);K=f.getAnchorXY(a,false);l=K[0]-L[0]+A[0];k=K[1]-L[1]+A[1];if(H){q=J.getWidth();E=J.getHeight();u=f.getRegion();b=e.charAt(0);g=e.charAt(e.length-1);i=a.charAt(0);j=a.charAt(a.length-1);t=((b=="t"&&i=="b")||(b=="b"&&i=="t"));v=((g=="r"&&j=="l")||(g=="l"&&j=="r"));if(l+q>s+D){l=v?u.left-q:s+D-q}if(lF+C){k=t?u.top-E:F+C-E}if(kA){o=A-p;l=true}if((n+B)>f){n=f-B;l=true}if(o"+String.format(Ext.Element.boxMarkup,c)+"
      "));Ext.DomQuery.selectNode("."+c+"-mc",d.dom).appendChild(this.dom);return d},setSize:function(e,c,d){var f=this;if(typeof e=="object"){c=e.height;e=e.width}e=f.adjustWidth(e);c=f.adjustHeight(c);if(!d||!f.anim){f.dom.style.width=f.addUnits(e);f.dom.style.height=f.addUnits(c)}else{f.anim({width:{to:e},height:{to:c}},f.preanim(arguments,2))}return f},getComputedHeight:function(){var d=this,c=Math.max(d.dom.offsetHeight,d.dom.clientHeight);if(!c){c=parseFloat(d.getStyle("height"))||0;if(!d.isBorderBox()){c+=d.getFrameWidth("tb")}}return c},getComputedWidth:function(){var c=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!c){c=parseFloat(this.getStyle("width"))||0;if(!this.isBorderBox()){c+=this.getFrameWidth("lr")}}return c},getFrameWidth:function(d,c){return c&&this.isBorderBox()?0:(this.getPadding(d)+this.getBorderWidth(d))},addClassOnOver:function(c){this.hover(function(){Ext.fly(this,a).addClass(c)},function(){Ext.fly(this,a).removeClass(c)});return this},addClassOnFocus:function(c){this.on("focus",function(){Ext.fly(this,a).addClass(c)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(c)},this.dom);return this},addClassOnClick:function(c){var d=this.dom;this.on("mousedown",function(){Ext.fly(d,a).addClass(c);var f=Ext.getDoc(),e=function(){Ext.fly(d,a).removeClass(c);f.removeListener("mouseup",e)};f.on("mouseup",e)});return this},getViewSize:function(){var f=document,g=this.dom,c=(g==f||g==f.body);if(c){var e=Ext.lib.Dom;return{width:e.getViewWidth(),height:e.getViewHeight()}}else{return{width:g.clientWidth,height:g.clientHeight}}},getStyleSize:function(){var i=this,c,g,k=document,l=this.dom,e=(l==k||l==k.body),f=l.style;if(e){var j=Ext.lib.Dom;return{width:j.getViewWidth(),height:j.getViewHeight()}}if(f.width&&f.width!="auto"){c=parseFloat(f.width);if(i.isBorderBox()){c-=i.getFrameWidth("lr")}}if(f.height&&f.height!="auto"){g=parseFloat(f.height);if(i.isBorderBox()){g-=i.getFrameWidth("tb")}}return{width:c||i.getWidth(true),height:g||i.getHeight(true)}},getSize:function(c){return{width:this.getWidth(c),height:this.getHeight(c)}},repaint:function(){var c=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(c).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(d){var e=this,c,f={t:"top",l:"left",r:"right",b:"bottom"},g={};if(!d){for(c in e.margins){g[f[c]]=parseFloat(e.getStyle(e.margins[c]))||0}return g}else{return e.addStyles.call(e,d,e.margins)}}}}());Ext.Element.addMethods({setBox:function(e,f,b){var d=this,a=e.width,c=e.height;if((f&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(i,o){var k=this,u,e,n,d=k.getBorderWidth,p=k.getPadding,f,a,s,m;if(!o){u=k.getXY()}else{e=parseInt(k.getStyle("left"),10)||0;n=parseInt(k.getStyle("top"),10)||0;u=[e,n]}var c=k.dom,q=c.offsetWidth,g=c.offsetHeight,j;if(!i){j={x:u[0],y:u[1],0:u[0],1:u[1],width:q,height:g}}else{f=d.call(k,"l")+p.call(k,"l");a=d.call(k,"r")+p.call(k,"r");s=d.call(k,"t")+p.call(k,"t");m=d.call(k,"b")+p.call(k,"b");j={x:u[0]+f,y:u[1]+s,0:u[0]+f,1:u[1]+s,width:q-(f+a),height:g-(s+m)}}j.right=j.x+j.width;j.bottom=j.y+j.height;return j},move:function(i,b,c){var f=this,l=f.getXY(),j=l[0],h=l[1],d=[j-b,h],k=[j+b,h],g=[j,h-b],a=[j,h+b],e={l:d,left:d,r:k,right:k,t:g,top:g,up:g,b:a,bottom:a,down:a};i=i.toLowerCase();f.moveTo(e[i][0],e[i][1],f.animTest.call(f,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,f,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,f)}else{e.anim({points:{to:[b,f]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({scrollTo:function(b,d,a){var e=/top/i.test(b),c=this,f=c.dom,g;if(!a||!c.anim){g="scroll"+(e?"Top":"Left");f[g]=d}else{g="scroll"+(e?"Left":"Top");c.anim({scroll:{to:e?[f[g],d]:[d,f[g]]}},c.preanim(arguments,2),"scroll")}return c},scrollIntoView:function(e,h){var n=Ext.getDom(e)||Ext.getBody().dom,g=this.dom,f=this.getOffsetsTo(n),j=f[0]+n.scrollLeft,s=f[1]+n.scrollTop,p=s+g.offsetHeight,d=j+g.offsetWidth,a=n.clientHeight,k=parseInt(n.scrollTop,10),q=parseInt(n.scrollLeft,10),i=k+a,m=q+n.clientWidth;if(g.offsetHeight>a||si){n.scrollTop=p-a}}n.scrollTop=n.scrollTop;if(h!==false){if(g.offsetWidth>n.clientWidth||jm){n.scrollLeft=d-n.clientWidth}}n.scrollLeft=n.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(k,b,d){if(!this.isScrollable()){return false}var e=this.dom,f=e.scrollLeft,o=e.scrollTop,m=e.scrollWidth,j=e.scrollHeight,g=e.clientWidth,a=e.clientHeight,c=false,n,i={l:Math.min(f+b,m-g),r:n=Math.max(f-b,0),t:Math.max(o-b,0),b:Math.min(o+b,j-a)};i.d=i.b;i.u=i.t;k=k.substr(0,1);if((n=i[k])>-1){c=true;this.scrollTo(k=="l"||k=="r"?"left":"top",n,this.preanim(arguments,2))}return c}});Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",g="none",c="x-masked",f="x-masked-relative",e=Ext.Element.data;return{isVisible:function(h){var i=!this.isStyle(d,a)&&!this.isStyle(b,g),j=this.dom.parentNode;if(h!==true||!i){return i}while(j&&!(/^body/i.test(j.tagName))){if(!Ext.fly(j,"_isVisible").isVisible()){return false}j=j.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,g)},enableDisplayMode:function(h){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(h)){e(this.dom,"originalDisplay",h)}return this},mask:function(i,m){var o=this,k=o.dom,n=Ext.DomHelper,l="ext-el-mask-msg",h,p;if(!/^body/i.test(k.tagName)&&o.getStyle("position")=="static"){o.addClass(f)}if(h=e(k,"maskMsg")){h.remove()}if(h=e(k,"mask")){h.remove()}p=n.append(k,{cls:"ext-el-mask"},true);e(k,"mask",p);o.addClass(c);p.setDisplayed(true);if(typeof i=="string"){var j=n.append(k,{cls:l,cn:{tag:"div"}},true);e(k,"maskMsg",j);j.dom.className=m?l+" "+m:l;j.dom.firstChild.innerHTML=i;j.setDisplayed(true);j.center(o)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&o.getStyle("height")=="auto"){p.setSize(undefined,o.getHeight())}return p},unmask:function(){var j=this,k=j.dom,h=e(k,"mask"),i=e(k,"maskMsg");if(h){if(i){i.remove();e(k,"maskMsg",undefined)}h.remove();e(k,"mask",undefined);j.removeClass([c,f])}},isMasked:function(){var h=e(this.dom,"mask");return h&&h.isVisible()},createShim:function(){var h=document.createElement("iframe"),i;h.frameBorder="0";h.className="ext-shim";h.src=Ext.SSL_SECURE_URL;i=Ext.get(this.dom.parentNode.insertBefore(h,this.dom));i.autoBoxAdjust=false;return i}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(typeof b!="object"||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});Ext.CompositeElementLite.importElementMethods();Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(f){if((b=(a[f]||a[f=c.indexOf(f)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(f,1)}});return this}});Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(b,a){this.elements=[];this.add(b,a)},getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(g){var h=this;h.transaction=null;if(g.argument.form&&g.argument.reset){try{g.argument.form.reset()}catch(i){}}if(h.loadScripts){h.renderer.render(h.el,g,h,f.createDelegate(h,[g]))}else{h.renderer.render(h.el,g,h);f.call(h,g)}}function f(g,h,i){this.fireEvent(h||d,this.el,g);if(Ext.isFunction(g.argument.callback)){g.argument.callback.call(g.argument.scope,this.el,Ext.isEmpty(i)?true:false,g,g.argument.options)}}function e(g){f.call(this,g,c,!!(this.transaction=null))}return{constructor:function(h,g){var i=this;h=Ext.get(h);if(!g&&h.updateManager){return h.updateManager}i.el=h;i.defaultUrl=null;i.addEvents(b,d,c);Ext.apply(i,Ext.Updater.defaults);i.transaction=null;i.refreshDelegate=i.refresh.createDelegate(i);i.updateDelegate=i.update.createDelegate(i);i.formUpdateDelegate=(i.formUpdate||function(){}).createDelegate(i);i.renderer=i.renderer||i.getDefaultRenderer();Ext.Updater.superclass.constructor.call(i)},setRenderer:function(g){this.renderer=g},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(g){this.defaultUrl=g},getEl:function(){return this.el},update:function(h,m,n,k){var j=this,g,i;if(j.fireEvent(b,j.el,h,m)!==false){if(Ext.isObject(h)){g=h;h=g.url;m=m||g.params;n=n||g.callback;k=k||g.discardUrl;i=g.scope;if(!Ext.isEmpty(g.nocache)){j.disableCaching=g.nocache}if(!Ext.isEmpty(g.text)){j.indicatorText='
      '+g.text+"
      "}if(!Ext.isEmpty(g.scripts)){j.loadScripts=g.scripts}if(!Ext.isEmpty(g.timeout)){j.timeout=g.timeout}}j.showLoading();if(!k){j.defaultUrl=h}if(Ext.isFunction(h)){h=h.call(j)}var l=Ext.apply({},{url:h,params:(Ext.isFunction(m)&&i)?m.createDelegate(i):m,success:a,failure:e,scope:j,callback:undefined,timeout:(j.timeout*1000),disableCaching:j.disableCaching,argument:{options:g,url:h,form:null,callback:n,scope:i||window,params:m}},g);j.transaction=Ext.Ajax.request(l)}},formUpdate:function(j,g,i,k){var h=this;if(h.fireEvent(b,h.el,j,g)!==false){if(Ext.isFunction(g)){g=g.call(h)}j=Ext.getDom(j);h.transaction=Ext.Ajax.request({form:j,url:g,success:a,failure:e,scope:h,timeout:(h.timeout*1000),argument:{url:g,form:j,callback:k,reset:i}});h.showLoading.defer(1,h)}},startAutoRefresh:function(h,i,k,l,g){var j=this;if(g){j.update(i||j.defaultUrl,k,l,true)}if(j.autoRefreshProcId){clearInterval(j.autoRefreshProcId)}j.autoRefreshProcId=setInterval(j.update.createDelegate(j,[i||j.defaultUrl,k,l,true]),h*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(g){if(this.defaultUrl){this.update(this.defaultUrl,null,g,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'
      Loading...
      ',loadScripts:false,sslBlankUrl:Ext.SSL_SECURE_URL};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,f){return c[f]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var f=(d||"").match(e);return f?new Date(((f[1]||"")+f[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatContainsHourInfo:(function(){var d=/(\\.)/g,c=/([gGhHisucUOPZ]|M\$)/;return function(e){return c.test(e.replace(d,""))}})(),formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var j="Y-m-dTH:i:sP",g=[],f=0,d=j.length;f= 0 && y >= 0){","v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(l){var e=Date.parseRegexes.length,n=1,f=[],k=[],j=false,d="",h=0,g,m;for(;h Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:function(){return a("A")},A:{calcLast:true,g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var f=0,d=c.length;f0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var b=0,e=this.clone(),a=this.getMonth(),c;for(c=0,e.setDate(1),e.setMonth(0);c28){a=Math.min(a,this.getFirstDateOfMonth().add("mo",c).getLastDateOfMonth().getDate())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},between:function(c,a){var b=this.getTime();return c.getTime()<=b&&b<=a.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.MixedCollection=function(b,a){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=b===true;if(a){this.getKey=a}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(b,c){if(arguments.length==1){c=arguments[0];b=this.getKey(c)}if(typeof b!="undefined"&&b!==null){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d=this.length){return this.add(b,c)}this.length++;this.items.splice(a,0,c);if(typeof b!="undefined"&&b!==null){this.map[b]=c}this.keys.splice(a,0,b);this.fireEvent("add",a,c,b);return c},remove:function(a){return this.removeAt(this.indexOf(a))},removeAt:function(a){if(a=0){this.length--;var c=this.items[a];this.items.splice(a,1);var b=this.keys[a];if(typeof b!="undefined"){delete this.map[b]}this.keys.splice(a,1);this.fireEvent("remove",c,b);return c}return false},removeKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return this.items.indexOf(a)},indexOfKey:function(a){return this.keys.indexOf(a)},item:function(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return typeof c!="function"||this.allowFunctions?c:null},itemAt:function(a){return this.items[a]},key:function(a){return this.map[a]},contains:function(a){return this.indexOf(a)!=-1},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(j,a,h){var d,e,b=String(a).toUpperCase()=="DESC"?-1:1,g=[],k=this.keys,f=this.items;h=h||function(i,c){return i-c};for(d=0,e=f.length;de?1:(f=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(f,e){var g=new Ext.util.MixedCollection();g.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c]+>/gi,stripScriptsRe=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,nl2brRe=/\r?\n/g;return{ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2),index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{return value.substr(0,len-3)+"..."}}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split("."),whole=ps[0],sub=ps[1]?"."+ps[1]:".00",r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTags:function(v){return !v?v:String(v).replace(stripTagsRE,"")},stripScripts:function(v){return !v?v:String(v).replace(stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var x=this,h=x.html,p=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^]*?for="(.*?)"/,u=/^]*?if="(.*?)"/,w=/^]*?exec="(.*?)"/,q,o=0,j=[],n="values",v="parent",k="xindex",l="xcount",e="return ",c="with(values){ ";h=["",h,""].join("");while((q=h.match(p))){var b=q[0].match(d),a=q[0].match(u),z=q[0].match(w),f=null,g=null,r=null,y=b&&b[1]?b[1]:"";if(a){f=a&&a[1]?a[1]:null;if(f){g=new Function(n,v,k,l,c+e+(Ext.util.Format.htmlDecode(f))+"; }")}}if(z){f=z&&z[1]?z[1]:null;if(f){r=new Function(n,v,k,l,c+(Ext.util.Format.htmlDecode(f))+"; }")}}if(y){switch(y){case".":y=new Function(n,v,c+e+n+"; }");break;case"..":y=new Function(n,v,c+e+v+"; }");break;default:y=new Function(n,v,c+e+y+"; }")}}j.push({id:o,target:y,exec:r,test:g,body:q[1]||""});h=h.replace(q[0],"{xtpl"+o+"}");++o}for(var t=j.length-1;t>=0;--t){x.compileTpl(j[t])}x.master=j[j.length-1];x.tpls=j};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w\-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,j,h,d,c){var g=this,f,l=g.tpls[a],k,b=[];if((l.test&&!l.test.call(g,j,h,d,c))||(l.exec&&l.exec.call(g,j,h,d,c))){return""}k=l.target?l.target.call(g,j,h):j;f=k.length;h=l.target?j:h;if(l.target&&Ext.isArray(k)){for(var e=0,f=k.length;e=0;--f){d[i[f].selectorText.toLowerCase()]=i[f]}}catch(h){}},getRules:function(g){if(d===null||g){d={};var j=c.styleSheets;for(var h=0,f=j.length;h=37&&a<=40){b.stopEvent()}},destroy:function(){this.disable()},enable:function(){if(this.disabled){if(Ext.isSafari2){this.el.on("keyup",this.stopKeyUp,this)}this.el.on(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=false}},disable:function(){if(!this.disabled){if(Ext.isSafari2){this.el.un("keyup",this.stopKeyUp,this)}this.el.un(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};Ext.KeyMap=function(c,b,a){this.el=Ext.get(c);this.eventName=a||"keydown";this.bindings=[];if(b){this.addBinding(b)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(b){if(Ext.isArray(b)){Ext.each(b,function(j){this.addBinding(j)},this);return}var i=b.key,f=b.fn||b.handler,k=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof i=="string"){var g=[];var e=i.toUpperCase();for(var c=0,d=e.length;c2)?a[2]:null;var g=(h>3)?a[3]:"/";var d=(h>4)?a[4]:null;var f=(h>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((g===null)?"":("; path="+g))+((d===null)?"":("; domain="+d))+((f===true)?"; secure":"")},get:function(d){var b=d+"=";var f=b.length;var a=document.cookie.length;var e=0;var c=0;while(e
        - *
      • b : Button
        This Button.
      • - *
      • e : EventObject
        The click event.
      • - *
      - * @cfg {Number} minWidth The minimum width for this button (used to give a set of buttons a common width). - * See also {@link Ext.Panel}.{@link Ext.Panel#minButtonWidth minButtonWidth}. - * @cfg {String/Object} tooltip The tooltip for the button - can be a string to be used as innerHTML (html tags are accepted) or QuickTips config object - * @cfg {Boolean} hidden True to start hidden (defaults to false) - * @cfg {Boolean} disabled True to start disabled (defaults to false) - * @cfg {Boolean} pressed True to start pressed (only if enableToggle = true) - * @cfg {String} toggleGroup The group this toggle button is a member of (only 1 per group can be pressed) - * @cfg {Boolean/Object} repeat True to repeat fire the click event while the mouse is down. This can also be - * a {@link Ext.util.ClickRepeater ClickRepeater} config object (defaults to false). - * @constructor - * Create a new button - * @param {Object} config The config object - * @xtype button - */ -Ext.Button = Ext.extend(Ext.BoxComponent, { - /** - * Read-only. True if this button is hidden - * @type Boolean - */ - hidden : false, - /** - * Read-only. True if this button is disabled - * @type Boolean - */ - disabled : false, - /** - * Read-only. True if this button is pressed (only if enableToggle = true) - * @type Boolean - */ - pressed : false, - - /** - * @cfg {Number} tabIndex Set a DOM tabIndex for this button (defaults to undefined) - */ - - /** - * @cfg {Boolean} allowDepress - * False to not allow a pressed Button to be depressed (defaults to undefined). Only valid when {@link #enableToggle} is true. - */ - - /** - * @cfg {Boolean} enableToggle - * True to enable pressed/not pressed toggling (defaults to false) - */ - enableToggle : false, - /** - * @cfg {Function} toggleHandler - * Function called when a Button with {@link #enableToggle} set to true is clicked. Two arguments are passed:
        - *
      • button : Ext.Button
        this Button object
      • - *
      • state : Boolean
        The next state of the Button, true means pressed.
      • - *
      - */ - /** - * @cfg {Mixed} menu - * Standard menu attribute consisting of a reference to a menu object, a menu id or a menu config blob (defaults to undefined). - */ - /** - * @cfg {String} menuAlign - * The position to align the menu to (see {@link Ext.Element#alignTo} for more details, defaults to 'tl-bl?'). - */ - menuAlign : 'tl-bl?', - - /** - * @cfg {String} overflowText If used in a {@link Ext.Toolbar Toolbar}, the - * text to be used if this item is shown in the overflow menu. See also - * {@link Ext.Toolbar.Item}.{@link Ext.Toolbar.Item#overflowText overflowText}. - */ - /** - * @cfg {String} iconCls - * A css class which sets a background image to be used as the icon for this button - */ - /** - * @cfg {String} type - * submit, reset or button - defaults to 'button' - */ - type : 'button', - - // private - menuClassTarget : 'tr:nth(2)', - - /** - * @cfg {String} clickEvent - * The DOM event that will fire the handler of the button. This can be any valid event name (dblclick, contextmenu). - * Defaults to 'click'. - */ - clickEvent : 'click', - - /** - * @cfg {Boolean} handleMouseEvents - * False to disable visual cues on mouseover, mouseout and mousedown (defaults to true) - */ - handleMouseEvents : true, - - /** - * @cfg {String} tooltipType - * The type of tooltip to use. Either 'qtip' (default) for QuickTips or 'title' for title attribute. - */ - tooltipType : 'qtip', - - /** - * @cfg {String} buttonSelector - *

      (Optional) A {@link Ext.DomQuery DomQuery} selector which is used to extract the active, clickable element from the - * DOM structure created.

      - *

      When a custom {@link #template} is used, you must ensure that this selector results in the selection of - * a focussable element.

      - *

      Defaults to 'button:first-child'.

      - */ - buttonSelector : 'button:first-child', - - /** - * @cfg {String} scale - *

      (Optional) The size of the Button. Three values are allowed:

      - *
        - *
      • 'small'
        Results in the button element being 16px high.
      • - *
      • 'medium'
        Results in the button element being 24px high.
      • - *
      • 'large'
        Results in the button element being 32px high.
      • - *
      - *

      Defaults to 'small'.

      - */ - scale : 'small', - - /** - * @cfg {Object} scope The scope (this reference) in which the - * {@link #handler} and {@link #toggleHandler} is - * executed. Defaults to this Button. - */ - - /** - * @cfg {String} iconAlign - *

      (Optional) The side of the Button box to render the icon. Four values are allowed:

      - *
        - *
      • 'top'
      • - *
      • 'right'
      • - *
      • 'bottom'
      • - *
      • 'left'
      • - *
      - *

      Defaults to 'left'.

      - */ - iconAlign : 'left', - - /** - * @cfg {String} arrowAlign - *

      (Optional) The side of the Button box to render the arrow if the button has an associated {@link #menu}. - * Two values are allowed:

      - *
        - *
      • 'right'
      • - *
      • 'bottom'
      • - *
      - *

      Defaults to 'right'.

      - */ - arrowAlign : 'right', - - /** - * @cfg {Ext.Template} template (Optional) - *

      A {@link Ext.Template Template} used to create the Button's DOM structure.

      - * Instances, or subclasses which need a different DOM structure may provide a different - * template layout in conjunction with an implementation of {@link #getTemplateArgs}. - * @type Ext.Template - * @property template - */ - /** - * @cfg {String} cls - * A CSS class string to apply to the button's main element. - */ - /** - * @property menu - * @type Menu - * The {@link Ext.menu.Menu Menu} object associated with this Button when configured with the {@link #menu} config option. - */ - /** - * @cfg {Boolean} autoWidth - * By default, if a width is not specified the button will attempt to stretch horizontally to fit its content. - * If the button is being managed by a width sizing layout (hbox, fit, anchor), set this to false to prevent - * the button from doing this automatic sizing. - * Defaults to undefined. - */ - - initComponent : function(){ - if(this.menu){ - // If array of items, turn it into an object config so we - // can set the ownerCt property in the config - if (Ext.isArray(this.menu)){ - this.menu = { items: this.menu }; - } - - // An object config will work here, but an instance of a menu - // will have already setup its ref's and have no effect - if (Ext.isObject(this.menu)){ - this.menu.ownerCt = this; - } - - this.menu = Ext.menu.MenuMgr.get(this.menu); - this.menu.ownerCt = undefined; - } - - Ext.Button.superclass.initComponent.call(this); - - this.addEvents( - /** - * @event click - * Fires when this button is clicked - * @param {Button} this - * @param {EventObject} e The click event - */ - 'click', - /** - * @event toggle - * Fires when the 'pressed' state of this button changes (only if enableToggle = true) - * @param {Button} this - * @param {Boolean} pressed - */ - 'toggle', - /** - * @event mouseover - * Fires when the mouse hovers over the button - * @param {Button} this - * @param {Event} e The event object - */ - 'mouseover', - /** - * @event mouseout - * Fires when the mouse exits the button - * @param {Button} this - * @param {Event} e The event object - */ - 'mouseout', - /** - * @event menushow - * If this button has a menu, this event fires when it is shown - * @param {Button} this - * @param {Menu} menu - */ - 'menushow', - /** - * @event menuhide - * If this button has a menu, this event fires when it is hidden - * @param {Button} this - * @param {Menu} menu - */ - 'menuhide', - /** - * @event menutriggerover - * If this button has a menu, this event fires when the mouse enters the menu triggering element - * @param {Button} this - * @param {Menu} menu - * @param {EventObject} e - */ - 'menutriggerover', - /** - * @event menutriggerout - * If this button has a menu, this event fires when the mouse leaves the menu triggering element - * @param {Button} this - * @param {Menu} menu - * @param {EventObject} e - */ - 'menutriggerout' - ); - - if(Ext.isString(this.toggleGroup)){ - this.enableToggle = true; - } - }, - -/** - *

      This method returns an Array which provides substitution parameters for the {@link #template Template} used - * to create this Button's DOM structure.

      - *

      Instances or subclasses which use a different Template to create a different DOM structure may need to provide their - * own implementation of this method.

      - *

      The default implementation which provides data for the default {@link #template} returns an Array containing the - * following items:

        - *
      • The <button>'s {@link #type}
      • - *
      • A CSS class name applied to the Button's main <tbody> element which determines the button's scale and icon alignment.
      • - *
      • A CSS class to determine the presence and position of an arrow icon. ('x-btn-arrow' or 'x-btn-arrow-bottom' or '')
      • - *
      • The {@link #cls} CSS class name applied to the button's wrapping <table> element.
      • - *
      • The Component id which is applied to the button's wrapping <table> element.
      • - *
      - * @return {Array} Substitution data for a Template. - */ - getTemplateArgs : function(){ - return [this.type, 'x-btn-' + this.scale + ' x-btn-icon-' + this.scale + '-' + this.iconAlign, this.getMenuClass(), this.cls, this.id]; - }, - - // private - setButtonClass : function(){ - if(this.useSetClass){ - if(!Ext.isEmpty(this.oldCls)){ - this.el.removeClass([this.oldCls, 'x-btn-pressed']); - } - this.oldCls = (this.iconCls || this.icon) ? (this.text ? 'x-btn-text-icon' : 'x-btn-icon') : 'x-btn-noicon'; - this.el.addClass([this.oldCls, this.pressed ? 'x-btn-pressed' : null]); - } - }, - - // protected - getMenuClass : function(){ - return this.menu ? (this.arrowAlign != 'bottom' ? 'x-btn-arrow' : 'x-btn-arrow-bottom') : ''; - }, - - // private - onRender : function(ct, position){ - if(!this.template){ - if(!Ext.Button.buttonTemplate){ - // hideous table template - Ext.Button.buttonTemplate = new Ext.Template( - '', - '', - '', - '', - '
        
        
        
      '); - Ext.Button.buttonTemplate.compile(); - } - this.template = Ext.Button.buttonTemplate; - } - - var btn, targs = this.getTemplateArgs(); - - if(position){ - btn = this.template.insertBefore(position, targs, true); - }else{ - btn = this.template.append(ct, targs, true); - } - /** - * An {@link Ext.Element Element} encapsulating the Button's clickable element. By default, - * this references a <button> element. Read only. - * @type Ext.Element - * @property btnEl - */ - this.btnEl = btn.child(this.buttonSelector); - this.mon(this.btnEl, { - scope: this, - focus: this.onFocus, - blur: this.onBlur - }); - - this.initButtonEl(btn, this.btnEl); - - Ext.ButtonToggleMgr.register(this); - }, - - // private - initButtonEl : function(btn, btnEl){ - this.el = btn; - this.setIcon(this.icon); - this.setText(this.text); - this.setIconClass(this.iconCls); - if(Ext.isDefined(this.tabIndex)){ - btnEl.dom.tabIndex = this.tabIndex; - } - if(this.tooltip){ - this.setTooltip(this.tooltip, true); - } - - if(this.handleMouseEvents){ - this.mon(btn, { - scope: this, - mouseover: this.onMouseOver, - mousedown: this.onMouseDown - }); - - // new functionality for monitoring on the document level - //this.mon(btn, 'mouseout', this.onMouseOut, this); - } - - if(this.menu){ - this.mon(this.menu, { - scope: this, - show: this.onMenuShow, - hide: this.onMenuHide - }); - } - - if(this.repeat){ - var repeater = new Ext.util.ClickRepeater(btn, Ext.isObject(this.repeat) ? this.repeat : {}); - this.mon(repeater, 'click', this.onRepeatClick, this); - }else{ - this.mon(btn, this.clickEvent, this.onClick, this); - } - }, - - // private - afterRender : function(){ - Ext.Button.superclass.afterRender.call(this); - this.useSetClass = true; - this.setButtonClass(); - this.doc = Ext.getDoc(); - this.doAutoWidth(); - }, - - /** - * Sets the CSS class that provides a background image to use as the button's icon. This method also changes - * the value of the {@link iconCls} config internally. - * @param {String} cls The CSS class providing the icon image - * @return {Ext.Button} this - */ - setIconClass : function(cls){ - this.iconCls = cls; - if(this.el){ - this.btnEl.dom.className = ''; - this.btnEl.addClass(['x-btn-text', cls || '']); - this.setButtonClass(); - } - return this; - }, - - /** - * Sets the tooltip for this Button. - * @param {String/Object} tooltip. This may be:
        - *
      • String : A string to be used as innerHTML (html tags are accepted) to show in a tooltip
      • - *
      • Object : A configuration object for {@link Ext.QuickTips#register}.
      • - *
      - * @return {Ext.Button} this - */ - setTooltip : function(tooltip, /* private */ initial){ - if(this.rendered){ - if(!initial){ - this.clearTip(); - } - if(Ext.isObject(tooltip)){ - Ext.QuickTips.register(Ext.apply({ - target: this.btnEl.id - }, tooltip)); - this.tooltip = tooltip; - }else{ - this.btnEl.dom[this.tooltipType] = tooltip; - } - }else{ - this.tooltip = tooltip; - } - return this; - }, - - // private - clearTip : function(){ - if(Ext.isObject(this.tooltip)){ - Ext.QuickTips.unregister(this.btnEl); - } - }, - - // private - beforeDestroy : function(){ - if(this.rendered){ - this.clearTip(); - } - if(this.menu && this.destroyMenu !== false) { - Ext.destroy(this.btnEl, this.menu); - } - Ext.destroy(this.repeater); - }, - - // private - onDestroy : function(){ - if(this.rendered){ - this.doc.un('mouseover', this.monitorMouseOver, this); - this.doc.un('mouseup', this.onMouseUp, this); - delete this.doc; - delete this.btnEl; - Ext.ButtonToggleMgr.unregister(this); - } - Ext.Button.superclass.onDestroy.call(this); - }, - - // private - doAutoWidth : function(){ - if(this.autoWidth !== false && this.el && this.text && this.width === undefined){ - this.el.setWidth('auto'); - if(Ext.isIE7 && Ext.isStrict){ - var ib = this.btnEl; - if(ib && ib.getWidth() > 20){ - ib.clip(); - ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr')); - } - } - if(this.minWidth){ - if(this.el.getWidth() < this.minWidth){ - this.el.setWidth(this.minWidth); - } - } - } - }, - - /** - * Assigns this Button's click handler - * @param {Function} handler The function to call when the button is clicked - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. - * Defaults to this Button. - * @return {Ext.Button} this - */ - setHandler : function(handler, scope){ - this.handler = handler; - this.scope = scope; - return this; - }, - - /** - * Sets this Button's text - * @param {String} text The button text - * @return {Ext.Button} this - */ - setText : function(text){ - this.text = text; - if(this.el){ - this.btnEl.update(text || ' '); - this.setButtonClass(); - } - this.doAutoWidth(); - return this; - }, - - /** - * Sets the background image (inline style) of the button. This method also changes - * the value of the {@link icon} config internally. - * @param {String} icon The path to an image to display in the button - * @return {Ext.Button} this - */ - setIcon : function(icon){ - this.icon = icon; - if(this.el){ - this.btnEl.setStyle('background-image', icon ? 'url(' + icon + ')' : ''); - this.setButtonClass(); - } - return this; - }, - - /** - * Gets the text for this Button - * @return {String} The button text - */ - getText : function(){ - return this.text; - }, - - /** - * If a state it passed, it becomes the pressed state otherwise the current state is toggled. - * @param {Boolean} state (optional) Force a particular state - * @param {Boolean} supressEvent (optional) True to stop events being fired when calling this method. - * @return {Ext.Button} this - */ - toggle : function(state, suppressEvent){ - state = state === undefined ? !this.pressed : !!state; - if(state != this.pressed){ - if(this.rendered){ - this.el[state ? 'addClass' : 'removeClass']('x-btn-pressed'); - } - this.pressed = state; - if(!suppressEvent){ - this.fireEvent('toggle', this, state); - if(this.toggleHandler){ - this.toggleHandler.call(this.scope || this, this, state); - } - } - } - return this; - }, - - // private - onDisable : function(){ - this.onDisableChange(true); - }, - - // private - onEnable : function(){ - this.onDisableChange(false); - }, - - onDisableChange : function(disabled){ - if(this.el){ - if(!Ext.isIE6 || !this.text){ - this.el[disabled ? 'addClass' : 'removeClass'](this.disabledClass); - } - this.el.dom.disabled = disabled; - } - this.disabled = disabled; - }, - - /** - * Show this button's menu (if it has one) - */ - showMenu : function(){ - if(this.rendered && this.menu){ - if(this.tooltip){ - Ext.QuickTips.getQuickTip().cancelShow(this.btnEl); - } - if(this.menu.isVisible()){ - this.menu.hide(); - } - this.menu.ownerCt = this; - this.menu.show(this.el, this.menuAlign); - } - return this; - }, - - /** - * Hide this button's menu (if it has one) - */ - hideMenu : function(){ - if(this.hasVisibleMenu()){ - this.menu.hide(); - } - return this; - }, - - /** - * Returns true if the button has a menu and it is visible - * @return {Boolean} - */ - hasVisibleMenu : function(){ - return this.menu && this.menu.ownerCt == this && this.menu.isVisible(); - }, - - // private - onRepeatClick : function(repeat, e){ - this.onClick(e); - }, - - // private - onClick : function(e){ - if(e){ - e.preventDefault(); - } - if(e.button !== 0){ - return; - } - if(!this.disabled){ - this.doToggle(); - if(this.menu && !this.hasVisibleMenu() && !this.ignoreNextClick){ - this.showMenu(); - } - this.fireEvent('click', this, e); - if(this.handler){ - //this.el.removeClass('x-btn-over'); - this.handler.call(this.scope || this, this, e); - } - } - }, - - // private - doToggle: function(){ - if (this.enableToggle && (this.allowDepress !== false || !this.pressed)) { - this.toggle(); - } - }, - - // private - isMenuTriggerOver : function(e, internal){ - return this.menu && !internal; - }, - - // private - isMenuTriggerOut : function(e, internal){ - return this.menu && !internal; - }, - - // private - onMouseOver : function(e){ - if(!this.disabled){ - var internal = e.within(this.el, true); - if(!internal){ - this.el.addClass('x-btn-over'); - if(!this.monitoringMouseOver){ - this.doc.on('mouseover', this.monitorMouseOver, this); - this.monitoringMouseOver = true; - } - this.fireEvent('mouseover', this, e); - } - if(this.isMenuTriggerOver(e, internal)){ - this.fireEvent('menutriggerover', this, this.menu, e); - } - } - }, - - // private - monitorMouseOver : function(e){ - if(e.target != this.el.dom && !e.within(this.el)){ - if(this.monitoringMouseOver){ - this.doc.un('mouseover', this.monitorMouseOver, this); - this.monitoringMouseOver = false; - } - this.onMouseOut(e); - } - }, - - // private - onMouseOut : function(e){ - var internal = e.within(this.el) && e.target != this.el.dom; - this.el.removeClass('x-btn-over'); - this.fireEvent('mouseout', this, e); - if(this.isMenuTriggerOut(e, internal)){ - this.fireEvent('menutriggerout', this, this.menu, e); - } - }, - - focus : function() { - this.btnEl.focus(); - }, - - blur : function() { - this.btnEl.blur(); - }, - - // private - onFocus : function(e){ - if(!this.disabled){ - this.el.addClass('x-btn-focus'); - } - }, - // private - onBlur : function(e){ - this.el.removeClass('x-btn-focus'); - }, - - // private - getClickEl : function(e, isUp){ - return this.el; - }, - - // private - onMouseDown : function(e){ - if(!this.disabled && e.button === 0){ - this.getClickEl(e).addClass('x-btn-click'); - this.doc.on('mouseup', this.onMouseUp, this); - } - }, - // private - onMouseUp : function(e){ - if(e.button === 0){ - this.getClickEl(e, true).removeClass('x-btn-click'); - this.doc.un('mouseup', this.onMouseUp, this); - } - }, - // private - onMenuShow : function(e){ - if(this.menu.ownerCt == this){ - this.menu.ownerCt = this; - this.ignoreNextClick = 0; - this.el.addClass('x-btn-menu-active'); - this.fireEvent('menushow', this, this.menu); - } - }, - // private - onMenuHide : function(e){ - if(this.menu.ownerCt == this){ - this.el.removeClass('x-btn-menu-active'); - this.ignoreNextClick = this.restoreClick.defer(250, this); - this.fireEvent('menuhide', this, this.menu); - delete this.menu.ownerCt; - } - }, - - // private - restoreClick : function(){ - this.ignoreNextClick = 0; - } - - /** - * @cfg {String} autoEl @hide - */ - /** - * @cfg {String/Object} html @hide - */ - /** - * @cfg {String} contentEl @hide - */ - /** - * @cfg {Mixed} data @hide - */ - /** - * @cfg {Mixed} tpl @hide - */ - /** - * @cfg {String} tplWriteMode @hide - */ -}); -Ext.reg('button', Ext.Button); - -// Private utility class used by Button -Ext.ButtonToggleMgr = function(){ - var groups = {}; - - function toggleGroup(btn, state){ - if(state){ - var g = groups[btn.toggleGroup]; - for(var i = 0, l = g.length; i < l; i++){ - if(g[i] != btn){ - g[i].toggle(false); - } - } - } - } - - return { - register : function(btn){ - if(!btn.toggleGroup){ - return; - } - var g = groups[btn.toggleGroup]; - if(!g){ - g = groups[btn.toggleGroup] = []; - } - g.push(btn); - btn.on('toggle', toggleGroup); - }, - - unregister : function(btn){ - if(!btn.toggleGroup){ - return; - } - var g = groups[btn.toggleGroup]; - if(g){ - g.remove(btn); - btn.un('toggle', toggleGroup); - } - }, - - /** - * Gets the pressed button in the passed group or null - * @param {String} group - * @return Button - */ - getPressed : function(group){ - var g = groups[group]; - if(g){ - for(var i = 0, len = g.length; i < len; i++){ - if(g[i].pressed === true){ - return g[i]; - } - } - } - return null; - } - }; -}(); -/** - * @class Ext.SplitButton - * @extends Ext.Button - * A split button that provides a built-in dropdown arrow that can fire an event separately from the default - * click event of the button. Typically this would be used to display a dropdown menu that provides additional - * options to the primary button action, but any custom handler can provide the arrowclick implementation. Example usage: - *
      
      -// display a dropdown menu:
      -new Ext.SplitButton({
      -	renderTo: 'button-ct', // the container id
      -   	text: 'Options',
      -   	handler: optionsHandler, // handle a click on the button itself
      -   	menu: new Ext.menu.Menu({
      -        items: [
      -        	// these items will render as dropdown menu items when the arrow is clicked:
      -	        {text: 'Item 1', handler: item1Handler},
      -	        {text: 'Item 2', handler: item2Handler}
      -        ]
      -   	})
      -});
      -
      -// Instead of showing a menu, you provide any type of custom
      -// functionality you want when the dropdown arrow is clicked:
      -new Ext.SplitButton({
      -	renderTo: 'button-ct',
      -   	text: 'Options',
      -   	handler: optionsHandler,
      -   	arrowHandler: myCustomHandler
      -});
      -
      - * @cfg {Function} arrowHandler A function called when the arrow button is clicked (can be used instead of click event) - * @cfg {String} arrowTooltip The title attribute of the arrow - * @constructor - * Create a new menu button - * @param {Object} config The config object - * @xtype splitbutton - */ -Ext.SplitButton = Ext.extend(Ext.Button, { - // private - arrowSelector : 'em', - split: true, - - // private - initComponent : function(){ - Ext.SplitButton.superclass.initComponent.call(this); - /** - * @event arrowclick - * Fires when this button's arrow is clicked - * @param {MenuButton} this - * @param {EventObject} e The click event - */ - this.addEvents("arrowclick"); - }, - - // private - onRender : function(){ - Ext.SplitButton.superclass.onRender.apply(this, arguments); - if(this.arrowTooltip){ - this.el.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip; - } - }, - - /** - * Sets this button's arrow click handler. - * @param {Function} handler The function to call when the arrow is clicked - * @param {Object} scope (optional) Scope for the function passed above - */ - setArrowHandler : function(handler, scope){ - this.arrowHandler = handler; - this.scope = scope; - }, - - getMenuClass : function(){ - return 'x-btn-split' + (this.arrowAlign == 'bottom' ? '-bottom' : ''); - }, - - isClickOnArrow : function(e){ - if (this.arrowAlign != 'bottom') { - var visBtn = this.el.child('em.x-btn-split'); - var right = visBtn.getRegion().right - visBtn.getPadding('r'); - return e.getPageX() > right; - } else { - return e.getPageY() > this.btnEl.getRegion().bottom; - } - }, - - // private - onClick : function(e, t){ - e.preventDefault(); - if(!this.disabled){ - if(this.isClickOnArrow(e)){ - if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ - this.showMenu(); - } - this.fireEvent("arrowclick", this, e); - if(this.arrowHandler){ - this.arrowHandler.call(this.scope || this, this, e); - } - }else{ - this.doToggle(); - this.fireEvent("click", this, e); - if(this.handler){ - this.handler.call(this.scope || this, this, e); - } - } - } - }, - - // private - isMenuTriggerOver : function(e){ - return this.menu && e.target.tagName == this.arrowSelector; - }, - - // private - isMenuTriggerOut : function(e, internal){ - return this.menu && e.target.tagName != this.arrowSelector; - } -}); - -Ext.reg('splitbutton', Ext.SplitButton);/** - * @class Ext.CycleButton - * @extends Ext.SplitButton - * A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements. The button automatically - * cycles through each menu item on click, raising the button's {@link #change} event (or calling the button's - * {@link #changeHandler} function, if supplied) for the active menu item. Clicking on the arrow section of the - * button displays the dropdown menu just like a normal SplitButton. Example usage: - *
      
      -var btn = new Ext.CycleButton({
      -    showText: true,
      -    prependText: 'View as ',
      -    items: [{
      -        text:'text only',
      -        iconCls:'view-text',
      -        checked:true
      -    },{
      -        text:'HTML',
      -        iconCls:'view-html'
      -    }],
      -    changeHandler:function(btn, item){
      -        Ext.Msg.alert('Change View', item.text);
      -    }
      -});
      -
      - * @constructor - * Create a new split button - * @param {Object} config The config object - * @xtype cycle - */ -Ext.CycleButton = Ext.extend(Ext.SplitButton, { - /** - * @cfg {Array} items An array of {@link Ext.menu.CheckItem} config objects to be used when creating the - * button's menu items (e.g., {text:'Foo', iconCls:'foo-icon'}) - */ - /** - * @cfg {Boolean} showText True to display the active item's text as the button text (defaults to false) - */ - /** - * @cfg {String} prependText A static string to prepend before the active item's text when displayed as the - * button's text (only applies when showText = true, defaults to '') - */ - /** - * @cfg {Function} changeHandler A callback function that will be invoked each time the active menu - * item in the button's menu has changed. If this callback is not supplied, the SplitButton will instead - * fire the {@link #change} event on active item change. The changeHandler function will be called with the - * following argument list: (SplitButton this, Ext.menu.CheckItem item) - */ - /** - * @cfg {String} forceIcon A css class which sets an image to be used as the static icon for this button. This - * icon will always be displayed regardless of which item is selected in the dropdown list. This overrides the - * default behavior of changing the button's icon to match the selected item's icon on change. - */ - /** - * @property menu - * @type Menu - * The {@link Ext.menu.Menu Menu} object used to display the {@link Ext.menu.CheckItem CheckItems} representing the available choices. - */ - - // private - getItemText : function(item){ - if(item && this.showText === true){ - var text = ''; - if(this.prependText){ - text += this.prependText; - } - text += item.text; - return text; - } - return undefined; - }, - - /** - * Sets the button's active menu item. - * @param {Ext.menu.CheckItem} item The item to activate - * @param {Boolean} suppressEvent True to prevent the button's change event from firing (defaults to false) - */ - setActiveItem : function(item, suppressEvent){ - if(!Ext.isObject(item)){ - item = this.menu.getComponent(item); - } - if(item){ - if(!this.rendered){ - this.text = this.getItemText(item); - this.iconCls = item.iconCls; - }else{ - var t = this.getItemText(item); - if(t){ - this.setText(t); - } - this.setIconClass(item.iconCls); - } - this.activeItem = item; - if(!item.checked){ - item.setChecked(true, suppressEvent); - } - if(this.forceIcon){ - this.setIconClass(this.forceIcon); - } - if(!suppressEvent){ - this.fireEvent('change', this, item); - } - } - }, - - /** - * Gets the currently active menu item. - * @return {Ext.menu.CheckItem} The active item - */ - getActiveItem : function(){ - return this.activeItem; - }, - - // private - initComponent : function(){ - this.addEvents( - /** - * @event change - * Fires after the button's active menu item has changed. Note that if a {@link #changeHandler} function - * is set on this CycleButton, it will be called instead on active item change and this change event will - * not be fired. - * @param {Ext.CycleButton} this - * @param {Ext.menu.CheckItem} item The menu item that was selected - */ - "change" - ); - - if(this.changeHandler){ - this.on('change', this.changeHandler, this.scope||this); - delete this.changeHandler; - } - - this.itemCount = this.items.length; - - this.menu = {cls:'x-cycle-menu', items:[]}; - var checked = 0; - Ext.each(this.items, function(item, i){ - Ext.apply(item, { - group: item.group || this.id, - itemIndex: i, - checkHandler: this.checkHandler, - scope: this, - checked: item.checked || false - }); - this.menu.items.push(item); - if(item.checked){ - checked = i; - } - }, this); - Ext.CycleButton.superclass.initComponent.call(this); - this.on('click', this.toggleSelected, this); - this.setActiveItem(checked, true); - }, - - // private - checkHandler : function(item, pressed){ - if(pressed){ - this.setActiveItem(item); - } - }, - - /** - * This is normally called internally on button click, but can be called externally to advance the button's - * active item programmatically to the next one in the menu. If the current item is the last one in the menu - * the active item will be set to the first item in the menu. - */ - toggleSelected : function(){ - var m = this.menu; - m.render(); - // layout if we haven't before so the items are active - if(!m.hasLayout){ - m.doLayout(); - } - - var nextIdx, checkItem; - for (var i = 1; i < this.itemCount; i++) { - nextIdx = (this.activeItem.itemIndex + i) % this.itemCount; - // check the potential item - checkItem = m.items.itemAt(nextIdx); - // if its not disabled then check it. - if (!checkItem.disabled) { - checkItem.setChecked(true); - break; - } - } - } -}); -Ext.reg('cycle', Ext.CycleButton); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-buttons.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-buttons.js deleted file mode 100644 index f90e8e9f17e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-buttons.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.Button=Ext.extend(Ext.BoxComponent,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr:nth(2)",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first-child",scale:"small",iconAlign:"left",arrowAlign:"right",initComponent:function(){if(this.menu){if(Ext.isArray(this.menu)){this.menu={items:this.menu}}if(Ext.isObject(this.menu)){this.menu.ownerCt=this}this.menu=Ext.menu.MenuMgr.get(this.menu);this.menu.ownerCt=undefined}Ext.Button.superclass.initComponent.call(this);this.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(Ext.isString(this.toggleGroup)){this.enableToggle=true}},getTemplateArgs:function(){return[this.type,"x-btn-"+this.scale+" x-btn-icon-"+this.scale+"-"+this.iconAlign,this.getMenuClass(),this.cls,this.id]},setButtonClass:function(){if(this.useSetClass){if(!Ext.isEmpty(this.oldCls)){this.el.removeClass([this.oldCls,"x-btn-pressed"])}this.oldCls=(this.iconCls||this.icon)?(this.text?"x-btn-text-icon":"x-btn-icon"):"x-btn-noicon";this.el.addClass([this.oldCls,this.pressed?"x-btn-pressed":null])}},getMenuClass:function(){return this.menu?(this.arrowAlign!="bottom"?"x-btn-arrow":"x-btn-arrow-bottom"):""},onRender:function(c,a){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('','','','',"
        
        
        
      ");Ext.Button.buttonTemplate.compile()}this.template=Ext.Button.buttonTemplate}var b,d=this.getTemplateArgs();if(a){b=this.template.insertBefore(a,d,true)}else{b=this.template.append(c,d,true)}this.btnEl=b.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});this.initButtonEl(b,this.btnEl);Ext.ButtonToggleMgr.register(this)},initButtonEl:function(b,c){this.el=b;this.setIcon(this.icon);this.setText(this.text);this.setIconClass(this.iconCls);if(Ext.isDefined(this.tabIndex)){c.dom.tabIndex=this.tabIndex}if(this.tooltip){this.setTooltip(this.tooltip,true)}if(this.handleMouseEvents){this.mon(b,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown})}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide})}if(this.repeat){var a=new Ext.util.ClickRepeater(b,Ext.isObject(this.repeat)?this.repeat:{});this.mon(a,"click",this.onRepeatClick,this)}else{this.mon(b,this.clickEvent,this.onClick,this)}},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.useSetClass=true;this.setButtonClass();this.doc=Ext.getDoc();this.doAutoWidth()},setIconClass:function(a){this.iconCls=a;if(this.el){this.btnEl.dom.className="";this.btnEl.addClass(["x-btn-text",a||""]);this.setButtonClass()}return this},setTooltip:function(b,a){if(this.rendered){if(!a){this.clearTip()}if(Ext.isObject(b)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},b));this.tooltip=b}else{this.btnEl.dom[this.tooltipType]=b}}else{this.tooltip=b}return this},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl)}},beforeDestroy:function(){if(this.rendered){this.clearTip()}if(this.menu&&this.destroyMenu!==false){Ext.destroy(this.btnEl,this.menu)}Ext.destroy(this.repeater)},onDestroy:function(){if(this.rendered){this.doc.un("mouseover",this.monitorMouseOver,this);this.doc.un("mouseup",this.onMouseUp,this);delete this.doc;delete this.btnEl;Ext.ButtonToggleMgr.unregister(this)}Ext.Button.superclass.onDestroy.call(this)},doAutoWidth:function(){if(this.autoWidth!==false&&this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var a=this.btnEl;if(a&&a.getWidth()>20){a.clip();a.setWidth(Ext.util.TextMetrics.measure(a,this.text).width+a.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()a}else{return c.getPageY()>this.btnEl.getRegion().bottom}},onClick:function(b,a){b.preventDefault();if(!this.disabled){if(this.isClickOnArrow(b)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("arrowclick",this,b);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,b)}}else{this.doToggle();this.fireEvent("click",this,b);if(this.handler){this.handler.call(this.scope||this,this,b)}}}},isMenuTriggerOver:function(a){return this.menu&&a.target.tagName==this.arrowSelector},isMenuTriggerOut:function(b,a){return this.menu&&b.target.tagName!=this.arrowSelector}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(a){if(a&&this.showText===true){var b="";if(this.prependText){b+=this.prependText}b+=a.text;return b}return undefined},setActiveItem:function(c,a){if(!Ext.isObject(c)){c=this.menu.getComponent(c)}if(c){if(!this.rendered){this.text=this.getItemText(c);this.iconCls=c.iconCls}else{var b=this.getItemText(c);if(b){this.setText(b)}this.setIconClass(c.iconCls)}this.activeItem=c;if(!c.checked){c.setChecked(true,a)}if(this.forceIcon){this.setIconClass(this.forceIcon)}if(!a){this.fireEvent("change",this,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var a=0;Ext.each(this.items,function(c,b){Ext.apply(c,{group:c.group||this.id,itemIndex:b,checkHandler:this.checkHandler,scope:this,checked:c.checked||false});this.menu.items.push(c);if(c.checked){a=b}},this);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this);this.setActiveItem(a,true)},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var a=this.menu;a.render();if(!a.hasLayout){a.doLayout()}var d,b;for(var c=1;c - is released under the MIT License -*/ - -var swfobject = function() { - - var UNDEF = "undefined", - OBJECT = "object", - SHOCKWAVE_FLASH = "Shockwave Flash", - SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", - FLASH_MIME_TYPE = "application/x-shockwave-flash", - EXPRESS_INSTALL_ID = "SWFObjectExprInst", - ON_READY_STATE_CHANGE = "onreadystatechange", - - win = window, - doc = document, - nav = navigator, - - plugin = false, - domLoadFnArr = [main], - regObjArr = [], - objIdArr = [], - listenersArr = [], - storedAltContent, - storedAltContentId, - storedCallbackFn, - storedCallbackObj, - isDomLoaded = false, - isExpressInstallActive = false, - dynamicStylesheet, - dynamicStylesheetMedia, - autoHideShow = true, - - /* Centralized function for browser feature detection - - User agent string detection is only used when no good alternative is possible - - Is executed directly for optimal performance - */ - ua = function() { - var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, - u = nav.userAgent.toLowerCase(), - p = nav.platform.toLowerCase(), - windows = p ? (/win/).test(p) : /win/.test(u), - mac = p ? (/mac/).test(p) : /mac/.test(u), - webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit - ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html - playerVersion = [0,0,0], - d = null; - if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { - d = nav.plugins[SHOCKWAVE_FLASH].description; - if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+ - plugin = true; - ie = false; // cascaded feature detection for Internet Explorer - d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); - playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); - playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); - playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0; - } - } - else if (typeof win.ActiveXObject != UNDEF) { - try { - var a = new ActiveXObject(SHOCKWAVE_FLASH_AX); - if (a) { // a will return null when ActiveX is disabled - d = a.GetVariable("$version"); - if (d) { - ie = true; // cascaded feature detection for Internet Explorer - d = d.split(" ")[1].split(","); - playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; - } - } - } - catch(e) {} - } - return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac }; - }(), - - /* Cross-browser onDomLoad - - Will fire an event as soon as the DOM of a web page is loaded - - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/ - - Regular onload serves as fallback - */ - onDomLoad = function() { - if (!ua.w3) { return; } - if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically - callDomLoadFunctions(); - } - if (!isDomLoaded) { - if (typeof doc.addEventListener != UNDEF) { - doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false); - } - if (ua.ie && ua.win) { - doc.attachEvent(ON_READY_STATE_CHANGE, function() { - if (doc.readyState == "complete") { - doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee); - callDomLoadFunctions(); - } - }); - if (win == top) { // if not inside an iframe - (function(){ - if (isDomLoaded) { return; } - try { - doc.documentElement.doScroll("left"); - } - catch(e) { - setTimeout(arguments.callee, 0); - return; - } - callDomLoadFunctions(); - })(); - } - } - if (ua.wk) { - (function(){ - if (isDomLoaded) { return; } - if (!(/loaded|complete/).test(doc.readyState)) { - setTimeout(arguments.callee, 0); - return; - } - callDomLoadFunctions(); - })(); - } - addLoadEvent(callDomLoadFunctions); - } - }(); - - function callDomLoadFunctions() { - if (isDomLoaded) { return; } - try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early - var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span")); - t.parentNode.removeChild(t); - } - catch (e) { return; } - isDomLoaded = true; - var dl = domLoadFnArr.length; - for (var i = 0; i < dl; i++) { - domLoadFnArr[i](); - } - } - - function addDomLoadEvent(fn) { - if (isDomLoaded) { - fn(); - } - else { - domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+ - } - } - - /* Cross-browser onload - - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/ - - Will fire an event as soon as a web page including all of its assets are loaded - */ - function addLoadEvent(fn) { - if (typeof win.addEventListener != UNDEF) { - win.addEventListener("load", fn, false); - } - else if (typeof doc.addEventListener != UNDEF) { - doc.addEventListener("load", fn, false); - } - else if (typeof win.attachEvent != UNDEF) { - addListener(win, "onload", fn); - } - else if (typeof win.onload == "function") { - var fnOld = win.onload; - win.onload = function() { - fnOld(); - fn(); - }; - } - else { - win.onload = fn; - } - } - - /* Main function - - Will preferably execute onDomLoad, otherwise onload (as a fallback) - */ - function main() { - if (plugin) { - testPlayerVersion(); - } - else { - matchVersions(); - } - } - - /* Detect the Flash Player version for non-Internet Explorer browsers - - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description: - a. Both release and build numbers can be detected - b. Avoid wrong descriptions by corrupt installers provided by Adobe - c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports - - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available - */ - function testPlayerVersion() { - var b = doc.getElementsByTagName("body")[0]; - var o = createElement(OBJECT); - o.setAttribute("type", FLASH_MIME_TYPE); - var t = b.appendChild(o); - if (t) { - var counter = 0; - (function(){ - if (typeof t.GetVariable != UNDEF) { - var d = t.GetVariable("$version"); - if (d) { - d = d.split(" ")[1].split(","); - ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; - } - } - else if (counter < 10) { - counter++; - setTimeout(arguments.callee, 10); - return; - } - b.removeChild(o); - t = null; - matchVersions(); - })(); - } - else { - matchVersions(); - } - } - - /* Perform Flash Player and SWF version matching; static publishing only - */ - function matchVersions() { - var rl = regObjArr.length; - if (rl > 0) { - for (var i = 0; i < rl; i++) { // for each registered object element - var id = regObjArr[i].id; - var cb = regObjArr[i].callbackFn; - var cbObj = {success:false, id:id}; - if (ua.pv[0] > 0) { - var obj = getElementById(id); - if (obj) { - if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match! - setVisibility(id, true); - if (cb) { - cbObj.success = true; - cbObj.ref = getObjectById(id); - cb(cbObj); - } - } - else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported - var att = {}; - att.data = regObjArr[i].expressInstall; - att.width = obj.getAttribute("width") || "0"; - att.height = obj.getAttribute("height") || "0"; - if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); } - if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); } - // parse HTML object param element's name-value pairs - var par = {}; - var p = obj.getElementsByTagName("param"); - var pl = p.length; - for (var j = 0; j < pl; j++) { - if (p[j].getAttribute("name").toLowerCase() != "movie") { - par[p[j].getAttribute("name")] = p[j].getAttribute("value"); - } - } - showExpressInstall(att, par, id, cb); - } - else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF - displayAltContent(obj); - if (cb) { cb(cbObj); } - } - } - } - else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content) - setVisibility(id, true); - if (cb) { - var o = getObjectById(id); // test whether there is an HTML object element or not - if (o && typeof o.SetVariable != UNDEF) { - cbObj.success = true; - cbObj.ref = o; - } - cb(cbObj); - } - } - } - } - } - - function getObjectById(objectIdStr) { - var r = null; - var o = getElementById(objectIdStr); - if (o && o.nodeName == "OBJECT") { - if (typeof o.SetVariable != UNDEF) { - r = o; - } - else { - var n = o.getElementsByTagName(OBJECT)[0]; - if (n) { - r = n; - } - } - } - return r; - } - - /* Requirements for Adobe Express Install - - only one instance can be active at a time - - fp 6.0.65 or higher - - Win/Mac OS only - - no Webkit engines older than version 312 - */ - function canExpressInstall() { - return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312); - } - - /* Show the Adobe Express Install dialog - - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75 - */ - function showExpressInstall(att, par, replaceElemIdStr, callbackFn) { - isExpressInstallActive = true; - storedCallbackFn = callbackFn || null; - storedCallbackObj = {success:false, id:replaceElemIdStr}; - var obj = getElementById(replaceElemIdStr); - if (obj) { - if (obj.nodeName == "OBJECT") { // static publishing - storedAltContent = abstractAltContent(obj); - storedAltContentId = null; - } - else { // dynamic publishing - storedAltContent = obj; - storedAltContentId = replaceElemIdStr; - } - att.id = EXPRESS_INSTALL_ID; - if (typeof att.width == UNDEF || (!(/%$/).test(att.width) && parseInt(att.width, 10) < 310)) { - att.width = "310"; - } - - if (typeof att.height == UNDEF || (!(/%$/).test(att.height) && parseInt(att.height, 10) < 137)) { - att.height = "137"; - } - doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; - var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", - fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title; - if (typeof par.flashvars != UNDEF) { - par.flashvars += "&" + fv; - } - else { - par.flashvars = fv; - } - // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it, - // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work - if (ua.ie && ua.win && obj.readyState != 4) { - var newObj = createElement("div"); - replaceElemIdStr += "SWFObjectNew"; - newObj.setAttribute("id", replaceElemIdStr); - obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf - obj.style.display = "none"; - (function(){ - if (obj.readyState == 4) { - obj.parentNode.removeChild(obj); - } - else { - setTimeout(arguments.callee, 10); - } - })(); - } - createSWF(att, par, replaceElemIdStr); - } - } - - /* Functions to abstract and display alternative content - */ - function displayAltContent(obj) { - if (ua.ie && ua.win && obj.readyState != 4) { - // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it, - // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work - var el = createElement("div"); - obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content - el.parentNode.replaceChild(abstractAltContent(obj), el); - obj.style.display = "none"; - (function(){ - if (obj.readyState == 4) { - obj.parentNode.removeChild(obj); - } - else { - setTimeout(arguments.callee, 10); - } - })(); - } - else { - obj.parentNode.replaceChild(abstractAltContent(obj), obj); - } - } - - function abstractAltContent(obj) { - var ac = createElement("div"); - if (ua.win && ua.ie) { - ac.innerHTML = obj.innerHTML; - } - else { - var nestedObj = obj.getElementsByTagName(OBJECT)[0]; - if (nestedObj) { - var c = nestedObj.childNodes; - if (c) { - var cl = c.length; - for (var i = 0; i < cl; i++) { - if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) { - ac.appendChild(c[i].cloneNode(true)); - } - } - } - } - } - return ac; - } - - /* Cross-browser dynamic SWF creation - */ - function createSWF(attObj, parObj, id) { - var r, el = getElementById(id); - if (ua.wk && ua.wk < 312) { return r; } - if (el) { - if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content - attObj.id = id; - } - if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML - var att = ""; - for (var i in attObj) { - if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries - if (i.toLowerCase() == "data") { - parObj.movie = attObj[i]; - } - else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword - att += ' class="' + attObj[i] + '"'; - } - else if (i.toLowerCase() != "classid") { - att += ' ' + i + '="' + attObj[i] + '"'; - } - } - } - var par = ""; - for (var j in parObj) { - if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries - par += ''; - } - } - el.outerHTML = '' + par + ''; - objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only) - r = getElementById(attObj.id); - } - else { // well-behaving browsers - var o = createElement(OBJECT); - o.setAttribute("type", FLASH_MIME_TYPE); - for (var m in attObj) { - if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries - if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword - o.setAttribute("class", attObj[m]); - } - else if (m.toLowerCase() != "classid") { // filter out IE specific attribute - o.setAttribute(m, attObj[m]); - } - } - } - for (var n in parObj) { - if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element - createObjParam(o, n, parObj[n]); - } - } - el.parentNode.replaceChild(o, el); - r = o; - } - } - return r; - } - - function createObjParam(el, pName, pValue) { - var p = createElement("param"); - p.setAttribute("name", pName); - p.setAttribute("value", pValue); - el.appendChild(p); - } - - /* Cross-browser SWF removal - - Especially needed to safely and completely remove a SWF in Internet Explorer - */ - function removeSWF(id) { - var obj = getElementById(id); - if (obj && obj.nodeName == "OBJECT") { - if (ua.ie && ua.win) { - obj.style.display = "none"; - (function(){ - if (obj.readyState == 4) { - removeObjectInIE(id); - } - else { - setTimeout(arguments.callee, 10); - } - })(); - } - else { - obj.parentNode.removeChild(obj); - } - } - } - - function removeObjectInIE(id) { - var obj = getElementById(id); - if (obj) { - for (var i in obj) { - if (typeof obj[i] == "function") { - obj[i] = null; - } - } - obj.parentNode.removeChild(obj); - } - } - - /* Functions to optimize JavaScript compression - */ - function getElementById(id) { - var el = null; - try { - el = doc.getElementById(id); - } - catch (e) {} - return el; - } - - function createElement(el) { - return doc.createElement(el); - } - - /* Updated attachEvent function for Internet Explorer - - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks - */ - function addListener(target, eventType, fn) { - target.attachEvent(eventType, fn); - listenersArr[listenersArr.length] = [target, eventType, fn]; - } - - /* Flash Player and SWF content version matching - */ - function hasPlayerVersion(rv) { - var pv = ua.pv, v = rv.split("."); - v[0] = parseInt(v[0], 10); - v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0" - v[2] = parseInt(v[2], 10) || 0; - return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; - } - - /* Cross-browser dynamic CSS creation - - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php - */ - function createCSS(sel, decl, media, newStyle) { - if (ua.ie && ua.mac) { return; } - var h = doc.getElementsByTagName("head")[0]; - if (!h) { return; } // to also support badly authored HTML pages that lack a head element - var m = (media && typeof media == "string") ? media : "screen"; - if (newStyle) { - dynamicStylesheet = null; - dynamicStylesheetMedia = null; - } - if (!dynamicStylesheet || dynamicStylesheetMedia != m) { - // create dynamic stylesheet + get a global reference to it - var s = createElement("style"); - s.setAttribute("type", "text/css"); - s.setAttribute("media", m); - dynamicStylesheet = h.appendChild(s); - if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) { - dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1]; - } - dynamicStylesheetMedia = m; - } - // add style rule - if (ua.ie && ua.win) { - if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) { - dynamicStylesheet.addRule(sel, decl); - } - } - else { - if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) { - dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}")); - } - } - } - - function setVisibility(id, isVisible) { - if (!autoHideShow) { return; } - var v = isVisible ? "visible" : "hidden"; - if (isDomLoaded && getElementById(id)) { - getElementById(id).style.visibility = v; - } - else { - createCSS("#" + id, "visibility:" + v); - } - } - - /* Filter to avoid XSS attacks - */ - function urlEncodeIfNecessary(s) { - var regex = /[\\\"<>\.;]/; - var hasBadChars = regex.exec(s) != null; - return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; - } - - /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only) - */ - var cleanup = function() { - if (ua.ie && ua.win) { - window.attachEvent("onunload", function() { - // remove listeners to avoid memory leaks - var ll = listenersArr.length; - for (var i = 0; i < ll; i++) { - listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]); - } - // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect - var il = objIdArr.length; - for (var j = 0; j < il; j++) { - removeSWF(objIdArr[j]); - } - // cleanup library's main closures to avoid memory leaks - for (var k in ua) { - ua[k] = null; - } - ua = null; - for (var l in swfobject) { - swfobject[l] = null; - } - swfobject = null; - window.detachEvent('onunload', arguments.callee); - }); - } - }(); - - return { - /* Public API - - Reference: http://code.google.com/p/swfobject/wiki/documentation - */ - registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) { - if (ua.w3 && objectIdStr && swfVersionStr) { - var regObj = {}; - regObj.id = objectIdStr; - regObj.swfVersion = swfVersionStr; - regObj.expressInstall = xiSwfUrlStr; - regObj.callbackFn = callbackFn; - regObjArr[regObjArr.length] = regObj; - setVisibility(objectIdStr, false); - } - else if (callbackFn) { - callbackFn({success:false, id:objectIdStr}); - } - }, - - getObjectById: function(objectIdStr) { - if (ua.w3) { - return getObjectById(objectIdStr); - } - }, - - embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) { - var callbackObj = {success:false, id:replaceElemIdStr}; - if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) { - setVisibility(replaceElemIdStr, false); - addDomLoadEvent(function() { - widthStr += ""; // auto-convert to string - heightStr += ""; - var att = {}; - if (attObj && typeof attObj === OBJECT) { - for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs - att[i] = attObj[i]; - } - } - att.data = swfUrlStr; - att.width = widthStr; - att.height = heightStr; - var par = {}; - if (parObj && typeof parObj === OBJECT) { - for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs - par[j] = parObj[j]; - } - } - if (flashvarsObj && typeof flashvarsObj === OBJECT) { - for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs - if (typeof par.flashvars != UNDEF) { - par.flashvars += "&" + k + "=" + flashvarsObj[k]; - } - else { - par.flashvars = k + "=" + flashvarsObj[k]; - } - } - } - if (hasPlayerVersion(swfVersionStr)) { // create SWF - var obj = createSWF(att, par, replaceElemIdStr); - if (att.id == replaceElemIdStr) { - setVisibility(replaceElemIdStr, true); - } - callbackObj.success = true; - callbackObj.ref = obj; - } - else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install - att.data = xiSwfUrlStr; - showExpressInstall(att, par, replaceElemIdStr, callbackFn); - return; - } - else { // show alternative content - setVisibility(replaceElemIdStr, true); - } - if (callbackFn) { callbackFn(callbackObj); } - }); - } - else if (callbackFn) { callbackFn(callbackObj); } - }, - - switchOffAutoHideShow: function() { - autoHideShow = false; - }, - - ua: ua, - - getFlashPlayerVersion: function() { - return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; - }, - - hasFlashPlayerVersion: hasPlayerVersion, - - createSWF: function(attObj, parObj, replaceElemIdStr) { - if (ua.w3) { - return createSWF(attObj, parObj, replaceElemIdStr); - } - else { - return undefined; - } - }, - - showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) { - if (ua.w3 && canExpressInstall()) { - showExpressInstall(att, par, replaceElemIdStr, callbackFn); - } - }, - - removeSWF: function(objElemIdStr) { - if (ua.w3) { - removeSWF(objElemIdStr); - } - }, - - createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) { - if (ua.w3) { - createCSS(selStr, declStr, mediaStr, newStyleBoolean); - } - }, - - addDomLoadEvent: addDomLoadEvent, - - addLoadEvent: addLoadEvent, - - getQueryParamValue: function(param) { - var q = doc.location.search || doc.location.hash; - if (q) { - if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark - if (param == null) { - return urlEncodeIfNecessary(q); - } - var pairs = q.split("&"); - for (var i = 0; i < pairs.length; i++) { - if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { - return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1))); - } - } - } - return ""; - }, - - // For internal usage only - expressInstallCallback: function() { - if (isExpressInstallActive) { - var obj = getElementById(EXPRESS_INSTALL_ID); - if (obj && storedAltContent) { - obj.parentNode.replaceChild(storedAltContent, obj); - if (storedAltContentId) { - setVisibility(storedAltContentId, true); - if (ua.ie && ua.win) { storedAltContent.style.display = "block"; } - } - if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); } - } - isExpressInstallActive = false; - } - } - }; -}(); -/** - * @class Ext.FlashComponent - * @extends Ext.BoxComponent - * @constructor - * @xtype flash - */ -Ext.FlashComponent = Ext.extend(Ext.BoxComponent, { - /** - * @cfg {String} flashVersion - * Indicates the version the flash content was published for. Defaults to '9.0.115'. - */ - flashVersion : '9.0.115', - - /** - * @cfg {String} backgroundColor - * The background color of the chart. Defaults to '#ffffff'. - */ - backgroundColor: '#ffffff', - - /** - * @cfg {String} wmode - * The wmode of the flash object. This can be used to control layering. Defaults to 'opaque'. - */ - wmode: 'opaque', - - /** - * @cfg {Object} flashVars - * A set of key value pairs to be passed to the flash object as flash variables. Defaults to undefined. - */ - flashVars: undefined, - - /** - * @cfg {Object} flashParams - * A set of key value pairs to be passed to the flash object as parameters. Possible parameters can be found here: - * http://kb2.adobe.com/cps/127/tn_12701.html Defaults to undefined. - */ - flashParams: undefined, - - /** - * @cfg {String} url - * The URL of the chart to include. Defaults to undefined. - */ - url: undefined, - swfId : undefined, - swfWidth: '100%', - swfHeight: '100%', - - /** - * @cfg {Boolean} expressInstall - * True to prompt the user to install flash if not installed. Note that this uses - * Ext.FlashComponent.EXPRESS_INSTALL_URL, which should be set to the local resource. Defaults to false. - */ - expressInstall: false, - - initComponent : function(){ - Ext.FlashComponent.superclass.initComponent.call(this); - - this.addEvents( - /** - * @event initialize - * - * @param {Chart} this - */ - 'initialize' - ); - }, - - onRender : function(){ - Ext.FlashComponent.superclass.onRender.apply(this, arguments); - - var params = Ext.apply({ - allowScriptAccess: 'always', - bgcolor: this.backgroundColor, - wmode: this.wmode - }, this.flashParams), vars = Ext.apply({ - allowedDomain: document.location.hostname, - YUISwfId: this.getId(), - YUIBridgeCallback: 'Ext.FlashEventProxy.onEvent' - }, this.flashVars); - - new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion, - this.expressInstall ? Ext.FlashComponent.EXPRESS_INSTALL_URL : undefined, vars, params); - - this.swf = Ext.getDom(this.id); - this.el = Ext.get(this.swf); - }, - - getSwfId : function(){ - return this.swfId || (this.swfId = "extswf" + (++Ext.Component.AUTO_ID)); - }, - - getId : function(){ - return this.id || (this.id = "extflashcmp" + (++Ext.Component.AUTO_ID)); - }, - - onFlashEvent : function(e){ - switch(e.type){ - case "swfReady": - this.initSwf(); - return; - case "log": - return; - } - e.component = this; - this.fireEvent(e.type.toLowerCase().replace(/event$/, ''), e); - }, - - initSwf : function(){ - this.onSwfReady(!!this.isInitialized); - this.isInitialized = true; - this.fireEvent('initialize', this); - }, - - beforeDestroy: function(){ - if(this.rendered){ - swfobject.removeSWF(this.swf.id); - } - Ext.FlashComponent.superclass.beforeDestroy.call(this); - }, - - onSwfReady : Ext.emptyFn -}); - -/** - * Sets the url for installing flash if it doesn't exist. This should be set to a local resource. - * @static - * @type String - */ -Ext.FlashComponent.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf'; - -Ext.reg('flash', Ext.FlashComponent);/** - * @class Ext.FlashProxy - * @singleton - */ -Ext.FlashEventProxy = { - onEvent : function(id, e){ - var fp = Ext.getCmp(id); - if(fp){ - fp.onFlashEvent(e); - }else{ - arguments.callee.defer(10, this, [id, e]); - } - } -};/** - * @class Ext.chart.Chart - * @extends Ext.FlashComponent - * The Ext.chart package provides the capability to visualize data with flash based charting. - * Each chart binds directly to an Ext.data.Store enabling automatic updates of the chart. - * To change the look and feel of a chart, see the {@link #chartStyle} and {@link #extraStyle} config options. - * @constructor - * @xtype chart - */ - - Ext.chart.Chart = Ext.extend(Ext.FlashComponent, { - refreshBuffer: 100, - - /** - * @cfg {String} backgroundColor - * @hide - */ - - /** - * @cfg {Object} chartStyle - * Sets styles for this chart. This contains default styling, so modifying this property will override - * the built in styles of the chart. Use {@link #extraStyle} to add customizations to the default styling. - */ - chartStyle: { - padding: 10, - animationEnabled: true, - font: { - name: 'Tahoma', - color: 0x444444, - size: 11 - }, - dataTip: { - padding: 5, - border: { - color: 0x99bbe8, - size:1 - }, - background: { - color: 0xDAE7F6, - alpha: .9 - }, - font: { - name: 'Tahoma', - color: 0x15428B, - size: 10, - bold: true - } - } - }, - - /** - * @cfg {String} url - * The url to load the chart from. This defaults to Ext.chart.Chart.CHART_URL, which should - * be modified to point to the local charts resource. - */ - - /** - * @cfg {Object} extraStyle - * Contains extra styles that will be added or overwritten to the default chartStyle. Defaults to null. - * For a detailed list of the options available, visit the YUI Charts site - * at http://developer.yahoo.com/yui/charts/#basicstyles
      - * Some of the options availabe:
      - *
        - *
      • padding - The space around the edge of the chart's contents. Padding does not increase the size of the chart.
      • - *
      • animationEnabled - A Boolean value that specifies whether marker animations are enabled or not. Enabled by default.
      • - *
      • font - An Object defining the font style to be used in the chart. Defaults to { name: 'Tahoma', color: 0x444444, size: 11 }
        - *
          - *
        • name - font name
        • - *
        • color - font color (hex code, ie: "#ff0000", "ff0000" or 0xff0000)
        • - *
        • size - font size in points (numeric portion only, ie: 11)
        • - *
        • bold - boolean
        • - *
        • italic - boolean
        • - *
        • underline - boolean
        • - *
        - *
      • - *
      • border - An object defining the border style around the chart. The chart itself will decrease in dimensions to accomodate the border.
        - *
          - *
        • color - border color (hex code, ie: "#ff0000", "ff0000" or 0xff0000)
        • - *
        • size - border size in pixels (numeric portion only, ie: 1)
        • - *
        - *
      • - *
      • background - An object defining the background style of the chart.
        - *
          - *
        • color - border color (hex code, ie: "#ff0000", "ff0000" or 0xff0000)
        • - *
        • image - an image URL. May be relative to the current document or absolute.
        • - *
        - *
      • - *
      • legend - An object defining the legend style
        - *
          - *
        • display - location of the legend. Possible values are "none", "left", "right", "top", and "bottom".
        • - *
        • spacing - an image URL. May be relative to the current document or absolute.
        • - *
        • padding, border, background, font - same options as described above.
        • - *
      • - *
      • dataTip - An object defining the style of the data tip (tooltip).
        - *
          - *
        • padding, border, background, font - same options as described above.
        • - *
      • - *
      • xAxis and yAxis - An object defining the style of the style of either axis.
        - *
          - *
        • color - same option as described above.
        • - *
        • size - same option as described above.
        • - *
        • showLabels - boolean
        • - *
        • labelRotation - a value in degrees from -90 through 90. Default is zero.
        • - *
      • - *
      • majorGridLines and minorGridLines - An object defining the style of the style of the grid lines.
        - *
          - *
        • color, size - same options as described above.
        • - *
      • - *
      • zeroGridLine - An object defining the style of the style of the zero grid line.
        - *
          - *
        • color, size - same options as described above.
        • - *
      • - *
      • majorTicks and minorTicks - An object defining the style of the style of ticks in the chart.
        - *
          - *
        • color, size - same options as described above.
        • - *
        • length - the length of each tick in pixels extending from the axis.
        • - *
        • display - how the ticks are drawn. Possible values are "none", "inside", "outside", and "cross".
        • - *
      • - *
      - */ - extraStyle: null, - - /** - * @cfg {Object} seriesStyles - * Contains styles to apply to the series after a refresh. Defaults to null. - */ - seriesStyles: null, - - /** - * @cfg {Boolean} disableCaching - * True to add a "cache buster" to the end of the chart url. Defaults to true for Opera and IE. - */ - disableCaching: Ext.isIE || Ext.isOpera, - disableCacheParam: '_dc', - - initComponent : function(){ - Ext.chart.Chart.superclass.initComponent.call(this); - if(!this.url){ - this.url = Ext.chart.Chart.CHART_URL; - } - if(this.disableCaching){ - this.url = Ext.urlAppend(this.url, String.format('{0}={1}', this.disableCacheParam, new Date().getTime())); - } - this.addEvents( - 'itemmouseover', - 'itemmouseout', - 'itemclick', - 'itemdoubleclick', - 'itemdragstart', - 'itemdrag', - 'itemdragend', - /** - * @event beforerefresh - * Fires before a refresh to the chart data is called. If the beforerefresh handler returns - * false the {@link #refresh} action will be cancelled. - * @param {Chart} this - */ - 'beforerefresh', - /** - * @event refresh - * Fires after the chart data has been refreshed. - * @param {Chart} this - */ - 'refresh' - ); - this.store = Ext.StoreMgr.lookup(this.store); - }, - - /** - * Sets a single style value on the Chart instance. - * - * @param name {String} Name of the Chart style value to change. - * @param value {Object} New value to pass to the Chart style. - */ - setStyle: function(name, value){ - this.swf.setStyle(name, Ext.encode(value)); - }, - - /** - * Resets all styles on the Chart instance. - * - * @param styles {Object} Initializer for all Chart styles. - */ - setStyles: function(styles){ - this.swf.setStyles(Ext.encode(styles)); - }, - - /** - * Sets the styles on all series in the Chart. - * - * @param styles {Array} Initializer for all Chart series styles. - */ - setSeriesStyles: function(styles){ - this.seriesStyles = styles; - var s = []; - Ext.each(styles, function(style){ - s.push(Ext.encode(style)); - }); - this.swf.setSeriesStyles(s); - }, - - setCategoryNames : function(names){ - this.swf.setCategoryNames(names); - }, - - setLegendRenderer : function(fn, scope){ - var chart = this; - scope = scope || chart; - chart.removeFnProxy(chart.legendFnName); - chart.legendFnName = chart.createFnProxy(function(name){ - return fn.call(scope, name); - }); - chart.swf.setLegendLabelFunction(chart.legendFnName); - }, - - setTipRenderer : function(fn, scope){ - var chart = this; - scope = scope || chart; - chart.removeFnProxy(chart.tipFnName); - chart.tipFnName = chart.createFnProxy(function(item, index, series){ - var record = chart.store.getAt(index); - return fn.call(scope, chart, record, index, series); - }); - chart.swf.setDataTipFunction(chart.tipFnName); - }, - - setSeries : function(series){ - this.series = series; - this.refresh(); - }, - - /** - * Changes the data store bound to this chart and refreshes it. - * @param {Store} store The store to bind to this chart - */ - bindStore : function(store, initial){ - if(!initial && this.store){ - if(store !== this.store && this.store.autoDestroy){ - this.store.destroy(); - }else{ - this.store.un("datachanged", this.refresh, this); - this.store.un("add", this.delayRefresh, this); - this.store.un("remove", this.delayRefresh, this); - this.store.un("update", this.delayRefresh, this); - this.store.un("clear", this.refresh, this); - } - } - if(store){ - store = Ext.StoreMgr.lookup(store); - store.on({ - scope: this, - datachanged: this.refresh, - add: this.delayRefresh, - remove: this.delayRefresh, - update: this.delayRefresh, - clear: this.refresh - }); - } - this.store = store; - if(store && !initial){ - this.refresh(); - } - }, - - onSwfReady : function(isReset){ - Ext.chart.Chart.superclass.onSwfReady.call(this, isReset); - var ref; - this.swf.setType(this.type); - - if(this.chartStyle){ - this.setStyles(Ext.apply({}, this.extraStyle, this.chartStyle)); - } - - if(this.categoryNames){ - this.setCategoryNames(this.categoryNames); - } - - if(this.tipRenderer){ - ref = this.getFunctionRef(this.tipRenderer); - this.setTipRenderer(ref.fn, ref.scope); - } - if(this.legendRenderer){ - ref = this.getFunctionRef(this.legendRenderer); - this.setLegendRenderer(ref.fn, ref.scope); - } - if(!isReset){ - this.bindStore(this.store, true); - } - this.refresh.defer(10, this); - }, - - delayRefresh : function(){ - if(!this.refreshTask){ - this.refreshTask = new Ext.util.DelayedTask(this.refresh, this); - } - this.refreshTask.delay(this.refreshBuffer); - }, - - refresh : function(){ - if(this.fireEvent('beforerefresh', this) !== false){ - var styleChanged = false; - // convert the store data into something YUI charts can understand - var data = [], rs = this.store.data.items; - for(var j = 0, len = rs.length; j < len; j++){ - data[j] = rs[j].data; - } - //make a copy of the series definitions so that we aren't - //editing them directly. - var dataProvider = []; - var seriesCount = 0; - var currentSeries = null; - var i = 0; - if(this.series){ - seriesCount = this.series.length; - for(i = 0; i < seriesCount; i++){ - currentSeries = this.series[i]; - var clonedSeries = {}; - for(var prop in currentSeries){ - if(prop == "style" && currentSeries.style !== null){ - clonedSeries.style = Ext.encode(currentSeries.style); - styleChanged = true; - //we don't want to modify the styles again next time - //so null out the style property. - // this causes issues - // currentSeries.style = null; - } else{ - clonedSeries[prop] = currentSeries[prop]; - } - } - dataProvider.push(clonedSeries); - } - } - - if(seriesCount > 0){ - for(i = 0; i < seriesCount; i++){ - currentSeries = dataProvider[i]; - if(!currentSeries.type){ - currentSeries.type = this.type; - } - currentSeries.dataProvider = data; - } - } else{ - dataProvider.push({type: this.type, dataProvider: data}); - } - this.swf.setDataProvider(dataProvider); - if(this.seriesStyles){ - this.setSeriesStyles(this.seriesStyles); - } - this.fireEvent('refresh', this); - } - }, - - // private - createFnProxy : function(fn){ - var fnName = 'extFnProxy' + (++Ext.chart.Chart.PROXY_FN_ID); - Ext.chart.Chart.proxyFunction[fnName] = fn; - return 'Ext.chart.Chart.proxyFunction.' + fnName; - }, - - // private - removeFnProxy : function(fn){ - if(!Ext.isEmpty(fn)){ - fn = fn.replace('Ext.chart.Chart.proxyFunction.', ''); - delete Ext.chart.Chart.proxyFunction[fn]; - } - }, - - // private - getFunctionRef : function(val){ - if(Ext.isFunction(val)){ - return { - fn: val, - scope: this - }; - }else{ - return { - fn: val.fn, - scope: val.scope || this - }; - } - }, - - // private - onDestroy: function(){ - if (this.refreshTask && this.refreshTask.cancel){ - this.refreshTask.cancel(); - } - Ext.chart.Chart.superclass.onDestroy.call(this); - this.bindStore(null); - this.removeFnProxy(this.tipFnName); - this.removeFnProxy(this.legendFnName); - } -}); -Ext.reg('chart', Ext.chart.Chart); -Ext.chart.Chart.PROXY_FN_ID = 0; -Ext.chart.Chart.proxyFunction = {}; - -/** - * Sets the url to load the chart from. This should be set to a local resource. - * @static - * @type String - */ -Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.8.2/build/charts/assets/charts.swf'; - -/** - * @class Ext.chart.PieChart - * @extends Ext.chart.Chart - * @constructor - * @xtype piechart - */ -Ext.chart.PieChart = Ext.extend(Ext.chart.Chart, { - type: 'pie', - - onSwfReady : function(isReset){ - Ext.chart.PieChart.superclass.onSwfReady.call(this, isReset); - - this.setDataField(this.dataField); - this.setCategoryField(this.categoryField); - }, - - setDataField : function(field){ - this.dataField = field; - this.swf.setDataField(field); - }, - - setCategoryField : function(field){ - this.categoryField = field; - this.swf.setCategoryField(field); - } -}); -Ext.reg('piechart', Ext.chart.PieChart); - -/** - * @class Ext.chart.CartesianChart - * @extends Ext.chart.Chart - * @constructor - * @xtype cartesianchart - */ -Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, { - onSwfReady : function(isReset){ - Ext.chart.CartesianChart.superclass.onSwfReady.call(this, isReset); - this.labelFn = []; - if(this.xField){ - this.setXField(this.xField); - } - if(this.yField){ - this.setYField(this.yField); - } - if(this.xAxis){ - this.setXAxis(this.xAxis); - } - if(this.xAxes){ - this.setXAxes(this.xAxes); - } - if(this.yAxis){ - this.setYAxis(this.yAxis); - } - if(this.yAxes){ - this.setYAxes(this.yAxes); - } - if(Ext.isDefined(this.constrainViewport)){ - this.swf.setConstrainViewport(this.constrainViewport); - } - }, - - setXField : function(value){ - this.xField = value; - this.swf.setHorizontalField(value); - }, - - setYField : function(value){ - this.yField = value; - this.swf.setVerticalField(value); - }, - - setXAxis : function(value){ - this.xAxis = this.createAxis('xAxis', value); - this.swf.setHorizontalAxis(this.xAxis); - }, - - setXAxes : function(value){ - var axis; - for(var i = 0; i < value.length; i++) { - axis = this.createAxis('xAxis' + i, value[i]); - this.swf.setHorizontalAxis(axis); - } - }, - - setYAxis : function(value){ - this.yAxis = this.createAxis('yAxis', value); - this.swf.setVerticalAxis(this.yAxis); - }, - - setYAxes : function(value){ - var axis; - for(var i = 0; i < value.length; i++) { - axis = this.createAxis('yAxis' + i, value[i]); - this.swf.setVerticalAxis(axis); - } - }, - - createAxis : function(axis, value){ - var o = Ext.apply({}, value), - ref, - old; - - if(this[axis]){ - old = this[axis].labelFunction; - this.removeFnProxy(old); - this.labelFn.remove(old); - } - if(o.labelRenderer){ - ref = this.getFunctionRef(o.labelRenderer); - o.labelFunction = this.createFnProxy(function(v){ - return ref.fn.call(ref.scope, v); - }); - delete o.labelRenderer; - this.labelFn.push(o.labelFunction); - } - if(axis.indexOf('xAxis') > -1 && o.position == 'left'){ - o.position = 'bottom'; - } - return o; - }, - - onDestroy : function(){ - Ext.chart.CartesianChart.superclass.onDestroy.call(this); - Ext.each(this.labelFn, function(fn){ - this.removeFnProxy(fn); - }, this); - } -}); -Ext.reg('cartesianchart', Ext.chart.CartesianChart); - -/** - * @class Ext.chart.LineChart - * @extends Ext.chart.CartesianChart - * @constructor - * @xtype linechart - */ -Ext.chart.LineChart = Ext.extend(Ext.chart.CartesianChart, { - type: 'line' -}); -Ext.reg('linechart', Ext.chart.LineChart); - -/** - * @class Ext.chart.ColumnChart - * @extends Ext.chart.CartesianChart - * @constructor - * @xtype columnchart - */ -Ext.chart.ColumnChart = Ext.extend(Ext.chart.CartesianChart, { - type: 'column' -}); -Ext.reg('columnchart', Ext.chart.ColumnChart); - -/** - * @class Ext.chart.StackedColumnChart - * @extends Ext.chart.CartesianChart - * @constructor - * @xtype stackedcolumnchart - */ -Ext.chart.StackedColumnChart = Ext.extend(Ext.chart.CartesianChart, { - type: 'stackcolumn' -}); -Ext.reg('stackedcolumnchart', Ext.chart.StackedColumnChart); - -/** - * @class Ext.chart.BarChart - * @extends Ext.chart.CartesianChart - * @constructor - * @xtype barchart - */ -Ext.chart.BarChart = Ext.extend(Ext.chart.CartesianChart, { - type: 'bar' -}); -Ext.reg('barchart', Ext.chart.BarChart); - -/** - * @class Ext.chart.StackedBarChart - * @extends Ext.chart.CartesianChart - * @constructor - * @xtype stackedbarchart - */ -Ext.chart.StackedBarChart = Ext.extend(Ext.chart.CartesianChart, { - type: 'stackbar' -}); -Ext.reg('stackedbarchart', Ext.chart.StackedBarChart); - - - -/** - * @class Ext.chart.Axis - * Defines a CartesianChart's vertical or horizontal axis. - * @constructor - */ -Ext.chart.Axis = function(config){ - Ext.apply(this, config); -}; - -Ext.chart.Axis.prototype = -{ - /** - * The type of axis. - * - * @property type - * @type String - */ - type: null, - - /** - * The direction in which the axis is drawn. May be "horizontal" or "vertical". - * - * @property orientation - * @type String - */ - orientation: "horizontal", - - /** - * If true, the items on the axis will be drawn in opposite direction. - * - * @property reverse - * @type Boolean - */ - reverse: false, - - /** - * A string reference to the globally-accessible function that may be called to - * determine each of the label values for this axis. - * - * @property labelFunction - * @type String - */ - labelFunction: null, - - /** - * If true, labels that overlap previously drawn labels on the axis will be hidden. - * - * @property hideOverlappingLabels - * @type Boolean - */ - hideOverlappingLabels: true, - - /** - * The space, in pixels, between labels on an axis. - * - * @property labelSpacing - * @type Number - */ - labelSpacing: 2 -}; - -/** - * @class Ext.chart.NumericAxis - * @extends Ext.chart.Axis - * A type of axis whose units are measured in numeric values. - * @constructor - */ -Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, { - type: "numeric", - - /** - * The minimum value drawn by the axis. If not set explicitly, the axis - * minimum will be calculated automatically. - * - * @property minimum - * @type Number - */ - minimum: NaN, - - /** - * The maximum value drawn by the axis. If not set explicitly, the axis - * maximum will be calculated automatically. - * - * @property maximum - * @type Number - */ - maximum: NaN, - - /** - * The spacing between major intervals on this axis. - * - * @property majorUnit - * @type Number - */ - majorUnit: NaN, - - /** - * The spacing between minor intervals on this axis. - * - * @property minorUnit - * @type Number - */ - minorUnit: NaN, - - /** - * If true, the labels, ticks, gridlines, and other objects will snap to the - * nearest major or minor unit. If false, their position will be based on - * the minimum value. - * - * @property snapToUnits - * @type Boolean - */ - snapToUnits: true, - - /** - * If true, and the bounds are calculated automatically, either the minimum - * or maximum will be set to zero. - * - * @property alwaysShowZero - * @type Boolean - */ - alwaysShowZero: true, - - /** - * The scaling algorithm to use on this axis. May be "linear" or - * "logarithmic". - * - * @property scale - * @type String - */ - scale: "linear", - - /** - * Indicates whether to round the major unit. - * - * @property roundMajorUnit - * @type Boolean - */ - roundMajorUnit: true, - - /** - * Indicates whether to factor in the size of the labels when calculating a - * major unit. - * - * @property calculateByLabelSize - * @type Boolean - */ - calculateByLabelSize: true, - - /** - * Indicates the position of the axis relative to the chart - * - * @property position - * @type String - */ - position: 'left', - - /** - * Indicates whether to extend maximum beyond data's maximum to the nearest - * majorUnit. - * - * @property adjustMaximumByMajorUnit - * @type Boolean - */ - adjustMaximumByMajorUnit: true, - - /** - * Indicates whether to extend the minimum beyond data's minimum to the - * nearest majorUnit. - * - * @property adjustMinimumByMajorUnit - * @type Boolean - */ - adjustMinimumByMajorUnit: true - -}); - -/** - * @class Ext.chart.TimeAxis - * @extends Ext.chart.Axis - * A type of axis whose units are measured in time-based values. - * @constructor - */ -Ext.chart.TimeAxis = Ext.extend(Ext.chart.Axis, { - type: "time", - - /** - * The minimum value drawn by the axis. If not set explicitly, the axis - * minimum will be calculated automatically. - * - * @property minimum - * @type Date - */ - minimum: null, - - /** - * The maximum value drawn by the axis. If not set explicitly, the axis - * maximum will be calculated automatically. - * - * @property maximum - * @type Number - */ - maximum: null, - - /** - * The spacing between major intervals on this axis. - * - * @property majorUnit - * @type Number - */ - majorUnit: NaN, - - /** - * The time unit used by the majorUnit. - * - * @property majorTimeUnit - * @type String - */ - majorTimeUnit: null, - - /** - * The spacing between minor intervals on this axis. - * - * @property majorUnit - * @type Number - */ - minorUnit: NaN, - - /** - * The time unit used by the minorUnit. - * - * @property majorTimeUnit - * @type String - */ - minorTimeUnit: null, - - /** - * If true, the labels, ticks, gridlines, and other objects will snap to the - * nearest major or minor unit. If false, their position will be based on - * the minimum value. - * - * @property snapToUnits - * @type Boolean - */ - snapToUnits: true, - - /** - * Series that are stackable will only stack when this value is set to true. - * - * @property stackingEnabled - * @type Boolean - */ - stackingEnabled: false, - - /** - * Indicates whether to factor in the size of the labels when calculating a - * major unit. - * - * @property calculateByLabelSize - * @type Boolean - */ - calculateByLabelSize: true - -}); - -/** - * @class Ext.chart.CategoryAxis - * @extends Ext.chart.Axis - * A type of axis that displays items in categories. - * @constructor - */ -Ext.chart.CategoryAxis = Ext.extend(Ext.chart.Axis, { - type: "category", - - /** - * A list of category names to display along this axis. - * - * @property categoryNames - * @type Array - */ - categoryNames: null, - - /** - * Indicates whether or not to calculate the number of categories (ticks and - * labels) when there is not enough room to display all labels on the axis. - * If set to true, the axis will determine the number of categories to plot. - * If not, all categories will be plotted. - * - * @property calculateCategoryCount - * @type Boolean - */ - calculateCategoryCount: false - -}); - -/** - * @class Ext.chart.Series - * Series class for the charts widget. - * @constructor - */ -Ext.chart.Series = function(config) { Ext.apply(this, config); }; - -Ext.chart.Series.prototype = -{ - /** - * The type of series. - * - * @property type - * @type String - */ - type: null, - - /** - * The human-readable name of the series. - * - * @property displayName - * @type String - */ - displayName: null -}; - -/** - * @class Ext.chart.CartesianSeries - * @extends Ext.chart.Series - * CartesianSeries class for the charts widget. - * @constructor - */ -Ext.chart.CartesianSeries = Ext.extend(Ext.chart.Series, { - /** - * The field used to access the x-axis value from the items from the data - * source. - * - * @property xField - * @type String - */ - xField: null, - - /** - * The field used to access the y-axis value from the items from the data - * source. - * - * @property yField - * @type String - */ - yField: null, - - /** - * False to not show this series in the legend. Defaults to true. - * - * @property showInLegend - * @type Boolean - */ - showInLegend: true, - - /** - * Indicates which axis the series will bind to - * - * @property axis - * @type String - */ - axis: 'primary' -}); - -/** - * @class Ext.chart.ColumnSeries - * @extends Ext.chart.CartesianSeries - * ColumnSeries class for the charts widget. - * @constructor - */ -Ext.chart.ColumnSeries = Ext.extend(Ext.chart.CartesianSeries, { - type: "column" -}); - -/** - * @class Ext.chart.LineSeries - * @extends Ext.chart.CartesianSeries - * LineSeries class for the charts widget. - * @constructor - */ -Ext.chart.LineSeries = Ext.extend(Ext.chart.CartesianSeries, { - type: "line" -}); - -/** - * @class Ext.chart.BarSeries - * @extends Ext.chart.CartesianSeries - * BarSeries class for the charts widget. - * @constructor - */ -Ext.chart.BarSeries = Ext.extend(Ext.chart.CartesianSeries, { - type: "bar" -}); - - -/** - * @class Ext.chart.PieSeries - * @extends Ext.chart.Series - * PieSeries class for the charts widget. - * @constructor - */ -Ext.chart.PieSeries = Ext.extend(Ext.chart.Series, { - type: "pie", - dataField: null, - categoryField: null -}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-charts.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-charts.js deleted file mode 100644 index 40b840d6dfb..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-charts.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/* SWFObject v2.2 - is released under the MIT License -*/ -var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?(/win/).test(Y):/win/.test(ah),ac=Y?(/mac/).test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!(/loaded|complete/).test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab0){for(g=0;g-1&&e.position=="left"){e.position="bottom"}return e},onDestroy:function(){Ext.chart.CartesianChart.superclass.onDestroy.call(this);Ext.each(this.labelFn,function(a){this.removeFnProxy(a)},this)}});Ext.reg("cartesianchart",Ext.chart.CartesianChart);Ext.chart.LineChart=Ext.extend(Ext.chart.CartesianChart,{type:"line"});Ext.reg("linechart",Ext.chart.LineChart);Ext.chart.ColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"column"});Ext.reg("columnchart",Ext.chart.ColumnChart);Ext.chart.StackedColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackcolumn"});Ext.reg("stackedcolumnchart",Ext.chart.StackedColumnChart);Ext.chart.BarChart=Ext.extend(Ext.chart.CartesianChart,{type:"bar"});Ext.reg("barchart",Ext.chart.BarChart);Ext.chart.StackedBarChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackbar"});Ext.reg("stackedbarchart",Ext.chart.StackedBarChart);Ext.chart.Axis=function(a){Ext.apply(this,a)};Ext.chart.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true,labelSpacing:2};Ext.chart.NumericAxis=Ext.extend(Ext.chart.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear",roundMajorUnit:true,calculateByLabelSize:true,position:"left",adjustMaximumByMajorUnit:true,adjustMinimumByMajorUnit:true});Ext.chart.TimeAxis=Ext.extend(Ext.chart.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true,stackingEnabled:false,calculateByLabelSize:true});Ext.chart.CategoryAxis=Ext.extend(Ext.chart.Axis,{type:"category",categoryNames:null,calculateCategoryCount:false});Ext.chart.Series=function(a){Ext.apply(this,a)};Ext.chart.Series.prototype={type:null,displayName:null};Ext.chart.CartesianSeries=Ext.extend(Ext.chart.Series,{xField:null,yField:null,showInLegend:true,axis:"primary"});Ext.chart.ColumnSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"column"});Ext.chart.LineSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"line"});Ext.chart.BarSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"bar"});Ext.chart.PieSeries=Ext.extend(Ext.chart.Series,{type:"pie",dataField:null,categoryField:null}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-forms-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-forms-debug.js deleted file mode 100644 index ec393a88536..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-forms-debug.js +++ /dev/null @@ -1,9237 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.form.Field - * @extends Ext.BoxComponent - * Base class for form fields that provides default event handling, sizing, value handling and other functionality. - * @constructor - * Creates a new Field - * @param {Object} config Configuration options - * @xtype field - */ -Ext.form.Field = Ext.extend(Ext.BoxComponent, { - /** - *

      The label Element associated with this Field. Only available after this Field has been rendered by a - * {@link form Ext.layout.FormLayout} layout manager.

      - * @type Ext.Element - * @property label - */ - /** - * @cfg {String} inputType The type attribute for input fields -- e.g. radio, text, password, file (defaults - * to 'text'). The types 'file' and 'password' must be used to render those field types currently -- there are - * no separate Ext components for those. Note that if you use inputType:'file', {@link #emptyText} - * is not supported and should be avoided. - */ - /** - * @cfg {Number} tabIndex The tabIndex for this field. Note this only applies to fields that are rendered, - * not those which are built via applyTo (defaults to undefined). - */ - /** - * @cfg {Mixed} value A value to initialize this field with (defaults to undefined). - */ - /** - * @cfg {String} name The field's HTML name attribute (defaults to ''). - * Note: this property must be set if this field is to be automatically included with - * {@link Ext.form.BasicForm#submit form submit()}. - */ - /** - * @cfg {String} cls A custom CSS class to apply to the field's underlying element (defaults to ''). - */ - - /** - * @cfg {String} invalidClass The CSS class to use when marking a field invalid (defaults to 'x-form-invalid') - */ - invalidClass : 'x-form-invalid', - /** - * @cfg {String} invalidText The error text to use when marking a field invalid and no message is provided - * (defaults to 'The value in this field is invalid') - */ - invalidText : 'The value in this field is invalid', - /** - * @cfg {String} focusClass The CSS class to use when the field receives focus (defaults to 'x-form-focus') - */ - focusClass : 'x-form-focus', - /** - * @cfg {Boolean} preventMark - * true to disable {@link #markInvalid marking the field invalid}. - * Defaults to false. - */ - /** - * @cfg {String/Boolean} validationEvent The event that should initiate field validation. Set to false to disable - automatic validation (defaults to 'keyup'). - */ - validationEvent : 'keyup', - /** - * @cfg {Boolean} validateOnBlur Whether the field should validate when it loses focus (defaults to true). - */ - validateOnBlur : true, - /** - * @cfg {Number} validationDelay The length of time in milliseconds after user input begins until validation - * is initiated (defaults to 250) - */ - validationDelay : 250, - /** - * @cfg {String/Object} autoCreate

      A {@link Ext.DomHelper DomHelper} element spec, or true for a default - * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component. - * See {@link Ext.Component#autoEl autoEl} for details. Defaults to:

      - *
      {tag: 'input', type: 'text', size: '20', autocomplete: 'off'}
      - */ - defaultAutoCreate : {tag: 'input', type: 'text', size: '20', autocomplete: 'off'}, - /** - * @cfg {String} fieldClass The default CSS class for the field (defaults to 'x-form-field') - */ - fieldClass : 'x-form-field', - /** - * @cfg {String} msgTarget

      The location where the message text set through {@link #markInvalid} should display. - * Must be one of the following values:

      - *
        - *
      • qtip Display a quick tip containing the message when the user hovers over the field. This is the default. - *
        {@link Ext.QuickTips#init Ext.QuickTips.init} must have been called for this setting to work. - *
      • title Display the message in a default browser title attribute popup.
      • - *
      • under Add a block div beneath the field containing the error message.
      • - *
      • side Add an error icon to the right of the field, displaying the message in a popup on hover.
      • - *
      • [element id] Add the error message directly to the innerHTML of the specified element.
      • - *
      - */ - msgTarget : 'qtip', - /** - * @cfg {String} msgFx Experimental The effect used when displaying a validation message under the field - * (defaults to 'normal'). - */ - msgFx : 'normal', - /** - * @cfg {Boolean} readOnly true to mark the field as readOnly in HTML - * (defaults to false). - *

      Note: this only sets the element's readOnly DOM attribute. - * Setting readOnly=true, for example, will not disable triggering a - * ComboBox or DateField; it gives you the option of forcing the user to choose - * via the trigger without typing in the text box. To hide the trigger use - * {@link Ext.form.TriggerField#hideTrigger hideTrigger}.

      - */ - readOnly : false, - /** - * @cfg {Boolean} disabled True to disable the field (defaults to false). - *

      Be aware that conformant with the HTML specification, - * disabled Fields will not be {@link Ext.form.BasicForm#submit submitted}.

      - */ - disabled : false, - /** - * @cfg {Boolean} submitValue False to clear the name attribute on the field so that it is not submitted during a form post. - * Defaults to true. - */ - submitValue: true, - - // private - isFormField : true, - - // private - msgDisplay: '', - - // private - hasFocus : false, - - // private - initComponent : function(){ - Ext.form.Field.superclass.initComponent.call(this); - this.addEvents( - /** - * @event focus - * Fires when this field receives input focus. - * @param {Ext.form.Field} this - */ - 'focus', - /** - * @event blur - * Fires when this field loses input focus. - * @param {Ext.form.Field} this - */ - 'blur', - /** - * @event specialkey - * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. - * To handle other keys see {@link Ext.Panel#keys} or {@link Ext.KeyMap}. - * You can check {@link Ext.EventObject#getKey} to determine which key was pressed. - * For example:
      
      -var form = new Ext.form.FormPanel({
      -    ...
      -    items: [{
      -            fieldLabel: 'Field 1',
      -            name: 'field1',
      -            allowBlank: false
      -        },{
      -            fieldLabel: 'Field 2',
      -            name: 'field2',
      -            listeners: {
      -                specialkey: function(field, e){
      -                    // e.HOME, e.END, e.PAGE_UP, e.PAGE_DOWN,
      -                    // e.TAB, e.ESC, arrow keys: e.LEFT, e.RIGHT, e.UP, e.DOWN
      -                    if (e.{@link Ext.EventObject#getKey getKey()} == e.ENTER) {
      -                        var form = field.ownerCt.getForm();
      -                        form.submit();
      -                    }
      -                }
      -            }
      -        }
      -    ],
      -    ...
      -});
      -             * 
      - * @param {Ext.form.Field} this - * @param {Ext.EventObject} e The event object - */ - 'specialkey', - /** - * @event change - * Fires just before the field blurs if the field value has changed. - * @param {Ext.form.Field} this - * @param {Mixed} newValue The new value - * @param {Mixed} oldValue The original value - */ - 'change', - /** - * @event invalid - * Fires after the field has been marked as invalid. - * @param {Ext.form.Field} this - * @param {String} msg The validation message - */ - 'invalid', - /** - * @event valid - * Fires after the field has been validated with no errors. - * @param {Ext.form.Field} this - */ - 'valid' - ); - }, - - /** - * Returns the {@link Ext.form.Field#name name} or {@link Ext.form.ComboBox#hiddenName hiddenName} - * attribute of the field if available. - * @return {String} name The field {@link Ext.form.Field#name name} or {@link Ext.form.ComboBox#hiddenName hiddenName} - */ - getName : function(){ - return this.rendered && this.el.dom.name ? this.el.dom.name : this.name || this.id || ''; - }, - - // private - onRender : function(ct, position){ - if(!this.el){ - var cfg = this.getAutoCreate(); - - if(!cfg.name){ - cfg.name = this.name || this.id; - } - if(this.inputType){ - cfg.type = this.inputType; - } - this.autoEl = cfg; - } - Ext.form.Field.superclass.onRender.call(this, ct, position); - if(this.submitValue === false){ - this.el.dom.removeAttribute('name'); - } - var type = this.el.dom.type; - if(type){ - if(type == 'password'){ - type = 'text'; - } - this.el.addClass('x-form-'+type); - } - if(this.readOnly){ - this.setReadOnly(true); - } - if(this.tabIndex !== undefined){ - this.el.dom.setAttribute('tabIndex', this.tabIndex); - } - - this.el.addClass([this.fieldClass, this.cls]); - }, - - // private - getItemCt : function(){ - return this.itemCt; - }, - - // private - initValue : function(){ - if(this.value !== undefined){ - this.setValue(this.value); - }else if(!Ext.isEmpty(this.el.dom.value) && this.el.dom.value != this.emptyText){ - this.setValue(this.el.dom.value); - } - /** - * The original value of the field as configured in the {@link #value} configuration, or - * as loaded by the last form load operation if the form's {@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad} - * setting is true. - * @type mixed - * @property originalValue - */ - this.originalValue = this.getValue(); - }, - - /** - *

      Returns true if the value of this Field has been changed from its original value. - * Will return false if the field is disabled or has not been rendered yet.

      - *

      Note that if the owning {@link Ext.form.BasicForm form} was configured with - * {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad} - * then the original value is updated when the values are loaded by - * {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#setValues setValues}.

      - * @return {Boolean} True if this field has been changed from its original value (and - * is not disabled), false otherwise. - */ - isDirty : function() { - if(this.disabled || !this.rendered) { - return false; - } - return String(this.getValue()) !== String(this.originalValue); - }, - - /** - * Sets the read only state of this field. - * @param {Boolean} readOnly Whether the field should be read only. - */ - setReadOnly : function(readOnly){ - if(this.rendered){ - this.el.dom.readOnly = readOnly; - } - this.readOnly = readOnly; - }, - - // private - afterRender : function(){ - Ext.form.Field.superclass.afterRender.call(this); - this.initEvents(); - this.initValue(); - }, - - // private - fireKey : function(e){ - if(e.isSpecialKey()){ - this.fireEvent('specialkey', this, e); - } - }, - - /** - * Resets the current field value to the originally loaded value and clears any validation messages. - * See {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad} - */ - reset : function(){ - this.setValue(this.originalValue); - this.clearInvalid(); - }, - - // private - initEvents : function(){ - this.mon(this.el, Ext.EventManager.getKeyEvent(), this.fireKey, this); - this.mon(this.el, 'focus', this.onFocus, this); - - // standardise buffer across all browsers + OS-es for consistent event order. - // (the 10ms buffer for Editors fixes a weird FF/Win editor issue when changing OS window focus) - this.mon(this.el, 'blur', this.onBlur, this, this.inEditor ? {buffer:10} : null); - }, - - // private - preFocus: Ext.emptyFn, - - // private - onFocus : function(){ - this.preFocus(); - if(this.focusClass){ - this.el.addClass(this.focusClass); - } - if(!this.hasFocus){ - this.hasFocus = true; - /** - *

      The value that the Field had at the time it was last focused. This is the value that is passed - * to the {@link #change} event which is fired if the value has been changed when the Field is blurred.

      - *

      This will be undefined until the Field has been visited. Compare {@link #originalValue}.

      - * @type mixed - * @property startValue - */ - this.startValue = this.getValue(); - this.fireEvent('focus', this); - } - }, - - // private - beforeBlur : Ext.emptyFn, - - // private - onBlur : function(){ - this.beforeBlur(); - if(this.focusClass){ - this.el.removeClass(this.focusClass); - } - this.hasFocus = false; - if(this.validationEvent !== false && (this.validateOnBlur || this.validationEvent == 'blur')){ - this.validate(); - } - var v = this.getValue(); - if(String(v) !== String(this.startValue)){ - this.fireEvent('change', this, v, this.startValue); - } - this.fireEvent('blur', this); - this.postBlur(); - }, - - // private - postBlur : Ext.emptyFn, - - /** - * Returns whether or not the field value is currently valid by - * {@link #validateValue validating} the {@link #processValue processed value} - * of the field. Note: {@link #disabled} fields are ignored. - * @param {Boolean} preventMark True to disable marking the field invalid - * @return {Boolean} True if the value is valid, else false - */ - isValid : function(preventMark){ - if(this.disabled){ - return true; - } - var restore = this.preventMark; - this.preventMark = preventMark === true; - var v = this.validateValue(this.processValue(this.getRawValue()), preventMark); - this.preventMark = restore; - return v; - }, - - /** - * Validates the field value - * @return {Boolean} True if the value is valid, else false - */ - validate : function(){ - if(this.disabled || this.validateValue(this.processValue(this.getRawValue()))){ - this.clearInvalid(); - return true; - } - return false; - }, - - /** - * This method should only be overridden if necessary to prepare raw values - * for validation (see {@link #validate} and {@link #isValid}). This method - * is expected to return the processed value for the field which will - * be used for validation (see validateValue method). - * @param {Mixed} value - */ - processValue : function(value){ - return value; - }, - - /** - * Uses getErrors to build an array of validation errors. If any errors are found, markInvalid is called - * with the first and false is returned, otherwise true is returned. Previously, subclasses were invited - * to provide an implementation of this to process validations - from 3.2 onwards getErrors should be - * overridden instead. - * @param {Mixed} The current value of the field - * @return {Boolean} True if all validations passed, false if one or more failed - */ - validateValue : function(value) { - //currently, we only show 1 error at a time for a field, so just use the first one - var error = this.getErrors(value)[0]; - - if (error == undefined) { - return true; - } else { - this.markInvalid(error); - return false; - } - }, - - /** - * Runs this field's validators and returns an array of error messages for any validation failures. - * This is called internally during validation and would not usually need to be used manually. - * Each subclass should override or augment the return value to provide their own errors - * @return {Array} All error messages for this field - */ - getErrors: function() { - return []; - }, - - /** - * Gets the active error message for this field. - * @return {String} Returns the active error message on the field, if there is no error, an empty string is returned. - */ - getActiveError : function(){ - return this.activeError || ''; - }, - - /** - *

      Display an error message associated with this field, using {@link #msgTarget} to determine how to - * display the message and applying {@link #invalidClass} to the field's UI element.

      - *

      Note: this method does not cause the Field's {@link #validate} method to return false - * if the value does pass validation. So simply marking a Field as invalid will not prevent - * submission of forms submitted with the {@link Ext.form.Action.Submit#clientValidation} option set.

      - * {@link #isValid invalid}. - * @param {String} msg (optional) The validation message (defaults to {@link #invalidText}) - */ - markInvalid : function(msg){ - //don't set the error icon if we're not rendered or marking is prevented - if (this.rendered && !this.preventMark) { - msg = msg || this.invalidText; - - var mt = this.getMessageHandler(); - if(mt){ - mt.mark(this, msg); - }else if(this.msgTarget){ - this.el.addClass(this.invalidClass); - var t = Ext.getDom(this.msgTarget); - if(t){ - t.innerHTML = msg; - t.style.display = this.msgDisplay; - } - } - } - - this.setActiveError(msg); - }, - - /** - * Clear any invalid styles/messages for this field - */ - clearInvalid : function(){ - //don't remove the error icon if we're not rendered or marking is prevented - if (this.rendered && !this.preventMark) { - this.el.removeClass(this.invalidClass); - var mt = this.getMessageHandler(); - if(mt){ - mt.clear(this); - }else if(this.msgTarget){ - this.el.removeClass(this.invalidClass); - var t = Ext.getDom(this.msgTarget); - if(t){ - t.innerHTML = ''; - t.style.display = 'none'; - } - } - } - - this.unsetActiveError(); - }, - - /** - * Sets the current activeError to the given string. Fires the 'invalid' event. - * This does not set up the error icon, only sets the message and fires the event. To show the error icon, - * use markInvalid instead, which calls this method internally - * @param {String} msg The error message - * @param {Boolean} suppressEvent True to suppress the 'invalid' event from being fired - */ - setActiveError: function(msg, suppressEvent) { - this.activeError = msg; - if (suppressEvent !== true) this.fireEvent('invalid', this, msg); - }, - - /** - * Clears the activeError and fires the 'valid' event. This is called internally by clearInvalid and would not - * usually need to be called manually - * @param {Boolean} suppressEvent True to suppress the 'invalid' event from being fired - */ - unsetActiveError: function(suppressEvent) { - delete this.activeError; - if (suppressEvent !== true) this.fireEvent('valid', this); - }, - - // private - getMessageHandler : function(){ - return Ext.form.MessageTargets[this.msgTarget]; - }, - - // private - getErrorCt : function(){ - return this.el.findParent('.x-form-element', 5, true) || // use form element wrap if available - this.el.findParent('.x-form-field-wrap', 5, true); // else direct field wrap - }, - - // Alignment for 'under' target - alignErrorEl : function(){ - this.errorEl.setWidth(this.getErrorCt().getWidth(true) - 20); - }, - - // Alignment for 'side' target - alignErrorIcon : function(){ - this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]); - }, - - /** - * Returns the raw data value which may or may not be a valid, defined value. To return a normalized value see {@link #getValue}. - * @return {Mixed} value The field value - */ - getRawValue : function(){ - var v = this.rendered ? this.el.getValue() : Ext.value(this.value, ''); - if(v === this.emptyText){ - v = ''; - } - return v; - }, - - /** - * Returns the normalized data value (undefined or emptyText will be returned as ''). To return the raw value see {@link #getRawValue}. - * @return {Mixed} value The field value - */ - getValue : function(){ - if(!this.rendered) { - return this.value; - } - var v = this.el.getValue(); - if(v === this.emptyText || v === undefined){ - v = ''; - } - return v; - }, - - /** - * Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation see {@link #setValue}. - * @param {Mixed} value The value to set - * @return {Mixed} value The field value that is set - */ - setRawValue : function(v){ - return this.rendered ? (this.el.dom.value = (Ext.isEmpty(v) ? '' : v)) : ''; - }, - - /** - * Sets a data value into the field and validates it. To set the value directly without validation see {@link #setRawValue}. - * @param {Mixed} value The value to set - * @return {Ext.form.Field} this - */ - setValue : function(v){ - this.value = v; - if(this.rendered){ - this.el.dom.value = (Ext.isEmpty(v) ? '' : v); - this.validate(); - } - return this; - }, - - // private, does not work for all fields - append : function(v){ - this.setValue([this.getValue(), v].join('')); - } - - /** - * @cfg {Boolean} autoWidth @hide - */ - /** - * @cfg {Boolean} autoHeight @hide - */ - - /** - * @cfg {String} autoEl @hide - */ -}); - - -Ext.form.MessageTargets = { - 'qtip' : { - mark: function(field, msg){ - field.el.addClass(field.invalidClass); - field.el.dom.qtip = msg; - field.el.dom.qclass = 'x-form-invalid-tip'; - if(Ext.QuickTips){ // fix for floating editors interacting with DND - Ext.QuickTips.enable(); - } - }, - clear: function(field){ - field.el.removeClass(field.invalidClass); - field.el.dom.qtip = ''; - } - }, - 'title' : { - mark: function(field, msg){ - field.el.addClass(field.invalidClass); - field.el.dom.title = msg; - }, - clear: function(field){ - field.el.dom.title = ''; - } - }, - 'under' : { - mark: function(field, msg){ - field.el.addClass(field.invalidClass); - if(!field.errorEl){ - var elp = field.getErrorCt(); - if(!elp){ // field has no container el - field.el.dom.title = msg; - return; - } - field.errorEl = elp.createChild({cls:'x-form-invalid-msg'}); - field.on('resize', field.alignErrorEl, field); - field.on('destroy', function(){ - Ext.destroy(this.errorEl); - }, field); - } - field.alignErrorEl(); - field.errorEl.update(msg); - Ext.form.Field.msgFx[field.msgFx].show(field.errorEl, field); - }, - clear: function(field){ - field.el.removeClass(field.invalidClass); - if(field.errorEl){ - Ext.form.Field.msgFx[field.msgFx].hide(field.errorEl, field); - }else{ - field.el.dom.title = ''; - } - } - }, - 'side' : { - mark: function(field, msg){ - field.el.addClass(field.invalidClass); - if(!field.errorIcon){ - var elp = field.getErrorCt(); - // field has no container el - if(!elp){ - field.el.dom.title = msg; - return; - } - field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'}); - if (field.ownerCt) { - field.ownerCt.on('afterlayout', field.alignErrorIcon, field); - field.ownerCt.on('expand', field.alignErrorIcon, field); - } - field.on('resize', field.alignErrorIcon, field); - field.on('destroy', function(){ - Ext.destroy(this.errorIcon); - }, field); - } - field.alignErrorIcon(); - field.errorIcon.dom.qtip = msg; - field.errorIcon.dom.qclass = 'x-form-invalid-tip'; - field.errorIcon.show(); - }, - clear: function(field){ - field.el.removeClass(field.invalidClass); - if(field.errorIcon){ - field.errorIcon.dom.qtip = ''; - field.errorIcon.hide(); - }else{ - field.el.dom.title = ''; - } - } - } -}; - -// anything other than normal should be considered experimental -Ext.form.Field.msgFx = { - normal : { - show: function(msgEl, f){ - msgEl.setDisplayed('block'); - }, - - hide : function(msgEl, f){ - msgEl.setDisplayed(false).update(''); - } - }, - - slide : { - show: function(msgEl, f){ - msgEl.slideIn('t', {stopFx:true}); - }, - - hide : function(msgEl, f){ - msgEl.slideOut('t', {stopFx:true,useDisplay:true}); - } - }, - - slideRight : { - show: function(msgEl, f){ - msgEl.fixDisplay(); - msgEl.alignTo(f.el, 'tl-tr'); - msgEl.slideIn('l', {stopFx:true}); - }, - - hide : function(msgEl, f){ - msgEl.slideOut('l', {stopFx:true,useDisplay:true}); - } - } -}; -Ext.reg('field', Ext.form.Field); -/** - * @class Ext.form.TextField - * @extends Ext.form.Field - *

      Basic text field. Can be used as a direct replacement for traditional text inputs, - * or as the base class for more sophisticated input controls (like {@link Ext.form.TextArea} - * and {@link Ext.form.ComboBox}).

      - *

      Validation

      - *

      The validation procedure is described in the documentation for {@link #validateValue}.

      - *

      Alter Validation Behavior

      - *

      Validation behavior for each field can be configured:

      - *
        - *
      • {@link Ext.form.TextField#invalidText invalidText} : the default validation message to - * show if any validation step above does not provide a message when invalid
      • - *
      • {@link Ext.form.TextField#maskRe maskRe} : filter out keystrokes before any validation occurs
      • - *
      • {@link Ext.form.TextField#stripCharsRe stripCharsRe} : filter characters after being typed in, - * but before being validated
      • - *
      • {@link Ext.form.Field#invalidClass invalidClass} : alternate style when invalid
      • - *
      • {@link Ext.form.Field#validateOnBlur validateOnBlur}, - * {@link Ext.form.Field#validationDelay validationDelay}, and - * {@link Ext.form.Field#validationEvent validationEvent} : modify how/when validation is triggered
      • - *
      - * - * @constructor Creates a new TextField - * @param {Object} config Configuration options - * - * @xtype textfield - */ -Ext.form.TextField = Ext.extend(Ext.form.Field, { - /** - * @cfg {String} vtypeText A custom error message to display in place of the default message provided - * for the {@link #vtype} currently set for this field (defaults to ''). Note: - * only applies if {@link #vtype} is set, else ignored. - */ - /** - * @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value - * before validation (defaults to null). - */ - /** - * @cfg {Boolean} grow true if this field should automatically grow and shrink to its content - * (defaults to false) - */ - grow : false, - /** - * @cfg {Number} growMin The minimum width to allow when {@link #grow} = true (defaults - * to 30) - */ - growMin : 30, - /** - * @cfg {Number} growMax The maximum width to allow when {@link #grow} = true (defaults - * to 800) - */ - growMax : 800, - /** - * @cfg {String} vtype A validation type name as defined in {@link Ext.form.VTypes} (defaults to null) - */ - vtype : null, - /** - * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that do - * not match (defaults to null). The maskRe will not operate on any paste events. - */ - maskRe : null, - /** - * @cfg {Boolean} disableKeyFilter Specify true to disable input keystroke filtering (defaults - * to false) - */ - disableKeyFilter : false, - /** - * @cfg {Boolean} allowBlank Specify false to validate that the value's length is > 0 (defaults to - * true) - */ - allowBlank : true, - /** - * @cfg {Number} minLength Minimum input field length required (defaults to 0) - */ - minLength : 0, - /** - * @cfg {Number} maxLength Maximum input field length allowed by validation (defaults to Number.MAX_VALUE). - * This behavior is intended to provide instant feedback to the user by improving usability to allow pasting - * and editing or overtyping and back tracking. To restrict the maximum number of characters that can be - * entered into the field use {@link Ext.form.Field#autoCreate autoCreate} to add - * any attributes you want to a field, for example:
      
      -var myField = new Ext.form.NumberField({
      -    id: 'mobile',
      -    anchor:'90%',
      -    fieldLabel: 'Mobile',
      -    maxLength: 16, // for validation
      -    autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '10'}
      -});
      -
      - */ - maxLength : Number.MAX_VALUE, - /** - * @cfg {String} minLengthText Error text to display if the {@link #minLength minimum length} - * validation fails (defaults to 'The minimum length for this field is {minLength}') - */ - minLengthText : 'The minimum length for this field is {0}', - /** - * @cfg {String} maxLengthText Error text to display if the {@link #maxLength maximum length} - * validation fails (defaults to 'The maximum length for this field is {maxLength}') - */ - maxLengthText : 'The maximum length for this field is {0}', - /** - * @cfg {Boolean} selectOnFocus true to automatically select any existing field text when the field - * receives input focus (defaults to false) - */ - selectOnFocus : false, - /** - * @cfg {String} blankText The error text to display if the {@link #allowBlank} validation - * fails (defaults to 'This field is required') - */ - blankText : 'This field is required', - /** - * @cfg {Function} validator - *

      A custom validation function to be called during field validation ({@link #validateValue}) - * (defaults to null). If specified, this function will be called first, allowing the - * developer to override the default validation process.

      - *

      This function will be passed the following Parameters:

      - *
        - *
      • value: Mixed - *
        The current field value
      • - *
      - *

      This function is to Return:

      - *
        - *
      • true: Boolean - *
        true if the value is valid
      • - *
      • msg: String - *
        An error message if the value is invalid
      • - *
      - */ - validator : null, - /** - * @cfg {RegExp} regex A JavaScript RegExp object to be tested against the field value during validation - * (defaults to null). If the test fails, the field will be marked invalid using - * {@link #regexText}. - */ - regex : null, - /** - * @cfg {String} regexText The error text to display if {@link #regex} is used and the - * test fails during validation (defaults to '') - */ - regexText : '', - /** - * @cfg {String} emptyText The default text to place into an empty field (defaults to null). - * Note: that this value will be submitted to the server if this field is enabled and configured - * with a {@link #name}. - */ - emptyText : null, - /** - * @cfg {String} emptyClass The CSS class to apply to an empty field to style the {@link #emptyText} - * (defaults to 'x-form-empty-field'). This class is automatically added and removed as needed - * depending on the current field value. - */ - emptyClass : 'x-form-empty-field', - - /** - * @cfg {Boolean} enableKeyEvents true to enable the proxying of key events for the HTML input - * field (defaults to false) - */ - - initComponent : function(){ - Ext.form.TextField.superclass.initComponent.call(this); - this.addEvents( - /** - * @event autosize - * Fires when the {@link #autoSize} function is triggered. The field may or - * may not have actually changed size according to the default logic, but this event provides - * a hook for the developer to apply additional logic at runtime to resize the field if needed. - * @param {Ext.form.Field} this This text field - * @param {Number} width The new field width - */ - 'autosize', - - /** - * @event keydown - * Keydown input field event. This event only fires if {@link #enableKeyEvents} - * is set to true. - * @param {Ext.form.TextField} this This text field - * @param {Ext.EventObject} e - */ - 'keydown', - /** - * @event keyup - * Keyup input field event. This event only fires if {@link #enableKeyEvents} - * is set to true. - * @param {Ext.form.TextField} this This text field - * @param {Ext.EventObject} e - */ - 'keyup', - /** - * @event keypress - * Keypress input field event. This event only fires if {@link #enableKeyEvents} - * is set to true. - * @param {Ext.form.TextField} this This text field - * @param {Ext.EventObject} e - */ - 'keypress' - ); - }, - - // private - initEvents : function(){ - Ext.form.TextField.superclass.initEvents.call(this); - if(this.validationEvent == 'keyup'){ - this.validationTask = new Ext.util.DelayedTask(this.validate, this); - this.mon(this.el, 'keyup', this.filterValidation, this); - } - else if(this.validationEvent !== false && this.validationEvent != 'blur'){ - this.mon(this.el, this.validationEvent, this.validate, this, {buffer: this.validationDelay}); - } - if(this.selectOnFocus || this.emptyText){ - this.mon(this.el, 'mousedown', this.onMouseDown, this); - - if(this.emptyText){ - this.applyEmptyText(); - } - } - if(this.maskRe || (this.vtype && this.disableKeyFilter !== true && (this.maskRe = Ext.form.VTypes[this.vtype+'Mask']))){ - this.mon(this.el, 'keypress', this.filterKeys, this); - } - if(this.grow){ - this.mon(this.el, 'keyup', this.onKeyUpBuffered, this, {buffer: 50}); - this.mon(this.el, 'click', this.autoSize, this); - } - if(this.enableKeyEvents){ - this.mon(this.el, { - scope: this, - keyup: this.onKeyUp, - keydown: this.onKeyDown, - keypress: this.onKeyPress - }); - } - }, - - onMouseDown: function(e){ - if(!this.hasFocus){ - this.mon(this.el, 'mouseup', Ext.emptyFn, this, { single: true, preventDefault: true }); - } - }, - - processValue : function(value){ - if(this.stripCharsRe){ - var newValue = value.replace(this.stripCharsRe, ''); - if(newValue !== value){ - this.setRawValue(newValue); - return newValue; - } - } - return value; - }, - - filterValidation : function(e){ - if(!e.isNavKeyPress()){ - this.validationTask.delay(this.validationDelay); - } - }, - - //private - onDisable: function(){ - Ext.form.TextField.superclass.onDisable.call(this); - if(Ext.isIE){ - this.el.dom.unselectable = 'on'; - } - }, - - //private - onEnable: function(){ - Ext.form.TextField.superclass.onEnable.call(this); - if(Ext.isIE){ - this.el.dom.unselectable = ''; - } - }, - - // private - onKeyUpBuffered : function(e){ - if(this.doAutoSize(e)){ - this.autoSize(); - } - }, - - // private - doAutoSize : function(e){ - return !e.isNavKeyPress(); - }, - - // private - onKeyUp : function(e){ - this.fireEvent('keyup', this, e); - }, - - // private - onKeyDown : function(e){ - this.fireEvent('keydown', this, e); - }, - - // private - onKeyPress : function(e){ - this.fireEvent('keypress', this, e); - }, - - /** - * Resets the current field value to the originally-loaded value and clears any validation messages. - * Also adds {@link #emptyText} and {@link #emptyClass} if the - * original value was blank. - */ - reset : function(){ - Ext.form.TextField.superclass.reset.call(this); - this.applyEmptyText(); - }, - - applyEmptyText : function(){ - if(this.rendered && this.emptyText && this.getRawValue().length < 1 && !this.hasFocus){ - this.setRawValue(this.emptyText); - this.el.addClass(this.emptyClass); - } - }, - - // private - preFocus : function(){ - var el = this.el, - isEmpty; - if(this.emptyText){ - if(el.dom.value == this.emptyText){ - this.setRawValue(''); - isEmpty = true; - } - el.removeClass(this.emptyClass); - } - if(this.selectOnFocus || isEmpty){ - el.dom.select(); - } - }, - - // private - postBlur : function(){ - this.applyEmptyText(); - }, - - // private - filterKeys : function(e){ - if(e.ctrlKey){ - return; - } - var k = e.getKey(); - if(Ext.isGecko && (e.isNavKeyPress() || k == e.BACKSPACE || (k == e.DELETE && e.button == -1))){ - return; - } - var cc = String.fromCharCode(e.getCharCode()); - if(!Ext.isGecko && e.isSpecialKey() && !cc){ - return; - } - if(!this.maskRe.test(cc)){ - e.stopEvent(); - } - }, - - setValue : function(v){ - if(this.emptyText && this.el && !Ext.isEmpty(v)){ - this.el.removeClass(this.emptyClass); - } - Ext.form.TextField.superclass.setValue.apply(this, arguments); - this.applyEmptyText(); - this.autoSize(); - return this; - }, - - /** - *

      Validates a value according to the field's validation rules and returns an array of errors - * for any failing validations. Validation rules are processed in the following order:

      - *
      ")}},updateHeaderSortState:function(){var b=this.ds.getSortState();if(!b){return}if(!this.sortState||(this.sortState.field!=b.field||this.sortState.direction!=b.direction)){this.grid.fireEvent("sortchange",this.grid,b)}this.sortState=b;var c=this.cm.findColumnIndex(b.field);if(c!=-1){var a=b.direction;this.updateSortIcon(c,a)}},clearHeaderSortState:function(){if(!this.sortState){return}this.grid.fireEvent("sortchange",this.grid,null);this.mainHd.select("td").removeClass(this.sortClasses);delete this.sortState},destroy:function(){var i=this,a=i.grid,d=a.getGridEl(),h=i.dragZone,f=i.splitZone,g=i.columnDrag,e=i.columnDrop,j=i.scrollToTopTask,c,b;if(j&&j.cancel){j.cancel()}Ext.destroyMembers(i,"colMenu","hmenu");i.initData(null,null);i.purgeListeners();Ext.fly(i.innerHd).un("click",i.handleHdDown,i);if(a.enableColumnMove){c=g.dragData;b=g.proxy;Ext.destroy(g.el,b.ghost,b.el,e.el,e.proxyTop,e.proxyBottom,c.ddel,c.header);if(b.anim){Ext.destroy(b.anim)}delete b.ghost;delete c.ddel;delete c.header;g.destroy();delete Ext.dd.DDM.locationCache[g.id];delete g._domRef;delete e.proxyTop;delete e.proxyBottom;e.destroy();delete Ext.dd.DDM.locationCache["gridHeader"+d.id];delete e._domRef;delete Ext.dd.DDM.ids[e.ddGroup]}if(f){f.destroy();delete f._domRef;delete Ext.dd.DDM.ids["gridSplitters"+d.id]}Ext.fly(i.innerHd).removeAllListeners();Ext.removeNode(i.innerHd);delete i.innerHd;Ext.destroy(i.el,i.mainWrap,i.mainHd,i.scroller,i.mainBody,i.focusEl,i.resizeMarker,i.resizeProxy,i.activeHdBtn,i._flyweight,h,f);delete a.container;if(h){h.destroy()}Ext.dd.DDM.currentTarget=null;delete Ext.dd.DDM.locationCache[d.id];Ext.EventManager.removeResizeListener(i.onWindowResize,i)},onDenyColumnHide:function(){},render:function(){if(this.autoFill){var a=this.grid.ownerCt;if(a&&a.getLayout()){a.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders();this.updateHeaderSortState()},this,{single:true})}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.grid.getGridEl().dom.innerHTML=this.renderUI();this.afterRenderUI()},initData:function(a,e){var b=this;if(b.ds){var d=b.ds;d.un("add",b.onAdd,b);d.un("load",b.onLoad,b);d.un("clear",b.onClear,b);d.un("remove",b.onRemove,b);d.un("update",b.onUpdate,b);d.un("datachanged",b.onDataChange,b);if(d!==a&&d.autoDestroy){d.destroy()}}if(a){a.on({scope:b,load:b.onLoad,add:b.onAdd,remove:b.onRemove,update:b.onUpdate,clear:b.onClear,datachanged:b.onDataChange})}if(b.cm){var c=b.cm;c.un("configchange",b.onColConfigChange,b);c.un("widthchange",b.onColWidthChange,b);c.un("headerchange",b.onHeaderChange,b);c.un("hiddenchange",b.onHiddenChange,b);c.un("columnmoved",b.onColumnMove,b)}if(e){delete b.lastViewWidth;e.on({scope:b,configchange:b.onColConfigChange,widthchange:b.onColWidthChange,headerchange:b.onHeaderChange,hiddenchange:b.onHiddenChange,columnmoved:b.onColumnMove})}b.ds=a;b.cm=e},onDataChange:function(){this.refresh(true);this.updateHeaderSortState();this.syncFocusEl(0)},onClear:function(){this.refresh();this.syncFocusEl(0)},onUpdate:function(b,a){this.refreshRow(a)},onAdd:function(b,a,c){this.insertRows(b,c,c+(a.length-1))},onRemove:function(b,a,c,d){if(d!==true){this.fireEvent("beforerowremoved",this,c,a)}this.removeRow(c);if(d!==true){this.processRows(c);this.applyEmptyText();this.fireEvent("rowremoved",this,c,a)}},onLoad:function(){if(Ext.isGecko){if(!this.scrollToTopTask){this.scrollToTopTask=new Ext.util.DelayedTask(this.scrollToTop,this)}this.scrollToTopTask.delay(1)}else{this.scrollToTop()}},onColWidthChange:function(a,b,c){this.updateColumnWidth(b,c)},onHeaderChange:function(a,b,c){this.updateHeaders()},onHiddenChange:function(a,b,c){this.updateColumnHidden(b,c)},onColumnMove:function(a,c,b){this.indexMap=null;this.refresh(true);this.restoreScroll(this.getScrollState());this.afterMove(b);this.grid.fireEvent("columnmove",c,b)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(a){a.on("headerclick",this.onHeaderClick,this)},initEvents:Ext.emptyFn,onHeaderClick:function(b,a){if(this.headersDisabled||!this.cm.isSortable(a)){return}b.stopEditing(true);b.store.sort(this.cm.getDataIndex(a))},onRowOver:function(b,a){var c=this.findRowIndex(a);if(c!==false){this.addRowClass(c,this.rowOverCls)}},onRowOut:function(b,a){var c=this.findRowIndex(a);if(c!==false&&!b.within(this.getRow(c),true)){this.removeRowClass(c,this.rowOverCls)}},onRowSelect:function(a){this.addRowClass(a,this.selectedRowClass)},onRowDeselect:function(a){this.removeRowClass(a,this.selectedRowClass)},onCellSelect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).addClass("x-grid3-cell-selected")}},onCellDeselect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).removeClass("x-grid3-cell-selected")}},handleWheel:function(a){a.stopPropagation()},onColumnSplitterMoved:function(a,b){this.userResized=true;this.grid.colModel.setColumnWidth(a,b,true);if(this.forceFit){this.fitColumns(true,false,a);this.updateAllColumnWidths()}else{this.updateColumnWidth(a,b);this.syncHeaderScroll()}this.grid.fireEvent("columnresize",a,b)},beforeColMenuShow:function(){var b=this.cm,d=b.getColumnCount(),a=this.colMenu,c;a.removeAll();for(c=0;c0){if(!this.cm.isHidden(a-1)){return a}a--}return undefined},handleHdOver:function(c,b){var d=this.findHeaderCell(b);if(d&&!this.headersDisabled){var a=this.fly(d);this.activeHdRef=b;this.activeHdIndex=this.getCellIndex(d);this.activeHdRegion=a.getRegion();if(!this.isMenuDisabled(this.activeHdIndex,a)){a.addClass("x-grid3-hd-over");this.activeHdBtn=a.child(".x-grid3-hd-btn");if(this.activeHdBtn){this.activeHdBtn.dom.style.height=(d.firstChild.offsetHeight-1)+"px"}}}},handleHdOut:function(b,a){var c=this.findHeaderCell(a);if(c&&(!Ext.isIE||!b.within(c,true))){this.activeHdRef=null;this.fly(c).removeClass("x-grid3-hd-over");c.style.cursor=""}},isMenuDisabled:function(a,b){return this.cm.isMenuDisabled(a)},hasRows:function(){var a=this.mainBody.dom.firstChild;return a&&a.nodeType==1&&a.className!="x-grid-empty"},isHideableColumn:function(a){return !a.hidden},bind:function(a,b){this.initData(a,b)}});Ext.grid.GridView.SplitDragZone=Ext.extend(Ext.dd.DDProxy,{constructor:function(a,b){this.grid=a;this.view=a.getView();this.marker=this.view.resizeMarker;this.proxy=this.view.resizeProxy;Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,b,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.scroll=false;this.hw=this.view.splitHandleWidth||5},b4StartDrag:function(a,e){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var d=this.view.mainWrap.getHeight();this.marker.setHeight(d);this.marker.show();this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]);this.proxy.setHeight(d);var b=this.cm.getColumnWidth(this.cellIndex),c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,e)},allowHeaderDrag:function(a){return true},handleMouseDown:function(a){var g=this.view.findHeaderCell(a.getTarget());if(g&&this.allowHeaderDrag(a)){var j=this.view.fly(g).getXY(),c=j[0],h=a.getXY(),b=h[0],f=g.offsetWidth,d=false;if((b-c)<=this.hw){d=-1}else{if((c+f)-b<=this.hw){d=0}}if(d!==false){this.cm=this.grid.colModel;var i=this.view.getCellIndex(g);if(d==-1){if(i+d<0){return}while(this.cm.isHidden(i+d)){--d;if(i+d<0){return}}}this.cellIndex=i+d;this.split=g.dom;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}else{if(this.view.columnDrag){this.view.columnDrag.callHandleMouseDown(a)}}}},endDrag:function(f){this.marker.hide();var a=this.view,c=Math.max(this.minX,f.getPageX()),d=c-this.startPos,b=this.dragHeadersDisabled;a.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+d);setTimeout(function(){a.headersDisabled=b},50)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.PivotGridView=Ext.extend(Ext.grid.GridView,{colHeaderCellCls:"grid-hd-group-cell",title:"",getColumnHeaders:function(){return this.grid.topAxis.buildHeaders()},getRowHeaders:function(){return this.grid.leftAxis.buildHeaders()},renderRows:function(a,s){var b=this.grid,n=b.extractData(),o=n.length,f=this.templates,r=b.renderer,g=typeof r=="function",v=this.getCellCls,m=typeof v=="function",d=f.cell,w=f.row,h=[],p={},c="width:"+this.getGridInnerWidth()+"px;",k,q,e,u,l;a=a||0;s=Ext.isDefined(s)?s:o-1;for(u=0;u','
      ','
      ','
      {title}
      ','
      ','
      ',"
      ",'
      ',"
      ",'
      ','
      ','
      {body}
      ','',"
      ","
      ",'
       
      ','
       
      ',""),initTemplates:function(){Ext.grid.PivotGridView.superclass.initTemplates.apply(this,arguments);var a=this.templates||{};if(!a.gcell){a.gcell=new Ext.XTemplate('','
      ',this.grid.enableHdMenu?'':"","{value}","
      ","")}this.templates=a;this.hrowRe=new RegExp("ux-grid-hd-group-row-(\\d+)","")},initElements:function(){Ext.grid.PivotGridView.superclass.initElements.apply(this,arguments);this.rowHeadersEl=new Ext.Element(this.scroller.child("div.x-grid3-row-headers"));this.headerTitleEl=new Ext.Element(this.mainHd.child("div.x-grid3-header-title"))},getGridInnerWidth:function(){var a=Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this,arguments);return a-this.getTotalRowHeaderWidth()},getTotalRowHeaderWidth:function(){var d=this.getRowHeaders(),c=d.length,b=0,a;for(a=0;a0&&d>0){g=g||n.data[a[f-1].dataIndex]!=k[d-1].data[a[f-1].dataIndex]}if(g){r.push({header:p,span:o,start:b});b+=o;o=0}if(h){r.push({header:m,span:o+1,start:b});b+=o;o=0}p=m;o++}c.push({items:r,width:e.width||this.defaultHeaderWidth});p=undefined}return c}});Ext.grid.HeaderDragZone=Ext.extend(Ext.dd.DragZone,{maxDragWidth:120,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,c);if(b){this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b))}this.scroll=false},getDragData:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findHeaderCell(a);if(b){return{ddel:b.firstChild,header:b}}return false},onInitDrag:function(a){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var b=this.dragData.ddel.cloneNode(true);b.id=Ext.id();b.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(b);return true},afterValidDrop:function(){this.completeDrop()},afterInvalidDrop:function(){this.completeDrop()},completeDrop:function(){var a=this.view,b=this.dragHeadersDisabled;setTimeout(function(){a.headersDisabled=b},50)}});Ext.grid.HeaderDropZone=Ext.extend(Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:" "},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:" "},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,a.getGridEl().dom)},getTargetFromEvent:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findCellIndex(a);if(b!==false){return this.view.getHeaderCell(b)}},nextVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.nextSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.nextSibling}return null},prevVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.prevSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.prevSibling}return null},positionIndicator:function(d,j,i){var a=Ext.lib.Event.getPageX(i),f=Ext.lib.Dom.getRegion(j.firstChild),c,g,b=f.top+this.proxyOffsets[1];if((f.right-a)<=(f.right-f.left)/2){c=f.right+this.view.borderWidth;g="after"}else{c=f.left;g="before"}if(this.grid.colModel.isFixed(this.view.getCellIndex(j))){return false}c+=this.proxyOffsets[0];this.proxyTop.setLeftTop(c,b);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(c,b+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return g},onNodeEnter:function(d,a,c,b){if(b.header!=d){this.positionIndicator(b.header,d,c)}},onNodeOver:function(f,b,d,c){var a=false;if(c.header!=f){a=this.positionIndicator(c.header,f,d)}if(!a){this.proxyTop.hide();this.proxyBottom.hide()}return a?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(d,a,c,b){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(b,l,f,c){var d=c.header;if(d!=b){var j=this.grid.colModel,i=Ext.lib.Event.getPageX(f),a=Ext.lib.Dom.getRegion(b.firstChild),m=(a.right-i)<=((a.right-a.left)/2)?"after":"before",g=this.view.getCellIndex(d),k=this.view.getCellIndex(b);if(m=="after"){k++}if(g=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){this.config[a].setEditor(b)},destroy:function(){var b=this.config.length,a=0;for(;a0},isSelected:function(a){var b=Ext.isNumber(a)?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,h,f){if(f.button!==0||this.isLocked()){return}var a=this.grid.getView();if(f.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,h,f.ctrlKey);this.last=c;a.focusRow(h)}else{var b=this.isSelected(h);if(f.ctrlKey&&b){this.deselectRow(h)}else{if(!b||this.getCount()>1){this.selectRow(h,f.ctrlKey||f.shiftKey);a.focusRow(h)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}if(!this.silent){this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(m,j){var d=j.getKey(),f,h=this.grid,o=h.lastEdit,i=h.activeEditor,b=j.shiftKey,n,o,a,l;if(d==j.TAB){j.stopEvent();i.completeEdit();if(b){f=h.walkCells(i.row,i.col-1,-1,this.acceptsNav,this)}else{f=h.walkCells(i.row,i.col+1,1,this.acceptsNav,this)}}else{if(d==j.ENTER){if(this.moveEditorOnEnter!==false){if(b){f=h.walkCells(o.row-1,o.col,-1,this.acceptsNav,this)}else{f=h.walkCells(o.row+1,o.col,1,this.acceptsNav,this)}}}}if(f){a=f[0];l=f[1];this.onEditorSelect(a,o.row);if(h.isEditor&&h.editing){n=h.activeEditor;if(n&&n.field.triggerBlur){n.field.triggerBlur()}}h.startEditing(a,l)}},onEditorSelect:function(b,a){if(a!=b){this.selectRow(b)}},destroy:function(){Ext.destroy(this.rowNav);this.rowNav=null;Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=Ext.extend(Ext.util.Observable,{isColumn:true,constructor:function(b){Ext.apply(this,b);if(Ext.isString(this.renderer)){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}if(!this.scope){this.scope=this}var a=this.editor;delete this.editor;this.setEditor(a);this.addEvents("click","contextmenu","dblclick","mousedown");Ext.grid.Column.superclass.constructor.call(this)},processEvent:function(b,d,c,f,a){return this.fireEvent(b,this,c,f,d)},destroy:function(){if(this.setEditor){this.setEditor(null)}this.purgeListeners()},renderer:function(a){return a},getEditor:function(a){return this.editable!==false?this.editor:null},setEditor:function(b){var a=this.editor;if(a){if(a.gridEditor){a.gridEditor.destroy();delete a.gridEditor}else{a.destroy()}}this.editor=null;if(b){if(!b.isXType){b=Ext.create(b,"textfield")}this.editor=b}},getCellEditor:function(b){var a=this.getEditor(b);if(a){if(!a.startEdit){if(!a.gridEditor){a.gridEditor=new Ext.grid.GridEditor(a)}a=a.gridEditor}}return a}});Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:" ",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=(!Ext.isPrimitive(this.tpl)&&this.tpl.compile)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.ActionColumn=Ext.extend(Ext.grid.Column,{header:" ",actionIdRe:/x-action-col-(\d+)/,altText:"",constructor:function(b){var f=this,c=b.items||(f.items=[f]),a=c.length,d,e;Ext.grid.ActionColumn.superclass.constructor.call(f,b);f.renderer=function(g,h){g=Ext.isFunction(b.renderer)?b.renderer.apply(this,arguments)||"":"";h.css+=" x-action-col-cell";for(d=0;d"}return g}},destroy:function(){delete this.items;delete this.renderer;return Ext.grid.ActionColumn.superclass.destroy.apply(this,arguments)},processEvent:function(c,h,d,i,b){var a=h.getTarget().className.match(this.actionIdRe),g,f;if(a&&(g=this.items[parseInt(a[1],10)])){if(c=="click"){(f=g.handler||this.handler)&&f.call(g.scope||this.scope||this,d,i,b,g,h)}else{if((c=="mousedown")&&(g.stopSelection!==false)){return false}}}return Ext.grid.ActionColumn.superclass.processEvent.apply(this,arguments)}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn,actioncolumn:Ext.grid.ActionColumn};Ext.grid.RowNumberer=Ext.extend(Object,{header:"",width:23,sortable:false,constructor:function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}},fixed:true,hideable:false,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}});Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'
       
      ',width:20,sortable:false,menuDisabled:true,fixed:true,hideable:false,dataIndex:"",id:"checker",isColumn:true,constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){Ext.fly(this.grid.getView().innerHd).on("mousedown",this.onHdMouseDown,this)},this)},processEvent:function(b,d,c,f,a){if(b=="mousedown"){this.onMouseDown(d,d.getTarget());return false}else{return Ext.grid.Column.prototype.processEvent.apply(this,arguments)}},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true);this.grid.getView().focusRow(a)}}}},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'
       
      '},onEditorSelect:function(b,a){if(a!=b&&!this.checkOnly){this.selectRow(b)}}}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-grouping-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-grouping-debug.js deleted file mode 100644 index 3239979a94d..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-grouping-debug.js +++ /dev/null @@ -1,611 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.grid.GroupingView - * @extends Ext.grid.GridView - * Adds the ability for single level grouping to the grid. A {@link Ext.data.GroupingStore GroupingStore} - * must be used to enable grouping. Some grouping characteristics may also be configured at the - * {@link Ext.grid.Column Column level}
        - *
      • {@link Ext.grid.Column#emptyGroupText emptyGroupText}
      • - *
      • {@link Ext.grid.Column#groupable groupable}
      • - *
      • {@link Ext.grid.Column#groupName groupName}
      • - *
      • {@link Ext.grid.Column#groupRender groupRender}
      • - *
      - *

      Sample usage:

      - *
      
      -var grid = new Ext.grid.GridPanel({
      -    // A groupingStore is required for a GroupingView
      -    store: new {@link Ext.data.GroupingStore}({
      -        autoDestroy: true,
      -        reader: reader,
      -        data: xg.dummyData,
      -        sortInfo: {field: 'company', direction: 'ASC'},
      -        {@link Ext.data.GroupingStore#groupOnSort groupOnSort}: true,
      -        {@link Ext.data.GroupingStore#remoteGroup remoteGroup}: true,
      -        {@link Ext.data.GroupingStore#groupField groupField}: 'industry'
      -    }),
      -    colModel: new {@link Ext.grid.ColumnModel}({
      -        columns:[
      -            {id:'company',header: 'Company', width: 60, dataIndex: 'company'},
      -            // {@link Ext.grid.Column#groupable groupable}, {@link Ext.grid.Column#groupName groupName}, {@link Ext.grid.Column#groupRender groupRender} are also configurable at column level
      -            {header: 'Price', renderer: Ext.util.Format.usMoney, dataIndex: 'price', {@link Ext.grid.Column#groupable groupable}: false},
      -            {header: 'Change', dataIndex: 'change', renderer: Ext.util.Format.usMoney},
      -            {header: 'Industry', dataIndex: 'industry'},
      -            {header: 'Last Updated', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
      -        ],
      -        defaults: {
      -            sortable: true,
      -            menuDisabled: false,
      -            width: 20
      -        }
      -    }),
      -
      -    view: new Ext.grid.GroupingView({
      -        {@link Ext.grid.GridView#forceFit forceFit}: true,
      -        // custom grouping text template to display the number of items per group
      -        {@link #groupTextTpl}: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
      -    }),
      -
      -    frame:true,
      -    width: 700,
      -    height: 450,
      -    collapsible: true,
      -    animCollapse: false,
      -    title: 'Grouping Example',
      -    iconCls: 'icon-grid',
      -    renderTo: document.body
      -});
      - * 
      - * @constructor - * @param {Object} config - */ -Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, { - - /** - * @cfg {String} groupByText Text displayed in the grid header menu for grouping by a column - * (defaults to 'Group By This Field'). - */ - groupByText : 'Group By This Field', - /** - * @cfg {String} showGroupsText Text displayed in the grid header for enabling/disabling grouping - * (defaults to 'Show in Groups'). - */ - showGroupsText : 'Show in Groups', - /** - * @cfg {Boolean} hideGroupedColumn true to hide the column that is currently grouped (defaults to false) - */ - hideGroupedColumn : false, - /** - * @cfg {Boolean} showGroupName If true will display a prefix plus a ': ' before the group field value - * in the group header line. The prefix will consist of the {@link Ext.grid.Column#groupName groupName} - * (or the configured {@link Ext.grid.Column#header header} if not provided) configured in the - * {@link Ext.grid.Column} for each set of grouped rows (defaults to true). - */ - showGroupName : true, - /** - * @cfg {Boolean} startCollapsed true to start all groups collapsed (defaults to false) - */ - startCollapsed : false, - /** - * @cfg {Boolean} enableGrouping false to disable grouping functionality (defaults to true) - */ - enableGrouping : true, - /** - * @cfg {Boolean} enableGroupingMenu true to enable the grouping control in the column menu (defaults to true) - */ - enableGroupingMenu : true, - /** - * @cfg {Boolean} enableNoGroups true to allow the user to turn off grouping (defaults to true) - */ - enableNoGroups : true, - /** - * @cfg {String} emptyGroupText The text to display when there is an empty group value (defaults to '(None)'). - * May also be specified per column, see {@link Ext.grid.Column}.{@link Ext.grid.Column#emptyGroupText emptyGroupText}. - */ - emptyGroupText : '(None)', - /** - * @cfg {Boolean} ignoreAdd true to skip refreshing the view when new rows are added (defaults to false) - */ - ignoreAdd : false, - /** - * @cfg {String} groupTextTpl The template used to render the group header (defaults to '{text}'). - * This is used to format an object which contains the following properties: - *
        - *
      • group : String

        The rendered value of the group field. - * By default this is the unchanged value of the group field. If a {@link Ext.grid.Column#groupRenderer groupRenderer} - * is specified, it is the result of a call to that function.

      • - *
      • gvalue : Object

        The raw value of the group field.

      • - *
      • text : String

        The configured header (as described in {@link #showGroupName}) - * if {@link #showGroupName} is true) plus the rendered group field value.

      • - *
      • groupId : String

        A unique, generated ID which is applied to the - * View Element which contains the group.

      • - *
      • startRow : Number

        The row index of the Record which caused group change.

      • - *
      • rs : Array

        Contains a single element: The Record providing the data - * for the row which caused group change.

      • - *
      • cls : String

        The generated class name string to apply to the group header Element.

      • - *
      • style : String

        The inline style rules to apply to the group header Element.

      • - *

      - * See {@link Ext.XTemplate} for information on how to format data using a template. Possible usage:
      
      -var grid = new Ext.grid.GridPanel({
      -    ...
      -    view: new Ext.grid.GroupingView({
      -        groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
      -    }),
      -});
      -     * 
      - */ - groupTextTpl : '{text}', - - /** - * @cfg {String} groupMode Indicates how to construct the group identifier. 'value' constructs the id using - * raw value, 'display' constructs the id using the rendered value. Defaults to 'value'. - */ - groupMode: 'value', - - /** - * @cfg {Function} groupRenderer This property must be configured in the {@link Ext.grid.Column} for - * each column. - */ - - /** - * @cfg {Boolean} cancelEditOnToggle True to cancel any editing when the group header is toggled. Defaults to true. - */ - cancelEditOnToggle: true, - - // private - initTemplates : function(){ - Ext.grid.GroupingView.superclass.initTemplates.call(this); - this.state = {}; - - var sm = this.grid.getSelectionModel(); - sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect', - this.onBeforeRowSelect, this); - - if(!this.startGroup){ - this.startGroup = new Ext.XTemplate( - '
      ', - '
      ', this.groupTextTpl ,'
      ', - '
      ' - ); - } - this.startGroup.compile(); - - if (!this.endGroup) { - this.endGroup = '
      '; - } - }, - - // private - findGroup : function(el){ - return Ext.fly(el).up('.x-grid-group', this.mainBody.dom); - }, - - // private - getGroups : function(){ - return this.hasRows() ? this.mainBody.dom.childNodes : []; - }, - - // private - onAdd : function(ds, records, index) { - if (this.canGroup() && !this.ignoreAdd) { - var ss = this.getScrollState(); - this.fireEvent('beforerowsinserted', ds, index, index + (records.length-1)); - this.refresh(); - this.restoreScroll(ss); - this.fireEvent('rowsinserted', ds, index, index + (records.length-1)); - } else if (!this.canGroup()) { - Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments); - } - }, - - // private - onRemove : function(ds, record, index, isUpdate){ - Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments); - var g = document.getElementById(record._groupId); - if(g && g.childNodes[1].childNodes.length < 1){ - Ext.removeNode(g); - } - this.applyEmptyText(); - }, - - // private - refreshRow : function(record){ - if(this.ds.getCount()==1){ - this.refresh(); - }else{ - this.isUpdating = true; - Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments); - this.isUpdating = false; - } - }, - - // private - beforeMenuShow : function(){ - var item, items = this.hmenu.items, disabled = this.cm.config[this.hdCtxIndex].groupable === false; - if((item = items.get('groupBy'))){ - item.setDisabled(disabled); - } - if((item = items.get('showGroups'))){ - item.setDisabled(disabled); - item.setChecked(this.canGroup(), true); - } - }, - - // private - renderUI : function(){ - var markup = Ext.grid.GroupingView.superclass.renderUI.call(this); - - if(this.enableGroupingMenu && this.hmenu){ - this.hmenu.add('-',{ - itemId:'groupBy', - text: this.groupByText, - handler: this.onGroupByClick, - scope: this, - iconCls:'x-group-by-icon' - }); - if(this.enableNoGroups){ - this.hmenu.add({ - itemId:'showGroups', - text: this.showGroupsText, - checked: true, - checkHandler: this.onShowGroupsClick, - scope: this - }); - } - this.hmenu.on('beforeshow', this.beforeMenuShow, this); - } - return markup; - }, - - processEvent: function(name, e){ - Ext.grid.GroupingView.superclass.processEvent.call(this, name, e); - var hd = e.getTarget('.x-grid-group-hd', this.mainBody); - if(hd){ - // group value is at the end of the string - var field = this.getGroupField(), - prefix = this.getPrefix(field), - groupValue = hd.id.substring(prefix.length), - emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd'); - - // remove trailing '-hd' - groupValue = groupValue.substr(0, groupValue.length - 3); - - // also need to check for empty groups - if(groupValue || emptyRe.test(hd.id)){ - this.grid.fireEvent('group' + name, this.grid, field, groupValue, e); - } - if(name == 'mousedown' && e.button == 0){ - this.toggleGroup(hd.parentNode); - } - } - - }, - - // private - onGroupByClick : function(){ - var grid = this.grid; - this.enableGrouping = true; - grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)); - grid.fireEvent('groupchange', grid, grid.store.getGroupState()); - this.beforeMenuShow(); // Make sure the checkboxes get properly set when changing groups - this.refresh(); - }, - - // private - onShowGroupsClick : function(mi, checked){ - this.enableGrouping = checked; - if(checked){ - this.onGroupByClick(); - }else{ - this.grid.store.clearGrouping(); - this.grid.fireEvent('groupchange', this, null); - } - }, - - /** - * Toggle the group that contains the specific row. - * @param {Number} rowIndex The row inside the group - * @param {Boolean} expanded (optional) - */ - toggleRowIndex : function(rowIndex, expanded){ - if(!this.canGroup()){ - return; - } - var row = this.getRow(rowIndex); - if(row){ - this.toggleGroup(this.findGroup(row), expanded); - } - }, - - /** - * Toggles the specified group if no value is passed, otherwise sets the expanded state of the group to the value passed. - * @param {String} groupId The groupId assigned to the group (see getGroupId) - * @param {Boolean} expanded (optional) - */ - toggleGroup : function(group, expanded){ - var gel = Ext.get(group), - id = Ext.util.Format.htmlEncode(gel.id); - - expanded = Ext.isDefined(expanded) ? expanded : gel.hasClass('x-grid-group-collapsed'); - if(this.state[id] !== expanded){ - if (this.cancelEditOnToggle !== false) { - this.grid.stopEditing(true); - } - this.state[id] = expanded; - gel[expanded ? 'removeClass' : 'addClass']('x-grid-group-collapsed'); - } - }, - - /** - * Toggles all groups if no value is passed, otherwise sets the expanded state of all groups to the value passed. - * @param {Boolean} expanded (optional) - */ - toggleAllGroups : function(expanded){ - var groups = this.getGroups(); - for(var i = 0, len = groups.length; i < len; i++){ - this.toggleGroup(groups[i], expanded); - } - }, - - /** - * Expands all grouped rows. - */ - expandAllGroups : function(){ - this.toggleAllGroups(true); - }, - - /** - * Collapses all grouped rows. - */ - collapseAllGroups : function(){ - this.toggleAllGroups(false); - }, - - // private - getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){ - var column = this.cm.config[colIndex], - g = groupRenderer ? groupRenderer.call(column.scope, v, {}, r, rowIndex, colIndex, ds) : String(v); - if(g === '' || g === ' '){ - g = column.emptyGroupText || this.emptyGroupText; - } - return g; - }, - - // private - getGroupField : function(){ - return this.grid.store.getGroupState(); - }, - - // private - afterRender : function(){ - if(!this.ds || !this.cm){ - return; - } - Ext.grid.GroupingView.superclass.afterRender.call(this); - if(this.grid.deferRowRender){ - this.updateGroupWidths(); - } - }, - - afterRenderUI: function () { - Ext.grid.GroupingView.superclass.afterRenderUI.call(this); - - if (this.enableGroupingMenu && this.hmenu) { - this.hmenu.add('-',{ - itemId:'groupBy', - text: this.groupByText, - handler: this.onGroupByClick, - scope: this, - iconCls:'x-group-by-icon' - }); - - if (this.enableNoGroups) { - this.hmenu.add({ - itemId:'showGroups', - text: this.showGroupsText, - checked: true, - checkHandler: this.onShowGroupsClick, - scope: this - }); - } - - this.hmenu.on('beforeshow', this.beforeMenuShow, this); - } - }, - - // private - renderRows : function(){ - var groupField = this.getGroupField(); - var eg = !!groupField; - // if they turned off grouping and the last grouped field is hidden - if(this.hideGroupedColumn) { - var colIndex = this.cm.findColumnIndex(groupField), - hasLastGroupField = Ext.isDefined(this.lastGroupField); - if(!eg && hasLastGroupField){ - this.mainBody.update(''); - this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField), false); - delete this.lastGroupField; - }else if (eg && !hasLastGroupField){ - this.lastGroupField = groupField; - this.cm.setHidden(colIndex, true); - }else if (eg && hasLastGroupField && groupField !== this.lastGroupField) { - this.mainBody.update(''); - var oldIndex = this.cm.findColumnIndex(this.lastGroupField); - this.cm.setHidden(oldIndex, false); - this.lastGroupField = groupField; - this.cm.setHidden(colIndex, true); - } - } - return Ext.grid.GroupingView.superclass.renderRows.apply( - this, arguments); - }, - - // private - doRender : function(cs, rs, ds, startRow, colCount, stripe){ - if(rs.length < 1){ - return ''; - } - - if(!this.canGroup() || this.isUpdating){ - return Ext.grid.GroupingView.superclass.doRender.apply(this, arguments); - } - - var groupField = this.getGroupField(), - colIndex = this.cm.findColumnIndex(groupField), - g, - gstyle = 'width:' + this.getTotalWidth() + ';', - cfg = this.cm.config[colIndex], - groupRenderer = cfg.groupRenderer || cfg.renderer, - prefix = this.showGroupName ? (cfg.groupName || cfg.header)+': ' : '', - groups = [], - curGroup, i, len, gid; - - for(i = 0, len = rs.length; i < len; i++){ - var rowIndex = startRow + i, - r = rs[i], - gvalue = r.data[groupField]; - - g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds); - if(!curGroup || curGroup.group != g){ - gid = this.constructId(gvalue, groupField, colIndex); - // if state is defined use it, however state is in terms of expanded - // so negate it, otherwise use the default. - this.state[gid] = !(Ext.isDefined(this.state[gid]) ? !this.state[gid] : this.startCollapsed); - curGroup = { - group: g, - gvalue: gvalue, - text: prefix + g, - groupId: gid, - startRow: rowIndex, - rs: [r], - cls: this.state[gid] ? '' : 'x-grid-group-collapsed', - style: gstyle - }; - groups.push(curGroup); - }else{ - curGroup.rs.push(r); - } - r._groupId = gid; - } - - var buf = []; - for(i = 0, len = groups.length; i < len; i++){ - g = groups[i]; - this.doGroupStart(buf, g, cs, ds, colCount); - buf[buf.length] = Ext.grid.GroupingView.superclass.doRender.call( - this, cs, g.rs, ds, g.startRow, colCount, stripe); - - this.doGroupEnd(buf, g, cs, ds, colCount); - } - return buf.join(''); - }, - - /** - * Dynamically tries to determine the groupId of a specific value - * @param {String} value - * @return {String} The group id - */ - getGroupId : function(value){ - var field = this.getGroupField(); - return this.constructId(value, field, this.cm.findColumnIndex(field)); - }, - - // private - constructId : function(value, field, idx){ - var cfg = this.cm.config[idx], - groupRenderer = cfg.groupRenderer || cfg.renderer, - val = (this.groupMode == 'value') ? value : this.getGroup(value, {data:{}}, groupRenderer, 0, idx, this.ds); - - return this.getPrefix(field) + Ext.util.Format.htmlEncode(val); - }, - - // private - canGroup : function(){ - return this.enableGrouping && !!this.getGroupField(); - }, - - // private - getPrefix: function(field){ - return this.grid.getGridEl().id + '-gp-' + field + '-'; - }, - - // private - doGroupStart : function(buf, g, cs, ds, colCount){ - buf[buf.length] = this.startGroup.apply(g); - }, - - // private - doGroupEnd : function(buf, g, cs, ds, colCount){ - buf[buf.length] = this.endGroup; - }, - - // private - getRows : function(){ - if(!this.canGroup()){ - return Ext.grid.GroupingView.superclass.getRows.call(this); - } - var r = [], - gs = this.getGroups(), - g, - i = 0, - len = gs.length, - j, - jlen; - for(; i < len; ++i){ - g = gs[i].childNodes[1]; - if(g){ - g = g.childNodes; - for(j = 0, jlen = g.length; j < jlen; ++j){ - r[r.length] = g[j]; - } - } - } - return r; - }, - - // private - updateGroupWidths : function(){ - if(!this.canGroup() || !this.hasRows()){ - return; - } - var tw = Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth-this.getScrollOffset()) +'px'; - var gs = this.getGroups(); - for(var i = 0, len = gs.length; i < len; i++){ - gs[i].firstChild.style.width = tw; - } - }, - - // private - onColumnWidthUpdated : function(col, w, tw){ - Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this, col, w, tw); - this.updateGroupWidths(); - }, - - // private - onAllColumnWidthsUpdated : function(ws, tw){ - Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this, ws, tw); - this.updateGroupWidths(); - }, - - // private - onColumnHiddenUpdated : function(col, hidden, tw){ - Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this, col, hidden, tw); - this.updateGroupWidths(); - }, - - // private - onLayout : function(){ - this.updateGroupWidths(); - }, - - // private - onBeforeRowSelect : function(sm, rowIndex){ - this.toggleRowIndex(rowIndex, true); - } -}); -// private -Ext.grid.GroupingView.GROUP_ID = 1000; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-grouping.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-grouping.js deleted file mode 100644 index 033953ca222..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-grouping.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",groupMode:"value",cancelEditOnToggle:true,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('
      ','
      ',this.groupTextTpl,"
      ",'
      ')}this.startGroup.compile();if(!this.endGroup){this.endGroup="
      "}},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(d,a,b){if(this.canGroup()&&!this.ignoreAdd){var c=this.getScrollState();this.fireEvent("beforerowsinserted",d,b,b+(a.length-1));this.refresh();this.restoreScroll(c);this.fireEvent("rowsinserted",d,b,b+(a.length-1))}else{if(!this.canGroup()){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(this.canGroup(),true)}},renderUI:function(){var a=Ext.grid.GroupingView.superclass.renderUI.call(this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}return a},processEvent:function(b,h){Ext.grid.GroupingView.superclass.processEvent.call(this,b,h);var g=h.getTarget(".x-grid-group-hd",this.mainBody);if(g){var f=this.getGroupField(),d=this.getPrefix(f),a=g.id.substring(d.length),c=new RegExp("gp-"+Ext.escapeRe(f)+"--hd");a=a.substr(0,a.length-3);if(a||c.test(g.id)){this.grid.fireEvent("group"+b,this.grid,f,a,h)}if(b=="mousedown"&&h.button==0){this.toggleGroup(g.parentNode)}}},onGroupByClick:function(){var a=this.grid;this.enableGrouping=true;a.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));a.fireEvent("groupchange",a,a.store.getGroupState());this.beforeMenuShow();this.refresh()},onShowGroupsClick:function(a,b){this.enableGrouping=b;if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping();this.grid.fireEvent("groupchange",this,null)}},toggleRowIndex:function(c,a){if(!this.canGroup()){return}var b=this.getRow(c);if(b){this.toggleGroup(this.findGroup(b),a)}},toggleGroup:function(c,b){var a=Ext.get(c),d=Ext.util.Format.htmlEncode(a.id);b=Ext.isDefined(b)?b:a.hasClass("x-grid-group-collapsed");if(this.state[d]!==b){if(this.cancelEditOnToggle!==false){this.grid.stopEditing(true)}this.state[d]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")}},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d -var rec = new Ext.grid.PropertyRecord({ - name: 'Birthday', - value: new Date(Date.parse('05/26/1972')) -}); -// Add record to an already populated grid -grid.store.addSorted(rec); - - * @constructor - * @param {Object} config A data object in the format: {name: [name], value: [value]}. The specified value's type - * will be read automatically by the grid to determine the type of editor to use when displaying it. - */ -Ext.grid.PropertyRecord = Ext.data.Record.create([ - {name:'name',type:'string'}, 'value' -]); - -/** - * @class Ext.grid.PropertyStore - * @extends Ext.util.Observable - * A custom wrapper for the {@link Ext.grid.PropertyGrid}'s {@link Ext.data.Store}. This class handles the mapping - * between the custom data source objects supported by the grid and the {@link Ext.grid.PropertyRecord} format - * required for compatibility with the underlying store. Generally this class should not need to be used directly -- - * the grid's data should be accessed from the underlying store via the {@link #store} property. - * @constructor - * @param {Ext.grid.Grid} grid The grid this store will be bound to - * @param {Object} source The source data config object - */ -Ext.grid.PropertyStore = Ext.extend(Ext.util.Observable, { - - constructor : function(grid, source){ - this.grid = grid; - this.store = new Ext.data.Store({ - recordType : Ext.grid.PropertyRecord - }); - this.store.on('update', this.onUpdate, this); - if(source){ - this.setSource(source); - } - Ext.grid.PropertyStore.superclass.constructor.call(this); - }, - - // protected - should only be called by the grid. Use grid.setSource instead. - setSource : function(o){ - this.source = o; - this.store.removeAll(); - var data = []; - for(var k in o){ - if(this.isEditableValue(o[k])){ - data.push(new Ext.grid.PropertyRecord({name: k, value: o[k]}, k)); - } - } - this.store.loadRecords({records: data}, {}, true); - }, - - // private - onUpdate : function(ds, record, type){ - if(type == Ext.data.Record.EDIT){ - var v = record.data.value; - var oldValue = record.modified.value; - if(this.grid.fireEvent('beforepropertychange', this.source, record.id, v, oldValue) !== false){ - this.source[record.id] = v; - record.commit(); - this.grid.fireEvent('propertychange', this.source, record.id, v, oldValue); - }else{ - record.reject(); - } - } - }, - - // private - getProperty : function(row){ - return this.store.getAt(row); - }, - - // private - isEditableValue: function(val){ - return Ext.isPrimitive(val) || Ext.isDate(val); - }, - - // private - setValue : function(prop, value, create){ - var r = this.getRec(prop); - if(r){ - r.set('value', value); - this.source[prop] = value; - }else if(create){ - // only create if specified. - this.source[prop] = value; - r = new Ext.grid.PropertyRecord({name: prop, value: value}, prop); - this.store.add(r); - - } - }, - - // private - remove : function(prop){ - var r = this.getRec(prop); - if(r){ - this.store.remove(r); - delete this.source[prop]; - } - }, - - // private - getRec : function(prop){ - return this.store.getById(prop); - }, - - // protected - should only be called by the grid. Use grid.getSource instead. - getSource : function(){ - return this.source; - } -}); - -/** - * @class Ext.grid.PropertyColumnModel - * @extends Ext.grid.ColumnModel - * A custom column model for the {@link Ext.grid.PropertyGrid}. Generally it should not need to be used directly. - * @constructor - * @param {Ext.grid.Grid} grid The grid this store will be bound to - * @param {Object} source The source data config object - */ -Ext.grid.PropertyColumnModel = Ext.extend(Ext.grid.ColumnModel, { - // private - strings used for locale support - nameText : 'Name', - valueText : 'Value', - dateFormat : 'm/j/Y', - trueText: 'true', - falseText: 'false', - - constructor : function(grid, store){ - var g = Ext.grid, - f = Ext.form; - - this.grid = grid; - g.PropertyColumnModel.superclass.constructor.call(this, [ - {header: this.nameText, width:50, sortable: true, dataIndex:'name', id: 'name', menuDisabled:true}, - {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value', menuDisabled:true} - ]); - this.store = store; - - var bfield = new f.Field({ - autoCreate: {tag: 'select', children: [ - {tag: 'option', value: 'true', html: this.trueText}, - {tag: 'option', value: 'false', html: this.falseText} - ]}, - getValue : function(){ - return this.el.dom.value == 'true'; - } - }); - this.editors = { - 'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})), - 'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})), - 'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})), - 'boolean' : new g.GridEditor(bfield, { - autoSize: 'both' - }) - }; - this.renderCellDelegate = this.renderCell.createDelegate(this); - this.renderPropDelegate = this.renderProp.createDelegate(this); - }, - - // private - renderDate : function(dateVal){ - return dateVal.dateFormat(this.dateFormat); - }, - - // private - renderBool : function(bVal){ - return this[bVal ? 'trueText' : 'falseText']; - }, - - // private - isCellEditable : function(colIndex, rowIndex){ - return colIndex == 1; - }, - - // private - getRenderer : function(col){ - return col == 1 ? - this.renderCellDelegate : this.renderPropDelegate; - }, - - // private - renderProp : function(v){ - return this.getPropertyName(v); - }, - - // private - renderCell : function(val, meta, rec){ - var renderer = this.grid.customRenderers[rec.get('name')]; - if(renderer){ - return renderer.apply(this, arguments); - } - var rv = val; - if(Ext.isDate(val)){ - rv = this.renderDate(val); - }else if(typeof val == 'boolean'){ - rv = this.renderBool(val); - } - return Ext.util.Format.htmlEncode(rv); - }, - - // private - getPropertyName : function(name){ - var pn = this.grid.propertyNames; - return pn && pn[name] ? pn[name] : name; - }, - - // private - getCellEditor : function(colIndex, rowIndex){ - var p = this.store.getProperty(rowIndex), - n = p.data.name, - val = p.data.value; - if(this.grid.customEditors[n]){ - return this.grid.customEditors[n]; - } - if(Ext.isDate(val)){ - return this.editors.date; - }else if(typeof val == 'number'){ - return this.editors.number; - }else if(typeof val == 'boolean'){ - return this.editors['boolean']; - }else{ - return this.editors.string; - } - }, - - // inherit docs - destroy : function(){ - Ext.grid.PropertyColumnModel.superclass.destroy.call(this); - this.destroyEditors(this.editors); - this.destroyEditors(this.grid.customEditors); - }, - - destroyEditors: function(editors){ - for(var ed in editors){ - Ext.destroy(editors[ed]); - } - } -}); - -/** - * @class Ext.grid.PropertyGrid - * @extends Ext.grid.EditorGridPanel - * A specialized grid implementation intended to mimic the traditional property grid as typically seen in - * development IDEs. Each row in the grid represents a property of some object, and the data is stored - * as a set of name/value pairs in {@link Ext.grid.PropertyRecord}s. Example usage: - *
      
      -var grid = new Ext.grid.PropertyGrid({
      -    title: 'Properties Grid',
      -    autoHeight: true,
      -    width: 300,
      -    renderTo: 'grid-ct',
      -    source: {
      -        "(name)": "My Object",
      -        "Created": new Date(Date.parse('10/15/2006')),
      -        "Available": false,
      -        "Version": .01,
      -        "Description": "A test object"
      -    }
      -});
      -
      - * @constructor - * @param {Object} config The grid config object - */ -Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, { - /** - * @cfg {Object} propertyNames An object containing property name/display name pairs. - * If specified, the display name will be shown in the name column instead of the property name. - */ - /** - * @cfg {Object} source A data object to use as the data source of the grid (see {@link #setSource} for details). - */ - /** - * @cfg {Object} customEditors An object containing name/value pairs of custom editor type definitions that allow - * the grid to support additional types of editable fields. By default, the grid supports strongly-typed editing - * of strings, dates, numbers and booleans using built-in form editors, but any custom type can be supported and - * associated with a custom input control by specifying a custom editor. The name of the editor - * type should correspond with the name of the property that will use the editor. Example usage: - *
      
      -var grid = new Ext.grid.PropertyGrid({
      -    ...
      -    customEditors: {
      -        'Start Time': new Ext.grid.GridEditor(new Ext.form.TimeField({selectOnFocus:true}))
      -    },
      -    source: {
      -        'Start Time': '10:00 AM'
      -    }
      -});
      -
      - */ - /** - * @cfg {Object} source A data object to use as the data source of the grid (see {@link #setSource} for details). - */ - /** - * @cfg {Object} customRenderers An object containing name/value pairs of custom renderer type definitions that allow - * the grid to support custom rendering of fields. By default, the grid supports strongly-typed rendering - * of strings, dates, numbers and booleans using built-in form editors, but any custom type can be supported and - * associated with the type of the value. The name of the renderer type should correspond with the name of the property - * that it will render. Example usage: - *
      
      -var grid = new Ext.grid.PropertyGrid({
      -    ...
      -    customRenderers: {
      -        Available: function(v){
      -            if(v){
      -                return 'Yes';
      -            }else{
      -                return 'No';
      -            }
      -        }
      -    },
      -    source: {
      -        Available: true
      -    }
      -});
      -
      - */ - - // private config overrides - enableColumnMove:false, - stripeRows:false, - trackMouseOver: false, - clicksToEdit:1, - enableHdMenu : false, - viewConfig : { - forceFit:true - }, - - // private - initComponent : function(){ - this.customRenderers = this.customRenderers || {}; - this.customEditors = this.customEditors || {}; - this.lastEditRow = null; - var store = new Ext.grid.PropertyStore(this); - this.propStore = store; - var cm = new Ext.grid.PropertyColumnModel(this, store); - store.store.sort('name', 'ASC'); - this.addEvents( - /** - * @event beforepropertychange - * Fires before a property value changes. Handlers can return false to cancel the property change - * (this will internally call {@link Ext.data.Record#reject} on the property's record). - * @param {Object} source The source data object for the grid (corresponds to the same object passed in - * as the {@link #source} config property). - * @param {String} recordId The record's id in the data store - * @param {Mixed} value The current edited property value - * @param {Mixed} oldValue The original property value prior to editing - */ - 'beforepropertychange', - /** - * @event propertychange - * Fires after a property value has changed. - * @param {Object} source The source data object for the grid (corresponds to the same object passed in - * as the {@link #source} config property). - * @param {String} recordId The record's id in the data store - * @param {Mixed} value The current edited property value - * @param {Mixed} oldValue The original property value prior to editing - */ - 'propertychange' - ); - this.cm = cm; - this.ds = store.store; - Ext.grid.PropertyGrid.superclass.initComponent.call(this); - - this.mon(this.selModel, 'beforecellselect', function(sm, rowIndex, colIndex){ - if(colIndex === 0){ - this.startEditing.defer(200, this, [rowIndex, 1]); - return false; - } - }, this); - }, - - // private - onRender : function(){ - Ext.grid.PropertyGrid.superclass.onRender.apply(this, arguments); - - this.getGridEl().addClass('x-props-grid'); - }, - - // private - afterRender: function(){ - Ext.grid.PropertyGrid.superclass.afterRender.apply(this, arguments); - if(this.source){ - this.setSource(this.source); - } - }, - - /** - * Sets the source data object containing the property data. The data object can contain one or more name/value - * pairs representing all of the properties of an object to display in the grid, and this data will automatically - * be loaded into the grid's {@link #store}. The values should be supplied in the proper data type if needed, - * otherwise string type will be assumed. If the grid already contains data, this method will replace any - * existing data. See also the {@link #source} config value. Example usage: - *
      
      -grid.setSource({
      -    "(name)": "My Object",
      -    "Created": new Date(Date.parse('10/15/2006')),  // date type
      -    "Available": false,  // boolean type
      -    "Version": .01,      // decimal type
      -    "Description": "A test object"
      -});
      -
      - * @param {Object} source The data object - */ - setSource : function(source){ - this.propStore.setSource(source); - }, - - /** - * Gets the source data object containing the property data. See {@link #setSource} for details regarding the - * format of the data object. - * @return {Object} The data object - */ - getSource : function(){ - return this.propStore.getSource(); - }, - - /** - * Sets the value of a property. - * @param {String} prop The name of the property to set - * @param {Mixed} value The value to test - * @param {Boolean} create (Optional) True to create the property if it doesn't already exist. Defaults to false. - */ - setProperty : function(prop, value, create){ - this.propStore.setValue(prop, value, create); - }, - - /** - * Removes a property from the grid. - * @param {String} prop The name of the property to remove - */ - removeProperty : function(prop){ - this.propStore.remove(prop); - } - - /** - * @cfg store - * @hide - */ - /** - * @cfg colModel - * @hide - */ - /** - * @cfg cm - * @hide - */ - /** - * @cfg columns - * @hide - */ -}); -Ext.reg("propertygrid", Ext.grid.PropertyGrid); diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-property.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-property.js deleted file mode 100644 index d0e31711f73..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-property.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=Ext.extend(Ext.util.Observable,{constructor:function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)},setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)},setValue:function(d,c,a){var b=this.getRec(d);if(b){b.set("value",c);this.source[d]=c}else{if(a){this.source[d]=c;b=new Ext.grid.PropertyRecord({name:d,value:c},d);this.store.add(b)}}},remove:function(b){var a=this.getRec(b);if(a){this.store.remove(a);delete this.source[b]}},getRec:function(a){return this.store.getById(a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=Ext.extend(Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",constructor:function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:this.trueText},{tag:"option",value:"false",html:this.falseText}]},getValue:function(){return this.el.dom.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a,{autoSize:"both"})};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)},renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return this[a?"trueText":"falseText"]},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(d,b,c){var a=this.grid.customRenderers[c.get("name")];if(a){return a.apply(this,arguments)}var e=d;if(Ext.isDate(d)){e=this.renderDate(d)}else{if(typeof d=="boolean"){e=this.renderBool(d)}}return Ext.util.Format.htmlEncode(e)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);this.destroyEditors(this.editors);this.destroyEditors(this.grid.customEditors)},destroyEditors:function(b){for(var a in b){Ext.destroy(b[a])}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customRenderers=this.customRenderers||{};this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.reg("propertygrid",Ext.grid.PropertyGrid); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-history-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-history-debug.js deleted file mode 100644 index 5b6cdf20f38..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-history-debug.js +++ /dev/null @@ -1,221 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.History - * @extends Ext.util.Observable - * History management component that allows you to register arbitrary tokens that signify application - * history state on navigation actions. You can then handle the history {@link #change} event in order - * to reset your application UI to the appropriate state when the user navigates forward or backward through - * the browser history stack. - * @singleton - */ -Ext.History = (function () { - var iframe, hiddenField; - var ready = false; - var currentToken; - - function getHash() { - var href = location.href, i = href.indexOf("#"), - hash = i >= 0 ? href.substr(i + 1) : null; - - if (Ext.isGecko) { - hash = decodeURIComponent(hash); - } - return hash; - } - - function doSave() { - hiddenField.value = currentToken; - } - - function handleStateChange(token) { - currentToken = token; - Ext.History.fireEvent('change', token); - } - - function updateIFrame (token) { - var html = ['
      ',Ext.util.Format.htmlEncode(token),'
      '].join(''); - try { - var doc = iframe.contentWindow.document; - doc.open(); - doc.write(html); - doc.close(); - return true; - } catch (e) { - return false; - } - } - - function checkIFrame() { - if (!iframe.contentWindow || !iframe.contentWindow.document) { - setTimeout(checkIFrame, 10); - return; - } - - var doc = iframe.contentWindow.document; - var elem = doc.getElementById("state"); - var token = elem ? elem.innerText : null; - - var hash = getHash(); - - setInterval(function () { - - doc = iframe.contentWindow.document; - elem = doc.getElementById("state"); - - var newtoken = elem ? elem.innerText : null; - - var newHash = getHash(); - - if (newtoken !== token) { - token = newtoken; - handleStateChange(token); - location.hash = token; - hash = token; - doSave(); - } else if (newHash !== hash) { - hash = newHash; - updateIFrame(newHash); - } - - }, 50); - - ready = true; - - Ext.History.fireEvent('ready', Ext.History); - } - - function startUp() { - currentToken = hiddenField.value ? hiddenField.value : getHash(); - - if (Ext.isIE) { - checkIFrame(); - } else { - var hash = getHash(); - setInterval(function () { - var newHash = getHash(); - if (newHash !== hash) { - hash = newHash; - handleStateChange(hash); - doSave(); - } - }, 50); - ready = true; - Ext.History.fireEvent('ready', Ext.History); - } - } - - return { - /** - * The id of the hidden field required for storing the current history token. - * @type String - * @property - */ - fieldId: 'x-history-field', - /** - * The id of the iframe required by IE to manage the history stack. - * @type String - * @property - */ - iframeId: 'x-history-frame', - - events:{}, - - /** - * Initialize the global History instance. - * @param {Boolean} onReady (optional) A callback function that will be called once the history - * component is fully initialized. - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to the browser window. - */ - init: function (onReady, scope) { - if(ready) { - Ext.callback(onReady, scope, [this]); - return; - } - if(!Ext.isReady){ - Ext.onReady(function(){ - Ext.History.init(onReady, scope); - }); - return; - } - hiddenField = Ext.getDom(Ext.History.fieldId); - if (Ext.isIE) { - iframe = Ext.getDom(Ext.History.iframeId); - } - this.addEvents( - /** - * @event ready - * Fires when the Ext.History singleton has been initialized and is ready for use. - * @param {Ext.History} The Ext.History singleton. - */ - 'ready', - /** - * @event change - * Fires when navigation back or forwards within the local page's history occurs. - * @param {String} token An identifier associated with the page state at that point in its history. - */ - 'change' - ); - if(onReady){ - this.on('ready', onReady, scope, {single:true}); - } - startUp(); - }, - - /** - * Add a new token to the history stack. This can be any arbitrary value, although it would - * commonly be the concatenation of a component id and another id marking the specifc history - * state of that component. Example usage: - *
      
      -// Handle tab changes on a TabPanel
      -tabPanel.on('tabchange', function(tabPanel, tab){
      -    Ext.History.add(tabPanel.id + ':' + tab.id);
      -});
      -
      - * @param {String} token The value that defines a particular application-specific history state - * @param {Boolean} preventDuplicates When true, if the passed token matches the current token - * it will not save a new history step. Set to false if the same state can be saved more than once - * at the same history stack location (defaults to true). - */ - add: function (token, preventDup) { - if(preventDup !== false){ - if(this.getToken() == token){ - return true; - } - } - if (Ext.isIE) { - return updateIFrame(token); - } else { - location.hash = token; - return true; - } - }, - - /** - * Programmatically steps back one step in browser history (equivalent to the user pressing the Back button). - */ - back: function(){ - history.go(-1); - }, - - /** - * Programmatically steps forward one step in browser history (equivalent to the user pressing the Forward button). - */ - forward: function(){ - history.go(1); - }, - - /** - * Retrieves the currently-active history token. - * @return {String} The token - */ - getToken: function() { - return ready ? currentToken : getHash(); - } - }; -})(); -Ext.apply(Ext.History, new Ext.util.Observable()); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-history.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-history.js deleted file mode 100644 index 884596cd0b3..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-history.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.History=(function(){var e,c;var j=false;var d;function f(){var k=location.href,l=k.indexOf("#"),m=l>=0?k.substr(l+1):null;if(Ext.isGecko){m=decodeURIComponent(m)}return m}function a(){c.value=d}function g(k){d=k;Ext.History.fireEvent("change",k)}function h(l){var k=['
      ',Ext.util.Format.htmlEncode(l),"
      "].join("");try{var n=e.contentWindow.document;n.open();n.write(k);n.close();return true}catch(m){return false}}function b(){if(!e.contentWindow||!e.contentWindow.document){setTimeout(b,10);return}var n=e.contentWindow.document;var l=n.getElementById("state");var k=l?l.innerText:null;var m=f();setInterval(function(){n=e.contentWindow.document;l=n.getElementById("state");var p=l?l.innerText:null;var o=f();if(p!==k){k=p;g(k);location.hash=k;m=k;a()}else{if(o!==m){m=o;h(o)}}},50);j=true;Ext.History.fireEvent("ready",Ext.History)}function i(){d=c.value?c.value:f();if(Ext.isIE){b()}else{var k=f();setInterval(function(){var l=f();if(l!==k){k=l;g(k);a()}},50);j=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(l,k){if(j){Ext.callback(l,k,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(l,k)});return}c=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){e=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(l){this.on("ready",l,k,{single:true})}i()},add:function(k,l){if(l!==false){if(this.getToken()==k){return true}}if(Ext.isIE){return h(k)}else{location.hash=k;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return j?d:f()}}})();Ext.apply(Ext.History,new Ext.util.Observable()); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-menu-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-menu-debug.js deleted file mode 100644 index 85ebf2365d5..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-menu-debug.js +++ /dev/null @@ -1,1727 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.menu.Menu - * @extends Ext.Container - *

      A menu object. This is the container to which you may add menu items. Menu can also serve as a base class - * when you want a specialized menu based off of another component (like {@link Ext.menu.DateMenu} for example).

      - *

      Menus may contain either {@link Ext.menu.Item menu items}, or general {@link Ext.Component Component}s.

      - *

      To make a contained general {@link Ext.Component Component} line up with other {@link Ext.menu.Item menu items} - * specify iconCls: 'no-icon'. This reserves a space for an icon, and indents the Component in line - * with the other menu items. See {@link Ext.form.ComboBox}.{@link Ext.form.ComboBox#getListParent getListParent} - * for an example.

      - *

      By default, Menus are absolutely positioned, floating Components. By configuring a Menu with - * {@link #floating}:false, a Menu may be used as child of a Container.

      - * - * @xtype menu - */ -Ext.menu.Menu = Ext.extend(Ext.Container, { - /** - * @cfg {Object} defaults - * A config object that will be applied to all items added to this container either via the {@link #items} - * config or via the {@link #add} method. The defaults config can contain any number of - * name/value property pairs to be added to each item, and should be valid for the types of items - * being added to the menu. - */ - /** - * @cfg {Mixed} items - * An array of items to be added to this menu. Menus may contain either {@link Ext.menu.Item menu items}, - * or general {@link Ext.Component Component}s. - */ - /** - * @cfg {Number} minWidth The minimum width of the menu in pixels (defaults to 120) - */ - minWidth : 120, - /** - * @cfg {Boolean/String} shadow True or 'sides' for the default effect, 'frame' for 4-way shadow, and 'drop' - * for bottom-right shadow (defaults to 'sides') - */ - shadow : 'sides', - /** - * @cfg {String} subMenuAlign The {@link Ext.Element#alignTo} anchor position value to use for submenus of - * this menu (defaults to 'tl-tr?') - */ - subMenuAlign : 'tl-tr?', - /** - * @cfg {String} defaultAlign The default {@link Ext.Element#alignTo} anchor position value for this menu - * relative to its element of origin (defaults to 'tl-bl?') - */ - defaultAlign : 'tl-bl?', - /** - * @cfg {Boolean} allowOtherMenus True to allow multiple menus to be displayed at the same time (defaults to false) - */ - allowOtherMenus : false, - /** - * @cfg {Boolean} ignoreParentClicks True to ignore clicks on any item in this menu that is a parent item (displays - * a submenu) so that the submenu is not dismissed when clicking the parent item (defaults to false). - */ - ignoreParentClicks : false, - /** - * @cfg {Boolean} enableScrolling True to allow the menu container to have scroller controls if the menu is too long (defaults to true). - */ - enableScrolling : true, - /** - * @cfg {Number} maxHeight The maximum height of the menu. Only applies when enableScrolling is set to True (defaults to null). - */ - maxHeight : null, - /** - * @cfg {Number} scrollIncrement The amount to scroll the menu. Only applies when enableScrolling is set to True (defaults to 24). - */ - scrollIncrement : 24, - /** - * @cfg {Boolean} showSeparator True to show the icon separator. (defaults to true). - */ - showSeparator : true, - /** - * @cfg {Array} defaultOffsets An array specifying the [x, y] offset in pixels by which to - * change the default Menu popup position after aligning according to the {@link #defaultAlign} - * configuration. Defaults to [0, 0]. - */ - defaultOffsets : [0, 0], - - /** - * @cfg {Boolean} plain - * True to remove the incised line down the left side of the menu. Defaults to false. - */ - plain : false, - - /** - * @cfg {Boolean} floating - *

      By default, a Menu configured as floating:true - * will be rendered as an {@link Ext.Layer} (an absolutely positioned, - * floating Component with zindex=15000). - * If configured as floating:false, the Menu may be - * used as child item of another Container instead of a free-floating - * {@link Ext.Layer Layer}. - */ - floating : true, - - - /** - * @cfg {Number} zIndex - * zIndex to use when the menu is floating. - */ - zIndex: 15000, - - // private - hidden : true, - - /** - * @cfg {String/Object} layout - * This class assigns a default layout (layout:'menu'). - * Developers may override this configuration option if another layout is required. - * See {@link Ext.Container#layout} for additional information. - */ - layout : 'menu', - hideMode : 'offsets', // Important for laying out Components - scrollerHeight : 8, - autoLayout : true, // Provided for backwards compat - defaultType : 'menuitem', - bufferResize : false, - - initComponent : function(){ - if(Ext.isArray(this.initialConfig)){ - Ext.apply(this, {items:this.initialConfig}); - } - this.addEvents( - /** - * @event click - * Fires when this menu is clicked (or when the enter key is pressed while it is active) - * @param {Ext.menu.Menu} this - * @param {Ext.menu.Item} menuItem The menu item that was clicked - * @param {Ext.EventObject} e - */ - 'click', - /** - * @event mouseover - * Fires when the mouse is hovering over this menu - * @param {Ext.menu.Menu} this - * @param {Ext.EventObject} e - * @param {Ext.menu.Item} menuItem The menu item that was clicked - */ - 'mouseover', - /** - * @event mouseout - * Fires when the mouse exits this menu - * @param {Ext.menu.Menu} this - * @param {Ext.EventObject} e - * @param {Ext.menu.Item} menuItem The menu item that was clicked - */ - 'mouseout', - /** - * @event itemclick - * Fires when a menu item contained in this menu is clicked - * @param {Ext.menu.BaseItem} baseItem The BaseItem that was clicked - * @param {Ext.EventObject} e - */ - 'itemclick' - ); - Ext.menu.MenuMgr.register(this); - if(this.floating){ - Ext.EventManager.onWindowResize(this.hide, this); - }else{ - if(this.initialConfig.hidden !== false){ - this.hidden = false; - } - this.internalDefaults = {hideOnClick: false}; - } - Ext.menu.Menu.superclass.initComponent.call(this); - if(this.autoLayout){ - var fn = this.doLayout.createDelegate(this, []); - this.on({ - add: fn, - remove: fn - }); - } - }, - - //private - getLayoutTarget : function() { - return this.ul; - }, - - // private - onRender : function(ct, position){ - if(!ct){ - ct = Ext.getBody(); - } - - var dh = { - id: this.getId(), - cls: 'x-menu ' + ((this.floating) ? 'x-menu-floating x-layer ' : '') + (this.cls || '') + (this.plain ? ' x-menu-plain' : '') + (this.showSeparator ? '' : ' x-menu-nosep'), - style: this.style, - cn: [ - {tag: 'a', cls: 'x-menu-focus', href: '#', onclick: 'return false;', tabIndex: '-1'}, - {tag: 'ul', cls: 'x-menu-list'} - ] - }; - if(this.floating){ - this.el = new Ext.Layer({ - shadow: this.shadow, - dh: dh, - constrain: false, - parentEl: ct, - zindex: this.zIndex - }); - }else{ - this.el = ct.createChild(dh); - } - Ext.menu.Menu.superclass.onRender.call(this, ct, position); - - if(!this.keyNav){ - this.keyNav = new Ext.menu.MenuNav(this); - } - // generic focus element - this.focusEl = this.el.child('a.x-menu-focus'); - this.ul = this.el.child('ul.x-menu-list'); - this.mon(this.ul, { - scope: this, - click: this.onClick, - mouseover: this.onMouseOver, - mouseout: this.onMouseOut - }); - if(this.enableScrolling){ - this.mon(this.el, { - scope: this, - delegate: '.x-menu-scroller', - click: this.onScroll, - mouseover: this.deactivateActive - }); - } - }, - - // private - findTargetItem : function(e){ - var t = e.getTarget('.x-menu-list-item', this.ul, true); - if(t && t.menuItemId){ - return this.items.get(t.menuItemId); - } - }, - - // private - onClick : function(e){ - var t = this.findTargetItem(e); - if(t){ - if(t.isFormField){ - this.setActiveItem(t); - }else if(t instanceof Ext.menu.BaseItem){ - if(t.menu && this.ignoreParentClicks){ - t.expandMenu(); - e.preventDefault(); - }else if(t.onClick){ - t.onClick(e); - this.fireEvent('click', this, t, e); - } - } - } - }, - - // private - setActiveItem : function(item, autoExpand){ - if(item != this.activeItem){ - this.deactivateActive(); - if((this.activeItem = item).isFormField){ - item.focus(); - }else{ - item.activate(autoExpand); - } - }else if(autoExpand){ - item.expandMenu(); - } - }, - - deactivateActive : function(){ - var a = this.activeItem; - if(a){ - if(a.isFormField){ - //Fields cannot deactivate, but Combos must collapse - if(a.collapse){ - a.collapse(); - } - }else{ - a.deactivate(); - } - delete this.activeItem; - } - }, - - // private - tryActivate : function(start, step){ - var items = this.items; - for(var i = start, len = items.length; i >= 0 && i < len; i+= step){ - var item = items.get(i); - if(item.isVisible() && !item.disabled && (item.canActivate || item.isFormField)){ - this.setActiveItem(item, false); - return item; - } - } - return false; - }, - - // private - onMouseOver : function(e){ - var t = this.findTargetItem(e); - if(t){ - if(t.canActivate && !t.disabled){ - this.setActiveItem(t, true); - } - } - this.over = true; - this.fireEvent('mouseover', this, e, t); - }, - - // private - onMouseOut : function(e){ - var t = this.findTargetItem(e); - if(t){ - if(t == this.activeItem && t.shouldDeactivate && t.shouldDeactivate(e)){ - this.activeItem.deactivate(); - delete this.activeItem; - } - } - this.over = false; - this.fireEvent('mouseout', this, e, t); - }, - - // private - onScroll : function(e, t){ - if(e){ - e.stopEvent(); - } - var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top'); - ul.scrollTop += this.scrollIncrement * (top ? -1 : 1); - if(top ? ul.scrollTop <= 0 : ul.scrollTop + this.activeMax >= ul.scrollHeight){ - this.onScrollerOut(null, t); - } - }, - - // private - onScrollerIn : function(e, t){ - var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top'); - if(top ? ul.scrollTop > 0 : ul.scrollTop + this.activeMax < ul.scrollHeight){ - Ext.fly(t).addClass(['x-menu-item-active', 'x-menu-scroller-active']); - } - }, - - // private - onScrollerOut : function(e, t){ - Ext.fly(t).removeClass(['x-menu-item-active', 'x-menu-scroller-active']); - }, - - /** - * If {@link #floating}=true, shows this menu relative to - * another element using {@link #showat}, otherwise uses {@link Ext.Component#show}. - * @param {Mixed} element The element to align to - * @param {String} position (optional) The {@link Ext.Element#alignTo} anchor position to use in aligning to - * the element (defaults to this.defaultAlign) - * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined) - */ - show : function(el, pos, parentMenu){ - if(this.floating){ - this.parentMenu = parentMenu; - if(!this.el){ - this.render(); - this.doLayout(false, true); - } - this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign, this.defaultOffsets), parentMenu); - }else{ - Ext.menu.Menu.superclass.show.call(this); - } - }, - - /** - * Displays this menu at a specific xy position and fires the 'show' event if a - * handler for the 'beforeshow' event does not return false cancelling the operation. - * @param {Array} xyPosition Contains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based) - * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined) - */ - showAt : function(xy, parentMenu){ - if(this.fireEvent('beforeshow', this) !== false){ - this.parentMenu = parentMenu; - if(!this.el){ - this.render(); - } - if(this.enableScrolling){ - // set the position so we can figure out the constrain value. - this.el.setXY(xy); - //constrain the value, keep the y coordinate the same - xy[1] = this.constrainScroll(xy[1]); - xy = [this.el.adjustForConstraints(xy)[0], xy[1]]; - }else{ - //constrain to the viewport. - xy = this.el.adjustForConstraints(xy); - } - this.el.setXY(xy); - this.el.show(); - Ext.menu.Menu.superclass.onShow.call(this); - if(Ext.isIE){ - // internal event, used so we don't couple the layout to the menu - this.fireEvent('autosize', this); - if(!Ext.isIE8){ - this.el.repaint(); - } - } - this.hidden = false; - this.focus(); - this.fireEvent('show', this); - } - }, - - constrainScroll : function(y){ - var max, full = this.ul.setHeight('auto').getHeight(), - returnY = y, normalY, parentEl, scrollTop, viewHeight; - if(this.floating){ - parentEl = Ext.fly(this.el.dom.parentNode); - scrollTop = parentEl.getScroll().top; - viewHeight = parentEl.getViewSize().height; - //Normalize y by the scroll position for the parent element. Need to move it into the coordinate space - //of the view. - normalY = y - scrollTop; - max = this.maxHeight ? this.maxHeight : viewHeight - normalY; - if(full > viewHeight) { - max = viewHeight; - //Set returnY equal to (0,0) in view space by reducing y by the value of normalY - returnY = y - normalY; - } else if(max < full) { - returnY = y - (full - max); - max = full; - } - }else{ - max = this.getHeight(); - } - // Always respect maxHeight - if (this.maxHeight){ - max = Math.min(this.maxHeight, max); - } - if(full > max && max > 0){ - this.activeMax = max - this.scrollerHeight * 2 - this.el.getFrameWidth('tb') - Ext.num(this.el.shadowOffset, 0); - this.ul.setHeight(this.activeMax); - this.createScrollers(); - this.el.select('.x-menu-scroller').setDisplayed(''); - }else{ - this.ul.setHeight(full); - this.el.select('.x-menu-scroller').setDisplayed('none'); - } - this.ul.dom.scrollTop = 0; - return returnY; - }, - - createScrollers : function(){ - if(!this.scroller){ - this.scroller = { - pos: 0, - top: this.el.insertFirst({ - tag: 'div', - cls: 'x-menu-scroller x-menu-scroller-top', - html: ' ' - }), - bottom: this.el.createChild({ - tag: 'div', - cls: 'x-menu-scroller x-menu-scroller-bottom', - html: ' ' - }) - }; - this.scroller.top.hover(this.onScrollerIn, this.onScrollerOut, this); - this.scroller.topRepeater = new Ext.util.ClickRepeater(this.scroller.top, { - listeners: { - click: this.onScroll.createDelegate(this, [null, this.scroller.top], false) - } - }); - this.scroller.bottom.hover(this.onScrollerIn, this.onScrollerOut, this); - this.scroller.bottomRepeater = new Ext.util.ClickRepeater(this.scroller.bottom, { - listeners: { - click: this.onScroll.createDelegate(this, [null, this.scroller.bottom], false) - } - }); - } - }, - - onLayout : function(){ - if(this.isVisible()){ - if(this.enableScrolling){ - this.constrainScroll(this.el.getTop()); - } - if(this.floating){ - this.el.sync(); - } - } - }, - - focus : function(){ - if(!this.hidden){ - this.doFocus.defer(50, this); - } - }, - - doFocus : function(){ - if(!this.hidden){ - this.focusEl.focus(); - } - }, - - /** - * Hides this menu and optionally all parent menus - * @param {Boolean} deep (optional) True to hide all parent menus recursively, if any (defaults to false) - */ - hide : function(deep){ - if (!this.isDestroyed) { - this.deepHide = deep; - Ext.menu.Menu.superclass.hide.call(this); - delete this.deepHide; - } - }, - - // private - onHide : function(){ - Ext.menu.Menu.superclass.onHide.call(this); - this.deactivateActive(); - if(this.el && this.floating){ - this.el.hide(); - } - var pm = this.parentMenu; - if(this.deepHide === true && pm){ - if(pm.floating){ - pm.hide(true); - }else{ - pm.deactivateActive(); - } - } - }, - - // private - lookupComponent : function(c){ - if(Ext.isString(c)){ - c = (c == 'separator' || c == '-') ? new Ext.menu.Separator() : new Ext.menu.TextItem(c); - this.applyDefaults(c); - }else{ - if(Ext.isObject(c)){ - c = this.getMenuItem(c); - }else if(c.tagName || c.el){ // element. Wrap it. - c = new Ext.BoxComponent({ - el: c - }); - } - } - return c; - }, - - applyDefaults : function(c) { - if (!Ext.isString(c)) { - c = Ext.menu.Menu.superclass.applyDefaults.call(this, c); - var d = this.internalDefaults; - if(d){ - if(c.events){ - Ext.applyIf(c.initialConfig, d); - Ext.apply(c, d); - }else{ - Ext.applyIf(c, d); - } - } - } - return c; - }, - - // private - getMenuItem : function(config) { - config.ownerCt = this; - - if (!config.isXType) { - if (!config.xtype && Ext.isBoolean(config.checked)) { - return new Ext.menu.CheckItem(config); - } - return Ext.create(config, this.defaultType); - } - return config; - }, - - /** - * Adds a separator bar to the menu - * @return {Ext.menu.Item} The menu item that was added - */ - addSeparator : function() { - return this.add(new Ext.menu.Separator()); - }, - - /** - * Adds an {@link Ext.Element} object to the menu - * @param {Mixed} el The element or DOM node to add, or its id - * @return {Ext.menu.Item} The menu item that was added - */ - addElement : function(el) { - return this.add(new Ext.menu.BaseItem({ - el: el - })); - }, - - /** - * Adds an existing object based on {@link Ext.menu.BaseItem} to the menu - * @param {Ext.menu.Item} item The menu item to add - * @return {Ext.menu.Item} The menu item that was added - */ - addItem : function(item) { - return this.add(item); - }, - - /** - * Creates a new {@link Ext.menu.Item} based an the supplied config object and adds it to the menu - * @param {Object} config A MenuItem config object - * @return {Ext.menu.Item} The menu item that was added - */ - addMenuItem : function(config) { - return this.add(this.getMenuItem(config)); - }, - - /** - * Creates a new {@link Ext.menu.TextItem} with the supplied text and adds it to the menu - * @param {String} text The text to display in the menu item - * @return {Ext.menu.Item} The menu item that was added - */ - addText : function(text){ - return this.add(new Ext.menu.TextItem(text)); - }, - - //private - onDestroy : function(){ - Ext.EventManager.removeResizeListener(this.hide, this); - var pm = this.parentMenu; - if(pm && pm.activeChild == this){ - delete pm.activeChild; - } - delete this.parentMenu; - Ext.menu.Menu.superclass.onDestroy.call(this); - Ext.menu.MenuMgr.unregister(this); - if(this.keyNav) { - this.keyNav.disable(); - } - var s = this.scroller; - if(s){ - Ext.destroy(s.topRepeater, s.bottomRepeater, s.top, s.bottom); - } - Ext.destroy( - this.el, - this.focusEl, - this.ul - ); - } -}); - -Ext.reg('menu', Ext.menu.Menu); - -// MenuNav is a private utility class used internally by the Menu -Ext.menu.MenuNav = Ext.extend(Ext.KeyNav, function(){ - function up(e, m){ - if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){ - m.tryActivate(m.items.length-1, -1); - } - } - function down(e, m){ - if(!m.tryActivate(m.items.indexOf(m.activeItem)+1, 1)){ - m.tryActivate(0, 1); - } - } - return { - constructor : function(menu){ - Ext.menu.MenuNav.superclass.constructor.call(this, menu.el); - this.scope = this.menu = menu; - }, - - doRelay : function(e, h){ - var k = e.getKey(); -// Keystrokes within a form Field (e.g.: down in a Combo) do not navigate. Allow only TAB - if (this.menu.activeItem && this.menu.activeItem.isFormField && k != e.TAB) { - return false; - } - if(!this.menu.activeItem && e.isNavKeyPress() && k != e.SPACE && k != e.RETURN){ - this.menu.tryActivate(0, 1); - return false; - } - return h.call(this.scope || this, e, this.menu); - }, - - tab: function(e, m) { - e.stopEvent(); - if (e.shiftKey) { - up(e, m); - } else { - down(e, m); - } - }, - - up : up, - - down : down, - - right : function(e, m){ - if(m.activeItem){ - m.activeItem.expandMenu(true); - } - }, - - left : function(e, m){ - m.hide(); - if(m.parentMenu && m.parentMenu.activeItem){ - m.parentMenu.activeItem.activate(); - } - }, - - enter : function(e, m){ - if(m.activeItem){ - e.stopPropagation(); - m.activeItem.onClick(e); - m.fireEvent('click', this, m.activeItem); - return true; - } - } - }; -}()); -/** - * @class Ext.menu.MenuMgr - * Provides a common registry of all menu items on a page so that they can be easily accessed by id. - * @singleton - */ -Ext.menu.MenuMgr = function(){ - var menus, - active, - map, - groups = {}, - attached = false, - lastShow = new Date(); - - - // private - called when first menu is created - function init(){ - menus = {}; - active = new Ext.util.MixedCollection(); - map = Ext.getDoc().addKeyListener(27, hideAll); - map.disable(); - } - - // private - function hideAll(){ - if(active && active.length > 0){ - var c = active.clone(); - c.each(function(m){ - m.hide(); - }); - return true; - } - return false; - } - - // private - function onHide(m){ - active.remove(m); - if(active.length < 1){ - map.disable(); - Ext.getDoc().un("mousedown", onMouseDown); - attached = false; - } - } - - // private - function onShow(m){ - var last = active.last(); - lastShow = new Date(); - active.add(m); - if(!attached){ - map.enable(); - Ext.getDoc().on("mousedown", onMouseDown); - attached = true; - } - if(m.parentMenu){ - m.getEl().setZIndex(parseInt(m.parentMenu.getEl().getStyle("z-index"), 10) + 3); - m.parentMenu.activeChild = m; - }else if(last && !last.isDestroyed && last.isVisible()){ - m.getEl().setZIndex(parseInt(last.getEl().getStyle("z-index"), 10) + 3); - } - } - - // private - function onBeforeHide(m){ - if(m.activeChild){ - m.activeChild.hide(); - } - if(m.autoHideTimer){ - clearTimeout(m.autoHideTimer); - delete m.autoHideTimer; - } - } - - // private - function onBeforeShow(m){ - var pm = m.parentMenu; - if(!pm && !m.allowOtherMenus){ - hideAll(); - }else if(pm && pm.activeChild){ - pm.activeChild.hide(); - } - } - - // private - function onMouseDown(e){ - if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){ - hideAll(); - } - } - - return { - - /** - * Hides all menus that are currently visible - * @return {Boolean} success True if any active menus were hidden. - */ - hideAll : function(){ - return hideAll(); - }, - - // private - register : function(menu){ - if(!menus){ - init(); - } - menus[menu.id] = menu; - menu.on({ - beforehide: onBeforeHide, - hide: onHide, - beforeshow: onBeforeShow, - show: onShow - }); - }, - - /** - * Returns a {@link Ext.menu.Menu} object - * @param {String/Object} menu The string menu id, an existing menu object reference, or a Menu config that will - * be used to generate and return a new Menu instance. - * @return {Ext.menu.Menu} The specified menu, or null if none are found - */ - get : function(menu){ - if(typeof menu == "string"){ // menu id - if(!menus){ // not initialized, no menus to return - return null; - } - return menus[menu]; - }else if(menu.events){ // menu instance - return menu; - }else if(typeof menu.length == 'number'){ // array of menu items? - return new Ext.menu.Menu({items:menu}); - }else{ // otherwise, must be a config - return Ext.create(menu, 'menu'); - } - }, - - // private - unregister : function(menu){ - delete menus[menu.id]; - menu.un("beforehide", onBeforeHide); - menu.un("hide", onHide); - menu.un("beforeshow", onBeforeShow); - menu.un("show", onShow); - }, - - // private - registerCheckable : function(menuItem){ - var g = menuItem.group; - if(g){ - if(!groups[g]){ - groups[g] = []; - } - groups[g].push(menuItem); - } - }, - - // private - unregisterCheckable : function(menuItem){ - var g = menuItem.group; - if(g){ - groups[g].remove(menuItem); - } - }, - - // private - onCheckChange: function(item, state){ - if(item.group && state){ - var group = groups[item.group], - i = 0, - len = group.length, - current; - - for(; i < len; i++){ - current = group[i]; - if(current != item){ - current.setChecked(false); - } - } - } - }, - - getCheckedItem : function(groupId){ - var g = groups[groupId]; - if(g){ - for(var i = 0, l = g.length; i < l; i++){ - if(g[i].checked){ - return g[i]; - } - } - } - return null; - }, - - setCheckedItem : function(groupId, itemId){ - var g = groups[groupId]; - if(g){ - for(var i = 0, l = g.length; i < l; i++){ - if(g[i].id == itemId){ - g[i].setChecked(true); - } - } - } - return null; - } - }; -}(); -/** - * @class Ext.menu.BaseItem - * @extends Ext.Component - * The base class for all items that render into menus. BaseItem provides default rendering, activated state - * management and base configuration options shared by all menu components. - * @constructor - * Creates a new BaseItem - * @param {Object} config Configuration options - * @xtype menubaseitem - */ -Ext.menu.BaseItem = Ext.extend(Ext.Component, { - /** - * @property parentMenu - * @type Ext.menu.Menu - * The parent Menu of this Item. - */ - /** - * @cfg {Function} handler - * A function that will handle the click event of this menu item (optional). - * The handler is passed the following parameters:

        - *
      • b : Item
        This menu Item.
      • - *
      • e : EventObject
        The click event.
      • - *
      - */ - /** - * @cfg {Object} scope - * The scope (this reference) in which the handler function will be called. - */ - /** - * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to false) - */ - canActivate : false, - /** - * @cfg {String} activeClass The CSS class to use when the item becomes activated (defaults to "x-menu-item-active") - */ - activeClass : "x-menu-item-active", - /** - * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to true) - */ - hideOnClick : true, - /** - * @cfg {Number} clickHideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 1) - */ - clickHideDelay : 1, - - // private - ctype : "Ext.menu.BaseItem", - - // private - actionMode : "container", - - initComponent : function(){ - Ext.menu.BaseItem.superclass.initComponent.call(this); - this.addEvents( - /** - * @event click - * Fires when this item is clicked - * @param {Ext.menu.BaseItem} this - * @param {Ext.EventObject} e - */ - 'click', - /** - * @event activate - * Fires when this item is activated - * @param {Ext.menu.BaseItem} this - */ - 'activate', - /** - * @event deactivate - * Fires when this item is deactivated - * @param {Ext.menu.BaseItem} this - */ - 'deactivate' - ); - if(this.handler){ - this.on("click", this.handler, this.scope); - } - }, - - // private - onRender : function(container, position){ - Ext.menu.BaseItem.superclass.onRender.apply(this, arguments); - if(this.ownerCt && this.ownerCt instanceof Ext.menu.Menu){ - this.parentMenu = this.ownerCt; - }else{ - this.container.addClass('x-menu-list-item'); - this.mon(this.el, { - scope: this, - click: this.onClick, - mouseenter: this.activate, - mouseleave: this.deactivate - }); - } - }, - - /** - * Sets the function that will handle click events for this item (equivalent to passing in the {@link #handler} - * config property). If an existing handler is already registered, it will be unregistered for you. - * @param {Function} handler The function that should be called on click - * @param {Object} scope The scope (this reference) in which the handler function is executed. Defaults to this menu item. - */ - setHandler : function(handler, scope){ - if(this.handler){ - this.un("click", this.handler, this.scope); - } - this.on("click", this.handler = handler, this.scope = scope); - }, - - // private - onClick : function(e){ - if(!this.disabled && this.fireEvent("click", this, e) !== false - && (this.parentMenu && this.parentMenu.fireEvent("itemclick", this, e) !== false)){ - this.handleClick(e); - }else{ - e.stopEvent(); - } - }, - - // private - activate : function(){ - if(this.disabled){ - return false; - } - var li = this.container; - li.addClass(this.activeClass); - this.region = li.getRegion().adjust(2, 2, -2, -2); - this.fireEvent("activate", this); - return true; - }, - - // private - deactivate : function(){ - this.container.removeClass(this.activeClass); - this.fireEvent("deactivate", this); - }, - - // private - shouldDeactivate : function(e){ - return !this.region || !this.region.contains(e.getPoint()); - }, - - // private - handleClick : function(e){ - var pm = this.parentMenu; - if(this.hideOnClick){ - if(pm.floating){ - this.clickHideDelayTimer = pm.hide.defer(this.clickHideDelay, pm, [true]); - }else{ - pm.deactivateActive(); - } - } - }, - - beforeDestroy: function(){ - clearTimeout(this.clickHideDelayTimer); - Ext.menu.BaseItem.superclass.beforeDestroy.call(this); - }, - - // private. Do nothing - expandMenu : Ext.emptyFn, - - // private. Do nothing - hideMenu : Ext.emptyFn -}); -Ext.reg('menubaseitem', Ext.menu.BaseItem);/** - * @class Ext.menu.TextItem - * @extends Ext.menu.BaseItem - * Adds a static text string to a menu, usually used as either a heading or group separator. - * @constructor - * Creates a new TextItem - * @param {Object/String} config If config is a string, it is used as the text to display, otherwise it - * is applied as a config object (and should contain a text property). - * @xtype menutextitem - */ -Ext.menu.TextItem = Ext.extend(Ext.menu.BaseItem, { - /** - * @cfg {String} text The text to display for this item (defaults to '') - */ - /** - * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false) - */ - hideOnClick : false, - /** - * @cfg {String} itemCls The default CSS class to use for text items (defaults to "x-menu-text") - */ - itemCls : "x-menu-text", - - constructor : function(config) { - if (typeof config == 'string') { - config = { - text: config - }; - } - Ext.menu.TextItem.superclass.constructor.call(this, config); - }, - - // private - onRender : function() { - var s = document.createElement("span"); - s.className = this.itemCls; - s.innerHTML = this.text; - this.el = s; - Ext.menu.TextItem.superclass.onRender.apply(this, arguments); - } -}); -Ext.reg('menutextitem', Ext.menu.TextItem);/** - * @class Ext.menu.Separator - * @extends Ext.menu.BaseItem - * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will - * add one of these by using "-" in you call to add() or in your items config rather than creating one directly. - * @constructor - * @param {Object} config Configuration options - * @xtype menuseparator - */ -Ext.menu.Separator = Ext.extend(Ext.menu.BaseItem, { - /** - * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep") - */ - itemCls : "x-menu-sep", - /** - * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false) - */ - hideOnClick : false, - - /** - * @cfg {String} activeClass - * @hide - */ - activeClass: '', - - // private - onRender : function(li){ - var s = document.createElement("span"); - s.className = this.itemCls; - s.innerHTML = " "; - this.el = s; - li.addClass("x-menu-sep-li"); - Ext.menu.Separator.superclass.onRender.apply(this, arguments); - } -}); -Ext.reg('menuseparator', Ext.menu.Separator);/** - * @class Ext.menu.Item - * @extends Ext.menu.BaseItem - * A base class for all menu items that require menu-related functionality (like sub-menus) and are not static - * display items. Item extends the base functionality of {@link Ext.menu.BaseItem} by adding menu-specific - * activation and click handling. - * @constructor - * Creates a new Item - * @param {Object} config Configuration options - * @xtype menuitem - */ -Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, { - /** - * @property menu - * @type Ext.menu.Menu - * The submenu associated with this Item if one was configured. - */ - /** - * @cfg {Mixed} menu (optional) Either an instance of {@link Ext.menu.Menu} or the config object for an - * {@link Ext.menu.Menu} which acts as the submenu when this item is activated. - */ - /** - * @cfg {String} icon The path to an icon to display in this item (defaults to Ext.BLANK_IMAGE_URL). If - * icon is specified {@link #iconCls} should not be. - */ - /** - * @cfg {String} iconCls A CSS class that specifies a background image that will be used as the icon for - * this item (defaults to ''). If iconCls is specified {@link #icon} should not be. - */ - /** - * @cfg {String} text The text to display in this item (defaults to ''). - */ - /** - * @cfg {String} href The href attribute to use for the underlying anchor link (defaults to '#'). - */ - /** - * @cfg {String} hrefTarget The target attribute to use for the underlying anchor link (defaults to ''). - */ - /** - * @cfg {String} itemCls The default CSS class to use for menu items (defaults to 'x-menu-item') - */ - itemCls : 'x-menu-item', - /** - * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to true) - */ - canActivate : true, - /** - * @cfg {Number} showDelay Length of time in milliseconds to wait before showing this item (defaults to 200) - */ - showDelay: 200, - - /** - * @cfg {String} altText The altText to use for the icon, if it exists. Defaults to ''. - */ - altText: '', - - // doc'd in BaseItem - hideDelay: 200, - - // private - ctype: 'Ext.menu.Item', - - initComponent : function(){ - Ext.menu.Item.superclass.initComponent.call(this); - if(this.menu){ - // If array of items, turn it into an object config so we - // can set the ownerCt property in the config - if (Ext.isArray(this.menu)){ - this.menu = { items: this.menu }; - } - - // An object config will work here, but an instance of a menu - // will have already setup its ref's and have no effect - if (Ext.isObject(this.menu)){ - this.menu.ownerCt = this; - } - - this.menu = Ext.menu.MenuMgr.get(this.menu); - this.menu.ownerCt = undefined; - } - }, - - // private - onRender : function(container, position){ - if (!this.itemTpl) { - this.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate( - '', - ' target="{hrefTarget}"', - '', - '>', - '{altText}', - '{text}', - '' - ); - } - var a = this.getTemplateArgs(); - this.el = position ? this.itemTpl.insertBefore(position, a, true) : this.itemTpl.append(container, a, true); - this.iconEl = this.el.child('img.x-menu-item-icon'); - this.textEl = this.el.child('.x-menu-item-text'); - if(!this.href) { // if no link defined, prevent the default anchor event - this.mon(this.el, 'click', Ext.emptyFn, null, { preventDefault: true }); - } - Ext.menu.Item.superclass.onRender.call(this, container, position); - }, - - getTemplateArgs: function() { - return { - id: this.id, - cls: this.itemCls + (this.menu ? ' x-menu-item-arrow' : '') + (this.cls ? ' ' + this.cls : ''), - href: this.href || '#', - hrefTarget: this.hrefTarget, - icon: this.icon || Ext.BLANK_IMAGE_URL, - iconCls: this.iconCls || '', - text: this.itemText||this.text||' ', - altText: this.altText || '' - }; - }, - - /** - * Sets the text to display in this menu item - * @param {String} text The text to display - */ - setText : function(text){ - this.text = text||' '; - if(this.rendered){ - this.textEl.update(this.text); - this.parentMenu.layout.doAutoSize(); - } - }, - - /** - * Sets the CSS class to apply to the item's icon element - * @param {String} cls The CSS class to apply - */ - setIconClass : function(cls){ - var oldCls = this.iconCls; - this.iconCls = cls; - if(this.rendered){ - this.iconEl.replaceClass(oldCls, this.iconCls); - } - }, - - //private - beforeDestroy: function(){ - clearTimeout(this.showTimer); - clearTimeout(this.hideTimer); - if (this.menu){ - delete this.menu.ownerCt; - this.menu.destroy(); - } - Ext.menu.Item.superclass.beforeDestroy.call(this); - }, - - // private - handleClick : function(e){ - if(!this.href){ // if no link defined, stop the event automatically - e.stopEvent(); - } - Ext.menu.Item.superclass.handleClick.apply(this, arguments); - }, - - // private - activate : function(autoExpand){ - if(Ext.menu.Item.superclass.activate.apply(this, arguments)){ - this.focus(); - if(autoExpand){ - this.expandMenu(); - } - } - return true; - }, - - // private - shouldDeactivate : function(e){ - if(Ext.menu.Item.superclass.shouldDeactivate.call(this, e)){ - if(this.menu && this.menu.isVisible()){ - return !this.menu.getEl().getRegion().contains(e.getPoint()); - } - return true; - } - return false; - }, - - // private - deactivate : function(){ - Ext.menu.Item.superclass.deactivate.apply(this, arguments); - this.hideMenu(); - }, - - // private - expandMenu : function(autoActivate){ - if(!this.disabled && this.menu){ - clearTimeout(this.hideTimer); - delete this.hideTimer; - if(!this.menu.isVisible() && !this.showTimer){ - this.showTimer = this.deferExpand.defer(this.showDelay, this, [autoActivate]); - }else if (this.menu.isVisible() && autoActivate){ - this.menu.tryActivate(0, 1); - } - } - }, - - // private - deferExpand : function(autoActivate){ - delete this.showTimer; - this.menu.show(this.container, this.parentMenu.subMenuAlign || 'tl-tr?', this.parentMenu); - if(autoActivate){ - this.menu.tryActivate(0, 1); - } - }, - - // private - hideMenu : function(){ - clearTimeout(this.showTimer); - delete this.showTimer; - if(!this.hideTimer && this.menu && this.menu.isVisible()){ - this.hideTimer = this.deferHide.defer(this.hideDelay, this); - } - }, - - // private - deferHide : function(){ - delete this.hideTimer; - if(this.menu.over){ - this.parentMenu.setActiveItem(this, false); - }else{ - this.menu.hide(); - } - } -}); -Ext.reg('menuitem', Ext.menu.Item);/** - * @class Ext.menu.CheckItem - * @extends Ext.menu.Item - * Adds a menu item that contains a checkbox by default, but can also be part of a radio group. - * @constructor - * Creates a new CheckItem - * @param {Object} config Configuration options - * @xtype menucheckitem - */ -Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, { - /** - * @cfg {String} group - * All check items with the same group name will automatically be grouped into a single-select - * radio button group (defaults to '') - */ - /** - * @cfg {String} itemCls The default CSS class to use for check items (defaults to "x-menu-item x-menu-check-item") - */ - itemCls : "x-menu-item x-menu-check-item", - /** - * @cfg {String} groupClass The default CSS class to use for radio group check items (defaults to "x-menu-group-item") - */ - groupClass : "x-menu-group-item", - - /** - * @cfg {Boolean} checked True to initialize this checkbox as checked (defaults to false). Note that - * if this checkbox is part of a radio group (group = true) only the first item in the group that is - * initialized with checked = true will be rendered as checked. - */ - checked: false, - - // private - ctype: "Ext.menu.CheckItem", - - initComponent : function(){ - Ext.menu.CheckItem.superclass.initComponent.call(this); - this.addEvents( - /** - * @event beforecheckchange - * Fires before the checked value is set, providing an opportunity to cancel if needed - * @param {Ext.menu.CheckItem} this - * @param {Boolean} checked The new checked value that will be set - */ - "beforecheckchange" , - /** - * @event checkchange - * Fires after the checked value has been set - * @param {Ext.menu.CheckItem} this - * @param {Boolean} checked The checked value that was set - */ - "checkchange" - ); - /** - * A function that handles the checkchange event. The function is undefined by default, but if an implementation - * is provided, it will be called automatically when the checkchange event fires. - * @param {Ext.menu.CheckItem} this - * @param {Boolean} checked The checked value that was set - * @method checkHandler - */ - if(this.checkHandler){ - this.on('checkchange', this.checkHandler, this.scope); - } - Ext.menu.MenuMgr.registerCheckable(this); - }, - - // private - onRender : function(c){ - Ext.menu.CheckItem.superclass.onRender.apply(this, arguments); - if(this.group){ - this.el.addClass(this.groupClass); - } - if(this.checked){ - this.checked = false; - this.setChecked(true, true); - } - }, - - // private - destroy : function(){ - Ext.menu.MenuMgr.unregisterCheckable(this); - Ext.menu.CheckItem.superclass.destroy.apply(this, arguments); - }, - - /** - * Set the checked state of this item - * @param {Boolean} checked The new checked value - * @param {Boolean} suppressEvent (optional) True to prevent the checkchange event from firing (defaults to false) - */ - setChecked : function(state, suppressEvent){ - var suppress = suppressEvent === true; - if(this.checked != state && (suppress || this.fireEvent("beforecheckchange", this, state) !== false)){ - Ext.menu.MenuMgr.onCheckChange(this, state); - if(this.container){ - this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked"); - } - this.checked = state; - if(!suppress){ - this.fireEvent("checkchange", this, state); - } - } - }, - - // private - handleClick : function(e){ - if(!this.disabled && !(this.checked && this.group)){// disable unselect on radio item - this.setChecked(!this.checked); - } - Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments); - } -}); -Ext.reg('menucheckitem', Ext.menu.CheckItem);/** - * @class Ext.menu.DateMenu - * @extends Ext.menu.Menu - *

      A menu containing an {@link Ext.DatePicker} Component.

      - *

      Notes:

        - *
      • Although not listed here, the constructor for this class - * accepts all of the configuration options of {@link Ext.DatePicker}.
      • - *
      • If subclassing DateMenu, any configuration options for the DatePicker must be - * applied to the initialConfig property of the DateMenu. - * Applying {@link Ext.DatePicker DatePicker} configuration settings to - * this will not affect the DatePicker's configuration.
      • - *
      - * @xtype datemenu - */ - Ext.menu.DateMenu = Ext.extend(Ext.menu.Menu, { - /** - * @cfg {Boolean} enableScrolling - * @hide - */ - enableScrolling : false, - /** - * @cfg {Function} handler - * Optional. A function that will handle the select event of this menu. - * The handler is passed the following parameters:
        - *
      • picker : DatePicker
        The Ext.DatePicker.
      • - *
      • date : Date
        The selected date.
      • - *
      - */ - /** - * @cfg {Object} scope - * The scope (this reference) in which the {@link #handler} - * function will be called. Defaults to this DateMenu instance. - */ - /** - * @cfg {Boolean} hideOnClick - * False to continue showing the menu after a date is selected, defaults to true. - */ - hideOnClick : true, - - /** - * @cfg {String} pickerId - * An id to assign to the underlying date picker. Defaults to null. - */ - pickerId : null, - - /** - * @cfg {Number} maxHeight - * @hide - */ - /** - * @cfg {Number} scrollIncrement - * @hide - */ - /** - * The {@link Ext.DatePicker} instance for this DateMenu - * @property picker - * @type DatePicker - */ - cls : 'x-date-menu', - - /** - * @event click - * @hide - */ - - /** - * @event itemclick - * @hide - */ - - initComponent : function(){ - this.on('beforeshow', this.onBeforeShow, this); - if(this.strict = (Ext.isIE7 && Ext.isStrict)){ - this.on('show', this.onShow, this, {single: true, delay: 20}); - } - Ext.apply(this, { - plain: true, - showSeparator: false, - items: this.picker = new Ext.DatePicker(Ext.applyIf({ - internalRender: this.strict || !Ext.isIE, - ctCls: 'x-menu-date-item', - id: this.pickerId - }, this.initialConfig)) - }); - this.picker.purgeListeners(); - Ext.menu.DateMenu.superclass.initComponent.call(this); - /** - * @event select - * Fires when a date is selected from the {@link #picker Ext.DatePicker} - * @param {DatePicker} picker The {@link #picker Ext.DatePicker} - * @param {Date} date The selected date - */ - this.relayEvents(this.picker, ['select']); - this.on('show', this.picker.focus, this.picker); - this.on('select', this.menuHide, this); - if(this.handler){ - this.on('select', this.handler, this.scope || this); - } - }, - - menuHide : function() { - if(this.hideOnClick){ - this.hide(true); - } - }, - - onBeforeShow : function(){ - if(this.picker){ - this.picker.hideMonthPicker(true); - } - }, - - onShow : function(){ - var el = this.picker.getEl(); - el.setWidth(el.getWidth()); //nasty hack for IE7 strict mode - } - }); - Ext.reg('datemenu', Ext.menu.DateMenu); - /** - * @class Ext.menu.ColorMenu - * @extends Ext.menu.Menu - *

      A menu containing a {@link Ext.ColorPalette} Component.

      - *

      Notes:

        - *
      • Although not listed here, the constructor for this class - * accepts all of the configuration options of {@link Ext.ColorPalette}.
      • - *
      • If subclassing ColorMenu, any configuration options for the ColorPalette must be - * applied to the initialConfig property of the ColorMenu. - * Applying {@link Ext.ColorPalette ColorPalette} configuration settings to - * this will not affect the ColorPalette's configuration.
      • - *
      * - * @xtype colormenu - */ - Ext.menu.ColorMenu = Ext.extend(Ext.menu.Menu, { - /** - * @cfg {Boolean} enableScrolling - * @hide - */ - enableScrolling : false, - /** - * @cfg {Function} handler - * Optional. A function that will handle the select event of this menu. - * The handler is passed the following parameters:
        - *
      • palette : ColorPalette
        The {@link #palette Ext.ColorPalette}.
      • - *
      • color : String
        The 6-digit color hex code (without the # symbol).
      • - *
      - */ - /** - * @cfg {Object} scope - * The scope (this reference) in which the {@link #handler} - * function will be called. Defaults to this ColorMenu instance. - */ - - /** - * @cfg {Boolean} hideOnClick - * False to continue showing the menu after a color is selected, defaults to true. - */ - hideOnClick : true, - - cls : 'x-color-menu', - - /** - * @cfg {String} paletteId - * An id to assign to the underlying color palette. Defaults to null. - */ - paletteId : null, - - /** - * @cfg {Number} maxHeight - * @hide - */ - /** - * @cfg {Number} scrollIncrement - * @hide - */ - /** - * @property palette - * @type ColorPalette - * The {@link Ext.ColorPalette} instance for this ColorMenu - */ - - - /** - * @event click - * @hide - */ - - /** - * @event itemclick - * @hide - */ - - initComponent : function(){ - Ext.apply(this, { - plain: true, - showSeparator: false, - items: this.palette = new Ext.ColorPalette(Ext.applyIf({ - id: this.paletteId - }, this.initialConfig)) - }); - this.palette.purgeListeners(); - Ext.menu.ColorMenu.superclass.initComponent.call(this); - /** - * @event select - * Fires when a color is selected from the {@link #palette Ext.ColorPalette} - * @param {Ext.ColorPalette} palette The {@link #palette Ext.ColorPalette} - * @param {String} color The 6-digit color hex code (without the # symbol) - */ - this.relayEvents(this.palette, ['select']); - this.on('select', this.menuHide, this); - if(this.handler){ - this.on('select', this.handler, this.scope || this); - } - }, - - menuHide : function(){ - if(this.hideOnClick){ - this.hide(true); - } - } -}); -Ext.reg('colormenu', Ext.menu.ColorMenu); diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-menu.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-menu.js deleted file mode 100644 index 9ce7e8222d0..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-menu.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,enableScrolling:true,maxHeight:null,scrollIncrement:24,showSeparator:true,defaultOffsets:[0,0],plain:false,floating:true,zIndex:15000,hidden:true,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:true,defaultType:"menuitem",bufferResize:false,initComponent:function(){if(Ext.isArray(this.initialConfig)){Ext.apply(this,{items:this.initialConfig})}this.addEvents("click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);if(this.floating){Ext.EventManager.onWindowResize(this.hide,this)}else{if(this.initialConfig.hidden!==false){this.hidden=false}this.internalDefaults={hideOnClick:false}}Ext.menu.Menu.superclass.initComponent.call(this);if(this.autoLayout){var a=this.doLayout.createDelegate(this,[]);this.on({add:a,remove:a})}},getLayoutTarget:function(){return this.ul},onRender:function(b,a){if(!b){b=Ext.getBody()}var c={id:this.getId(),cls:"x-menu "+((this.floating)?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};if(this.floating){this.el=new Ext.Layer({shadow:this.shadow,dh:c,constrain:false,parentEl:b,zindex:this.zIndex})}else{this.el=b.createChild(c)}Ext.menu.Menu.superclass.onRender.call(this,b,a);if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}this.focusEl=this.el.child("a.x-menu-focus");this.ul=this.el.child("ul.x-menu-list");this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut});if(this.enableScrolling){this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})}},findTargetItem:function(b){var a=b.getTarget(".x-menu-list-item",this.ul,true);if(a&&a.menuItemId){return this.items.get(a.menuItemId)}},onClick:function(b){var a=this.findTargetItem(b);if(a){if(a.isFormField){this.setActiveItem(a)}else{if(a instanceof Ext.menu.BaseItem){if(a.menu&&this.ignoreParentClicks){a.expandMenu();b.preventDefault()}else{if(a.onClick){a.onClick(b);this.fireEvent("click",this,a,b)}}}}}},setActiveItem:function(a,b){if(a!=this.activeItem){this.deactivateActive();if((this.activeItem=a).isFormField){a.focus()}else{a.activate(b)}}else{if(b){a.expandMenu()}}},deactivateActive:function(){var b=this.activeItem;if(b){if(b.isFormField){if(b.collapse){b.collapse()}}else{b.deactivate()}delete this.activeItem}},tryActivate:function(f,e){var b=this.items;for(var c=f,a=b.length;c>=0&&c=a.scrollHeight){this.onScrollerOut(null,b)}},onScrollerIn:function(d,b){var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");if(c?a.scrollTop>0:a.scrollTop+this.activeMaxc){b=c;a=h-g}else{if(bb&&b>0){this.activeMax=b-this.scrollerHeight*2-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0);this.ul.setHeight(this.activeMax);this.createScrollers();this.el.select(".x-menu-scroller").setDisplayed("")}else{this.ul.setHeight(d);this.el.select(".x-menu-scroller").setDisplayed("none")}this.ul.dom.scrollTop=0;return a},createScrollers:function(){if(!this.scroller){this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:" "}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:" "})};this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],false)}});this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],false)}})}},onLayout:function(){if(this.isVisible()){if(this.enableScrolling){this.constrainScroll(this.el.getTop())}if(this.floating){this.el.sync()}}},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){if(!this.isDestroyed){this.deepHide=a;Ext.menu.Menu.superclass.hide.call(this);delete this.deepHide}},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this);this.deactivateActive();if(this.el&&this.floating){this.el.hide()}var a=this.parentMenu;if(this.deepHide===true&&a){if(a.floating){a.hide(true)}else{a.deactivateActive()}}},lookupComponent:function(a){if(Ext.isString(a)){a=(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.TextItem(a);this.applyDefaults(a)}else{if(Ext.isObject(a)){a=this.getMenuItem(a)}else{if(a.tagName||a.el){a=new Ext.BoxComponent({el:a})}}}return a},applyDefaults:function(b){if(!Ext.isString(b)){b=Ext.menu.Menu.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(a){if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}}return b},getMenuItem:function(a){a.ownerCt=this;if(!a.isXType){if(!a.xtype&&Ext.isBoolean(a.checked)){return new Ext.menu.CheckItem(a)}return Ext.create(a,this.defaultType)}return a},addSeparator:function(){return this.add(new Ext.menu.Separator())},addElement:function(a){return this.add(new Ext.menu.BaseItem({el:a}))},addItem:function(a){return this.add(a)},addMenuItem:function(a){return this.add(this.getMenuItem(a))},addText:function(a){return this.add(new Ext.menu.TextItem(a))},onDestroy:function(){Ext.EventManager.removeResizeListener(this.hide,this);var a=this.parentMenu;if(a&&a.activeChild==this){delete a.activeChild}delete this.parentMenu;Ext.menu.Menu.superclass.onDestroy.call(this);Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable()}var b=this.scroller;if(b){Ext.destroy(b.topRepeater,b.bottomRepeater,b.top,b.bottom)}Ext.destroy(this.el,this.focusEl,this.ul)}});Ext.reg("menu",Ext.menu.Menu);Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function a(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)-1,-1)){c.tryActivate(c.items.length-1,-1)}}function b(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)+1,1)){c.tryActivate(0,1)}}return{constructor:function(c){Ext.menu.MenuNav.superclass.constructor.call(this,c.el);this.scope=this.menu=c},doRelay:function(f,d){var c=f.getKey();if(this.menu.activeItem&&this.menu.activeItem.isFormField&&c!=f.TAB){return false}if(!this.menu.activeItem&&f.isNavKeyPress()&&c!=f.SPACE&&c!=f.RETURN){this.menu.tryActivate(0,1);return false}return d.call(this.scope||this,f,this.menu)},tab:function(d,c){d.stopEvent();if(d.shiftKey){a(d,c)}else{b(d,c)}},up:a,down:b,right:function(d,c){if(c.activeItem){c.activeItem.expandMenu(true)}},left:function(d,c){c.hide();if(c.parentMenu&&c.parentMenu.activeItem){c.parentMenu.activeItem.activate()}},enter:function(d,c){if(c.activeItem){d.stopPropagation();c.activeItem.onClick(d);c.fireEvent("click",this,c.activeItem);return true}}}}());Ext.menu.MenuMgr=function(){var g,e,b,d={},a=false,k=new Date();function m(){g={};e=new Ext.util.MixedCollection();b=Ext.getDoc().addKeyListener(27,i);b.disable()}function i(){if(e&&e.length>0){var n=e.clone();n.each(function(o){o.hide()});return true}return false}function f(n){e.remove(n);if(e.length<1){b.disable();Ext.getDoc().un("mousedown",l);a=false}}function j(n){var o=e.last();k=new Date();e.add(n);if(!a){b.enable();Ext.getDoc().on("mousedown",l);a=true}if(n.parentMenu){n.getEl().setZIndex(parseInt(n.parentMenu.getEl().getStyle("z-index"),10)+3);n.parentMenu.activeChild=n}else{if(o&&!o.isDestroyed&&o.isVisible()){n.getEl().setZIndex(parseInt(o.getEl().getStyle("z-index"),10)+3)}}}function c(n){if(n.activeChild){n.activeChild.hide()}if(n.autoHideTimer){clearTimeout(n.autoHideTimer);delete n.autoHideTimer}}function h(n){var o=n.parentMenu;if(!o&&!n.allowOtherMenus){i()}else{if(o&&o.activeChild){o.activeChild.hide()}}}function l(n){if(k.getElapsed()>50&&e.length>0&&!n.getTarget(".x-menu")){i()}}return{hideAll:function(){return i()},register:function(n){if(!g){m()}g[n.id]=n;n.on({beforehide:c,hide:f,beforeshow:h,show:j})},get:function(n){if(typeof n=="string"){if(!g){return null}return g[n]}else{if(n.events){return n}else{if(typeof n.length=="number"){return new Ext.menu.Menu({items:n})}else{return Ext.create(n,"menu")}}}},unregister:function(n){delete g[n.id];n.un("beforehide",c);n.un("hide",f);n.un("beforeshow",h);n.un("show",j)},registerCheckable:function(n){var o=n.group;if(o){if(!d[o]){d[o]=[]}d[o].push(n)}},unregisterCheckable:function(n){var o=n.group;if(o){d[o].remove(n)}},onCheckChange:function(p,q){if(p.group&&q){var s=d[p.group],o=0,n=s.length,r;for(;o',' target="{hrefTarget}"',"",">",'{altText}','{text}',"")}var c=this.getTemplateArgs();this.el=b?this.itemTpl.insertBefore(b,c,true):this.itemTpl.append(d,c,true);this.iconEl=this.el.child("img.x-menu-item-icon");this.textEl=this.el.child(".x-menu-item-text");if(!this.href){this.mon(this.el,"click",Ext.emptyFn,null,{preventDefault:true})}Ext.menu.Item.superclass.onRender.call(this,d,b)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||" ",altText:this.altText||""}},setText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text);this.parentMenu.layout.doAutoSize()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.iconEl.replaceClass(b,this.iconCls)}},beforeDestroy:function(){clearTimeout(this.showTimer);clearTimeout(this.hideTimer);if(this.menu){delete this.menu.ownerCt;this.menu.destroy()}Ext.menu.Item.superclass.beforeDestroy.call(this)},handleClick:function(a){if(!this.href){a.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(a){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(a){this.expandMenu()}}return true},shouldDeactivate:function(a){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,a)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(a.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(a){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[a])}else{if(this.menu.isVisible()&&a){this.menu.tryActivate(0,1)}}}},deferExpand:function(a){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(a){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;if(this.menu.over){this.parentMenu.setActiveItem(this,false)}else{this.menu.hide()}}});Ext.reg("menuitem",Ext.menu.Item);Ext.menu.CheckItem=Ext.extend(Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",initComponent:function(){Ext.menu.CheckItem.superclass.initComponent.call(this);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)},onRender:function(a){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(b,a){var c=a===true;if(this.checked!=b&&(c||this.fireEvent("beforecheckchange",this,b)!==false)){Ext.menu.MenuMgr.onCheckChange(this,b);if(this.container){this.container[b?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=b;if(!c){this.fireEvent("checkchange",this,b)}}},handleClick:function(a){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});Ext.reg("menucheckitem",Ext.menu.CheckItem);Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,pickerId:null,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this);if(this.strict=(Ext.isIE7&&Ext.isStrict)){this.on("show",this.onShow,this,{single:true,delay:20})}Ext.apply(this,{plain:true,showSeparator:false,items:this.picker=new Ext.DatePicker(Ext.applyIf({internalRender:this.strict||!Ext.isIE,ctCls:"x-menu-date-item",id:this.pickerId},this.initialConfig))});this.picker.purgeListeners();Ext.menu.DateMenu.superclass.initComponent.call(this);this.relayEvents(this.picker,["select"]);this.on("show",this.picker.focus,this.picker);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}},onBeforeShow:function(){if(this.picker){this.picker.hideMonthPicker(true)}},onShow:function(){var a=this.picker.getEl();a.setWidth(a.getWidth())}});Ext.reg("datemenu",Ext.menu.DateMenu);Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,cls:"x-color-menu",paletteId:null,initComponent:function(){Ext.apply(this,{plain:true,showSeparator:false,items:this.palette=new Ext.ColorPalette(Ext.applyIf({id:this.paletteId},this.initialConfig))});this.palette.purgeListeners();Ext.menu.ColorMenu.superclass.initComponent.call(this);this.relayEvents(this.palette,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}}});Ext.reg("colormenu",Ext.menu.ColorMenu); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tabs-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tabs-debug.js deleted file mode 100644 index b3b04363ad3..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tabs-debug.js +++ /dev/null @@ -1,1132 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.TabPanel - *

      A basic tab container. TabPanels can be used exactly like a standard {@link Ext.Panel} - * for layout purposes, but also have special support for containing child Components - * ({@link Ext.Container#items items}) that are managed using a - * {@link Ext.layout.CardLayout CardLayout layout manager}, and displayed as separate tabs.

      - * - * Note: By default, a tab's close tool destroys the child tab Component - * and all its descendants. This makes the child tab Component, and all its descendants unusable. To enable - * re-use of a tab, configure the TabPanel with {@link #autoDestroy autoDestroy: false}. - * - *

      TabPanel header/footer elements

      - *

      TabPanels use their {@link Ext.Panel#header header} or {@link Ext.Panel#footer footer} element - * (depending on the {@link #tabPosition} configuration) to accommodate the tab selector buttons. - * This means that a TabPanel will not display any configured title, and will not display any - * configured header {@link Ext.Panel#tools tools}.

      - *

      To display a header, embed the TabPanel in a {@link Ext.Panel Panel} which uses - * {@link Ext.Container#layout layout:'fit'}.

      - * - *

      Tab Events

      - *

      There is no actual tab class — each tab is simply a {@link Ext.BoxComponent Component} - * such as a {@link Ext.Panel Panel}. However, when rendered in a TabPanel, each child Component - * can fire additional events that only exist for tabs and are not available from other Components. - * These events are:

      - *
        - *
      • {@link Ext.Panel#activate activate} : Fires when this Component becomes - * the active tab.
      • - *
      • {@link Ext.Panel#deactivate deactivate} : Fires when the Component that - * was the active tab becomes deactivated.
      • - *
      • {@link Ext.Panel#beforeclose beforeclose} : Fires when the user clicks on the close tool of a closeable tab. - * May be vetoed by returning false from a handler.
      • - *
      • {@link Ext.Panel#close close} : Fires a closeable tab has been closed by the user.
      • - *
      - *

      Creating TabPanels from Code

      - *

      TabPanels can be created and rendered completely in code, as in this example:

      - *
      
      -var tabs = new Ext.TabPanel({
      -    renderTo: Ext.getBody(),
      -    activeTab: 0,
      -    items: [{
      -        title: 'Tab 1',
      -        html: 'A simple tab'
      -    },{
      -        title: 'Tab 2',
      -        html: 'Another one'
      -    }]
      -});
      -
      - *

      Creating TabPanels from Existing Markup

      - *

      TabPanels can also be rendered from pre-existing markup in a couple of ways.

      - *
        - * - *
      • Pre-Structured Markup
      • - *
        - *

        A container div with one or more nested tab divs with class 'x-tab' can be rendered entirely - * from existing markup (See the {@link #autoTabs} example).

        - *
        - * - *
      • Un-Structured Markup
      • - *
        - *

        A TabPanel can also be rendered from markup that is not strictly structured by simply specifying by id - * which elements should be the container and the tabs. Using this method tab content can be pulled from different - * elements within the page by id regardless of page structure. For example:

        - *
        
        -var tabs = new Ext.TabPanel({
        -    renderTo: 'my-tabs',
        -    activeTab: 0,
        -    items:[
        -        {contentEl:'tab1', title:'Tab 1'},
        -        {contentEl:'tab2', title:'Tab 2'}
        -    ]
        -});
        -
        -// Note that the tabs do not have to be nested within the container (although they can be)
        -<div id="my-tabs"></div>
        -<div id="tab1" class="x-hide-display">A simple tab</div>
        -<div id="tab2" class="x-hide-display">Another one</div>
        -
        - * Note that the tab divs in this example contain the class 'x-hide-display' so that they can be rendered - * deferred without displaying outside the tabs. You could alternately set {@link #deferredRender} = false - * to render all content tabs on page load. - *
        - * - *
      - * - * @extends Ext.Panel - * @constructor - * @param {Object} config The configuration options - * @xtype tabpanel - */ -Ext.TabPanel = Ext.extend(Ext.Panel, { - /** - * @cfg {Boolean} layoutOnTabChange - * Set to true to force a layout of the active tab when the tab is changed. Defaults to false. - * See {@link Ext.layout.CardLayout}.{@link Ext.layout.CardLayout#layoutOnCardChange layoutOnCardChange}. - */ - /** - * @cfg {String} tabCls This config option is used on child Components of ths TabPanel. A CSS - * class name applied to the tab strip item representing the child Component, allowing special - * styling to be applied. - */ - /** - * @cfg {Boolean} deferredRender - *

      true by default to defer the rendering of child {@link Ext.Container#items items} - * to the browsers DOM until a tab is activated. false will render all contained - * {@link Ext.Container#items items} as soon as the {@link Ext.layout.CardLayout layout} - * is rendered. If there is a significant amount of content or a lot of heavy controls being - * rendered into panels that are not displayed by default, setting this to true might - * improve performance.

      - *

      The deferredRender property is internally passed to the layout manager for - * TabPanels ({@link Ext.layout.CardLayout}) as its {@link Ext.layout.CardLayout#deferredRender} - * configuration value.

      - *

      Note: leaving deferredRender as true means that the content - * within an unactivated tab will not be available. For example, this means that if the TabPanel - * is within a {@link Ext.form.FormPanel form}, then until a tab is activated, any Fields within - * unactivated tabs will not be rendered, and will therefore not be submitted and will not be - * available to either {@link Ext.form.BasicForm#getValues getValues} or - * {@link Ext.form.BasicForm#setValues setValues}.

      - */ - deferredRender : true, - /** - * @cfg {Number} tabWidth The initial width in pixels of each new tab (defaults to 120). - */ - tabWidth : 120, - /** - * @cfg {Number} minTabWidth The minimum width in pixels for each tab when {@link #resizeTabs} = true (defaults to 30). - */ - minTabWidth : 30, - /** - * @cfg {Boolean} resizeTabs True to automatically resize each tab so that the tabs will completely fill the - * tab strip (defaults to false). Setting this to true may cause specific widths that might be set per tab to - * be overridden in order to fit them all into view (although {@link #minTabWidth} will always be honored). - */ - resizeTabs : false, - /** - * @cfg {Boolean} enableTabScroll True to enable scrolling to tabs that may be invisible due to overflowing the - * overall TabPanel width. Only available with tabPosition:'top' (defaults to false). - */ - enableTabScroll : false, - /** - * @cfg {Number} scrollIncrement The number of pixels to scroll each time a tab scroll button is pressed - * (defaults to 100, or if {@link #resizeTabs} = true, the calculated tab width). Only - * applies when {@link #enableTabScroll} = true. - */ - scrollIncrement : 0, - /** - * @cfg {Number} scrollRepeatInterval Number of milliseconds between each scroll while a tab scroll button is - * continuously pressed (defaults to 400). - */ - scrollRepeatInterval : 400, - /** - * @cfg {Float} scrollDuration The number of milliseconds that each scroll animation should last (defaults - * to .35). Only applies when {@link #animScroll} = true. - */ - scrollDuration : 0.35, - /** - * @cfg {Boolean} animScroll True to animate tab scrolling so that hidden tabs slide smoothly into view (defaults - * to true). Only applies when {@link #enableTabScroll} = true. - */ - animScroll : true, - /** - * @cfg {String} tabPosition The position where the tab strip should be rendered (defaults to 'top'). - * The only other supported value is 'bottom'. Note: tab scrolling is only supported for - * tabPosition: 'top'. - */ - tabPosition : 'top', - /** - * @cfg {String} baseCls The base CSS class applied to the panel (defaults to 'x-tab-panel'). - */ - baseCls : 'x-tab-panel', - /** - * @cfg {Boolean} autoTabs - *

      true to query the DOM for any divs with a class of 'x-tab' to be automatically converted - * to tabs and added to this panel (defaults to false). Note that the query will be executed within - * the scope of the container element only (so that multiple tab panels from markup can be supported via this - * method).

      - *

      This method is only possible when the markup is structured correctly as a container with nested divs - * containing the class 'x-tab'. To create TabPanels without these limitations, or to pull tab content - * from other elements on the page, see the example at the top of the class for generating tabs from markup.

      - *

      There are a couple of things to note when using this method:

        - *
      • When using the autoTabs config (as opposed to passing individual tab configs in the TabPanel's - * {@link #items} collection), you must use {@link #applyTo} to correctly use the specified id - * as the tab container. The autoTabs method replaces existing content with the TabPanel - * components.
      • - *
      • Make sure that you set {@link #deferredRender}: false so that the content elements for each - * tab will be rendered into the TabPanel immediately upon page load, otherwise they will not be transformed - * until each tab is activated and will be visible outside the TabPanel.
      • - *
      Example usage:

      - *
      
      -var tabs = new Ext.TabPanel({
      -    applyTo: 'my-tabs',
      -    activeTab: 0,
      -    deferredRender: false,
      -    autoTabs: true
      -});
      -
      -// This markup will be converted to a TabPanel from the code above
      -<div id="my-tabs">
      -    <div class="x-tab" title="Tab 1">A simple tab</div>
      -    <div class="x-tab" title="Tab 2">Another one</div>
      -</div>
      -
      - */ - autoTabs : false, - /** - * @cfg {String} autoTabSelector The CSS selector used to search for tabs in existing markup when - * {@link #autoTabs} = true (defaults to 'div.x-tab'). This can be any valid selector - * supported by {@link Ext.DomQuery#select}. Note that the query will be executed within the scope of this - * tab panel only (so that multiple tab panels from markup can be supported on a page). - */ - autoTabSelector : 'div.x-tab', - /** - * @cfg {String/Number} activeTab A string id or the numeric index of the tab that should be initially - * activated on render (defaults to undefined). - */ - activeTab : undefined, - /** - * @cfg {Number} tabMargin The number of pixels of space to calculate into the sizing and scrolling of - * tabs. If you change the margin in CSS, you will need to update this value so calculations are correct - * with either {@link #resizeTabs} or scrolling tabs. (defaults to 2) - */ - tabMargin : 2, - /** - * @cfg {Boolean} plain true to render the tab strip without a background container image - * (defaults to false). - */ - plain : false, - /** - * @cfg {Number} wheelIncrement For scrolling tabs, the number of pixels to increment on mouse wheel - * scrolling (defaults to 20). - */ - wheelIncrement : 20, - - /* - * This is a protected property used when concatenating tab ids to the TabPanel id for internal uniqueness. - * It does not generally need to be changed, but can be if external code also uses an id scheme that can - * potentially clash with this one. - */ - idDelimiter : '__', - - // private - itemCls : 'x-tab-item', - - // private config overrides - elements : 'body', - headerAsText : false, - frame : false, - hideBorders :true, - - // private - initComponent : function(){ - this.frame = false; - Ext.TabPanel.superclass.initComponent.call(this); - this.addEvents( - /** - * @event beforetabchange - * Fires before the active tab changes. Handlers can return false to cancel the tab change. - * @param {TabPanel} this - * @param {Panel} newTab The tab being activated - * @param {Panel} currentTab The current active tab - */ - 'beforetabchange', - /** - * @event tabchange - * Fires after the active tab has changed. - * @param {TabPanel} this - * @param {Panel} tab The new active tab - */ - 'tabchange', - /** - * @event contextmenu - * Relays the contextmenu event from a tab selector element in the tab strip. - * @param {TabPanel} this - * @param {Panel} tab The target tab - * @param {EventObject} e - */ - 'contextmenu' - ); - /** - * @cfg {Object} layoutConfig - * TabPanel implicitly uses {@link Ext.layout.CardLayout} as its layout manager. - * layoutConfig may be used to configure this layout manager. - * {@link #deferredRender} and {@link #layoutOnTabChange} - * configured on the TabPanel will be applied as configs to the layout manager. - */ - this.setLayout(new Ext.layout.CardLayout(Ext.apply({ - layoutOnCardChange: this.layoutOnTabChange, - deferredRender: this.deferredRender - }, this.layoutConfig))); - - if(this.tabPosition == 'top'){ - this.elements += ',header'; - this.stripTarget = 'header'; - }else { - this.elements += ',footer'; - this.stripTarget = 'footer'; - } - if(!this.stack){ - this.stack = Ext.TabPanel.AccessStack(); - } - this.initItems(); - }, - - // private - onRender : function(ct, position){ - Ext.TabPanel.superclass.onRender.call(this, ct, position); - - if(this.plain){ - var pos = this.tabPosition == 'top' ? 'header' : 'footer'; - this[pos].addClass('x-tab-panel-'+pos+'-plain'); - } - - var st = this[this.stripTarget]; - - this.stripWrap = st.createChild({cls:'x-tab-strip-wrap', cn:{ - tag:'ul', cls:'x-tab-strip x-tab-strip-'+this.tabPosition}}); - - var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null); - st.createChild({cls:'x-tab-strip-spacer'}, beforeEl); - this.strip = new Ext.Element(this.stripWrap.dom.firstChild); - - // create an empty span with class x-tab-strip-text to force the height of the header element when there's no tabs. - this.edge = this.strip.createChild({tag:'li', cls:'x-tab-edge', cn: [{tag: 'span', cls: 'x-tab-strip-text', cn: ' '}]}); - this.strip.createChild({cls:'x-clear'}); - - this.body.addClass('x-tab-panel-body-'+this.tabPosition); - - /** - * @cfg {Template/XTemplate} itemTpl

      (Optional) A {@link Ext.Template Template} or - * {@link Ext.XTemplate XTemplate} which may be provided to process the data object returned from - * {@link #getTemplateArgs} to produce a clickable selector element in the tab strip.

      - *

      The main element created should be a <li> element. In order for a click event on - * a selector element to be connected to its item, it must take its id from the TabPanel's - * native {@link #getTemplateArgs}.

      - *

      The child element which contains the title text must be marked by the CSS class - * x-tab-strip-inner.

      - *

      To enable closability, the created element should contain an element marked by the CSS class - * x-tab-strip-close.

      - *

      If a custom itemTpl is supplied, it is the developer's responsibility to create CSS - * style rules to create the desired appearance.

      - * Below is an example of how to create customized tab selector items:
      
      -new Ext.TabPanel({
      -    renderTo: document.body,
      -    minTabWidth: 115,
      -    tabWidth: 135,
      -    enableTabScroll: true,
      -    width: 600,
      -    height: 250,
      -    defaults: {autoScroll:true},
      -    itemTpl: new Ext.XTemplate(
      -    '<li class="{cls}" id="{id}" style="overflow:hidden">',
      -         '<tpl if="closable">',
      -            '<a class="x-tab-strip-close"></a>',
      -         '</tpl>',
      -         '<a class="x-tab-right" href="#" style="padding-left:6px">',
      -            '<em class="x-tab-left">',
      -                '<span class="x-tab-strip-inner">',
      -                    '<img src="{src}" style="float:left;margin:3px 3px 0 0">',
      -                    '<span style="margin-left:20px" class="x-tab-strip-text {iconCls}">{text} {extra}</span>',
      -                '</span>',
      -            '</em>',
      -        '</a>',
      -    '</li>'
      -    ),
      -    getTemplateArgs: function(item) {
      -//      Call the native method to collect the base data. Like the ID!
      -        var result = Ext.TabPanel.prototype.getTemplateArgs.call(this, item);
      -
      -//      Add stuff used in our template
      -        return Ext.apply(result, {
      -            closable: item.closable,
      -            src: item.iconSrc,
      -            extra: item.extraText || ''
      -        });
      -    },
      -    items: [{
      -        title: 'New Tab 1',
      -        iconSrc: '../shared/icons/fam/grid.png',
      -        html: 'Tab Body 1',
      -        closable: true
      -    }, {
      -        title: 'New Tab 2',
      -        iconSrc: '../shared/icons/fam/grid.png',
      -        html: 'Tab Body 2',
      -        extraText: 'Extra stuff in the tab button'
      -    }]
      -});
      -
      - */ - if(!this.itemTpl){ - var tt = new Ext.Template( - '
    • ', - '', - '{text}', - '
    • ' - ); - tt.disableFormats = true; - tt.compile(); - Ext.TabPanel.prototype.itemTpl = tt; - } - - this.items.each(this.initTab, this); - }, - - // private - afterRender : function(){ - Ext.TabPanel.superclass.afterRender.call(this); - if(this.autoTabs){ - this.readTabs(false); - } - if(this.activeTab !== undefined){ - var item = Ext.isObject(this.activeTab) ? this.activeTab : this.items.get(this.activeTab); - delete this.activeTab; - this.setActiveTab(item); - } - }, - - // private - initEvents : function(){ - Ext.TabPanel.superclass.initEvents.call(this); - this.mon(this.strip, { - scope: this, - mousedown: this.onStripMouseDown, - contextmenu: this.onStripContextMenu - }); - if(this.enableTabScroll){ - this.mon(this.strip, 'mousewheel', this.onWheel, this); - } - }, - - // private - findTargets : function(e){ - var item = null, - itemEl = e.getTarget('li:not(.x-tab-edge)', this.strip); - - if(itemEl){ - item = this.getComponent(itemEl.id.split(this.idDelimiter)[1]); - if(item.disabled){ - return { - close : null, - item : null, - el : null - }; - } - } - return { - close : e.getTarget('.x-tab-strip-close', this.strip), - item : item, - el : itemEl - }; - }, - - // private - onStripMouseDown : function(e){ - if(e.button !== 0){ - return; - } - e.preventDefault(); - var t = this.findTargets(e); - if(t.close){ - if (t.item.fireEvent('beforeclose', t.item) !== false) { - t.item.fireEvent('close', t.item); - this.remove(t.item); - } - return; - } - if(t.item && t.item != this.activeTab){ - this.setActiveTab(t.item); - } - }, - - // private - onStripContextMenu : function(e){ - e.preventDefault(); - var t = this.findTargets(e); - if(t.item){ - this.fireEvent('contextmenu', this, t.item, e); - } - }, - - /** - * True to scan the markup in this tab panel for {@link #autoTabs} using the - * {@link #autoTabSelector} - * @param {Boolean} removeExisting True to remove existing tabs - */ - readTabs : function(removeExisting){ - if(removeExisting === true){ - this.items.each(function(item){ - this.remove(item); - }, this); - } - var tabs = this.el.query(this.autoTabSelector); - for(var i = 0, len = tabs.length; i < len; i++){ - var tab = tabs[i], - title = tab.getAttribute('title'); - tab.removeAttribute('title'); - this.add({ - title: title, - contentEl: tab - }); - } - }, - - // private - initTab : function(item, index){ - var before = this.strip.dom.childNodes[index], - p = this.getTemplateArgs(item), - el = before ? - this.itemTpl.insertBefore(before, p) : - this.itemTpl.append(this.strip, p), - cls = 'x-tab-strip-over', - tabEl = Ext.get(el); - - tabEl.hover(function(){ - if(!item.disabled){ - tabEl.addClass(cls); - } - }, function(){ - tabEl.removeClass(cls); - }); - - if(item.tabTip){ - tabEl.child('span.x-tab-strip-text', true).qtip = item.tabTip; - } - item.tabEl = el; - - // Route *keyboard triggered* click events to the tab strip mouse handler. - tabEl.select('a').on('click', function(e){ - if(!e.getPageX()){ - this.onStripMouseDown(e); - } - }, this, {preventDefault: true}); - - item.on({ - scope: this, - disable: this.onItemDisabled, - enable: this.onItemEnabled, - titlechange: this.onItemTitleChanged, - iconchange: this.onItemIconChanged, - beforeshow: this.onBeforeShowItem - }); - }, - - - - /** - *

      Provides template arguments for rendering a tab selector item in the tab strip.

      - *

      This method returns an object hash containing properties used by the TabPanel's {@link #itemTpl} - * to create a formatted, clickable tab selector element. The properties which must be returned - * are:

        - *
      • id : String
        A unique identifier which links to the item
      • - *
      • text : String
        The text to display
      • - *
      • cls : String
        The CSS class name
      • - *
      • iconCls : String
        A CSS class to provide appearance for an icon.
      • - *
      - * @param {Ext.BoxComponent} item The {@link Ext.BoxComponent BoxComponent} for which to create a selector element in the tab strip. - * @return {Object} An object hash containing the properties required to render the selector element. - */ - getTemplateArgs : function(item) { - var cls = item.closable ? 'x-tab-strip-closable' : ''; - if(item.disabled){ - cls += ' x-item-disabled'; - } - if(item.iconCls){ - cls += ' x-tab-with-icon'; - } - if(item.tabCls){ - cls += ' ' + item.tabCls; - } - - return { - id: this.id + this.idDelimiter + item.getItemId(), - text: item.title, - cls: cls, - iconCls: item.iconCls || '' - }; - }, - - // private - onAdd : function(c){ - Ext.TabPanel.superclass.onAdd.call(this, c); - if(this.rendered){ - var items = this.items; - this.initTab(c, items.indexOf(c)); - this.delegateUpdates(); - } - }, - - // private - onBeforeAdd : function(item){ - var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item); - if(existing){ - this.setActiveTab(item); - return false; - } - Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments); - var es = item.elements; - item.elements = es ? es.replace(',header', '') : es; - item.border = (item.border === true); - }, - - // private - onRemove : function(c){ - var te = Ext.get(c.tabEl); - // check if the tabEl exists, it won't if the tab isn't rendered - if(te){ - te.select('a').removeAllListeners(); - Ext.destroy(te); - } - Ext.TabPanel.superclass.onRemove.call(this, c); - this.stack.remove(c); - delete c.tabEl; - c.un('disable', this.onItemDisabled, this); - c.un('enable', this.onItemEnabled, this); - c.un('titlechange', this.onItemTitleChanged, this); - c.un('iconchange', this.onItemIconChanged, this); - c.un('beforeshow', this.onBeforeShowItem, this); - if(c == this.activeTab){ - var next = this.stack.next(); - if(next){ - this.setActiveTab(next); - }else if(this.items.getCount() > 0){ - this.setActiveTab(0); - }else{ - this.setActiveTab(null); - } - } - if(!this.destroying){ - this.delegateUpdates(); - } - }, - - // private - onBeforeShowItem : function(item){ - if(item != this.activeTab){ - this.setActiveTab(item); - return false; - } - }, - - // private - onItemDisabled : function(item){ - var el = this.getTabEl(item); - if(el){ - Ext.fly(el).addClass('x-item-disabled'); - } - this.stack.remove(item); - }, - - // private - onItemEnabled : function(item){ - var el = this.getTabEl(item); - if(el){ - Ext.fly(el).removeClass('x-item-disabled'); - } - }, - - // private - onItemTitleChanged : function(item){ - var el = this.getTabEl(item); - if(el){ - Ext.fly(el).child('span.x-tab-strip-text', true).innerHTML = item.title; - } - }, - - //private - onItemIconChanged : function(item, iconCls, oldCls){ - var el = this.getTabEl(item); - if(el){ - el = Ext.get(el); - el.child('span.x-tab-strip-text').replaceClass(oldCls, iconCls); - el[Ext.isEmpty(iconCls) ? 'removeClass' : 'addClass']('x-tab-with-icon'); - } - }, - - /** - * Gets the DOM element for the tab strip item which activates the child panel with the specified - * ID. Access this to change the visual treatment of the item, for example by changing the CSS class name. - * @param {Panel/Number/String} tab The tab component, or the tab's index, or the tabs id or itemId. - * @return {HTMLElement} The DOM node - */ - getTabEl : function(item){ - var c = this.getComponent(item); - return c ? c.tabEl : null; - }, - - // private - onResize : function(){ - Ext.TabPanel.superclass.onResize.apply(this, arguments); - this.delegateUpdates(); - }, - - /** - * Suspends any internal calculations or scrolling while doing a bulk operation. See {@link #endUpdate} - */ - beginUpdate : function(){ - this.suspendUpdates = true; - }, - - /** - * Resumes calculations and scrolling at the end of a bulk operation. See {@link #beginUpdate} - */ - endUpdate : function(){ - this.suspendUpdates = false; - this.delegateUpdates(); - }, - - /** - * Hides the tab strip item for the passed tab - * @param {Number/String/Panel} item The tab index, id or item - */ - hideTabStripItem : function(item){ - item = this.getComponent(item); - var el = this.getTabEl(item); - if(el){ - el.style.display = 'none'; - this.delegateUpdates(); - } - this.stack.remove(item); - }, - - /** - * Unhides the tab strip item for the passed tab - * @param {Number/String/Panel} item The tab index, id or item - */ - unhideTabStripItem : function(item){ - item = this.getComponent(item); - var el = this.getTabEl(item); - if(el){ - el.style.display = ''; - this.delegateUpdates(); - } - }, - - // private - delegateUpdates : function(){ - var rendered = this.rendered; - if(this.suspendUpdates){ - return; - } - if(this.resizeTabs && rendered){ - this.autoSizeTabs(); - } - if(this.enableTabScroll && rendered){ - this.autoScrollTabs(); - } - }, - - // private - autoSizeTabs : function(){ - var count = this.items.length, - ce = this.tabPosition != 'bottom' ? 'header' : 'footer', - ow = this[ce].dom.offsetWidth, - aw = this[ce].dom.clientWidth; - - if(!this.resizeTabs || count < 1 || !aw){ // !aw for display:none - return; - } - - var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth); // -4 for float errors in IE - this.lastTabWidth = each; - var lis = this.strip.query('li:not(.x-tab-edge)'); - for(var i = 0, len = lis.length; i < len; i++) { - var li = lis[i], - inner = Ext.fly(li).child('.x-tab-strip-inner', true), - tw = li.offsetWidth, - iw = inner.offsetWidth; - inner.style.width = (each - (tw-iw)) + 'px'; - } - }, - - // private - adjustBodyWidth : function(w){ - if(this.header){ - this.header.setWidth(w); - } - if(this.footer){ - this.footer.setWidth(w); - } - return w; - }, - - /** - * Sets the specified tab as the active tab. This method fires the {@link #beforetabchange} event which - * can return false to cancel the tab change. - * @param {String/Number} item - * The id or tab Panel to activate. This parameter may be any of the following: - *
        - *
      • a String : representing the {@link Ext.Component#itemId itemId} - * or {@link Ext.Component#id id} of the child component
      • - *
      • a Number : representing the position of the child component - * within the {@link Ext.Container#items items} property
      • - *
      - *

      For additional information see {@link Ext.util.MixedCollection#get}. - */ - setActiveTab : function(item){ - item = this.getComponent(item); - if(this.fireEvent('beforetabchange', this, item, this.activeTab) === false){ - return; - } - if(!this.rendered){ - this.activeTab = item; - return; - } - if(this.activeTab != item){ - if(this.activeTab){ - var oldEl = this.getTabEl(this.activeTab); - if(oldEl){ - Ext.fly(oldEl).removeClass('x-tab-strip-active'); - } - } - this.activeTab = item; - if(item){ - var el = this.getTabEl(item); - Ext.fly(el).addClass('x-tab-strip-active'); - this.stack.add(item); - - this.layout.setActiveItem(item); - // Need to do this here, since setting the active tab slightly changes the size - this.delegateUpdates(); - if(this.scrolling){ - this.scrollToTab(item, this.animScroll); - } - } - this.fireEvent('tabchange', this, item); - } - }, - - /** - * Returns the Component which is the currently active tab. Note that before the TabPanel - * first activates a child Component, this method will return whatever was configured in the - * {@link #activeTab} config option. - * @return {BoxComponent} The currently active child Component if one is active, or the {@link #activeTab} config value. - */ - getActiveTab : function(){ - return this.activeTab || null; - }, - - /** - * Gets the specified tab by id. - * @param {String} id The tab id - * @return {Panel} The tab - */ - getItem : function(item){ - return this.getComponent(item); - }, - - // private - autoScrollTabs : function(){ - this.pos = this.tabPosition=='bottom' ? this.footer : this.header; - var count = this.items.length, - ow = this.pos.dom.offsetWidth, - tw = this.pos.dom.clientWidth, - wrap = this.stripWrap, - wd = wrap.dom, - cw = wd.offsetWidth, - pos = this.getScrollPos(), - l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos; - - if(!this.enableTabScroll || cw < 20){ // 20 to prevent display:none issues - return; - } - if(count == 0 || l <= tw){ - // ensure the width is set if there's no tabs - wd.scrollLeft = 0; - wrap.setWidth(tw); - if(this.scrolling){ - this.scrolling = false; - this.pos.removeClass('x-tab-scrolling'); - this.scrollLeft.hide(); - this.scrollRight.hide(); - // See here: http://extjs.com/forum/showthread.php?t=49308&highlight=isSafari - if(Ext.isAir || Ext.isWebKit){ - wd.style.marginLeft = ''; - wd.style.marginRight = ''; - } - } - }else{ - if(!this.scrolling){ - this.pos.addClass('x-tab-scrolling'); - // See here: http://extjs.com/forum/showthread.php?t=49308&highlight=isSafari - if(Ext.isAir || Ext.isWebKit){ - wd.style.marginLeft = '18px'; - wd.style.marginRight = '18px'; - } - } - tw -= wrap.getMargins('lr'); - wrap.setWidth(tw > 20 ? tw : 20); - if(!this.scrolling){ - if(!this.scrollLeft){ - this.createScrollers(); - }else{ - this.scrollLeft.show(); - this.scrollRight.show(); - } - } - this.scrolling = true; - if(pos > (l-tw)){ // ensure it stays within bounds - wd.scrollLeft = l-tw; - }else{ // otherwise, make sure the active tab is still visible - this.scrollToTab(this.activeTab, false); - } - this.updateScrollButtons(); - } - }, - - // private - createScrollers : function(){ - this.pos.addClass('x-tab-scrolling-' + this.tabPosition); - var h = this.stripWrap.dom.offsetHeight; - - // left - var sl = this.pos.insertFirst({ - cls:'x-tab-scroller-left' - }); - sl.setHeight(h); - sl.addClassOnOver('x-tab-scroller-left-over'); - this.leftRepeater = new Ext.util.ClickRepeater(sl, { - interval : this.scrollRepeatInterval, - handler: this.onScrollLeft, - scope: this - }); - this.scrollLeft = sl; - - // right - var sr = this.pos.insertFirst({ - cls:'x-tab-scroller-right' - }); - sr.setHeight(h); - sr.addClassOnOver('x-tab-scroller-right-over'); - this.rightRepeater = new Ext.util.ClickRepeater(sr, { - interval : this.scrollRepeatInterval, - handler: this.onScrollRight, - scope: this - }); - this.scrollRight = sr; - }, - - // private - getScrollWidth : function(){ - return this.edge.getOffsetsTo(this.stripWrap)[0] + this.getScrollPos(); - }, - - // private - getScrollPos : function(){ - return parseInt(this.stripWrap.dom.scrollLeft, 10) || 0; - }, - - // private - getScrollArea : function(){ - return parseInt(this.stripWrap.dom.clientWidth, 10) || 0; - }, - - // private - getScrollAnim : function(){ - return {duration:this.scrollDuration, callback: this.updateScrollButtons, scope: this}; - }, - - // private - getScrollIncrement : function(){ - return this.scrollIncrement || (this.resizeTabs ? this.lastTabWidth+2 : 100); - }, - - /** - * Scrolls to a particular tab if tab scrolling is enabled - * @param {Panel} item The item to scroll to - * @param {Boolean} animate True to enable animations - */ - - scrollToTab : function(item, animate){ - if(!item){ - return; - } - var el = this.getTabEl(item), - pos = this.getScrollPos(), - area = this.getScrollArea(), - left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos, - right = left + el.offsetWidth; - if(left < pos){ - this.scrollTo(left, animate); - }else if(right > (pos + area)){ - this.scrollTo(right - area, animate); - } - }, - - // private - scrollTo : function(pos, animate){ - this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false); - if(!animate){ - this.updateScrollButtons(); - } - }, - - onWheel : function(e){ - var d = e.getWheelDelta()*this.wheelIncrement*-1; - e.stopEvent(); - - var pos = this.getScrollPos(), - newpos = pos + d, - sw = this.getScrollWidth()-this.getScrollArea(); - - var s = Math.max(0, Math.min(sw, newpos)); - if(s != pos){ - this.scrollTo(s, false); - } - }, - - // private - onScrollRight : function(){ - var sw = this.getScrollWidth()-this.getScrollArea(), - pos = this.getScrollPos(), - s = Math.min(sw, pos + this.getScrollIncrement()); - if(s != pos){ - this.scrollTo(s, this.animScroll); - } - }, - - // private - onScrollLeft : function(){ - var pos = this.getScrollPos(), - s = Math.max(0, pos - this.getScrollIncrement()); - if(s != pos){ - this.scrollTo(s, this.animScroll); - } - }, - - // private - updateScrollButtons : function(){ - var pos = this.getScrollPos(); - this.scrollLeft[pos === 0 ? 'addClass' : 'removeClass']('x-tab-scroller-left-disabled'); - this.scrollRight[pos >= (this.getScrollWidth()-this.getScrollArea()) ? 'addClass' : 'removeClass']('x-tab-scroller-right-disabled'); - }, - - // private - beforeDestroy : function() { - Ext.destroy(this.leftRepeater, this.rightRepeater); - this.deleteMembers('strip', 'edge', 'scrollLeft', 'scrollRight', 'stripWrap'); - this.activeTab = null; - Ext.TabPanel.superclass.beforeDestroy.apply(this); - } - - /** - * @cfg {Boolean} collapsible - * @hide - */ - /** - * @cfg {String} header - * @hide - */ - /** - * @cfg {Boolean} headerAsText - * @hide - */ - /** - * @property header - * @hide - */ - /** - * @cfg title - * @hide - */ - /** - * @cfg {Array} tools - * @hide - */ - /** - * @cfg {Array} toolTemplate - * @hide - */ - /** - * @cfg {Boolean} hideCollapseTool - * @hide - */ - /** - * @cfg {Boolean} titleCollapse - * @hide - */ - /** - * @cfg {Boolean} collapsed - * @hide - */ - /** - * @cfg {String} layout - * @hide - */ - /** - * @cfg {Boolean} preventBodyReset - * @hide - */ -}); -Ext.reg('tabpanel', Ext.TabPanel); - -/** - * See {@link #setActiveTab}. Sets the specified tab as the active tab. This method fires - * the {@link #beforetabchange} event which can return false to cancel the tab change. - * @param {String/Panel} tab The id or tab Panel to activate - * @method activate - */ -Ext.TabPanel.prototype.activate = Ext.TabPanel.prototype.setActiveTab; - -// private utility class used by TabPanel -Ext.TabPanel.AccessStack = function(){ - var items = []; - return { - add : function(item){ - items.push(item); - if(items.length > 10){ - items.shift(); - } - }, - - remove : function(item){ - var s = []; - for(var i = 0, len = items.length; i < len; i++) { - if(items[i] != item){ - s.push(items[i]); - } - } - items = s; - }, - - next : function(){ - return items.pop(); - } - }; -}; diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tabs.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tabs.js deleted file mode 100644 index c48465f837c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tabs.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.TabPanel=Ext.extend(Ext.Panel,{deferredRender:true,tabWidth:120,minTabWidth:30,resizeTabs:false,enableTabScroll:false,scrollIncrement:0,scrollRepeatInterval:400,scrollDuration:0.35,animScroll:true,tabPosition:"top",baseCls:"x-tab-panel",autoTabs:false,autoTabSelector:"div.x-tab",activeTab:undefined,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:"__",itemCls:"x-tab-item",elements:"body",headerAsText:false,frame:false,hideBorders:true,initComponent:function(){this.frame=false;Ext.TabPanel.superclass.initComponent.call(this);this.addEvents("beforetabchange","tabchange","contextmenu");this.setLayout(new Ext.layout.CardLayout(Ext.apply({layoutOnCardChange:this.layoutOnTabChange,deferredRender:this.deferredRender},this.layoutConfig)));if(this.tabPosition=="top"){this.elements+=",header";this.stripTarget="header"}else{this.elements+=",footer";this.stripTarget="footer"}if(!this.stack){this.stack=Ext.TabPanel.AccessStack()}this.initItems()},onRender:function(c,a){Ext.TabPanel.superclass.onRender.call(this,c,a);if(this.plain){var f=this.tabPosition=="top"?"header":"footer";this[f].addClass("x-tab-panel-"+f+"-plain")}var b=this[this.stripTarget];this.stripWrap=b.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-"+this.tabPosition}});var e=(this.tabPosition=="bottom"?this.stripWrap:null);b.createChild({cls:"x-tab-strip-spacer"},e);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:"li",cls:"x-tab-edge",cn:[{tag:"span",cls:"x-tab-strip-text",cn:" "}]});this.strip.createChild({cls:"x-clear"});this.body.addClass("x-tab-panel-body-"+this.tabPosition);if(!this.itemTpl){var d=new Ext.Template('

    • ','','{text}',"
    • ");d.disableFormats=true;d.compile();Ext.TabPanel.prototype.itemTpl=d}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}if(this.activeTab!==undefined){var a=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.mon(this.strip,{scope:this,mousedown:this.onStripMouseDown,contextmenu:this.onStripContextMenu});if(this.enableTabScroll){this.mon(this.strip,"mousewheel",this.onWheel,this)}},findTargets:function(c){var b=null,a=c.getTarget("li:not(.x-tab-edge)",this.strip);if(a){b=this.getComponent(a.id.split(this.idDelimiter)[1]);if(b.disabled){return{close:null,item:null,el:null}}}return{close:c.getTarget(".x-tab-strip-close",this.strip),item:b,el:a}},onStripMouseDown:function(b){if(b.button!==0){return}b.preventDefault();var a=this.findTargets(b);if(a.close){if(a.item.fireEvent("beforeclose",a.item)!==false){a.item.fireEvent("close",a.item);this.remove(a.item)}return}if(a.item&&a.item!=this.activeTab){this.setActiveTab(a.item)}},onStripContextMenu:function(b){b.preventDefault();var a=this.findTargets(b);if(a.item){this.fireEvent("contextmenu",this,a.item,b)}},readTabs:function(d){if(d===true){this.items.each(function(g){this.remove(g)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b0){this.setActiveTab(0)}else{this.setActiveTab(null)}}}if(!this.destroying){this.delegateUpdates()}},onBeforeShowItem:function(a){if(a!=this.activeTab){this.setActiveTab(a);return false}},onItemDisabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).addClass("x-item-disabled")}this.stack.remove(b)},onItemEnabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).removeClass("x-item-disabled")}},onItemTitleChanged:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).child("span.x-tab-strip-text",true).innerHTML=b.title}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){b=Ext.get(b);b.child("span.x-tab-strip-text").replaceClass(c,a);b[Ext.isEmpty(a)?"removeClass":"addClass"]("x-tab-with-icon")}},getTabEl:function(a){var b=this.getComponent(a);return b?b.tabEl:null},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=true},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates()},hideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="none";this.delegateUpdates()}this.stack.remove(b)},unhideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="";this.delegateUpdates()}},delegateUpdates:function(){var a=this.rendered;if(this.suspendUpdates){return}if(this.resizeTabs&&a){this.autoSizeTabs()}if(this.enableTabScroll&&a){this.autoScrollTabs()}},autoSizeTabs:function(){var g=this.items.length,b=this.tabPosition!="bottom"?"header":"footer",c=this[b].dom.offsetWidth,a=this[b].dom.clientWidth;if(!this.resizeTabs||g<1||!a){return}var j=Math.max(Math.min(Math.floor((a-4)/g)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=j;var l=this.strip.query("li:not(.x-tab-edge)");for(var e=0,h=l.length;e20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(h>(a-c)){e.scrollLeft=a-c}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var c=this.stripWrap.dom.offsetHeight;var a=this.pos.insertFirst({cls:"x-tab-scroller-left"});a.setHeight(c);a.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=a;var b=this.pos.insertFirst({cls:"x-tab-scroller-right"});b.setHeight(c);b.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=b},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(e,a){if(!e){return}var c=this.getTabEl(e),g=this.getScrollPos(),d=this.getScrollArea(),f=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+g,b=f+c.offsetWidth;if(f(g+d)){this.scrollTo(b-d,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(f){var g=f.getWheelDelta()*this.wheelIncrement*-1;f.stopEvent();var h=this.getScrollPos(),c=h+g,a=this.getScrollWidth()-this.getScrollArea();var b=Math.max(0,Math.min(a,c));if(b!=h){this.scrollTo(b,false)}},onScrollRight:function(){var a=this.getScrollWidth()-this.getScrollArea(),c=this.getScrollPos(),b=Math.min(a,c+this.getScrollIncrement());if(b!=c){this.scrollTo(b,this.animScroll)}},onScrollLeft:function(){var b=this.getScrollPos(),a=Math.max(0,b-this.getScrollIncrement());if(a!=b){this.scrollTo(a,this.animScroll)}},updateScrollButtons:function(){var a=this.getScrollPos();this.scrollLeft[a===0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[a>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")},beforeDestroy:function(){Ext.destroy(this.leftRepeater,this.rightRepeater);this.deleteMembers("strip","edge","scrollLeft","scrollRight","stripWrap");this.activeTab=null;Ext.TabPanel.superclass.beforeDestroy.apply(this)}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var a=[];return{add:function(b){a.push(b);if(a.length>10){a.shift()}},remove:function(e){var d=[];for(var c=0,b=a.length;cExperimental. The default {@link Ext.Element#alignTo} anchor position value - * for this tip relative to its element of origin (defaults to "tl-bl?"). - */ - defaultAlign : "tl-bl?", - autoRender: true, - quickShowInterval : 250, - - // private panel overrides - frame:true, - hidden:true, - baseCls: 'x-tip', - floating:{shadow:true,shim:true,useDisplay:true,constrain:false}, - autoHeight:true, - - closeAction: 'hide', - - // private - initComponent : function(){ - Ext.Tip.superclass.initComponent.call(this); - if(this.closable && !this.title){ - this.elements += ',header'; - } - }, - - // private - afterRender : function(){ - Ext.Tip.superclass.afterRender.call(this); - if(this.closable){ - this.addTool({ - id: 'close', - handler: this[this.closeAction], - scope: this - }); - } - }, - - /** - * Shows this tip at the specified XY position. Example usage: - *
      
      -// Show the tip at x:50 and y:100
      -tip.showAt([50,100]);
      -
      - * @param {Array} xy An array containing the x and y coordinates - */ - showAt : function(xy){ - Ext.Tip.superclass.show.call(this); - if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){ - this.doAutoWidth(); - } - if(this.constrainPosition){ - xy = this.el.adjustForConstraints(xy); - } - this.setPagePosition(xy[0], xy[1]); - }, - - // protected - doAutoWidth : function(adjust){ - adjust = adjust || 0; - var bw = this.body.getTextWidth(); - if(this.title){ - bw = Math.max(bw, this.header.child('span').getTextWidth(this.title)); - } - bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr") + adjust; - this.setWidth(bw.constrain(this.minWidth, this.maxWidth)); - - // IE7 repaint bug on initial show - if(Ext.isIE7 && !this.repainted){ - this.el.repaint(); - this.repainted = true; - } - }, - - /** - * Experimental. Shows this tip at a position relative to another element using a standard {@link Ext.Element#alignTo} - * anchor position value. Example usage: - *
      
      -// Show the tip at the default position ('tl-br?')
      -tip.showBy('my-el');
      -
      -// Show the tip's top-left corner anchored to the element's top-right corner
      -tip.showBy('my-el', 'tl-tr');
      -
      - * @param {Mixed} el An HTMLElement, Ext.Element or string id of the target element to align to - * @param {String} position (optional) A valid {@link Ext.Element#alignTo} anchor position (defaults to 'tl-br?' or - * {@link #defaultAlign} if specified). - */ - showBy : function(el, pos){ - if(!this.rendered){ - this.render(Ext.getBody()); - } - this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign)); - }, - - initDraggable : function(){ - this.dd = new Ext.Tip.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable); - this.header.addClass('x-tip-draggable'); - } -}); - -Ext.reg('tip', Ext.Tip); - -// private - custom Tip DD implementation -Ext.Tip.DD = function(tip, config){ - Ext.apply(this, config); - this.tip = tip; - Ext.Tip.DD.superclass.constructor.call(this, tip.el.id, 'WindowDD-'+tip.id); - this.setHandleElId(tip.header.id); - this.scroll = false; -}; - -Ext.extend(Ext.Tip.DD, Ext.dd.DD, { - moveOnly:true, - scroll:false, - headerOffsets:[100, 25], - startDrag : function(){ - this.tip.el.disableShadow(); - }, - endDrag : function(e){ - this.tip.el.enableShadow(true); - } -});/** - * @class Ext.ToolTip - * @extends Ext.Tip - * A standard tooltip implementation for providing additional information when hovering over a target element. - * @xtype tooltip - * @constructor - * Create a new Tooltip - * @param {Object} config The configuration options - */ -Ext.ToolTip = Ext.extend(Ext.Tip, { - /** - * When a Tooltip is configured with the {@link #delegate} - * option to cause selected child elements of the {@link #target} - * Element to each trigger a seperate show event, this property is set to - * the DOM element which triggered the show. - * @type DOMElement - * @property triggerElement - */ - /** - * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to monitor - * for mouseover events to trigger showing this ToolTip. - */ - /** - * @cfg {Boolean} autoHide True to automatically hide the tooltip after the - * mouse exits the target element or after the {@link #dismissDelay} - * has expired if set (defaults to true). If {@link closable} = true - * a close tool button will be rendered into the tooltip header. - */ - /** - * @cfg {Number} showDelay Delay in milliseconds before the tooltip displays - * after the mouse enters the target element (defaults to 500) - */ - showDelay : 500, - /** - * @cfg {Number} hideDelay Delay in milliseconds after the mouse exits the - * target element but before the tooltip actually hides (defaults to 200). - * Set to 0 for the tooltip to hide immediately. - */ - hideDelay : 200, - /** - * @cfg {Number} dismissDelay Delay in milliseconds before the tooltip - * automatically hides (defaults to 5000). To disable automatic hiding, set - * dismissDelay = 0. - */ - dismissDelay : 5000, - /** - * @cfg {Array} mouseOffset An XY offset from the mouse position where the - * tooltip should be shown (defaults to [15,18]). - */ - /** - * @cfg {Boolean} trackMouse True to have the tooltip follow the mouse as it - * moves over the target element (defaults to false). - */ - trackMouse : false, - /** - * @cfg {Boolean} anchorToTarget True to anchor the tooltip to the target - * element, false to anchor it relative to the mouse coordinates (defaults - * to true). When anchorToTarget is true, use - * {@link #defaultAlign} to control tooltip alignment to the - * target element. When anchorToTarget is false, use - * {@link #anchorPosition} instead to control alignment. - */ - anchorToTarget : true, - /** - * @cfg {Number} anchorOffset A numeric pixel value used to offset the - * default position of the anchor arrow (defaults to 0). When the anchor - * position is on the top or bottom of the tooltip, anchorOffset - * will be used as a horizontal offset. Likewise, when the anchor position - * is on the left or right side, anchorOffset will be used as - * a vertical offset. - */ - anchorOffset : 0, - /** - * @cfg {String} delegate

      Optional. A {@link Ext.DomQuery DomQuery} - * selector which allows selection of individual elements within the - * {@link #target} element to trigger showing and hiding the - * ToolTip as the mouse moves within the target.

      - *

      When specified, the child element of the target which caused a show - * event is placed into the {@link #triggerElement} property - * before the ToolTip is shown.

      - *

      This may be useful when a Component has regular, repeating elements - * in it, each of which need a Tooltip which contains information specific - * to that element. For example:

      
      -var myGrid = new Ext.grid.gridPanel(gridConfig);
      -myGrid.on('render', function(grid) {
      -    var store = grid.getStore();  // Capture the Store.
      -    var view = grid.getView();    // Capture the GridView.
      -    myGrid.tip = new Ext.ToolTip({
      -        target: view.mainBody,    // The overall target element.
      -        delegate: '.x-grid3-row', // Each grid row causes its own seperate show and hide.
      -        trackMouse: true,         // Moving within the row should not hide the tip.
      -        renderTo: document.body,  // Render immediately so that tip.body can be
      -                                  //  referenced prior to the first show.
      -        listeners: {              // Change content dynamically depending on which element
      -                                  //  triggered the show.
      -            beforeshow: function updateTipBody(tip) {
      -                var rowIndex = view.findRowIndex(tip.triggerElement);
      -                tip.body.dom.innerHTML = 'Over Record ID ' + store.getAt(rowIndex).id;
      -            }
      -        }
      -    });
      -});
      -     *
      - */ - - // private - targetCounter : 0, - - constrainPosition : false, - - // private - initComponent : function(){ - Ext.ToolTip.superclass.initComponent.call(this); - this.lastActive = new Date(); - this.initTarget(this.target); - this.origAnchor = this.anchor; - }, - - // private - onRender : function(ct, position){ - Ext.ToolTip.superclass.onRender.call(this, ct, position); - this.anchorCls = 'x-tip-anchor-' + this.getAnchorPosition(); - this.anchorEl = this.el.createChild({ - cls: 'x-tip-anchor ' + this.anchorCls - }); - }, - - // private - afterRender : function(){ - Ext.ToolTip.superclass.afterRender.call(this); - this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1).setVisibilityMode(Ext.Element.DISPLAY); - }, - - /** - * Binds this ToolTip to the specified element. The tooltip will be displayed when the mouse moves over the element. - * @param {Mixed} t The Element, HtmlElement, or ID of an element to bind to - */ - initTarget : function(target){ - var t; - if((t = Ext.get(target))){ - if(this.target){ - var tg = Ext.get(this.target); - this.mun(tg, 'mouseover', this.onTargetOver, this); - this.mun(tg, 'mouseout', this.onTargetOut, this); - this.mun(tg, 'mousemove', this.onMouseMove, this); - } - this.mon(t, { - mouseover: this.onTargetOver, - mouseout: this.onTargetOut, - mousemove: this.onMouseMove, - scope: this - }); - this.target = t; - } - if(this.anchor){ - this.anchorTarget = this.target; - } - }, - - // private - onMouseMove : function(e){ - var t = this.delegate ? e.getTarget(this.delegate) : this.triggerElement = true; - if (t) { - this.targetXY = e.getXY(); - if (t === this.triggerElement) { - if(!this.hidden && this.trackMouse){ - this.setPagePosition(this.getTargetXY()); - } - } else { - this.hide(); - this.lastActive = new Date(0); - this.onTargetOver(e); - } - } else if (!this.closable && this.isVisible()) { - this.hide(); - } - }, - - // private - getTargetXY : function(){ - if(this.delegate){ - this.anchorTarget = this.triggerElement; - } - if(this.anchor){ - this.targetCounter++; - var offsets = this.getOffsets(), - xy = (this.anchorToTarget && !this.trackMouse) ? this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) : this.targetXY, - dw = Ext.lib.Dom.getViewWidth() - 5, - dh = Ext.lib.Dom.getViewHeight() - 5, - de = document.documentElement, - bd = document.body, - scrollX = (de.scrollLeft || bd.scrollLeft || 0) + 5, - scrollY = (de.scrollTop || bd.scrollTop || 0) + 5, - axy = [xy[0] + offsets[0], xy[1] + offsets[1]], - sz = this.getSize(); - - this.anchorEl.removeClass(this.anchorCls); - - if(this.targetCounter < 2){ - if(axy[0] < scrollX){ - if(this.anchorToTarget){ - this.defaultAlign = 'l-r'; - if(this.mouseOffset){this.mouseOffset[0] *= -1;} - } - this.anchor = 'left'; - return this.getTargetXY(); - } - if(axy[0]+sz.width > dw){ - if(this.anchorToTarget){ - this.defaultAlign = 'r-l'; - if(this.mouseOffset){this.mouseOffset[0] *= -1;} - } - this.anchor = 'right'; - return this.getTargetXY(); - } - if(axy[1] < scrollY){ - if(this.anchorToTarget){ - this.defaultAlign = 't-b'; - if(this.mouseOffset){this.mouseOffset[1] *= -1;} - } - this.anchor = 'top'; - return this.getTargetXY(); - } - if(axy[1]+sz.height > dh){ - if(this.anchorToTarget){ - this.defaultAlign = 'b-t'; - if(this.mouseOffset){this.mouseOffset[1] *= -1;} - } - this.anchor = 'bottom'; - return this.getTargetXY(); - } - } - - this.anchorCls = 'x-tip-anchor-'+this.getAnchorPosition(); - this.anchorEl.addClass(this.anchorCls); - this.targetCounter = 0; - return axy; - }else{ - var mouseOffset = this.getMouseOffset(); - return [this.targetXY[0]+mouseOffset[0], this.targetXY[1]+mouseOffset[1]]; - } - }, - - getMouseOffset : function(){ - var offset = this.anchor ? [0,0] : [15,18]; - if(this.mouseOffset){ - offset[0] += this.mouseOffset[0]; - offset[1] += this.mouseOffset[1]; - } - return offset; - }, - - // private - getAnchorPosition : function(){ - if(this.anchor){ - this.tipAnchor = this.anchor.charAt(0); - }else{ - var m = this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/); - if(!m){ - throw 'AnchorTip.defaultAlign is invalid'; - } - this.tipAnchor = m[1].charAt(0); - } - - switch(this.tipAnchor){ - case 't': return 'top'; - case 'b': return 'bottom'; - case 'r': return 'right'; - } - return 'left'; - }, - - // private - getAnchorAlign : function(){ - switch(this.anchor){ - case 'top' : return 'tl-bl'; - case 'left' : return 'tl-tr'; - case 'right': return 'tr-tl'; - default : return 'bl-tl'; - } - }, - - // private - getOffsets : function(){ - var offsets, - ap = this.getAnchorPosition().charAt(0); - if(this.anchorToTarget && !this.trackMouse){ - switch(ap){ - case 't': - offsets = [0, 9]; - break; - case 'b': - offsets = [0, -13]; - break; - case 'r': - offsets = [-13, 0]; - break; - default: - offsets = [9, 0]; - break; - } - }else{ - switch(ap){ - case 't': - offsets = [-15-this.anchorOffset, 30]; - break; - case 'b': - offsets = [-19-this.anchorOffset, -13-this.el.dom.offsetHeight]; - break; - case 'r': - offsets = [-15-this.el.dom.offsetWidth, -13-this.anchorOffset]; - break; - default: - offsets = [25, -13-this.anchorOffset]; - break; - } - } - var mouseOffset = this.getMouseOffset(); - offsets[0] += mouseOffset[0]; - offsets[1] += mouseOffset[1]; - - return offsets; - }, - - // private - onTargetOver : function(e){ - if(this.disabled || e.within(this.target.dom, true)){ - return; - } - var t = e.getTarget(this.delegate); - if (t) { - this.triggerElement = t; - this.clearTimer('hide'); - this.targetXY = e.getXY(); - this.delayShow(); - } - }, - - // private - delayShow : function(){ - if(this.hidden && !this.showTimer){ - if(this.lastActive.getElapsed() < this.quickShowInterval){ - this.show(); - }else{ - this.showTimer = this.show.defer(this.showDelay, this); - } - }else if(!this.hidden && this.autoHide !== false){ - this.show(); - } - }, - - // private - onTargetOut : function(e){ - if(this.disabled || e.within(this.target.dom, true)){ - return; - } - this.clearTimer('show'); - if(this.autoHide !== false){ - this.delayHide(); - } - }, - - // private - delayHide : function(){ - if(!this.hidden && !this.hideTimer){ - this.hideTimer = this.hide.defer(this.hideDelay, this); - } - }, - - /** - * Hides this tooltip if visible. - */ - hide: function(){ - this.clearTimer('dismiss'); - this.lastActive = new Date(); - if(this.anchorEl){ - this.anchorEl.hide(); - } - Ext.ToolTip.superclass.hide.call(this); - delete this.triggerElement; - }, - - /** - * Shows this tooltip at the current event target XY position. - */ - show : function(){ - if(this.anchor){ - // pre-show it off screen so that the el will have dimensions - // for positioning calcs when getting xy next - this.showAt([-1000,-1000]); - this.origConstrainPosition = this.constrainPosition; - this.constrainPosition = false; - this.anchor = this.origAnchor; - } - this.showAt(this.getTargetXY()); - - if(this.anchor){ - this.anchorEl.show(); - this.syncAnchor(); - this.constrainPosition = this.origConstrainPosition; - }else{ - this.anchorEl.hide(); - } - }, - - // inherit docs - showAt : function(xy){ - this.lastActive = new Date(); - this.clearTimers(); - Ext.ToolTip.superclass.showAt.call(this, xy); - if(this.dismissDelay && this.autoHide !== false){ - this.dismissTimer = this.hide.defer(this.dismissDelay, this); - } - if(this.anchor && !this.anchorEl.isVisible()){ - this.syncAnchor(); - this.anchorEl.show(); - }else{ - this.anchorEl.hide(); - } - }, - - // private - syncAnchor : function(){ - var anchorPos, targetPos, offset; - switch(this.tipAnchor.charAt(0)){ - case 't': - anchorPos = 'b'; - targetPos = 'tl'; - offset = [20+this.anchorOffset, 2]; - break; - case 'r': - anchorPos = 'l'; - targetPos = 'tr'; - offset = [-2, 11+this.anchorOffset]; - break; - case 'b': - anchorPos = 't'; - targetPos = 'bl'; - offset = [20+this.anchorOffset, -2]; - break; - default: - anchorPos = 'r'; - targetPos = 'tl'; - offset = [2, 11+this.anchorOffset]; - break; - } - this.anchorEl.alignTo(this.el, anchorPos+'-'+targetPos, offset); - }, - - // private - setPagePosition : function(x, y){ - Ext.ToolTip.superclass.setPagePosition.call(this, x, y); - if(this.anchor){ - this.syncAnchor(); - } - }, - - // private - clearTimer : function(name){ - name = name + 'Timer'; - clearTimeout(this[name]); - delete this[name]; - }, - - // private - clearTimers : function(){ - this.clearTimer('show'); - this.clearTimer('dismiss'); - this.clearTimer('hide'); - }, - - // private - onShow : function(){ - Ext.ToolTip.superclass.onShow.call(this); - Ext.getDoc().on('mousedown', this.onDocMouseDown, this); - }, - - // private - onHide : function(){ - Ext.ToolTip.superclass.onHide.call(this); - Ext.getDoc().un('mousedown', this.onDocMouseDown, this); - }, - - // private - onDocMouseDown : function(e){ - if(this.autoHide !== true && !this.closable && !e.within(this.el.dom)){ - this.disable(); - this.doEnable.defer(100, this); - } - }, - - // private - doEnable : function(){ - if(!this.isDestroyed){ - this.enable(); - } - }, - - // private - onDisable : function(){ - this.clearTimers(); - this.hide(); - }, - - // private - adjustPosition : function(x, y){ - if(this.constrainPosition){ - var ay = this.targetXY[1], h = this.getSize().height; - if(y <= ay && (y+h) >= ay){ - y = ay-h-5; - } - } - return {x : x, y: y}; - }, - - beforeDestroy : function(){ - this.clearTimers(); - Ext.destroy(this.anchorEl); - delete this.anchorEl; - delete this.target; - delete this.anchorTarget; - delete this.triggerElement; - Ext.ToolTip.superclass.beforeDestroy.call(this); - }, - - // private - onDestroy : function(){ - Ext.getDoc().un('mousedown', this.onDocMouseDown, this); - Ext.ToolTip.superclass.onDestroy.call(this); - } -}); - -Ext.reg('tooltip', Ext.ToolTip);/** - * @class Ext.QuickTip - * @extends Ext.ToolTip - * @xtype quicktip - * A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global - * {@link Ext.QuickTips} instance. See the QuickTips class header for additional usage details and examples. - * @constructor - * Create a new Tip - * @param {Object} config The configuration options - */ -Ext.QuickTip = Ext.extend(Ext.ToolTip, { - /** - * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to associate with this quicktip (defaults to the document). - */ - /** - * @cfg {Boolean} interceptTitles True to automatically use the element's DOM title value if available (defaults to false). - */ - interceptTitles : false, - - // private - tagConfig : { - namespace : "ext", - attribute : "qtip", - width : "qwidth", - target : "target", - title : "qtitle", - hide : "hide", - cls : "qclass", - align : "qalign", - anchor : "anchor" - }, - - // private - initComponent : function(){ - this.target = this.target || Ext.getDoc(); - this.targets = this.targets || {}; - Ext.QuickTip.superclass.initComponent.call(this); - }, - - /** - * Configures a new quick tip instance and assigns it to a target element. The following config values are - * supported (for example usage, see the {@link Ext.QuickTips} class header): - *
        - *
      • autoHide
      • - *
      • cls
      • - *
      • dismissDelay (overrides the singleton value)
      • - *
      • target (required)
      • - *
      • text (required)
      • - *
      • title
      • - *
      • width
      - * @param {Object} config The config object - */ - register : function(config){ - var cs = Ext.isArray(config) ? config : arguments; - for(var i = 0, len = cs.length; i < len; i++){ - var c = cs[i]; - var target = c.target; - if(target){ - if(Ext.isArray(target)){ - for(var j = 0, jlen = target.length; j < jlen; j++){ - this.targets[Ext.id(target[j])] = c; - } - } else{ - this.targets[Ext.id(target)] = c; - } - } - } - }, - - /** - * Removes this quick tip from its element and destroys it. - * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed. - */ - unregister : function(el){ - delete this.targets[Ext.id(el)]; - }, - - /** - * Hides a visible tip or cancels an impending show for a particular element. - * @param {String/HTMLElement/Element} el The element that is the target of the tip. - */ - cancelShow: function(el){ - var at = this.activeTarget; - el = Ext.get(el).dom; - if(this.isVisible()){ - if(at && at.el == el){ - this.hide(); - } - }else if(at && at.el == el){ - this.clearTimer('show'); - } - }, - - getTipCfg: function(e) { - var t = e.getTarget(), - ttp, - cfg; - if(this.interceptTitles && t.title && Ext.isString(t.title)){ - ttp = t.title; - t.qtip = ttp; - t.removeAttribute("title"); - e.preventDefault(); - }else{ - cfg = this.tagConfig; - ttp = t.qtip || Ext.fly(t).getAttribute(cfg.attribute, cfg.namespace); - } - return ttp; - }, - - // private - onTargetOver : function(e){ - if(this.disabled){ - return; - } - this.targetXY = e.getXY(); - var t = e.getTarget(); - if(!t || t.nodeType !== 1 || t == document || t == document.body){ - return; - } - if(this.activeTarget && ((t == this.activeTarget.el) || Ext.fly(this.activeTarget.el).contains(t))){ - this.clearTimer('hide'); - this.show(); - return; - } - if(t && this.targets[t.id]){ - this.activeTarget = this.targets[t.id]; - this.activeTarget.el = t; - this.anchor = this.activeTarget.anchor; - if(this.anchor){ - this.anchorTarget = t; - } - this.delayShow(); - return; - } - var ttp, et = Ext.fly(t), cfg = this.tagConfig, ns = cfg.namespace; - if(ttp = this.getTipCfg(e)){ - var autoHide = et.getAttribute(cfg.hide, ns); - this.activeTarget = { - el: t, - text: ttp, - width: et.getAttribute(cfg.width, ns), - autoHide: autoHide != "user" && autoHide !== 'false', - title: et.getAttribute(cfg.title, ns), - cls: et.getAttribute(cfg.cls, ns), - align: et.getAttribute(cfg.align, ns) - - }; - this.anchor = et.getAttribute(cfg.anchor, ns); - if(this.anchor){ - this.anchorTarget = t; - } - this.delayShow(); - } - }, - - // private - onTargetOut : function(e){ - - // If moving within the current target, and it does not have a new tip, ignore the mouseout - if (this.activeTarget && e.within(this.activeTarget.el) && !this.getTipCfg(e)) { - return; - } - - this.clearTimer('show'); - if(this.autoHide !== false){ - this.delayHide(); - } - }, - - // inherit docs - showAt : function(xy){ - var t = this.activeTarget; - if(t){ - if(!this.rendered){ - this.render(Ext.getBody()); - this.activeTarget = t; - } - if(t.width){ - this.setWidth(t.width); - this.body.setWidth(this.adjustBodyWidth(t.width - this.getFrameWidth())); - this.measureWidth = false; - } else{ - this.measureWidth = true; - } - this.setTitle(t.title || ''); - this.body.update(t.text); - this.autoHide = t.autoHide; - this.dismissDelay = t.dismissDelay || this.dismissDelay; - if(this.lastCls){ - this.el.removeClass(this.lastCls); - delete this.lastCls; - } - if(t.cls){ - this.el.addClass(t.cls); - this.lastCls = t.cls; - } - if(this.anchor){ - this.constrainPosition = false; - }else if(t.align){ // TODO: this doesn't seem to work consistently - xy = this.el.getAlignToXY(t.el, t.align); - this.constrainPosition = false; - }else{ - this.constrainPosition = true; - } - } - Ext.QuickTip.superclass.showAt.call(this, xy); - }, - - // inherit docs - hide: function(){ - delete this.activeTarget; - Ext.QuickTip.superclass.hide.call(this); - } -}); -Ext.reg('quicktip', Ext.QuickTip);/** - * @class Ext.QuickTips - *

      Provides attractive and customizable tooltips for any element. The QuickTips - * singleton is used to configure and manage tooltips globally for multiple elements - * in a generic manner. To create individual tooltips with maximum customizability, - * you should consider either {@link Ext.Tip} or {@link Ext.ToolTip}.

      - *

      Quicktips can be configured via tag attributes directly in markup, or by - * registering quick tips programmatically via the {@link #register} method.

      - *

      The singleton's instance of {@link Ext.QuickTip} is available via - * {@link #getQuickTip}, and supports all the methods, and all the all the - * configuration properties of Ext.QuickTip. These settings will apply to all - * tooltips shown by the singleton.

      - *

      Below is the summary of the configuration properties which can be used. - * For detailed descriptions see the config options for the {@link Ext.QuickTip QuickTip} class

      - *

      QuickTips singleton configs (all are optional)

      - *
      • dismissDelay
      • - *
      • hideDelay
      • - *
      • maxWidth
      • - *
      • minWidth
      • - *
      • showDelay
      • - *
      • trackMouse
      - *

      Target element configs (optional unless otherwise noted)

      - *
      • autoHide
      • - *
      • cls
      • - *
      • dismissDelay (overrides singleton value)
      • - *
      • target (required)
      • - *
      • text (required)
      • - *
      • title
      • - *
      • width
      - *

      Here is an example showing how some of these config options could be used:

      - *
      
      -// Init the singleton.  Any tag-based quick tips will start working.
      -Ext.QuickTips.init();
      -
      -// Apply a set of config properties to the singleton
      -Ext.apply(Ext.QuickTips.getQuickTip(), {
      -    maxWidth: 200,
      -    minWidth: 100,
      -    showDelay: 50,      // Show 50ms after entering target
      -    trackMouse: true
      -});
      -
      -// Manually register a quick tip for a specific element
      -Ext.QuickTips.register({
      -    target: 'my-div',
      -    title: 'My Tooltip',
      -    text: 'This tooltip was added in code',
      -    width: 100,
      -    dismissDelay: 10000 // Hide after 10 seconds hover
      -});
      -
      - *

      To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with - * the ext: namespace. The HTML element itself is automatically set as the quick tip target. Here is the summary - * of supported attributes (optional unless otherwise noted):

      - *
      • hide: Specifying "user" is equivalent to setting autoHide = false. Any other value will be the - * same as autoHide = true.
      • - *
      • qclass: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).
      • - *
      • qtip (required): The quick tip text (equivalent to the 'text' target element config).
      • - *
      • qtitle: The quick tip title (equivalent to the 'title' target element config).
      • - *
      • qwidth: The quick tip width (equivalent to the 'width' target element config).
      - *

      Here is an example of configuring an HTML element to display a tooltip from markup:

      - *
      
      -// Add a quick tip to an HTML button
      -<input type="button" value="OK" ext:qtitle="OK Button" ext:qwidth="100"
      -     ext:qtip="This is a quick tip from markup!"></input>
      -
      - * @singleton - */ -Ext.QuickTips = function(){ - var tip, - disabled = false; - - return { - /** - * Initialize the global QuickTips instance and prepare any quick tips. - * @param {Boolean} autoRender True to render the QuickTips container immediately to preload images. (Defaults to true) - */ - init : function(autoRender){ - if(!tip){ - if(!Ext.isReady){ - Ext.onReady(function(){ - Ext.QuickTips.init(autoRender); - }); - return; - } - tip = new Ext.QuickTip({ - elements:'header,body', - disabled: disabled - }); - if(autoRender !== false){ - tip.render(Ext.getBody()); - } - } - }, - - // Protected method called by the dd classes - ddDisable : function(){ - // don't disable it if we don't need to - if(tip && !disabled){ - tip.disable(); - } - }, - - // Protected method called by the dd classes - ddEnable : function(){ - // only enable it if it hasn't been disabled - if(tip && !disabled){ - tip.enable(); - } - }, - - /** - * Enable quick tips globally. - */ - enable : function(){ - if(tip){ - tip.enable(); - } - disabled = false; - }, - - /** - * Disable quick tips globally. - */ - disable : function(){ - if(tip){ - tip.disable(); - } - disabled = true; - }, - - /** - * Returns true if quick tips are enabled, else false. - * @return {Boolean} - */ - isEnabled : function(){ - return tip !== undefined && !tip.disabled; - }, - - /** - * Gets the single {@link Ext.QuickTip QuickTip} instance used to show tips from all registered elements. - * @return {Ext.QuickTip} - */ - getQuickTip : function(){ - return tip; - }, - - /** - * Configures a new quick tip instance and assigns it to a target element. See - * {@link Ext.QuickTip#register} for details. - * @param {Object} config The config object - */ - register : function(){ - tip.register.apply(tip, arguments); - }, - - /** - * Removes any registered quick tip from the target element and destroys it. - * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed. - */ - unregister : function(){ - tip.unregister.apply(tip, arguments); - }, - - /** - * Alias of {@link #register}. - * @param {Object} config The config object - */ - tips : function(){ - tip.register.apply(tip, arguments); - } - }; -}();/** - * @class Ext.slider.Tip - * @extends Ext.Tip - * Simple plugin for using an Ext.Tip with a slider to show the slider value. Example usage: -
      -new Ext.Slider({
      -    width: 214,
      -    minValue: 0,
      -    maxValue: 100,
      -    plugins: new Ext.slider.Tip()
      -});
      -
      - * Optionally provide your own tip text by overriding getText: -
      - new Ext.Slider({
      -     width: 214,
      -     minValue: 0,
      -     maxValue: 100,
      -     plugins: new Ext.slider.Tip({
      -         getText: function(thumb){
      -             return String.format('{0}% complete', thumb.value);
      -         }
      -     })
      - });
      - 
      - */ -Ext.slider.Tip = Ext.extend(Ext.Tip, { - minWidth: 10, - offsets : [0, -10], - - init: function(slider) { - slider.on({ - scope : this, - dragstart: this.onSlide, - drag : this.onSlide, - dragend : this.hide, - destroy : this.destroy - }); - }, - - /** - * @private - * Called whenever a dragstart or drag event is received on the associated Thumb. - * Aligns the Tip with the Thumb's new position. - * @param {Ext.slider.MultiSlider} slider The slider - * @param {Ext.EventObject} e The Event object - * @param {Ext.slider.Thumb} thumb The thumb that the Tip is attached to - */ - onSlide : function(slider, e, thumb) { - this.show(); - this.body.update(this.getText(thumb)); - this.doAutoWidth(); - this.el.alignTo(thumb.el, 'b-t?', this.offsets); - }, - - /** - * Used to create the text that appears in the Tip's body. By default this just returns - * the value of the Slider Thumb that the Tip is attached to. Override to customize. - * @param {Ext.slider.Thumb} thumb The Thumb that the Tip is attached to - * @return {String} The text to display in the tip - */ - getText : function(thumb) { - return String(thumb.value); - } -}); - -//backwards compatibility - SliderTip used to be a ux before 3.2 -Ext.ux.SliderTip = Ext.slider.Tip; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tips.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tips.js deleted file mode 100644 index d0bc840c8bc..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tips.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,closeAction:"hide",initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header"}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this[this.closeAction],scope:this})}},showAt:function(a){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth()}if(this.constrainPosition){a=this.el.adjustForConstraints(a)}this.setPagePosition(a[0],a[1])},doAutoWidth:function(a){a=a||0;var b=this.body.getTextWidth();if(this.title){b=Math.max(b,this.header.child("span").getTextWidth(this.title))}b+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr")+a;this.setWidth(b.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}},showBy:function(a,b){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});Ext.reg("tip",Ext.Tip);Ext.Tip.DD=function(b,a){Ext.apply(this,a);this.tip=b;Ext.Tip.DD.superclass.constructor.call(this,b.el.id,"WindowDD-"+b.id);this.setHandleElId(b.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(a){this.tip.el.enableShadow(true)}});Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,constrainPosition:false,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget(this.target);this.origAnchor=this.anchor},onRender:function(b,a){Ext.ToolTip.superclass.onRender.call(this,b,a);this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this);this.anchorEl.setStyle("z-index",this.el.getZIndex()+1).setVisibilityMode(Ext.Element.DISPLAY)},initTarget:function(c){var a;if((a=Ext.get(c))){if(this.target){var b=Ext.get(this.target);this.mun(b,"mouseover",this.onTargetOver,this);this.mun(b,"mouseout",this.onTargetOut,this);this.mun(b,"mousemove",this.onMouseMove,this)}this.mon(a,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this});this.target=a}if(this.anchor){this.anchorTarget=this.target}},onMouseMove:function(b){var a=this.delegate?b.getTarget(this.delegate):this.triggerElement=true;if(a){this.targetXY=b.getXY();if(a===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(b)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},getTargetXY:function(){if(this.delegate){this.anchorTarget=this.triggerElement}if(this.anchor){this.targetCounter++;var c=this.getOffsets(),k=(this.anchorToTarget&&!this.trackMouse)?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY,a=Ext.lib.Dom.getViewWidth()-5,g=Ext.lib.Dom.getViewHeight()-5,h=document.documentElement,e=document.body,j=(h.scrollLeft||e.scrollLeft||0)+5,i=(h.scrollTop||e.scrollTop||0)+5,b=[k[0]+c[0],k[1]+c[1]],f=this.getSize();this.anchorEl.removeClass(this.anchorCls);if(this.targetCounter<2){if(b[0]a){if(this.anchorToTarget){this.defaultAlign="r-l";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="right";return this.getTargetXY()}if(b[1]g){if(this.anchorToTarget){this.defaultAlign="b-t";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="bottom";return this.getTargetXY()}}this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl.addClass(this.anchorCls);this.targetCounter=0;return b}else{var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]}},getMouseOffset:function(){var a=this.anchor?[0,0]:[15,18];if(this.mouseOffset){a[0]+=this.mouseOffset[0];a[1]+=this.mouseOffset[1]}return a},getAnchorPosition:function(){if(this.anchor){this.tipAnchor=this.anchor.charAt(0)}else{var a=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!a){throw"AnchorTip.defaultAlign is invalid"}this.tipAnchor=a[1].charAt(0)}switch(this.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var b,a=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-this.anchorOffset,30];break;case"b":b=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":b=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:b=[25,-13-this.anchorOffset];break}}var c=this.getMouseOffset();b[0]+=c[0];b[1]+=c[1];return b},onTargetOver:function(b){if(this.disabled||b.within(this.target.dom,true)){return}var a=b.getTarget(this.delegate);if(a){this.triggerElement=a;this.clearTimer("hide");this.targetXY=b.getXY();this.delayShow()}},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()=c){d=c-b-5}}return{x:a,y:d}},beforeDestroy:function(){this.clearTimers();Ext.destroy(this.anchorEl);delete this.anchorEl;delete this.target;delete this.anchorTarget;delete this.triggerElement;Ext.ToolTip.superclass.beforeDestroy.call(this)},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);Ext.ToolTip.superclass.onDestroy.call(this)}});Ext.reg("tooltip",Ext.ToolTip);Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(e){var g=Ext.isArray(e)?e:arguments;for(var f=0,a=g.length;fBasic Toolbar class. Although the {@link Ext.Container#defaultType defaultType} for Toolbar - * is {@link Ext.Button button}, Toolbar elements (child items for the Toolbar container) may - * be virtually any type of Component. Toolbar elements can be created explicitly via their constructors, - * or implicitly via their xtypes, and can be {@link #add}ed dynamically.

      - *

      Some items have shortcut strings for creation:

      - *
      -Shortcut  xtype          Class                  Description
      -'->'      'tbfill'       {@link Ext.Toolbar.Fill}       begin using the right-justified button container
      -'-'       'tbseparator'  {@link Ext.Toolbar.Separator}  add a vertical separator bar between toolbar items
      -' '       'tbspacer'     {@link Ext.Toolbar.Spacer}     add horiztonal space between elements
      - * 
      - * - * Example usage of various elements: - *
      
      -var tb = new Ext.Toolbar({
      -    renderTo: document.body,
      -    width: 600,
      -    height: 100,
      -    items: [
      -        {
      -            // xtype: 'button', // default for Toolbars, same as 'tbbutton'
      -            text: 'Button'
      -        },
      -        {
      -            xtype: 'splitbutton', // same as 'tbsplitbutton'
      -            text: 'Split Button'
      -        },
      -        // begin using the right-justified button container
      -        '->', // same as {xtype: 'tbfill'}, // Ext.Toolbar.Fill
      -        {
      -            xtype: 'textfield',
      -            name: 'field1',
      -            emptyText: 'enter search term'
      -        },
      -        // add a vertical separator bar between toolbar items
      -        '-', // same as {xtype: 'tbseparator'} to create Ext.Toolbar.Separator
      -        'text 1', // same as {xtype: 'tbtext', text: 'text1'} to create Ext.Toolbar.TextItem
      -        {xtype: 'tbspacer'},// same as ' ' to create Ext.Toolbar.Spacer
      -        'text 2',
      -        {xtype: 'tbspacer', width: 50}, // add a 50px space
      -        'text 3'
      -    ]
      -});
      - * 
      - * Example adding a ComboBox within a menu of a button: - *
      
      -// ComboBox creation
      -var combo = new Ext.form.ComboBox({
      -    store: new Ext.data.ArrayStore({
      -        autoDestroy: true,
      -        fields: ['initials', 'fullname'],
      -        data : [
      -            ['FF', 'Fred Flintstone'],
      -            ['BR', 'Barney Rubble']
      -        ]
      -    }),
      -    displayField: 'fullname',
      -    typeAhead: true,
      -    mode: 'local',
      -    forceSelection: true,
      -    triggerAction: 'all',
      -    emptyText: 'Select a name...',
      -    selectOnFocus: true,
      -    width: 135,
      -    getListParent: function() {
      -        return this.el.up('.x-menu');
      -    },
      -    iconCls: 'no-icon' //use iconCls if placing within menu to shift to right side of menu
      -});
      -
      -// put ComboBox in a Menu
      -var menu = new Ext.menu.Menu({
      -    id: 'mainMenu',
      -    items: [
      -        combo // A Field in a Menu
      -    ]
      -});
      -
      -// add a Button with the menu
      -tb.add({
      -        text:'Button w/ Menu',
      -        menu: menu  // assign menu by instance
      -    });
      -tb.doLayout();
      - * 
      - * @constructor - * Creates a new Toolbar - * @param {Object/Array} config A config object or an array of buttons to {@link #add} - * @xtype toolbar - */ -Ext.Toolbar = function(config){ - if(Ext.isArray(config)){ - config = {items: config, layout: 'toolbar'}; - } else { - config = Ext.apply({ - layout: 'toolbar' - }, config); - if(config.buttons) { - config.items = config.buttons; - } - } - Ext.Toolbar.superclass.constructor.call(this, config); -}; - -(function(){ - -var T = Ext.Toolbar; - -Ext.extend(T, Ext.Container, { - - defaultType: 'button', - - /** - * @cfg {String/Object} layout - * This class assigns a default layout (layout:'toolbar'). - * Developers may override this configuration option if another layout - * is required (the constructor must be passed a configuration object in this - * case instead of an array). - * See {@link Ext.Container#layout} for additional information. - */ - - enableOverflow : false, - - /** - * @cfg {Boolean} enableOverflow - * Defaults to false. Configure true to make the toolbar provide a button - * which activates a dropdown Menu to show items which overflow the Toolbar's width. - */ - /** - * @cfg {String} buttonAlign - *

      The default position at which to align child items. Defaults to "left"

      - *

      May be specified as "center" to cause items added before a Fill (A "->") item - * to be centered in the Toolbar. Items added after a Fill are still right-aligned.

      - *

      Specify as "right" to right align all child items.

      - */ - - trackMenus : true, - internalDefaults: {removeMode: 'container', hideParent: true}, - toolbarCls: 'x-toolbar', - - initComponent : function(){ - T.superclass.initComponent.call(this); - - /** - * @event overflowchange - * Fires after the overflow state has changed. - * @param {Object} c The Container - * @param {Boolean} lastOverflow overflow state - */ - this.addEvents('overflowchange'); - }, - - // private - onRender : function(ct, position){ - if(!this.el){ - if(!this.autoCreate){ - this.autoCreate = { - cls: this.toolbarCls + ' x-small-editor' - }; - } - this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position); - Ext.Toolbar.superclass.onRender.apply(this, arguments); - } - }, - - /** - *

      Adds element(s) to the toolbar -- this function takes a variable number of - * arguments of mixed type and adds them to the toolbar.

      - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @param {Mixed} arg1 The following types of arguments are all valid:
      - *
        - *
      • {@link Ext.Button} config: A valid button config object (equivalent to {@link #addButton})
      • - *
      • HtmlElement: Any standard HTML element (equivalent to {@link #addElement})
      • - *
      • Field: Any form field (equivalent to {@link #addField})
      • - *
      • Item: Any subclass of {@link Ext.Toolbar.Item} (equivalent to {@link #addItem})
      • - *
      • String: Any generic string (gets wrapped in a {@link Ext.Toolbar.TextItem}, equivalent to {@link #addText}). - * Note that there are a few special strings that are treated differently as explained next.
      • - *
      • '-': Creates a separator element (equivalent to {@link #addSeparator})
      • - *
      • ' ': Creates a spacer element (equivalent to {@link #addSpacer})
      • - *
      • '->': Creates a fill element (equivalent to {@link #addFill})
      • - *
      - * @param {Mixed} arg2 - * @param {Mixed} etc. - * @method add - */ - - // private - lookupComponent : function(c){ - if(Ext.isString(c)){ - if(c == '-'){ - c = new T.Separator(); - }else if(c == ' '){ - c = new T.Spacer(); - }else if(c == '->'){ - c = new T.Fill(); - }else{ - c = new T.TextItem(c); - } - this.applyDefaults(c); - }else{ - if(c.isFormField || c.render){ // some kind of form field, some kind of Toolbar.Item - c = this.createComponent(c); - }else if(c.tag){ // DomHelper spec - c = new T.Item({autoEl: c}); - }else if(c.tagName){ // element - c = new T.Item({el:c}); - }else if(Ext.isObject(c)){ // must be button config? - c = c.xtype ? this.createComponent(c) : this.constructButton(c); - } - } - return c; - }, - - // private - applyDefaults : function(c){ - if(!Ext.isString(c)){ - c = Ext.Toolbar.superclass.applyDefaults.call(this, c); - var d = this.internalDefaults; - if(c.events){ - Ext.applyIf(c.initialConfig, d); - Ext.apply(c, d); - }else{ - Ext.applyIf(c, d); - } - } - return c; - }, - - /** - * Adds a separator - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @return {Ext.Toolbar.Item} The separator {@link Ext.Toolbar.Item item} - */ - addSeparator : function(){ - return this.add(new T.Separator()); - }, - - /** - * Adds a spacer element - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @return {Ext.Toolbar.Spacer} The spacer item - */ - addSpacer : function(){ - return this.add(new T.Spacer()); - }, - - /** - * Forces subsequent additions into the float:right toolbar - *

      Note: See the notes within {@link Ext.Container#add}.

      - */ - addFill : function(){ - this.add(new T.Fill()); - }, - - /** - * Adds any standard HTML element to the toolbar - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @param {Mixed} el The element or id of the element to add - * @return {Ext.Toolbar.Item} The element's item - */ - addElement : function(el){ - return this.addItem(new T.Item({el:el})); - }, - - /** - * Adds any Toolbar.Item or subclass - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @param {Ext.Toolbar.Item} item - * @return {Ext.Toolbar.Item} The item - */ - addItem : function(item){ - return this.add.apply(this, arguments); - }, - - /** - * Adds a button (or buttons). See {@link Ext.Button} for more info on the config. - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @param {Object/Array} config A button config or array of configs - * @return {Ext.Button/Array} - */ - addButton : function(config){ - if(Ext.isArray(config)){ - var buttons = []; - for(var i = 0, len = config.length; i < len; i++) { - buttons.push(this.addButton(config[i])); - } - return buttons; - } - return this.add(this.constructButton(config)); - }, - - /** - * Adds text to the toolbar - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @param {String} text The text to add - * @return {Ext.Toolbar.Item} The element's item - */ - addText : function(text){ - return this.addItem(new T.TextItem(text)); - }, - - /** - * Adds a new element to the toolbar from the passed {@link Ext.DomHelper} config - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @param {Object} config - * @return {Ext.Toolbar.Item} The element's item - */ - addDom : function(config){ - return this.add(new T.Item({autoEl: config})); - }, - - /** - * Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have - * been rendered yet. For a field that has already been rendered, use {@link #addElement}. - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @param {Ext.form.Field} field - * @return {Ext.Toolbar.Item} - */ - addField : function(field){ - return this.add(field); - }, - - /** - * Inserts any {@link Ext.Toolbar.Item}/{@link Ext.Button} at the specified index. - *

      Note: See the notes within {@link Ext.Container#add}.

      - * @param {Number} index The index where the item is to be inserted - * @param {Object/Ext.Toolbar.Item/Ext.Button/Array} item The button, or button config object to be - * inserted, or an array of buttons/configs. - * @return {Ext.Button/Item} - */ - insertButton : function(index, item){ - if(Ext.isArray(item)){ - var buttons = []; - for(var i = 0, len = item.length; i < len; i++) { - buttons.push(this.insertButton(index + i, item[i])); - } - return buttons; - } - return Ext.Toolbar.superclass.insert.call(this, index, item); - }, - - // private - trackMenu : function(item, remove){ - if(this.trackMenus && item.menu){ - var method = remove ? 'mun' : 'mon'; - this[method](item, 'menutriggerover', this.onButtonTriggerOver, this); - this[method](item, 'menushow', this.onButtonMenuShow, this); - this[method](item, 'menuhide', this.onButtonMenuHide, this); - } - }, - - // private - constructButton : function(item){ - var b = item.events ? item : this.createComponent(item, item.split ? 'splitbutton' : this.defaultType); - return b; - }, - - // private - onAdd : function(c){ - Ext.Toolbar.superclass.onAdd.call(this); - this.trackMenu(c); - if(this.disabled){ - c.disable(); - } - }, - - // private - onRemove : function(c){ - Ext.Toolbar.superclass.onRemove.call(this); - if (c == this.activeMenuBtn) { - delete this.activeMenuBtn; - } - this.trackMenu(c, true); - }, - - // private - onDisable : function(){ - this.items.each(function(item){ - if(item.disable){ - item.disable(); - } - }); - }, - - // private - onEnable : function(){ - this.items.each(function(item){ - if(item.enable){ - item.enable(); - } - }); - }, - - // private - onButtonTriggerOver : function(btn){ - if(this.activeMenuBtn && this.activeMenuBtn != btn){ - this.activeMenuBtn.hideMenu(); - btn.showMenu(); - this.activeMenuBtn = btn; - } - }, - - // private - onButtonMenuShow : function(btn){ - this.activeMenuBtn = btn; - }, - - // private - onButtonMenuHide : function(btn){ - delete this.activeMenuBtn; - } -}); -Ext.reg('toolbar', Ext.Toolbar); - -/** - * @class Ext.Toolbar.Item - * @extends Ext.BoxComponent - * The base class that other non-interacting Toolbar Item classes should extend in order to - * get some basic common toolbar item functionality. - * @constructor - * Creates a new Item - * @param {HTMLElement} el - * @xtype tbitem - */ -T.Item = Ext.extend(Ext.BoxComponent, { - hideParent: true, // Hiding a Toolbar.Item hides its containing TD - enable:Ext.emptyFn, - disable:Ext.emptyFn, - focus:Ext.emptyFn - /** - * @cfg {String} overflowText Text to be used for the menu if the item is overflowed. - */ -}); -Ext.reg('tbitem', T.Item); - -/** - * @class Ext.Toolbar.Separator - * @extends Ext.Toolbar.Item - * A simple class that adds a vertical separator bar between toolbar items - * (css class:'xtb-sep'). Example usage: - *
      
      -new Ext.Panel({
      -    tbar : [
      -        'Item 1',
      -        {xtype: 'tbseparator'}, // or '-'
      -        'Item 2'
      -    ]
      -});
      -
      - * @constructor - * Creates a new Separator - * @xtype tbseparator - */ -T.Separator = Ext.extend(T.Item, { - onRender : function(ct, position){ - this.el = ct.createChild({tag:'span', cls:'xtb-sep'}, position); - } -}); -Ext.reg('tbseparator', T.Separator); - -/** - * @class Ext.Toolbar.Spacer - * @extends Ext.Toolbar.Item - * A simple element that adds extra horizontal space between items in a toolbar. - * By default a 2px wide space is added via css specification:
      
      -.x-toolbar .xtb-spacer {
      -    width:2px;
      -}
      - * 
      - *

      Example usage:

      - *
      
      -new Ext.Panel({
      -    tbar : [
      -        'Item 1',
      -        {xtype: 'tbspacer'}, // or ' '
      -        'Item 2',
      -        // space width is also configurable via javascript
      -        {xtype: 'tbspacer', width: 50}, // add a 50px space
      -        'Item 3'
      -    ]
      -});
      -
      - * @constructor - * Creates a new Spacer - * @xtype tbspacer - */ -T.Spacer = Ext.extend(T.Item, { - /** - * @cfg {Number} width - * The width of the spacer in pixels (defaults to 2px via css style .x-toolbar .xtb-spacer). - */ - - onRender : function(ct, position){ - this.el = ct.createChild({tag:'div', cls:'xtb-spacer', style: this.width?'width:'+this.width+'px':''}, position); - } -}); -Ext.reg('tbspacer', T.Spacer); - -/** - * @class Ext.Toolbar.Fill - * @extends Ext.Toolbar.Spacer - * A non-rendering placeholder item which instructs the Toolbar's Layout to begin using - * the right-justified button container. - *
      
      -new Ext.Panel({
      -    tbar : [
      -        'Item 1',
      -        {xtype: 'tbfill'}, // or '->'
      -        'Item 2'
      -    ]
      -});
      -
      - * @constructor - * Creates a new Fill - * @xtype tbfill - */ -T.Fill = Ext.extend(T.Item, { - // private - render : Ext.emptyFn, - isFill : true -}); -Ext.reg('tbfill', T.Fill); - -/** - * @class Ext.Toolbar.TextItem - * @extends Ext.Toolbar.Item - * A simple class that renders text directly into a toolbar - * (with css class:'xtb-text'). Example usage: - *
      
      -new Ext.Panel({
      -    tbar : [
      -        {xtype: 'tbtext', text: 'Item 1'} // or simply 'Item 1'
      -    ]
      -});
      -
      - * @constructor - * Creates a new TextItem - * @param {String/Object} text A text string, or a config object containing a text property - * @xtype tbtext - */ -T.TextItem = Ext.extend(T.Item, { - /** - * @cfg {String} text The text to be used as innerHTML (html tags are accepted) - */ - - constructor: function(config){ - T.TextItem.superclass.constructor.call(this, Ext.isString(config) ? {text: config} : config); - }, - - // private - onRender : function(ct, position) { - this.autoEl = {cls: 'xtb-text', html: this.text || ''}; - T.TextItem.superclass.onRender.call(this, ct, position); - }, - - /** - * Updates this item's text, setting the text to be used as innerHTML. - * @param {String} t The text to display (html accepted). - */ - setText : function(t) { - if(this.rendered){ - this.el.update(t); - }else{ - this.text = t; - } - } -}); -Ext.reg('tbtext', T.TextItem); - -// backwards compat -T.Button = Ext.extend(Ext.Button, {}); -T.SplitButton = Ext.extend(Ext.SplitButton, {}); -Ext.reg('tbbutton', T.Button); -Ext.reg('tbsplit', T.SplitButton); - -})(); -/** - * @class Ext.ButtonGroup - * @extends Ext.Panel - * Container for a group of buttons. Example usage: - *
      
      -var p = new Ext.Panel({
      -    title: 'Panel with Button Group',
      -    width: 300,
      -    height:200,
      -    renderTo: document.body,
      -    html: 'whatever',
      -    tbar: [{
      -        xtype: 'buttongroup',
      -        {@link #columns}: 3,
      -        title: 'Clipboard',
      -        items: [{
      -            text: 'Paste',
      -            scale: 'large',
      -            rowspan: 3, iconCls: 'add',
      -            iconAlign: 'top',
      -            cls: 'x-btn-as-arrow'
      -        },{
      -            xtype:'splitbutton',
      -            text: 'Menu Button',
      -            scale: 'large',
      -            rowspan: 3,
      -            iconCls: 'add',
      -            iconAlign: 'top',
      -            arrowAlign:'bottom',
      -            menu: [{text: 'Menu Item 1'}]
      -        },{
      -            xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
      -        },{
      -            text: 'Copy', iconCls: 'add16'
      -        },{
      -            text: 'Format', iconCls: 'add16'
      -        }]
      -    }]
      -});
      - * 
      - * @constructor - * Create a new ButtonGroup. - * @param {Object} config The config object - * @xtype buttongroup - */ -Ext.ButtonGroup = Ext.extend(Ext.Panel, { - /** - * @cfg {Number} columns The columns configuration property passed to the - * {@link #layout configured layout manager}. See {@link Ext.layout.TableLayout#columns}. - */ - /** - * @cfg {String} baseCls Defaults to 'x-btn-group'. See {@link Ext.Panel#baseCls}. - */ - baseCls: 'x-btn-group', - /** - * @cfg {String} layout Defaults to 'table'. See {@link Ext.Container#layout}. - */ - layout:'table', - defaultType: 'button', - /** - * @cfg {Boolean} frame Defaults to true. See {@link Ext.Panel#frame}. - */ - frame: true, - internalDefaults: {removeMode: 'container', hideParent: true}, - - initComponent : function(){ - this.layoutConfig = this.layoutConfig || {}; - Ext.applyIf(this.layoutConfig, { - columns : this.columns - }); - if(!this.title){ - this.addClass('x-btn-group-notitle'); - } - this.on('afterlayout', this.onAfterLayout, this); - Ext.ButtonGroup.superclass.initComponent.call(this); - }, - - applyDefaults : function(c){ - c = Ext.ButtonGroup.superclass.applyDefaults.call(this, c); - var d = this.internalDefaults; - if(c.events){ - Ext.applyIf(c.initialConfig, d); - Ext.apply(c, d); - }else{ - Ext.applyIf(c, d); - } - return c; - }, - - onAfterLayout : function(){ - var bodyWidth = this.body.getFrameWidth('lr') + this.body.dom.firstChild.offsetWidth; - this.body.setWidth(bodyWidth); - this.el.setWidth(bodyWidth + this.getFrameWidth()); - } - /** - * @cfg {Array} tools @hide - */ -}); - -Ext.reg('buttongroup', Ext.ButtonGroup); -/** - * @class Ext.PagingToolbar - * @extends Ext.Toolbar - *

      As the amount of records increases, the time required for the browser to render - * them increases. Paging is used to reduce the amount of data exchanged with the client. - * Note: if there are more records/rows than can be viewed in the available screen area, vertical - * scrollbars will be added.

      - *

      Paging is typically handled on the server side (see exception below). The client sends - * parameters to the server side, which the server needs to interpret and then respond with the - * approprate data.

      - *

      Ext.PagingToolbar is a specialized toolbar that is bound to a {@link Ext.data.Store} - * and provides automatic paging control. This Component {@link Ext.data.Store#load load}s blocks - * of data into the {@link #store} by passing {@link Ext.data.Store#paramNames paramNames} used for - * paging criteria.

      - *

      PagingToolbar is typically used as one of the Grid's toolbars:

      - *
      
      -Ext.QuickTips.init(); // to display button quicktips
      -
      -var myStore = new Ext.data.Store({
      -    reader: new Ext.data.JsonReader({
      -        {@link Ext.data.JsonReader#totalProperty totalProperty}: 'results', 
      -        ...
      -    }),
      -    ...
      -});
      -
      -var myPageSize = 25;  // server script should only send back 25 items at a time
      -
      -var grid = new Ext.grid.GridPanel({
      -    ...
      -    store: myStore,
      -    bbar: new Ext.PagingToolbar({
      -        {@link #store}: myStore,       // grid and PagingToolbar using same store
      -        {@link #displayInfo}: true,
      -        {@link #pageSize}: myPageSize,
      -        {@link #prependButtons}: true,
      -        items: [
      -            'text 1'
      -        ]
      -    })
      -});
      - * 
      - * - *

      To use paging, pass the paging requirements to the server when the store is first loaded.

      - *
      
      -store.load({
      -    params: {
      -        // specify params for the first page load if using paging
      -        start: 0,          
      -        limit: myPageSize,
      -        // other params
      -        foo:   'bar'
      -    }
      -});
      - * 
      - * - *

      If using {@link Ext.data.Store#autoLoad store's autoLoad} configuration:

      - *
      
      -var myStore = new Ext.data.Store({
      -    {@link Ext.data.Store#autoLoad autoLoad}: {params:{start: 0, limit: 25}},
      -    ...
      -});
      - * 
      - * - *

      The packet sent back from the server would have this form:

      - *
      
      -{
      -    "success": true,
      -    "results": 2000, 
      -    "rows": [ // *Note: this must be an Array 
      -        { "id":  1, "name": "Bill", "occupation": "Gardener" },
      -        { "id":  2, "name":  "Ben", "occupation": "Horticulturalist" },
      -        ...
      -        { "id": 25, "name":  "Sue", "occupation": "Botanist" }
      -    ]
      -}
      - * 
      - *

      Paging with Local Data

      - *

      Paging can also be accomplished with local data using extensions:

      - *
      - * @constructor Create a new PagingToolbar - * @param {Object} config The config object - * @xtype paging - */ -(function() { - -var T = Ext.Toolbar; - -Ext.PagingToolbar = Ext.extend(Ext.Toolbar, { - /** - * @cfg {Ext.data.Store} store - * The {@link Ext.data.Store} the paging toolbar should use as its data source (required). - */ - /** - * @cfg {Boolean} displayInfo - * true to display the displayMsg (defaults to false) - */ - /** - * @cfg {Number} pageSize - * The number of records to display per page (defaults to 20) - */ - pageSize : 20, - /** - * @cfg {Boolean} prependButtons - * true to insert any configured items before the paging buttons. - * Defaults to false. - */ - /** - * @cfg {String} displayMsg - * The paging status message to display (defaults to 'Displaying {0} - {1} of {2}'). - * Note that this string is formatted using the braced numbers {0}-{2} as tokens - * that are replaced by the values for start, end and total respectively. These tokens should - * be preserved when overriding this string if showing those values is desired. - */ - displayMsg : 'Displaying {0} - {1} of {2}', - /** - * @cfg {String} emptyMsg - * The message to display when no records are found (defaults to 'No data to display') - */ - emptyMsg : 'No data to display', - /** - * @cfg {String} beforePageText - * The text displayed before the input item (defaults to 'Page'). - */ - beforePageText : 'Page', - /** - * @cfg {String} afterPageText - * Customizable piece of the default paging text (defaults to 'of {0}'). Note that - * this string is formatted using {0} as a token that is replaced by the number of - * total pages. This token should be preserved when overriding this string if showing the - * total page count is desired. - */ - afterPageText : 'of {0}', - /** - * @cfg {String} firstText - * The quicktip text displayed for the first page button (defaults to 'First Page'). - * Note: quick tips must be initialized for the quicktip to show. - */ - firstText : 'First Page', - /** - * @cfg {String} prevText - * The quicktip text displayed for the previous page button (defaults to 'Previous Page'). - * Note: quick tips must be initialized for the quicktip to show. - */ - prevText : 'Previous Page', - /** - * @cfg {String} nextText - * The quicktip text displayed for the next page button (defaults to 'Next Page'). - * Note: quick tips must be initialized for the quicktip to show. - */ - nextText : 'Next Page', - /** - * @cfg {String} lastText - * The quicktip text displayed for the last page button (defaults to 'Last Page'). - * Note: quick tips must be initialized for the quicktip to show. - */ - lastText : 'Last Page', - /** - * @cfg {String} refreshText - * The quicktip text displayed for the Refresh button (defaults to 'Refresh'). - * Note: quick tips must be initialized for the quicktip to show. - */ - refreshText : 'Refresh', - - /** - *

      Deprecated. paramNames should be set in the data store - * (see {@link Ext.data.Store#paramNames}).

      - *

      Object mapping of parameter names used for load calls, initially set to:

      - *
      {start: 'start', limit: 'limit'}
      - * @type Object - * @property paramNames - * @deprecated - */ - - /** - * The number of records to display per page. See also {@link #cursor}. - * @type Number - * @property pageSize - */ - - /** - * Indicator for the record position. This property might be used to get the active page - * number for example:
      
      -     * // t is reference to the paging toolbar instance
      -     * var activePage = Math.ceil((t.cursor + t.pageSize) / t.pageSize);
      -     * 
      - * @type Number - * @property cursor - */ - - initComponent : function(){ - var pagingItems = [this.first = new T.Button({ - tooltip: this.firstText, - overflowText: this.firstText, - iconCls: 'x-tbar-page-first', - disabled: true, - handler: this.moveFirst, - scope: this - }), this.prev = new T.Button({ - tooltip: this.prevText, - overflowText: this.prevText, - iconCls: 'x-tbar-page-prev', - disabled: true, - handler: this.movePrevious, - scope: this - }), '-', this.beforePageText, - this.inputItem = new Ext.form.NumberField({ - cls: 'x-tbar-page-number', - allowDecimals: false, - allowNegative: false, - enableKeyEvents: true, - selectOnFocus: true, - submitValue: false, - listeners: { - scope: this, - keydown: this.onPagingKeyDown, - blur: this.onPagingBlur - } - }), this.afterTextItem = new T.TextItem({ - text: String.format(this.afterPageText, 1) - }), '-', this.next = new T.Button({ - tooltip: this.nextText, - overflowText: this.nextText, - iconCls: 'x-tbar-page-next', - disabled: true, - handler: this.moveNext, - scope: this - }), this.last = new T.Button({ - tooltip: this.lastText, - overflowText: this.lastText, - iconCls: 'x-tbar-page-last', - disabled: true, - handler: this.moveLast, - scope: this - }), '-', this.refresh = new T.Button({ - tooltip: this.refreshText, - overflowText: this.refreshText, - iconCls: 'x-tbar-loading', - handler: this.doRefresh, - scope: this - })]; - - - var userItems = this.items || this.buttons || []; - if (this.prependButtons) { - this.items = userItems.concat(pagingItems); - }else{ - this.items = pagingItems.concat(userItems); - } - delete this.buttons; - if(this.displayInfo){ - this.items.push('->'); - this.items.push(this.displayItem = new T.TextItem({})); - } - Ext.PagingToolbar.superclass.initComponent.call(this); - this.addEvents( - /** - * @event change - * Fires after the active page has been changed. - * @param {Ext.PagingToolbar} this - * @param {Object} pageData An object that has these properties:
        - *
      • total : Number
        The total number of records in the dataset as - * returned by the server
      • - *
      • activePage : Number
        The current page number
      • - *
      • pages : Number
        The total number of pages (calculated from - * the total number of records in the dataset as returned by the server and the current {@link #pageSize})
      • - *
      - */ - 'change', - /** - * @event beforechange - * Fires just before the active page is changed. - * Return false to prevent the active page from being changed. - * @param {Ext.PagingToolbar} this - * @param {Object} params An object hash of the parameters which the PagingToolbar will send when - * loading the required page. This will contain:
        - *
      • start : Number
        The starting row number for the next page of records to - * be retrieved from the server
      • - *
      • limit : Number
        The number of records to be retrieved from the server
      • - *
      - *

      (note: the names of the start and limit properties are determined - * by the store's {@link Ext.data.Store#paramNames paramNames} property.)

      - *

      Parameters may be added as required in the event handler.

      - */ - 'beforechange' - ); - this.on('afterlayout', this.onFirstLayout, this, {single: true}); - this.cursor = 0; - this.bindStore(this.store, true); - }, - - // private - onFirstLayout : function(){ - if(this.dsLoaded){ - this.onLoad.apply(this, this.dsLoaded); - } - }, - - // private - updateInfo : function(){ - if(this.displayItem){ - var count = this.store.getCount(); - var msg = count == 0 ? - this.emptyMsg : - String.format( - this.displayMsg, - this.cursor+1, this.cursor+count, this.store.getTotalCount() - ); - this.displayItem.setText(msg); - } - }, - - // private - onLoad : function(store, r, o){ - if(!this.rendered){ - this.dsLoaded = [store, r, o]; - return; - } - var p = this.getParams(); - this.cursor = (o.params && o.params[p.start]) ? o.params[p.start] : 0; - var d = this.getPageData(), ap = d.activePage, ps = d.pages; - - this.afterTextItem.setText(String.format(this.afterPageText, d.pages)); - this.inputItem.setValue(ap); - this.first.setDisabled(ap == 1); - this.prev.setDisabled(ap == 1); - this.next.setDisabled(ap == ps); - this.last.setDisabled(ap == ps); - this.refresh.enable(); - this.updateInfo(); - this.fireEvent('change', this, d); - }, - - // private - getPageData : function(){ - var total = this.store.getTotalCount(); - return { - total : total, - activePage : Math.ceil((this.cursor+this.pageSize)/this.pageSize), - pages : total < this.pageSize ? 1 : Math.ceil(total/this.pageSize) - }; - }, - - /** - * Change the active page - * @param {Integer} page The page to display - */ - changePage : function(page){ - this.doLoad(((page-1) * this.pageSize).constrain(0, this.store.getTotalCount())); - }, - - // private - onLoadError : function(){ - if(!this.rendered){ - return; - } - this.refresh.enable(); - }, - - // private - readPage : function(d){ - var v = this.inputItem.getValue(), pageNum; - if (!v || isNaN(pageNum = parseInt(v, 10))) { - this.inputItem.setValue(d.activePage); - return false; - } - return pageNum; - }, - - onPagingFocus : function(){ - this.inputItem.select(); - }, - - //private - onPagingBlur : function(e){ - this.inputItem.setValue(this.getPageData().activePage); - }, - - // private - onPagingKeyDown : function(field, e){ - var k = e.getKey(), d = this.getPageData(), pageNum; - if (k == e.RETURN) { - e.stopEvent(); - pageNum = this.readPage(d); - if(pageNum !== false){ - pageNum = Math.min(Math.max(1, pageNum), d.pages) - 1; - this.doLoad(pageNum * this.pageSize); - } - }else if (k == e.HOME || k == e.END){ - e.stopEvent(); - pageNum = k == e.HOME ? 1 : d.pages; - field.setValue(pageNum); - }else if (k == e.UP || k == e.PAGEUP || k == e.DOWN || k == e.PAGEDOWN){ - e.stopEvent(); - if((pageNum = this.readPage(d))){ - var increment = e.shiftKey ? 10 : 1; - if(k == e.DOWN || k == e.PAGEDOWN){ - increment *= -1; - } - pageNum += increment; - if(pageNum >= 1 & pageNum <= d.pages){ - field.setValue(pageNum); - } - } - } - }, - - // private - getParams : function(){ - //retain backwards compat, allow params on the toolbar itself, if they exist. - return this.paramNames || this.store.paramNames; - }, - - // private - beforeLoad : function(){ - if(this.rendered && this.refresh){ - this.refresh.disable(); - } - }, - - // private - doLoad : function(start){ - var o = {}, pn = this.getParams(); - o[pn.start] = start; - o[pn.limit] = this.pageSize; - if(this.fireEvent('beforechange', this, o) !== false){ - this.store.load({params:o}); - } - }, - - /** - * Move to the first page, has the same effect as clicking the 'first' button. - */ - moveFirst : function(){ - this.doLoad(0); - }, - - /** - * Move to the previous page, has the same effect as clicking the 'previous' button. - */ - movePrevious : function(){ - this.doLoad(Math.max(0, this.cursor-this.pageSize)); - }, - - /** - * Move to the next page, has the same effect as clicking the 'next' button. - */ - moveNext : function(){ - this.doLoad(this.cursor+this.pageSize); - }, - - /** - * Move to the last page, has the same effect as clicking the 'last' button. - */ - moveLast : function(){ - var total = this.store.getTotalCount(), - extra = total % this.pageSize; - - this.doLoad(extra ? (total - extra) : total - this.pageSize); - }, - - /** - * Refresh the current page, has the same effect as clicking the 'refresh' button. - */ - doRefresh : function(){ - this.doLoad(this.cursor); - }, - - /** - * Binds the paging toolbar to the specified {@link Ext.data.Store} - * @param {Store} store The store to bind to this toolbar - * @param {Boolean} initial (Optional) true to not remove listeners - */ - bindStore : function(store, initial){ - var doLoad; - if(!initial && this.store){ - if(store !== this.store && this.store.autoDestroy){ - this.store.destroy(); - }else{ - this.store.un('beforeload', this.beforeLoad, this); - this.store.un('load', this.onLoad, this); - this.store.un('exception', this.onLoadError, this); - } - if(!store){ - this.store = null; - } - } - if(store){ - store = Ext.StoreMgr.lookup(store); - store.on({ - scope: this, - beforeload: this.beforeLoad, - load: this.onLoad, - exception: this.onLoadError - }); - doLoad = true; - } - this.store = store; - if(doLoad){ - this.onLoad(store, null, {}); - } - }, - - /** - * Unbinds the paging toolbar from the specified {@link Ext.data.Store} (deprecated) - * @param {Ext.data.Store} store The data store to unbind - */ - unbind : function(store){ - this.bindStore(null); - }, - - /** - * Binds the paging toolbar to the specified {@link Ext.data.Store} (deprecated) - * @param {Ext.data.Store} store The data store to bind - */ - bind : function(store){ - this.bindStore(store); - }, - - // private - onDestroy : function(){ - this.bindStore(null); - Ext.PagingToolbar.superclass.onDestroy.call(this); - } -}); - -})(); -Ext.reg('paging', Ext.PagingToolbar); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-toolbars.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-toolbars.js deleted file mode 100644 index 091ad94e918..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-toolbars.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.Toolbar=function(a){if(Ext.isArray(a)){a={items:a,layout:"toolbar"}}else{a=Ext.apply({layout:"toolbar"},a);if(a.buttons){a.items=a.buttons}}Ext.Toolbar.superclass.constructor.call(this,a)};(function(){var a=Ext.Toolbar;Ext.extend(a,Ext.Container,{defaultType:"button",enableOverflow:false,trackMenus:true,internalDefaults:{removeMode:"container",hideParent:true},toolbarCls:"x-toolbar",initComponent:function(){a.superclass.initComponent.call(this);this.addEvents("overflowchange")},onRender:function(c,b){if(!this.el){if(!this.autoCreate){this.autoCreate={cls:this.toolbarCls+" x-small-editor"}}this.el=c.createChild(Ext.apply({id:this.id},this.autoCreate),b);Ext.Toolbar.superclass.onRender.apply(this,arguments)}},lookupComponent:function(b){if(Ext.isString(b)){if(b=="-"){b=new a.Separator()}else{if(b==" "){b=new a.Spacer()}else{if(b=="->"){b=new a.Fill()}else{b=new a.TextItem(b)}}}this.applyDefaults(b)}else{if(b.isFormField||b.render){b=this.createComponent(b)}else{if(b.tag){b=new a.Item({autoEl:b})}else{if(b.tagName){b=new a.Item({el:b})}else{if(Ext.isObject(b)){b=b.xtype?this.createComponent(b):this.constructButton(b)}}}}}return b},applyDefaults:function(e){if(!Ext.isString(e)){e=Ext.Toolbar.superclass.applyDefaults.call(this,e);var b=this.internalDefaults;if(e.events){Ext.applyIf(e.initialConfig,b);Ext.apply(e,b)}else{Ext.applyIf(e,b)}}return e},addSeparator:function(){return this.add(new a.Separator())},addSpacer:function(){return this.add(new a.Spacer())},addFill:function(){this.add(new a.Fill())},addElement:function(b){return this.addItem(new a.Item({el:b}))},addItem:function(b){return this.add.apply(this,arguments)},addButton:function(c){if(Ext.isArray(c)){var e=[];for(var d=0,b=c.length;d");this.items.push(this.displayItem=new a.TextItem({}))}Ext.PagingToolbar.superclass.initComponent.call(this);this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});this.cursor=0;this.bindStore(this.store,true)},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var c=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());this.displayItem.setText(c)}},onLoad:function(b,e,i){if(!this.rendered){this.dsLoaded=[b,e,i];return}var f=this.getParams();this.cursor=(i.params&&i.params[f.start])?i.params[f.start]:0;var h=this.getPageData(),c=h.activePage,g=h.pages;this.afterTextItem.setText(String.format(this.afterPageText,h.pages));this.inputItem.setValue(c);this.first.setDisabled(c==1);this.prev.setDisabled(c==1);this.next.setDisabled(c==g);this.last.setDisabled(c==g);this.refresh.enable();this.updateInfo();this.fireEvent("change",this,h)},getPageData:function(){var b=this.store.getTotalCount();return{total:b,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:b=1&f<=i.pages){h.setValue(f)}}}}}},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(d){var c={},b=this.getParams();c[b.start]=d;c[b.limit]=this.pageSize;if(this.fireEvent("beforechange",this,c)!==false){this.store.load({params:c})}},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var c=this.store.getTotalCount(),b=c%this.pageSize;this.doLoad(b?(c-b):c-this.pageSize)},doRefresh:function(){this.doLoad(this.cursor)},bindStore:function(c,d){var b;if(!d&&this.store){if(c!==this.store&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.beforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this)}if(!c){this.store=null}}if(c){c=Ext.StoreMgr.lookup(c);c.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});b=true}this.store=c;if(b){this.onLoad(c,null,{})}},unbind:function(b){this.bindStore(null)},bind:function(b){this.bindStore(b)},onDestroy:function(){this.bindStore(null);Ext.PagingToolbar.superclass.onDestroy.call(this)}})})();Ext.reg("paging",Ext.PagingToolbar); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tree-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tree-debug.js deleted file mode 100644 index 7e97cd0e37c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tree-debug.js +++ /dev/null @@ -1,4837 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.tree.TreePanel - * @extends Ext.Panel - *

      The TreePanel provides tree-structured UI representation of tree-structured data.

      - *

      {@link Ext.tree.TreeNode TreeNode}s added to the TreePanel may each contain metadata - * used by your application in their {@link Ext.tree.TreeNode#attributes attributes} property.

      - *

      A TreePanel must have a {@link #root} node before it is rendered. This may either be - * specified using the {@link #root} config option, or using the {@link #setRootNode} method. - *

      An example of tree rendered to an existing div:

      
      -var tree = new Ext.tree.TreePanel({
      -    renderTo: 'tree-div',
      -    useArrows: true,
      -    autoScroll: true,
      -    animate: true,
      -    enableDD: true,
      -    containerScroll: true,
      -    border: false,
      -    // auto create TreeLoader
      -    dataUrl: 'get-nodes.php',
      -
      -    root: {
      -        nodeType: 'async',
      -        text: 'Ext JS',
      -        draggable: false,
      -        id: 'source'
      -    }
      -});
      -
      -tree.getRootNode().expand();
      - * 
      - *

      The example above would work with a data packet similar to this:

      
      -[{
      -    "text": "adapter",
      -    "id": "source\/adapter",
      -    "cls": "folder"
      -}, {
      -    "text": "dd",
      -    "id": "source\/dd",
      -    "cls": "folder"
      -}, {
      -    "text": "debug.js",
      -    "id": "source\/debug.js",
      -    "leaf": true,
      -    "cls": "file"
      -}]
      - * 
      - *

      An example of tree within a Viewport:

      
      -new Ext.Viewport({
      -    layout: 'border',
      -    items: [{
      -        region: 'west',
      -        collapsible: true,
      -        title: 'Navigation',
      -        xtype: 'treepanel',
      -        width: 200,
      -        autoScroll: true,
      -        split: true,
      -        loader: new Ext.tree.TreeLoader(),
      -        root: new Ext.tree.AsyncTreeNode({
      -            expanded: true,
      -            children: [{
      -                text: 'Menu Option 1',
      -                leaf: true
      -            }, {
      -                text: 'Menu Option 2',
      -                leaf: true
      -            }, {
      -                text: 'Menu Option 3',
      -                leaf: true
      -            }]
      -        }),
      -        rootVisible: false,
      -        listeners: {
      -            click: function(n) {
      -                Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"');
      -            }
      -        }
      -    }, {
      -        region: 'center',
      -        xtype: 'tabpanel',
      -        // remaining code not shown ...
      -    }]
      -});
      -
      - * - * @cfg {Ext.tree.TreeNode} root The root node for the tree. - * @cfg {Boolean} rootVisible false to hide the root node (defaults to true) - * @cfg {Boolean} lines false to disable tree lines (defaults to true) - * @cfg {Boolean} enableDD true to enable drag and drop - * @cfg {Boolean} enableDrag true to enable just drag - * @cfg {Boolean} enableDrop true to enable just drop - * @cfg {Object} dragConfig Custom config to pass to the {@link Ext.tree.TreeDragZone} instance - * @cfg {Object} dropConfig Custom config to pass to the {@link Ext.tree.TreeDropZone} instance - * @cfg {String} ddGroup The DD group this TreePanel belongs to - * @cfg {Boolean} ddAppendOnly true if the tree should only allow append drops (use for trees which are sorted) - * @cfg {Boolean} ddScroll true to enable body scrolling - * @cfg {Boolean} containerScroll true to register this container with ScrollManager - * @cfg {Boolean} hlDrop false to disable node highlight on drop (defaults to the value of {@link Ext#enableFx}) - * @cfg {String} hlColor The color of the node highlight (defaults to 'C3DAF9') - * @cfg {Boolean} animate true to enable animated expand/collapse (defaults to the value of {@link Ext#enableFx}) - * @cfg {Boolean} singleExpand true if only 1 node per branch may be expanded - * @cfg {Object} selModel A tree selection model to use with this TreePanel (defaults to an {@link Ext.tree.DefaultSelectionModel}) - * @cfg {Boolean} trackMouseOver false to disable mouse over highlighting - * @cfg {Ext.tree.TreeLoader} loader A {@link Ext.tree.TreeLoader} for use with this TreePanel - * @cfg {String} pathSeparator The token used to separate sub-paths in path strings (defaults to '/') - * @cfg {Boolean} useArrows true to use Vista-style arrows in the tree (defaults to false) - * @cfg {String} requestMethod The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}). - * - * @constructor - * @param {Object} config - * @xtype treepanel - */ -Ext.tree.TreePanel = Ext.extend(Ext.Panel, { - rootVisible : true, - animate : Ext.enableFx, - lines : true, - enableDD : false, - hlDrop : Ext.enableFx, - pathSeparator : '/', - - /** - * @cfg {Array} bubbleEvents - *

      An array of events that, when fired, should be bubbled to any parent container. - * See {@link Ext.util.Observable#enableBubble}. - * Defaults to []. - */ - bubbleEvents : [], - - initComponent : function(){ - Ext.tree.TreePanel.superclass.initComponent.call(this); - - if(!this.eventModel){ - this.eventModel = new Ext.tree.TreeEventModel(this); - } - - // initialize the loader - var l = this.loader; - if(!l){ - l = new Ext.tree.TreeLoader({ - dataUrl: this.dataUrl, - requestMethod: this.requestMethod - }); - }else if(Ext.isObject(l) && !l.load){ - l = new Ext.tree.TreeLoader(l); - } - this.loader = l; - - this.nodeHash = {}; - - /** - * The root node of this tree. - * @type Ext.tree.TreeNode - * @property root - */ - if(this.root){ - var r = this.root; - delete this.root; - this.setRootNode(r); - } - - - this.addEvents( - - /** - * @event append - * Fires when a new child node is appended to a node in this tree. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The newly appended node - * @param {Number} index The index of the newly appended node - */ - 'append', - /** - * @event remove - * Fires when a child node is removed from a node in this tree. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node removed - */ - 'remove', - /** - * @event movenode - * Fires when a node is moved to a new location in the tree - * @param {Tree} tree The owner tree - * @param {Node} node The node moved - * @param {Node} oldParent The old parent of this node - * @param {Node} newParent The new parent of this node - * @param {Number} index The index it was moved to - */ - 'movenode', - /** - * @event insert - * Fires when a new child node is inserted in a node in this tree. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node inserted - * @param {Node} refNode The child node the node was inserted before - */ - 'insert', - /** - * @event beforeappend - * Fires before a new child is appended to a node in this tree, return false to cancel the append. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node to be appended - */ - 'beforeappend', - /** - * @event beforeremove - * Fires before a child is removed from a node in this tree, return false to cancel the remove. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node to be removed - */ - 'beforeremove', - /** - * @event beforemovenode - * Fires before a node is moved to a new location in the tree. Return false to cancel the move. - * @param {Tree} tree The owner tree - * @param {Node} node The node being moved - * @param {Node} oldParent The parent of the node - * @param {Node} newParent The new parent the node is moving to - * @param {Number} index The index it is being moved to - */ - 'beforemovenode', - /** - * @event beforeinsert - * Fires before a new child is inserted in a node in this tree, return false to cancel the insert. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node to be inserted - * @param {Node} refNode The child node the node is being inserted before - */ - 'beforeinsert', - - /** - * @event beforeload - * Fires before a node is loaded, return false to cancel - * @param {Node} node The node being loaded - */ - 'beforeload', - /** - * @event load - * Fires when a node is loaded - * @param {Node} node The node that was loaded - */ - 'load', - /** - * @event textchange - * Fires when the text for a node is changed - * @param {Node} node The node - * @param {String} text The new text - * @param {String} oldText The old text - */ - 'textchange', - /** - * @event beforeexpandnode - * Fires before a node is expanded, return false to cancel. - * @param {Node} node The node - * @param {Boolean} deep - * @param {Boolean} anim - */ - 'beforeexpandnode', - /** - * @event beforecollapsenode - * Fires before a node is collapsed, return false to cancel. - * @param {Node} node The node - * @param {Boolean} deep - * @param {Boolean} anim - */ - 'beforecollapsenode', - /** - * @event expandnode - * Fires when a node is expanded - * @param {Node} node The node - */ - 'expandnode', - /** - * @event disabledchange - * Fires when the disabled status of a node changes - * @param {Node} node The node - * @param {Boolean} disabled - */ - 'disabledchange', - /** - * @event collapsenode - * Fires when a node is collapsed - * @param {Node} node The node - */ - 'collapsenode', - /** - * @event beforeclick - * Fires before click processing on a node. Return false to cancel the default action. - * @param {Node} node The node - * @param {Ext.EventObject} e The event object - */ - 'beforeclick', - /** - * @event click - * Fires when a node is clicked - * @param {Node} node The node - * @param {Ext.EventObject} e The event object - */ - 'click', - /** - * @event containerclick - * Fires when the tree container is clicked - * @param {Tree} this - * @param {Ext.EventObject} e The event object - */ - 'containerclick', - /** - * @event checkchange - * Fires when a node with a checkbox's checked property changes - * @param {Node} this This node - * @param {Boolean} checked - */ - 'checkchange', - /** - * @event beforedblclick - * Fires before double click processing on a node. Return false to cancel the default action. - * @param {Node} node The node - * @param {Ext.EventObject} e The event object - */ - 'beforedblclick', - /** - * @event dblclick - * Fires when a node is double clicked - * @param {Node} node The node - * @param {Ext.EventObject} e The event object - */ - 'dblclick', - /** - * @event containerdblclick - * Fires when the tree container is double clicked - * @param {Tree} this - * @param {Ext.EventObject} e The event object - */ - 'containerdblclick', - /** - * @event contextmenu - * Fires when a node is right clicked. To display a context menu in response to this - * event, first create a Menu object (see {@link Ext.menu.Menu} for details), then add - * a handler for this event:

      
      -new Ext.tree.TreePanel({
      -    title: 'My TreePanel',
      -    root: new Ext.tree.AsyncTreeNode({
      -        text: 'The Root',
      -        children: [
      -            { text: 'Child node 1', leaf: true },
      -            { text: 'Child node 2', leaf: true }
      -        ]
      -    }),
      -    contextMenu: new Ext.menu.Menu({
      -        items: [{
      -            id: 'delete-node',
      -            text: 'Delete Node'
      -        }],
      -        listeners: {
      -            itemclick: function(item) {
      -                switch (item.id) {
      -                    case 'delete-node':
      -                        var n = item.parentMenu.contextNode;
      -                        if (n.parentNode) {
      -                            n.remove();
      -                        }
      -                        break;
      -                }
      -            }
      -        }
      -    }),
      -    listeners: {
      -        contextmenu: function(node, e) {
      -//          Register the context node with the menu so that a Menu Item's handler function can access
      -//          it via its {@link Ext.menu.BaseItem#parentMenu parentMenu} property.
      -            node.select();
      -            var c = node.getOwnerTree().contextMenu;
      -            c.contextNode = node;
      -            c.showAt(e.getXY());
      -        }
      -    }
      -});
      -
      - * @param {Node} node The node - * @param {Ext.EventObject} e The event object - */ - 'contextmenu', - /** - * @event containercontextmenu - * Fires when the tree container is right clicked - * @param {Tree} this - * @param {Ext.EventObject} e The event object - */ - 'containercontextmenu', - /** - * @event beforechildrenrendered - * Fires right before the child nodes for a node are rendered - * @param {Node} node The node - */ - 'beforechildrenrendered', - /** - * @event startdrag - * Fires when a node starts being dragged - * @param {Ext.tree.TreePanel} this - * @param {Ext.tree.TreeNode} node - * @param {event} e The raw browser event - */ - 'startdrag', - /** - * @event enddrag - * Fires when a drag operation is complete - * @param {Ext.tree.TreePanel} this - * @param {Ext.tree.TreeNode} node - * @param {event} e The raw browser event - */ - 'enddrag', - /** - * @event dragdrop - * Fires when a dragged node is dropped on a valid DD target - * @param {Ext.tree.TreePanel} this - * @param {Ext.tree.TreeNode} node - * @param {DD} dd The dd it was dropped on - * @param {event} e The raw browser event - */ - 'dragdrop', - /** - * @event beforenodedrop - * Fires when a DD object is dropped on a node in this tree for preprocessing. Return false to cancel the drop. The dropEvent - * passed to handlers has the following properties:
      - *
        - *
      • tree - The TreePanel
      • - *
      • target - The node being targeted for the drop
      • - *
      • data - The drag data from the drag source
      • - *
      • point - The point of the drop - append, above or below
      • - *
      • source - The drag source
      • - *
      • rawEvent - Raw mouse event
      • - *
      • dropNode - Drop node(s) provided by the source OR you can supply node(s) - * to be inserted by setting them on this object.
      • - *
      • cancel - Set this to true to cancel the drop.
      • - *
      • dropStatus - If the default drop action is cancelled but the drop is valid, setting this to true - * will prevent the animated 'repair' from appearing.
      • - *
      - * @param {Object} dropEvent - */ - 'beforenodedrop', - /** - * @event nodedrop - * Fires after a DD object is dropped on a node in this tree. The dropEvent - * passed to handlers has the following properties:
      - *
        - *
      • tree - The TreePanel
      • - *
      • target - The node being targeted for the drop
      • - *
      • data - The drag data from the drag source
      • - *
      • point - The point of the drop - append, above or below
      • - *
      • source - The drag source
      • - *
      • rawEvent - Raw mouse event
      • - *
      • dropNode - Dropped node(s).
      • - *
      - * @param {Object} dropEvent - */ - 'nodedrop', - /** - * @event nodedragover - * Fires when a tree node is being targeted for a drag drop, return false to signal drop not allowed. The dragOverEvent - * passed to handlers has the following properties:
      - *
        - *
      • tree - The TreePanel
      • - *
      • target - The node being targeted for the drop
      • - *
      • data - The drag data from the drag source
      • - *
      • point - The point of the drop - append, above or below
      • - *
      • source - The drag source
      • - *
      • rawEvent - Raw mouse event
      • - *
      • dropNode - Drop node(s) provided by the source.
      • - *
      • cancel - Set this to true to signal drop not allowed.
      • - *
      - * @param {Object} dragOverEvent - */ - 'nodedragover' - ); - if(this.singleExpand){ - this.on('beforeexpandnode', this.restrictExpand, this); - } - }, - - // private - proxyNodeEvent : function(ename, a1, a2, a3, a4, a5, a6){ - if(ename == 'collapse' || ename == 'expand' || ename == 'beforecollapse' || ename == 'beforeexpand' || ename == 'move' || ename == 'beforemove'){ - ename = ename+'node'; - } - // args inline for performance while bubbling events - return this.fireEvent(ename, a1, a2, a3, a4, a5, a6); - }, - - - /** - * Returns this root node for this tree - * @return {Node} - */ - getRootNode : function(){ - return this.root; - }, - - /** - * Sets the root node for this tree. If the TreePanel has already rendered a root node, the - * previous root node (and all of its descendants) are destroyed before the new root node is rendered. - * @param {Node} node - * @return {Node} - */ - setRootNode : function(node){ - this.destroyRoot(); - if(!node.render){ // attributes passed - node = this.loader.createNode(node); - } - this.root = node; - node.ownerTree = this; - node.isRoot = true; - this.registerNode(node); - if(!this.rootVisible){ - var uiP = node.attributes.uiProvider; - node.ui = uiP ? new uiP(node) : new Ext.tree.RootTreeNodeUI(node); - } - if(this.innerCt){ - this.clearInnerCt(); - this.renderRoot(); - } - return node; - }, - - clearInnerCt : function(){ - this.innerCt.update(''); - }, - - // private - renderRoot : function(){ - this.root.render(); - if(!this.rootVisible){ - this.root.renderChildren(); - } - }, - - /** - * Gets a node in this tree by its id - * @param {String} id - * @return {Node} - */ - getNodeById : function(id){ - return this.nodeHash[id]; - }, - - // private - registerNode : function(node){ - this.nodeHash[node.id] = node; - }, - - // private - unregisterNode : function(node){ - delete this.nodeHash[node.id]; - }, - - // private - toString : function(){ - return '[Tree'+(this.id?' '+this.id:'')+']'; - }, - - // private - restrictExpand : function(node){ - var p = node.parentNode; - if(p){ - if(p.expandedChild && p.expandedChild.parentNode == p){ - p.expandedChild.collapse(); - } - p.expandedChild = node; - } - }, - - /** - * Retrieve an array of checked nodes, or an array of a specific attribute of checked nodes (e.g. 'id') - * @param {String} attribute (optional) Defaults to null (return the actual nodes) - * @param {TreeNode} startNode (optional) The node to start from, defaults to the root - * @return {Array} - */ - getChecked : function(a, startNode){ - startNode = startNode || this.root; - var r = []; - var f = function(){ - if(this.attributes.checked){ - r.push(!a ? this : (a == 'id' ? this.id : this.attributes[a])); - } - }; - startNode.cascade(f); - return r; - }, - - /** - * Returns the default {@link Ext.tree.TreeLoader} for this TreePanel. - * @return {Ext.tree.TreeLoader} The TreeLoader for this TreePanel. - */ - getLoader : function(){ - return this.loader; - }, - - /** - * Expand all nodes - */ - expandAll : function(){ - this.root.expand(true); - }, - - /** - * Collapse all nodes - */ - collapseAll : function(){ - this.root.collapse(true); - }, - - /** - * Returns the selection model used by this TreePanel. - * @return {TreeSelectionModel} The selection model used by this TreePanel - */ - getSelectionModel : function(){ - if(!this.selModel){ - this.selModel = new Ext.tree.DefaultSelectionModel(); - } - return this.selModel; - }, - - /** - * Expands a specified path in this TreePanel. A path can be retrieved from a node with {@link Ext.data.Node#getPath} - * @param {String} path - * @param {String} attr (optional) The attribute used in the path (see {@link Ext.data.Node#getPath} for more info) - * @param {Function} callback (optional) The callback to call when the expand is complete. The callback will be called with - * (bSuccess, oLastNode) where bSuccess is if the expand was successful and oLastNode is the last node that was expanded. - */ - expandPath : function(path, attr, callback){ - if(Ext.isEmpty(path)){ - if(callback){ - callback(false, undefined); - } - return; - } - attr = attr || 'id'; - var keys = path.split(this.pathSeparator); - var curNode = this.root; - if(curNode.attributes[attr] != keys[1]){ // invalid root - if(callback){ - callback(false, null); - } - return; - } - var index = 1; - var f = function(){ - if(++index == keys.length){ - if(callback){ - callback(true, curNode); - } - return; - } - var c = curNode.findChild(attr, keys[index]); - if(!c){ - if(callback){ - callback(false, curNode); - } - return; - } - curNode = c; - c.expand(false, false, f); - }; - curNode.expand(false, false, f); - }, - - /** - * Selects the node in this tree at the specified path. A path can be retrieved from a node with {@link Ext.data.Node#getPath} - * @param {String} path - * @param {String} attr (optional) The attribute used in the path (see {@link Ext.data.Node#getPath} for more info) - * @param {Function} callback (optional) The callback to call when the selection is complete. The callback will be called with - * (bSuccess, oSelNode) where bSuccess is if the selection was successful and oSelNode is the selected node. - */ - selectPath : function(path, attr, callback){ - if(Ext.isEmpty(path)){ - if(callback){ - callback(false, undefined); - } - return; - } - attr = attr || 'id'; - var keys = path.split(this.pathSeparator), - v = keys.pop(); - if(keys.length > 1){ - var f = function(success, node){ - if(success && node){ - var n = node.findChild(attr, v); - if(n){ - n.select(); - if(callback){ - callback(true, n); - } - }else if(callback){ - callback(false, n); - } - }else{ - if(callback){ - callback(false, n); - } - } - }; - this.expandPath(keys.join(this.pathSeparator), attr, f); - }else{ - this.root.select(); - if(callback){ - callback(true, this.root); - } - } - }, - - /** - * Returns the underlying Element for this tree - * @return {Ext.Element} The Element - */ - getTreeEl : function(){ - return this.body; - }, - - // private - onRender : function(ct, position){ - Ext.tree.TreePanel.superclass.onRender.call(this, ct, position); - this.el.addClass('x-tree'); - this.innerCt = this.body.createChild({tag:'ul', - cls:'x-tree-root-ct ' + - (this.useArrows ? 'x-tree-arrows' : this.lines ? 'x-tree-lines' : 'x-tree-no-lines')}); - }, - - // private - initEvents : function(){ - Ext.tree.TreePanel.superclass.initEvents.call(this); - - if(this.containerScroll){ - Ext.dd.ScrollManager.register(this.body); - } - if((this.enableDD || this.enableDrop) && !this.dropZone){ - /** - * The dropZone used by this tree if drop is enabled (see {@link #enableDD} or {@link #enableDrop}) - * @property dropZone - * @type Ext.tree.TreeDropZone - */ - this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || { - ddGroup: this.ddGroup || 'TreeDD', appendOnly: this.ddAppendOnly === true - }); - } - if((this.enableDD || this.enableDrag) && !this.dragZone){ - /** - * The dragZone used by this tree if drag is enabled (see {@link #enableDD} or {@link #enableDrag}) - * @property dragZone - * @type Ext.tree.TreeDragZone - */ - this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || { - ddGroup: this.ddGroup || 'TreeDD', - scroll: this.ddScroll - }); - } - this.getSelectionModel().init(this); - }, - - // private - afterRender : function(){ - Ext.tree.TreePanel.superclass.afterRender.call(this); - this.renderRoot(); - }, - - beforeDestroy : function(){ - if(this.rendered){ - Ext.dd.ScrollManager.unregister(this.body); - Ext.destroy(this.dropZone, this.dragZone); - } - this.destroyRoot(); - Ext.destroy(this.loader); - this.nodeHash = this.root = this.loader = null; - Ext.tree.TreePanel.superclass.beforeDestroy.call(this); - }, - - /** - * Destroy the root node. Not included by itself because we need to pass the silent parameter. - * @private - */ - destroyRoot : function(){ - if(this.root && this.root.destroy){ - this.root.destroy(true); - } - } - - /** - * @cfg {String/Number} activeItem - * @hide - */ - /** - * @cfg {Boolean} autoDestroy - * @hide - */ - /** - * @cfg {Object/String/Function} autoLoad - * @hide - */ - /** - * @cfg {Boolean} autoWidth - * @hide - */ - /** - * @cfg {Boolean/Number} bufferResize - * @hide - */ - /** - * @cfg {String} defaultType - * @hide - */ - /** - * @cfg {Object} defaults - * @hide - */ - /** - * @cfg {Boolean} hideBorders - * @hide - */ - /** - * @cfg {Mixed} items - * @hide - */ - /** - * @cfg {String} layout - * @hide - */ - /** - * @cfg {Object} layoutConfig - * @hide - */ - /** - * @cfg {Boolean} monitorResize - * @hide - */ - /** - * @property items - * @hide - */ - /** - * @method cascade - * @hide - */ - /** - * @method doLayout - * @hide - */ - /** - * @method find - * @hide - */ - /** - * @method findBy - * @hide - */ - /** - * @method findById - * @hide - */ - /** - * @method findByType - * @hide - */ - /** - * @method getComponent - * @hide - */ - /** - * @method getLayout - * @hide - */ - /** - * @method getUpdater - * @hide - */ - /** - * @method insert - * @hide - */ - /** - * @method load - * @hide - */ - /** - * @method remove - * @hide - */ - /** - * @event add - * @hide - */ - /** - * @method removeAll - * @hide - */ - /** - * @event afterLayout - * @hide - */ - /** - * @event beforeadd - * @hide - */ - /** - * @event beforeremove - * @hide - */ - /** - * @event remove - * @hide - */ - - - - /** - * @cfg {String} allowDomMove @hide - */ - /** - * @cfg {String} autoEl @hide - */ - /** - * @cfg {String} applyTo @hide - */ - /** - * @cfg {String} contentEl @hide - */ - /** - * @cfg {Mixed} data @hide - */ - /** - * @cfg {Mixed} tpl @hide - */ - /** - * @cfg {String} tplWriteMode @hide - */ - /** - * @cfg {String} disabledClass @hide - */ - /** - * @cfg {String} elements @hide - */ - /** - * @cfg {String} html @hide - */ - /** - * @cfg {Boolean} preventBodyReset - * @hide - */ - /** - * @property disabled - * @hide - */ - /** - * @method applyToMarkup - * @hide - */ - /** - * @method enable - * @hide - */ - /** - * @method disable - * @hide - */ - /** - * @method setDisabled - * @hide - */ -}); - -Ext.tree.TreePanel.nodeTypes = {}; - -Ext.reg('treepanel', Ext.tree.TreePanel);Ext.tree.TreeEventModel = function(tree){ - this.tree = tree; - this.tree.on('render', this.initEvents, this); -}; - -Ext.tree.TreeEventModel.prototype = { - initEvents : function(){ - var t = this.tree; - - if(t.trackMouseOver !== false){ - t.mon(t.innerCt, { - scope: this, - mouseover: this.delegateOver, - mouseout: this.delegateOut - }); - } - t.mon(t.getTreeEl(), { - scope: this, - click: this.delegateClick, - dblclick: this.delegateDblClick, - contextmenu: this.delegateContextMenu - }); - }, - - getNode : function(e){ - var t; - if(t = e.getTarget('.x-tree-node-el', 10)){ - var id = Ext.fly(t, '_treeEvents').getAttribute('tree-node-id', 'ext'); - if(id){ - return this.tree.getNodeById(id); - } - } - return null; - }, - - getNodeTarget : function(e){ - var t = e.getTarget('.x-tree-node-icon', 1); - if(!t){ - t = e.getTarget('.x-tree-node-el', 6); - } - return t; - }, - - delegateOut : function(e, t){ - if(!this.beforeEvent(e)){ - return; - } - if(e.getTarget('.x-tree-ec-icon', 1)){ - var n = this.getNode(e); - this.onIconOut(e, n); - if(n == this.lastEcOver){ - delete this.lastEcOver; - } - } - if((t = this.getNodeTarget(e)) && !e.within(t, true)){ - this.onNodeOut(e, this.getNode(e)); - } - }, - - delegateOver : function(e, t){ - if(!this.beforeEvent(e)){ - return; - } - if(Ext.isGecko && !this.trackingDoc){ // prevent hanging in FF - Ext.getBody().on('mouseover', this.trackExit, this); - this.trackingDoc = true; - } - if(this.lastEcOver){ // prevent hung highlight - this.onIconOut(e, this.lastEcOver); - delete this.lastEcOver; - } - if(e.getTarget('.x-tree-ec-icon', 1)){ - this.lastEcOver = this.getNode(e); - this.onIconOver(e, this.lastEcOver); - } - if(t = this.getNodeTarget(e)){ - this.onNodeOver(e, this.getNode(e)); - } - }, - - trackExit : function(e){ - if(this.lastOverNode){ - if(this.lastOverNode.ui && !e.within(this.lastOverNode.ui.getEl())){ - this.onNodeOut(e, this.lastOverNode); - } - delete this.lastOverNode; - Ext.getBody().un('mouseover', this.trackExit, this); - this.trackingDoc = false; - } - - }, - - delegateClick : function(e, t){ - if(this.beforeEvent(e)){ - if(e.getTarget('input[type=checkbox]', 1)){ - this.onCheckboxClick(e, this.getNode(e)); - }else if(e.getTarget('.x-tree-ec-icon', 1)){ - this.onIconClick(e, this.getNode(e)); - }else if(this.getNodeTarget(e)){ - this.onNodeClick(e, this.getNode(e)); - } - }else{ - this.checkContainerEvent(e, 'click'); - } - }, - - delegateDblClick : function(e, t){ - if(this.beforeEvent(e)){ - if(this.getNodeTarget(e)){ - this.onNodeDblClick(e, this.getNode(e)); - } - }else{ - this.checkContainerEvent(e, 'dblclick'); - } - }, - - delegateContextMenu : function(e, t){ - if(this.beforeEvent(e)){ - if(this.getNodeTarget(e)){ - this.onNodeContextMenu(e, this.getNode(e)); - } - }else{ - this.checkContainerEvent(e, 'contextmenu'); - } - }, - - checkContainerEvent: function(e, type){ - if(this.disabled){ - e.stopEvent(); - return false; - } - this.onContainerEvent(e, type); - }, - - onContainerEvent: function(e, type){ - this.tree.fireEvent('container' + type, this.tree, e); - }, - - onNodeClick : function(e, node){ - node.ui.onClick(e); - }, - - onNodeOver : function(e, node){ - this.lastOverNode = node; - node.ui.onOver(e); - }, - - onNodeOut : function(e, node){ - node.ui.onOut(e); - }, - - onIconOver : function(e, node){ - node.ui.addClass('x-tree-ec-over'); - }, - - onIconOut : function(e, node){ - node.ui.removeClass('x-tree-ec-over'); - }, - - onIconClick : function(e, node){ - node.ui.ecClick(e); - }, - - onCheckboxClick : function(e, node){ - node.ui.onCheckChange(e); - }, - - onNodeDblClick : function(e, node){ - node.ui.onDblClick(e); - }, - - onNodeContextMenu : function(e, node){ - node.ui.onContextMenu(e); - }, - - beforeEvent : function(e){ - var node = this.getNode(e); - if(this.disabled || !node || !node.ui){ - e.stopEvent(); - return false; - } - return true; - }, - - disable: function(){ - this.disabled = true; - }, - - enable: function(){ - this.disabled = false; - } -};/** - * @class Ext.tree.DefaultSelectionModel - * @extends Ext.util.Observable - * The default single selection for a TreePanel. - */ -Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, { - - constructor : function(config){ - this.selNode = null; - - this.addEvents( - /** - * @event selectionchange - * Fires when the selected node changes - * @param {DefaultSelectionModel} this - * @param {TreeNode} node the new selection - */ - 'selectionchange', - - /** - * @event beforeselect - * Fires before the selected node changes, return false to cancel the change - * @param {DefaultSelectionModel} this - * @param {TreeNode} node the new selection - * @param {TreeNode} node the old selection - */ - 'beforeselect' - ); - - Ext.apply(this, config); - Ext.tree.DefaultSelectionModel.superclass.constructor.call(this); - }, - - init : function(tree){ - this.tree = tree; - tree.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this); - tree.on('click', this.onNodeClick, this); - }, - - onNodeClick : function(node, e){ - this.select(node); - }, - - /** - * Select a node. - * @param {TreeNode} node The node to select - * @return {TreeNode} The selected node - */ - select : function(node, /* private*/ selectNextNode){ - // If node is hidden, select the next node in whatever direction was being moved in. - if (!Ext.fly(node.ui.wrap).isVisible() && selectNextNode) { - return selectNextNode.call(this, node); - } - var last = this.selNode; - if(node == last){ - node.ui.onSelectedChange(true); - }else if(this.fireEvent('beforeselect', this, node, last) !== false){ - if(last && last.ui){ - last.ui.onSelectedChange(false); - } - this.selNode = node; - node.ui.onSelectedChange(true); - this.fireEvent('selectionchange', this, node, last); - } - return node; - }, - - /** - * Deselect a node. - * @param {TreeNode} node The node to unselect - * @param {Boolean} silent True to stop the selectionchange event from firing. - */ - unselect : function(node, silent){ - if(this.selNode == node){ - this.clearSelections(silent); - } - }, - - /** - * Clear all selections - * @param {Boolean} silent True to stop the selectionchange event from firing. - */ - clearSelections : function(silent){ - var n = this.selNode; - if(n){ - n.ui.onSelectedChange(false); - this.selNode = null; - if(silent !== true){ - this.fireEvent('selectionchange', this, null); - } - } - return n; - }, - - /** - * Get the selected node - * @return {TreeNode} The selected node - */ - getSelectedNode : function(){ - return this.selNode; - }, - - /** - * Returns true if the node is selected - * @param {TreeNode} node The node to check - * @return {Boolean} - */ - isSelected : function(node){ - return this.selNode == node; - }, - - /** - * Selects the node above the selected node in the tree, intelligently walking the nodes - * @return TreeNode The new selection - */ - selectPrevious : function(/* private */ s){ - if(!(s = s || this.selNode || this.lastSelNode)){ - return null; - } - // Here we pass in the current function to select to indicate the direction we're moving - var ps = s.previousSibling; - if(ps){ - if(!ps.isExpanded() || ps.childNodes.length < 1){ - return this.select(ps, this.selectPrevious); - } else{ - var lc = ps.lastChild; - while(lc && lc.isExpanded() && Ext.fly(lc.ui.wrap).isVisible() && lc.childNodes.length > 0){ - lc = lc.lastChild; - } - return this.select(lc, this.selectPrevious); - } - } else if(s.parentNode && (this.tree.rootVisible || !s.parentNode.isRoot)){ - return this.select(s.parentNode, this.selectPrevious); - } - return null; - }, - - /** - * Selects the node above the selected node in the tree, intelligently walking the nodes - * @return TreeNode The new selection - */ - selectNext : function(/* private */ s){ - if(!(s = s || this.selNode || this.lastSelNode)){ - return null; - } - // Here we pass in the current function to select to indicate the direction we're moving - if(s.firstChild && s.isExpanded() && Ext.fly(s.ui.wrap).isVisible()){ - return this.select(s.firstChild, this.selectNext); - }else if(s.nextSibling){ - return this.select(s.nextSibling, this.selectNext); - }else if(s.parentNode){ - var newS = null; - s.parentNode.bubble(function(){ - if(this.nextSibling){ - newS = this.getOwnerTree().selModel.select(this.nextSibling, this.selectNext); - return false; - } - }); - return newS; - } - return null; - }, - - onKeyDown : function(e){ - var s = this.selNode || this.lastSelNode; - // undesirable, but required - var sm = this; - if(!s){ - return; - } - var k = e.getKey(); - switch(k){ - case e.DOWN: - e.stopEvent(); - this.selectNext(); - break; - case e.UP: - e.stopEvent(); - this.selectPrevious(); - break; - case e.RIGHT: - e.preventDefault(); - if(s.hasChildNodes()){ - if(!s.isExpanded()){ - s.expand(); - }else if(s.firstChild){ - this.select(s.firstChild, e); - } - } - break; - case e.LEFT: - e.preventDefault(); - if(s.hasChildNodes() && s.isExpanded()){ - s.collapse(); - }else if(s.parentNode && (this.tree.rootVisible || s.parentNode != this.tree.getRootNode())){ - this.select(s.parentNode, e); - } - break; - }; - } -}); - -/** - * @class Ext.tree.MultiSelectionModel - * @extends Ext.util.Observable - * Multi selection for a TreePanel. - */ -Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, { - - constructor : function(config){ - this.selNodes = []; - this.selMap = {}; - this.addEvents( - /** - * @event selectionchange - * Fires when the selected nodes change - * @param {MultiSelectionModel} this - * @param {Array} nodes Array of the selected nodes - */ - 'selectionchange' - ); - Ext.apply(this, config); - Ext.tree.MultiSelectionModel.superclass.constructor.call(this); - }, - - init : function(tree){ - this.tree = tree; - tree.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this); - tree.on('click', this.onNodeClick, this); - }, - - onNodeClick : function(node, e){ - if(e.ctrlKey && this.isSelected(node)){ - this.unselect(node); - }else{ - this.select(node, e, e.ctrlKey); - } - }, - - /** - * Select a node. - * @param {TreeNode} node The node to select - * @param {EventObject} e (optional) An event associated with the selection - * @param {Boolean} keepExisting True to retain existing selections - * @return {TreeNode} The selected node - */ - select : function(node, e, keepExisting){ - if(keepExisting !== true){ - this.clearSelections(true); - } - if(this.isSelected(node)){ - this.lastSelNode = node; - return node; - } - this.selNodes.push(node); - this.selMap[node.id] = node; - this.lastSelNode = node; - node.ui.onSelectedChange(true); - this.fireEvent('selectionchange', this, this.selNodes); - return node; - }, - - /** - * Deselect a node. - * @param {TreeNode} node The node to unselect - */ - unselect : function(node){ - if(this.selMap[node.id]){ - node.ui.onSelectedChange(false); - var sn = this.selNodes; - var index = sn.indexOf(node); - if(index != -1){ - this.selNodes.splice(index, 1); - } - delete this.selMap[node.id]; - this.fireEvent('selectionchange', this, this.selNodes); - } - }, - - /** - * Clear all selections - */ - clearSelections : function(suppressEvent){ - var sn = this.selNodes; - if(sn.length > 0){ - for(var i = 0, len = sn.length; i < len; i++){ - sn[i].ui.onSelectedChange(false); - } - this.selNodes = []; - this.selMap = {}; - if(suppressEvent !== true){ - this.fireEvent('selectionchange', this, this.selNodes); - } - } - }, - - /** - * Returns true if the node is selected - * @param {TreeNode} node The node to check - * @return {Boolean} - */ - isSelected : function(node){ - return this.selMap[node.id] ? true : false; - }, - - /** - * Returns an array of the selected nodes - * @return {Array} - */ - getSelectedNodes : function(){ - return this.selNodes.concat([]); - }, - - onKeyDown : Ext.tree.DefaultSelectionModel.prototype.onKeyDown, - - selectNext : Ext.tree.DefaultSelectionModel.prototype.selectNext, - - selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious -});/** - * @class Ext.data.Tree - * @extends Ext.util.Observable - * Represents a tree data structure and bubbles all the events for its nodes. The nodes - * in the tree have most standard DOM functionality. - * @constructor - * @param {Node} root (optional) The root node - */ -Ext.data.Tree = Ext.extend(Ext.util.Observable, { - - constructor: function(root){ - this.nodeHash = {}; - /** - * The root node for this tree - * @type Node - */ - this.root = null; - if(root){ - this.setRootNode(root); - } - this.addEvents( - /** - * @event append - * Fires when a new child node is appended to a node in this tree. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The newly appended node - * @param {Number} index The index of the newly appended node - */ - "append", - /** - * @event remove - * Fires when a child node is removed from a node in this tree. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node removed - */ - "remove", - /** - * @event move - * Fires when a node is moved to a new location in the tree - * @param {Tree} tree The owner tree - * @param {Node} node The node moved - * @param {Node} oldParent The old parent of this node - * @param {Node} newParent The new parent of this node - * @param {Number} index The index it was moved to - */ - "move", - /** - * @event insert - * Fires when a new child node is inserted in a node in this tree. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node inserted - * @param {Node} refNode The child node the node was inserted before - */ - "insert", - /** - * @event beforeappend - * Fires before a new child is appended to a node in this tree, return false to cancel the append. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node to be appended - */ - "beforeappend", - /** - * @event beforeremove - * Fires before a child is removed from a node in this tree, return false to cancel the remove. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node to be removed - */ - "beforeremove", - /** - * @event beforemove - * Fires before a node is moved to a new location in the tree. Return false to cancel the move. - * @param {Tree} tree The owner tree - * @param {Node} node The node being moved - * @param {Node} oldParent The parent of the node - * @param {Node} newParent The new parent the node is moving to - * @param {Number} index The index it is being moved to - */ - "beforemove", - /** - * @event beforeinsert - * Fires before a new child is inserted in a node in this tree, return false to cancel the insert. - * @param {Tree} tree The owner tree - * @param {Node} parent The parent node - * @param {Node} node The child node to be inserted - * @param {Node} refNode The child node the node is being inserted before - */ - "beforeinsert" - ); - Ext.data.Tree.superclass.constructor.call(this); - }, - - /** - * @cfg {String} pathSeparator - * The token used to separate paths in node ids (defaults to '/'). - */ - pathSeparator: "/", - - // private - proxyNodeEvent : function(){ - return this.fireEvent.apply(this, arguments); - }, - - /** - * Returns the root node for this tree. - * @return {Node} - */ - getRootNode : function(){ - return this.root; - }, - - /** - * Sets the root node for this tree. - * @param {Node} node - * @return {Node} - */ - setRootNode : function(node){ - this.root = node; - node.ownerTree = this; - node.isRoot = true; - this.registerNode(node); - return node; - }, - - /** - * Gets a node in this tree by its id. - * @param {String} id - * @return {Node} - */ - getNodeById : function(id){ - return this.nodeHash[id]; - }, - - // private - registerNode : function(node){ - this.nodeHash[node.id] = node; - }, - - // private - unregisterNode : function(node){ - delete this.nodeHash[node.id]; - }, - - toString : function(){ - return "[Tree"+(this.id?" "+this.id:"")+"]"; - } -}); - -/** - * @class Ext.data.Node - * @extends Ext.util.Observable - * @cfg {Boolean} leaf true if this node is a leaf and does not have children - * @cfg {String} id The id for this node. If one is not specified, one is generated. - * @constructor - * @param {Object} attributes The attributes/config for the node - */ -Ext.data.Node = Ext.extend(Ext.util.Observable, { - - constructor: function(attributes){ - /** - * The attributes supplied for the node. You can use this property to access any custom attributes you supplied. - * @type {Object} - */ - this.attributes = attributes || {}; - this.leaf = this.attributes.leaf; - /** - * The node id. @type String - */ - this.id = this.attributes.id; - if(!this.id){ - this.id = Ext.id(null, "xnode-"); - this.attributes.id = this.id; - } - /** - * All child nodes of this node. @type Array - */ - this.childNodes = []; - /** - * The parent node for this node. @type Node - */ - this.parentNode = null; - /** - * The first direct child node of this node, or null if this node has no child nodes. @type Node - */ - this.firstChild = null; - /** - * The last direct child node of this node, or null if this node has no child nodes. @type Node - */ - this.lastChild = null; - /** - * The node immediately preceding this node in the tree, or null if there is no sibling node. @type Node - */ - this.previousSibling = null; - /** - * The node immediately following this node in the tree, or null if there is no sibling node. @type Node - */ - this.nextSibling = null; - - this.addEvents({ - /** - * @event append - * Fires when a new child node is appended - * @param {Tree} tree The owner tree - * @param {Node} this This node - * @param {Node} node The newly appended node - * @param {Number} index The index of the newly appended node - */ - "append" : true, - /** - * @event remove - * Fires when a child node is removed - * @param {Tree} tree The owner tree - * @param {Node} this This node - * @param {Node} node The removed node - */ - "remove" : true, - /** - * @event move - * Fires when this node is moved to a new location in the tree - * @param {Tree} tree The owner tree - * @param {Node} this This node - * @param {Node} oldParent The old parent of this node - * @param {Node} newParent The new parent of this node - * @param {Number} index The index it was moved to - */ - "move" : true, - /** - * @event insert - * Fires when a new child node is inserted. - * @param {Tree} tree The owner tree - * @param {Node} this This node - * @param {Node} node The child node inserted - * @param {Node} refNode The child node the node was inserted before - */ - "insert" : true, - /** - * @event beforeappend - * Fires before a new child is appended, return false to cancel the append. - * @param {Tree} tree The owner tree - * @param {Node} this This node - * @param {Node} node The child node to be appended - */ - "beforeappend" : true, - /** - * @event beforeremove - * Fires before a child is removed, return false to cancel the remove. - * @param {Tree} tree The owner tree - * @param {Node} this This node - * @param {Node} node The child node to be removed - */ - "beforeremove" : true, - /** - * @event beforemove - * Fires before this node is moved to a new location in the tree. Return false to cancel the move. - * @param {Tree} tree The owner tree - * @param {Node} this This node - * @param {Node} oldParent The parent of this node - * @param {Node} newParent The new parent this node is moving to - * @param {Number} index The index it is being moved to - */ - "beforemove" : true, - /** - * @event beforeinsert - * Fires before a new child is inserted, return false to cancel the insert. - * @param {Tree} tree The owner tree - * @param {Node} this This node - * @param {Node} node The child node to be inserted - * @param {Node} refNode The child node the node is being inserted before - */ - "beforeinsert" : true - }); - this.listeners = this.attributes.listeners; - Ext.data.Node.superclass.constructor.call(this); - }, - - // private - fireEvent : function(evtName){ - // first do standard event for this node - if(Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false){ - return false; - } - // then bubble it up to the tree if the event wasn't cancelled - var ot = this.getOwnerTree(); - if(ot){ - if(ot.proxyNodeEvent.apply(ot, arguments) === false){ - return false; - } - } - return true; - }, - - /** - * Returns true if this node is a leaf - * @return {Boolean} - */ - isLeaf : function(){ - return this.leaf === true; - }, - - // private - setFirstChild : function(node){ - this.firstChild = node; - }, - - //private - setLastChild : function(node){ - this.lastChild = node; - }, - - - /** - * Returns true if this node is the last child of its parent - * @return {Boolean} - */ - isLast : function(){ - return (!this.parentNode ? true : this.parentNode.lastChild == this); - }, - - /** - * Returns true if this node is the first child of its parent - * @return {Boolean} - */ - isFirst : function(){ - return (!this.parentNode ? true : this.parentNode.firstChild == this); - }, - - /** - * Returns true if this node has one or more child nodes, else false. - * @return {Boolean} - */ - hasChildNodes : function(){ - return !this.isLeaf() && this.childNodes.length > 0; - }, - - /** - * Returns true if this node has one or more child nodes, or if the expandable - * node attribute is explicitly specified as true (see {@link #attributes}), otherwise returns false. - * @return {Boolean} - */ - isExpandable : function(){ - return this.attributes.expandable || this.hasChildNodes(); - }, - - /** - * Insert node(s) as the last child node of this node. - * @param {Node/Array} node The node or Array of nodes to append - * @return {Node} The appended node if single append, or null if an array was passed - */ - appendChild : function(node){ - var multi = false; - if(Ext.isArray(node)){ - multi = node; - }else if(arguments.length > 1){ - multi = arguments; - } - // if passed an array or multiple args do them one by one - if(multi){ - for(var i = 0, len = multi.length; i < len; i++) { - this.appendChild(multi[i]); - } - }else{ - if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){ - return false; - } - var index = this.childNodes.length; - var oldParent = node.parentNode; - // it's a move, make sure we move it cleanly - if(oldParent){ - if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){ - return false; - } - oldParent.removeChild(node); - } - index = this.childNodes.length; - if(index === 0){ - this.setFirstChild(node); - } - this.childNodes.push(node); - node.parentNode = this; - var ps = this.childNodes[index-1]; - if(ps){ - node.previousSibling = ps; - ps.nextSibling = node; - }else{ - node.previousSibling = null; - } - node.nextSibling = null; - this.setLastChild(node); - node.setOwnerTree(this.getOwnerTree()); - this.fireEvent("append", this.ownerTree, this, node, index); - if(oldParent){ - node.fireEvent("move", this.ownerTree, node, oldParent, this, index); - } - return node; - } - }, - - /** - * Removes a child node from this node. - * @param {Node} node The node to remove - * @param {Boolean} destroy true to destroy the node upon removal. Defaults to false. - * @return {Node} The removed node - */ - removeChild : function(node, destroy){ - var index = this.childNodes.indexOf(node); - if(index == -1){ - return false; - } - if(this.fireEvent("beforeremove", this.ownerTree, this, node) === false){ - return false; - } - - // remove it from childNodes collection - this.childNodes.splice(index, 1); - - // update siblings - if(node.previousSibling){ - node.previousSibling.nextSibling = node.nextSibling; - } - if(node.nextSibling){ - node.nextSibling.previousSibling = node.previousSibling; - } - - // update child refs - if(this.firstChild == node){ - this.setFirstChild(node.nextSibling); - } - if(this.lastChild == node){ - this.setLastChild(node.previousSibling); - } - - this.fireEvent("remove", this.ownerTree, this, node); - if(destroy){ - node.destroy(true); - }else{ - node.clear(); - } - return node; - }, - - // private - clear : function(destroy){ - // clear any references from the node - this.setOwnerTree(null, destroy); - this.parentNode = this.previousSibling = this.nextSibling = null; - if(destroy){ - this.firstChild = this.lastChild = null; - } - }, - - /** - * Destroys the node. - */ - destroy : function(/* private */ silent){ - /* - * Silent is to be used in a number of cases - * 1) When setRootNode is called. - * 2) When destroy on the tree is called - * 3) For destroying child nodes on a node - */ - if(silent === true){ - this.purgeListeners(); - this.clear(true); - Ext.each(this.childNodes, function(n){ - n.destroy(true); - }); - this.childNodes = null; - }else{ - this.remove(true); - } - }, - - /** - * Inserts the first node before the second node in this nodes childNodes collection. - * @param {Node} node The node to insert - * @param {Node} refNode The node to insert before (if null the node is appended) - * @return {Node} The inserted node - */ - insertBefore : function(node, refNode){ - if(!refNode){ // like standard Dom, refNode can be null for append - return this.appendChild(node); - } - // nothing to do - if(node == refNode){ - return false; - } - - if(this.fireEvent("beforeinsert", this.ownerTree, this, node, refNode) === false){ - return false; - } - var index = this.childNodes.indexOf(refNode); - var oldParent = node.parentNode; - var refIndex = index; - - // when moving internally, indexes will change after remove - if(oldParent == this && this.childNodes.indexOf(node) < index){ - refIndex--; - } - - // it's a move, make sure we move it cleanly - if(oldParent){ - if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index, refNode) === false){ - return false; - } - oldParent.removeChild(node); - } - if(refIndex === 0){ - this.setFirstChild(node); - } - this.childNodes.splice(refIndex, 0, node); - node.parentNode = this; - var ps = this.childNodes[refIndex-1]; - if(ps){ - node.previousSibling = ps; - ps.nextSibling = node; - }else{ - node.previousSibling = null; - } - node.nextSibling = refNode; - refNode.previousSibling = node; - node.setOwnerTree(this.getOwnerTree()); - this.fireEvent("insert", this.ownerTree, this, node, refNode); - if(oldParent){ - node.fireEvent("move", this.ownerTree, node, oldParent, this, refIndex, refNode); - } - return node; - }, - - /** - * Removes this node from its parent - * @param {Boolean} destroy true to destroy the node upon removal. Defaults to false. - * @return {Node} this - */ - remove : function(destroy){ - if (this.parentNode) { - this.parentNode.removeChild(this, destroy); - } - return this; - }, - - /** - * Removes all child nodes from this node. - * @param {Boolean} destroy true to destroy the node upon removal. Defaults to false. - * @return {Node} this - */ - removeAll : function(destroy){ - var cn = this.childNodes, - n; - while((n = cn[0])){ - this.removeChild(n, destroy); - } - return this; - }, - - /** - * Returns the child node at the specified index. - * @param {Number} index - * @return {Node} - */ - item : function(index){ - return this.childNodes[index]; - }, - - /** - * Replaces one child node in this node with another. - * @param {Node} newChild The replacement node - * @param {Node} oldChild The node to replace - * @return {Node} The replaced node - */ - replaceChild : function(newChild, oldChild){ - var s = oldChild ? oldChild.nextSibling : null; - this.removeChild(oldChild); - this.insertBefore(newChild, s); - return oldChild; - }, - - /** - * Returns the index of a child node - * @param {Node} node - * @return {Number} The index of the node or -1 if it was not found - */ - indexOf : function(child){ - return this.childNodes.indexOf(child); - }, - - /** - * Returns the tree this node is in. - * @return {Tree} - */ - getOwnerTree : function(){ - // if it doesn't have one, look for one - if(!this.ownerTree){ - var p = this; - while(p){ - if(p.ownerTree){ - this.ownerTree = p.ownerTree; - break; - } - p = p.parentNode; - } - } - return this.ownerTree; - }, - - /** - * Returns depth of this node (the root node has a depth of 0) - * @return {Number} - */ - getDepth : function(){ - var depth = 0; - var p = this; - while(p.parentNode){ - ++depth; - p = p.parentNode; - } - return depth; - }, - - // private - setOwnerTree : function(tree, destroy){ - // if it is a move, we need to update everyone - if(tree != this.ownerTree){ - if(this.ownerTree){ - this.ownerTree.unregisterNode(this); - } - this.ownerTree = tree; - // If we're destroying, we don't need to recurse since it will be called on each child node - if(destroy !== true){ - Ext.each(this.childNodes, function(n){ - n.setOwnerTree(tree); - }); - } - if(tree){ - tree.registerNode(this); - } - } - }, - - /** - * Changes the id of this node. - * @param {String} id The new id for the node. - */ - setId: function(id){ - if(id !== this.id){ - var t = this.ownerTree; - if(t){ - t.unregisterNode(this); - } - this.id = this.attributes.id = id; - if(t){ - t.registerNode(this); - } - this.onIdChange(id); - } - }, - - // private - onIdChange: Ext.emptyFn, - - /** - * Returns the path for this node. The path can be used to expand or select this node programmatically. - * @param {String} attr (optional) The attr to use for the path (defaults to the node's id) - * @return {String} The path - */ - getPath : function(attr){ - attr = attr || "id"; - var p = this.parentNode; - var b = [this.attributes[attr]]; - while(p){ - b.unshift(p.attributes[attr]); - p = p.parentNode; - } - var sep = this.getOwnerTree().pathSeparator; - return sep + b.join(sep); - }, - - /** - * Bubbles up the tree from this node, calling the specified function with each node. The arguments to the function - * will be the args provided or the current node. If the function returns false at any point, - * the bubble is stopped. - * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the current Node. - * @param {Array} args (optional) The args to call the function with (default to passing the current Node) - */ - bubble : function(fn, scope, args){ - var p = this; - while(p){ - if(fn.apply(scope || p, args || [p]) === false){ - break; - } - p = p.parentNode; - } - }, - - /** - * Cascades down the tree from this node, calling the specified function with each node. The arguments to the function - * will be the args provided or the current node. If the function returns false at any point, - * the cascade is stopped on that branch. - * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the current Node. - * @param {Array} args (optional) The args to call the function with (default to passing the current Node) - */ - cascade : function(fn, scope, args){ - if(fn.apply(scope || this, args || [this]) !== false){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].cascade(fn, scope, args); - } - } - }, - - /** - * Interates the child nodes of this node, calling the specified function with each node. The arguments to the function - * will be the args provided or the current node. If the function returns false at any point, - * the iteration stops. - * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the current Node in the iteration. - * @param {Array} args (optional) The args to call the function with (default to passing the current Node) - */ - eachChild : function(fn, scope, args){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - if(fn.apply(scope || cs[i], args || [cs[i]]) === false){ - break; - } - } - }, - - /** - * Finds the first child that has the attribute with the specified value. - * @param {String} attribute The attribute name - * @param {Mixed} value The value to search for - * @param {Boolean} deep (Optional) True to search through nodes deeper than the immediate children - * @return {Node} The found child or null if none was found - */ - findChild : function(attribute, value, deep){ - return this.findChildBy(function(){ - return this.attributes[attribute] == value; - }, null, deep); - }, - - /** - * Finds the first child by a custom function. The child matches if the function passed returns true. - * @param {Function} fn A function which must return true if the passed Node is the required Node. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the Node being tested. - * @param {Boolean} deep (Optional) True to search through nodes deeper than the immediate children - * @return {Node} The found child or null if none was found - */ - findChildBy : function(fn, scope, deep){ - var cs = this.childNodes, - len = cs.length, - i = 0, - n, - res; - for(; i < len; i++){ - n = cs[i]; - if(fn.call(scope || n, n) === true){ - return n; - }else if (deep){ - res = n.findChildBy(fn, scope, deep); - if(res != null){ - return res; - } - } - - } - return null; - }, - - /** - * Sorts this nodes children using the supplied sort function. - * @param {Function} fn A function which, when passed two Nodes, returns -1, 0 or 1 depending upon required sort order. - * @param {Object} scope (optional)The scope (this reference) in which the function is executed. Defaults to the browser window. - */ - sort : function(fn, scope){ - var cs = this.childNodes; - var len = cs.length; - if(len > 0){ - var sortFn = scope ? function(){fn.apply(scope, arguments);} : fn; - cs.sort(sortFn); - for(var i = 0; i < len; i++){ - var n = cs[i]; - n.previousSibling = cs[i-1]; - n.nextSibling = cs[i+1]; - if(i === 0){ - this.setFirstChild(n); - } - if(i == len-1){ - this.setLastChild(n); - } - } - } - }, - - /** - * Returns true if this node is an ancestor (at any point) of the passed node. - * @param {Node} node - * @return {Boolean} - */ - contains : function(node){ - return node.isAncestor(this); - }, - - /** - * Returns true if the passed node is an ancestor (at any point) of this node. - * @param {Node} node - * @return {Boolean} - */ - isAncestor : function(node){ - var p = this.parentNode; - while(p){ - if(p == node){ - return true; - } - p = p.parentNode; - } - return false; - }, - - toString : function(){ - return "[Node"+(this.id?" "+this.id:"")+"]"; - } -});/** - * @class Ext.tree.TreeNode - * @extends Ext.data.Node - * @cfg {String} text The text for this node - * @cfg {Boolean} expanded true to start the node expanded - * @cfg {Boolean} allowDrag False to make this node undraggable if {@link #draggable} = true (defaults to true) - * @cfg {Boolean} allowDrop False if this node cannot have child nodes dropped on it (defaults to true) - * @cfg {Boolean} disabled true to start the node disabled - * @cfg {String} icon The path to an icon for the node. The preferred way to do this - * is to use the cls or iconCls attributes and add the icon via a CSS background image. - * @cfg {String} cls A css class to be added to the node - * @cfg {String} iconCls A css class to be added to the nodes icon element for applying css background images - * @cfg {String} href URL of the link used for the node (defaults to #) - * @cfg {String} hrefTarget target frame for the link - * @cfg {Boolean} hidden True to render hidden. (Defaults to false). - * @cfg {String} qtip An Ext QuickTip for the node - * @cfg {Boolean} expandable If set to true, the node will always show a plus/minus icon, even when empty - * @cfg {String} qtipCfg An Ext QuickTip config for the node (used instead of qtip) - * @cfg {Boolean} singleClickExpand True for single click expand on this node - * @cfg {Function} uiProvider A UI class to use for this node (defaults to Ext.tree.TreeNodeUI) - * @cfg {Boolean} checked True to render a checked checkbox for this node, false to render an unchecked checkbox - * (defaults to undefined with no checkbox rendered) - * @cfg {Boolean} draggable True to make this node draggable (defaults to false) - * @cfg {Boolean} isTarget False to not allow this node to act as a drop target (defaults to true) - * @cfg {Boolean} allowChildren False to not allow this node to have child nodes (defaults to true) - * @cfg {Boolean} editable False to not allow this node to be edited by an {@link Ext.tree.TreeEditor} (defaults to true) - * @constructor - * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node - */ -Ext.tree.TreeNode = Ext.extend(Ext.data.Node, { - - constructor : function(attributes){ - attributes = attributes || {}; - if(Ext.isString(attributes)){ - attributes = {text: attributes}; - } - this.childrenRendered = false; - this.rendered = false; - Ext.tree.TreeNode.superclass.constructor.call(this, attributes); - this.expanded = attributes.expanded === true; - this.isTarget = attributes.isTarget !== false; - this.draggable = attributes.draggable !== false && attributes.allowDrag !== false; - this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false; - - /** - * Read-only. The text for this node. To change it use {@link #setText}. - * @type String - */ - this.text = attributes.text; - /** - * True if this node is disabled. - * @type Boolean - */ - this.disabled = attributes.disabled === true; - /** - * True if this node is hidden. - * @type Boolean - */ - this.hidden = attributes.hidden === true; - - this.addEvents( - /** - * @event textchange - * Fires when the text for this node is changed - * @param {Node} this This node - * @param {String} text The new text - * @param {String} oldText The old text - */ - 'textchange', - /** - * @event beforeexpand - * Fires before this node is expanded, return false to cancel. - * @param {Node} this This node - * @param {Boolean} deep - * @param {Boolean} anim - */ - 'beforeexpand', - /** - * @event beforecollapse - * Fires before this node is collapsed, return false to cancel. - * @param {Node} this This node - * @param {Boolean} deep - * @param {Boolean} anim - */ - 'beforecollapse', - /** - * @event expand - * Fires when this node is expanded - * @param {Node} this This node - */ - 'expand', - /** - * @event disabledchange - * Fires when the disabled status of this node changes - * @param {Node} this This node - * @param {Boolean} disabled - */ - 'disabledchange', - /** - * @event collapse - * Fires when this node is collapsed - * @param {Node} this This node - */ - 'collapse', - /** - * @event beforeclick - * Fires before click processing. Return false to cancel the default action. - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'beforeclick', - /** - * @event click - * Fires when this node is clicked - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'click', - /** - * @event checkchange - * Fires when a node with a checkbox's checked property changes - * @param {Node} this This node - * @param {Boolean} checked - */ - 'checkchange', - /** - * @event beforedblclick - * Fires before double click processing. Return false to cancel the default action. - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'beforedblclick', - /** - * @event dblclick - * Fires when this node is double clicked - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'dblclick', - /** - * @event contextmenu - * Fires when this node is right clicked - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'contextmenu', - /** - * @event beforechildrenrendered - * Fires right before the child nodes for this node are rendered - * @param {Node} this This node - */ - 'beforechildrenrendered' - ); - - var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI; - - /** - * Read-only. The UI for this node - * @type TreeNodeUI - */ - this.ui = new uiClass(this); - }, - - preventHScroll : true, - /** - * Returns true if this node is expanded - * @return {Boolean} - */ - isExpanded : function(){ - return this.expanded; - }, - -/** - * Returns the UI object for this node. - * @return {TreeNodeUI} The object which is providing the user interface for this tree - * node. Unless otherwise specified in the {@link #uiProvider}, this will be an instance - * of {@link Ext.tree.TreeNodeUI} - */ - getUI : function(){ - return this.ui; - }, - - getLoader : function(){ - var owner; - return this.loader || ((owner = this.getOwnerTree()) && owner.loader ? owner.loader : (this.loader = new Ext.tree.TreeLoader())); - }, - - // private override - setFirstChild : function(node){ - var of = this.firstChild; - Ext.tree.TreeNode.superclass.setFirstChild.call(this, node); - if(this.childrenRendered && of && node != of){ - of.renderIndent(true, true); - } - if(this.rendered){ - this.renderIndent(true, true); - } - }, - - // private override - setLastChild : function(node){ - var ol = this.lastChild; - Ext.tree.TreeNode.superclass.setLastChild.call(this, node); - if(this.childrenRendered && ol && node != ol){ - ol.renderIndent(true, true); - } - if(this.rendered){ - this.renderIndent(true, true); - } - }, - - // these methods are overridden to provide lazy rendering support - // private override - appendChild : function(n){ - if(!n.render && !Ext.isArray(n)){ - n = this.getLoader().createNode(n); - } - var node = Ext.tree.TreeNode.superclass.appendChild.call(this, n); - if(node && this.childrenRendered){ - node.render(); - } - this.ui.updateExpandIcon(); - return node; - }, - - // private override - removeChild : function(node, destroy){ - this.ownerTree.getSelectionModel().unselect(node); - Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments); - // only update the ui if we're not destroying - if(!destroy){ - var rendered = node.ui.rendered; - // if it's been rendered remove dom node - if(rendered){ - node.ui.remove(); - } - if(rendered && this.childNodes.length < 1){ - this.collapse(false, false); - }else{ - this.ui.updateExpandIcon(); - } - if(!this.firstChild && !this.isHiddenRoot()){ - this.childrenRendered = false; - } - } - return node; - }, - - // private override - insertBefore : function(node, refNode){ - if(!node.render){ - node = this.getLoader().createNode(node); - } - var newNode = Ext.tree.TreeNode.superclass.insertBefore.call(this, node, refNode); - if(newNode && refNode && this.childrenRendered){ - node.render(); - } - this.ui.updateExpandIcon(); - return newNode; - }, - - /** - * Sets the text for this node - * @param {String} text - */ - setText : function(text){ - var oldText = this.text; - this.text = this.attributes.text = text; - if(this.rendered){ // event without subscribing - this.ui.onTextChange(this, text, oldText); - } - this.fireEvent('textchange', this, text, oldText); - }, - - /** - * Sets the icon class for this node. - * @param {String} cls - */ - setIconCls : function(cls){ - var old = this.attributes.iconCls; - this.attributes.iconCls = cls; - if(this.rendered){ - this.ui.onIconClsChange(this, cls, old); - } - }, - - /** - * Sets the tooltip for this node. - * @param {String} tip The text for the tip - * @param {String} title (Optional) The title for the tip - */ - setTooltip : function(tip, title){ - this.attributes.qtip = tip; - this.attributes.qtipTitle = title; - if(this.rendered){ - this.ui.onTipChange(this, tip, title); - } - }, - - /** - * Sets the icon for this node. - * @param {String} icon - */ - setIcon : function(icon){ - this.attributes.icon = icon; - if(this.rendered){ - this.ui.onIconChange(this, icon); - } - }, - - /** - * Sets the href for the node. - * @param {String} href The href to set - * @param {String} (Optional) target The target of the href - */ - setHref : function(href, target){ - this.attributes.href = href; - this.attributes.hrefTarget = target; - if(this.rendered){ - this.ui.onHrefChange(this, href, target); - } - }, - - /** - * Sets the class on this node. - * @param {String} cls - */ - setCls : function(cls){ - var old = this.attributes.cls; - this.attributes.cls = cls; - if(this.rendered){ - this.ui.onClsChange(this, cls, old); - } - }, - - /** - * Triggers selection of this node - */ - select : function(){ - var t = this.getOwnerTree(); - if(t){ - t.getSelectionModel().select(this); - } - }, - - /** - * Triggers deselection of this node - * @param {Boolean} silent (optional) True to stop selection change events from firing. - */ - unselect : function(silent){ - var t = this.getOwnerTree(); - if(t){ - t.getSelectionModel().unselect(this, silent); - } - }, - - /** - * Returns true if this node is selected - * @return {Boolean} - */ - isSelected : function(){ - var t = this.getOwnerTree(); - return t ? t.getSelectionModel().isSelected(this) : false; - }, - - /** - * Expand this node. - * @param {Boolean} deep (optional) True to expand all children as well - * @param {Boolean} anim (optional) false to cancel the default animation - * @param {Function} callback (optional) A callback to be called when - * expanding this node completes (does not wait for deep expand to complete). - * Called with 1 parameter, this node. - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to this TreeNode. - */ - expand : function(deep, anim, callback, scope){ - if(!this.expanded){ - if(this.fireEvent('beforeexpand', this, deep, anim) === false){ - return; - } - if(!this.childrenRendered){ - this.renderChildren(); - } - this.expanded = true; - if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){ - this.ui.animExpand(function(){ - this.fireEvent('expand', this); - this.runCallback(callback, scope || this, [this]); - if(deep === true){ - this.expandChildNodes(true, true); - } - }.createDelegate(this)); - return; - }else{ - this.ui.expand(); - this.fireEvent('expand', this); - this.runCallback(callback, scope || this, [this]); - } - }else{ - this.runCallback(callback, scope || this, [this]); - } - if(deep === true){ - this.expandChildNodes(true); - } - }, - - runCallback : function(cb, scope, args){ - if(Ext.isFunction(cb)){ - cb.apply(scope, args); - } - }, - - isHiddenRoot : function(){ - return this.isRoot && !this.getOwnerTree().rootVisible; - }, - - /** - * Collapse this node. - * @param {Boolean} deep (optional) True to collapse all children as well - * @param {Boolean} anim (optional) false to cancel the default animation - * @param {Function} callback (optional) A callback to be called when - * expanding this node completes (does not wait for deep expand to complete). - * Called with 1 parameter, this node. - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to this TreeNode. - */ - collapse : function(deep, anim, callback, scope){ - if(this.expanded && !this.isHiddenRoot()){ - if(this.fireEvent('beforecollapse', this, deep, anim) === false){ - return; - } - this.expanded = false; - if((this.getOwnerTree().animate && anim !== false) || anim){ - this.ui.animCollapse(function(){ - this.fireEvent('collapse', this); - this.runCallback(callback, scope || this, [this]); - if(deep === true){ - this.collapseChildNodes(true); - } - }.createDelegate(this)); - return; - }else{ - this.ui.collapse(); - this.fireEvent('collapse', this); - this.runCallback(callback, scope || this, [this]); - } - }else if(!this.expanded){ - this.runCallback(callback, scope || this, [this]); - } - if(deep === true){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].collapse(true, false); - } - } - }, - - // private - delayedExpand : function(delay){ - if(!this.expandProcId){ - this.expandProcId = this.expand.defer(delay, this); - } - }, - - // private - cancelExpand : function(){ - if(this.expandProcId){ - clearTimeout(this.expandProcId); - } - this.expandProcId = false; - }, - - /** - * Toggles expanded/collapsed state of the node - */ - toggle : function(){ - if(this.expanded){ - this.collapse(); - }else{ - this.expand(); - } - }, - - /** - * Ensures all parent nodes are expanded, and if necessary, scrolls - * the node into view. - * @param {Function} callback (optional) A function to call when the node has been made visible. - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to this TreeNode. - */ - ensureVisible : function(callback, scope){ - var tree = this.getOwnerTree(); - tree.expandPath(this.parentNode ? this.parentNode.getPath() : this.getPath(), false, function(){ - var node = tree.getNodeById(this.id); // Somehow if we don't do this, we lose changes that happened to node in the meantime - tree.getTreeEl().scrollChildIntoView(node.ui.anchor); - this.runCallback(callback, scope || this, [this]); - }.createDelegate(this)); - }, - - /** - * Expand all child nodes - * @param {Boolean} deep (optional) true if the child nodes should also expand their child nodes - */ - expandChildNodes : function(deep, anim) { - var cs = this.childNodes, - i, - len = cs.length; - for (i = 0; i < len; i++) { - cs[i].expand(deep, anim); - } - }, - - /** - * Collapse all child nodes - * @param {Boolean} deep (optional) true if the child nodes should also collapse their child nodes - */ - collapseChildNodes : function(deep){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].collapse(deep); - } - }, - - /** - * Disables this node - */ - disable : function(){ - this.disabled = true; - this.unselect(); - if(this.rendered && this.ui.onDisableChange){ // event without subscribing - this.ui.onDisableChange(this, true); - } - this.fireEvent('disabledchange', this, true); - }, - - /** - * Enables this node - */ - enable : function(){ - this.disabled = false; - if(this.rendered && this.ui.onDisableChange){ // event without subscribing - this.ui.onDisableChange(this, false); - } - this.fireEvent('disabledchange', this, false); - }, - - // private - renderChildren : function(suppressEvent){ - if(suppressEvent !== false){ - this.fireEvent('beforechildrenrendered', this); - } - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].render(true); - } - this.childrenRendered = true; - }, - - // private - sort : function(fn, scope){ - Ext.tree.TreeNode.superclass.sort.apply(this, arguments); - if(this.childrenRendered){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].render(true); - } - } - }, - - // private - render : function(bulkRender){ - this.ui.render(bulkRender); - if(!this.rendered){ - // make sure it is registered - this.getOwnerTree().registerNode(this); - this.rendered = true; - if(this.expanded){ - this.expanded = false; - this.expand(false, false); - } - } - }, - - // private - renderIndent : function(deep, refresh){ - if(refresh){ - this.ui.childIndent = null; - } - this.ui.renderIndent(); - if(deep === true && this.childrenRendered){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].renderIndent(true, refresh); - } - } - }, - - beginUpdate : function(){ - this.childrenRendered = false; - }, - - endUpdate : function(){ - if(this.expanded && this.rendered){ - this.renderChildren(); - } - }, - - //inherit docs - destroy : function(silent){ - if(silent === true){ - this.unselect(true); - } - Ext.tree.TreeNode.superclass.destroy.call(this, silent); - Ext.destroy(this.ui, this.loader); - this.ui = this.loader = null; - }, - - // private - onIdChange : function(id){ - this.ui.onIdChange(id); - } -}); - -Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;/** - * @class Ext.tree.AsyncTreeNode - * @extends Ext.tree.TreeNode - * @cfg {TreeLoader} loader A TreeLoader to be used by this node (defaults to the loader defined on the tree) - * @constructor - * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node - */ - Ext.tree.AsyncTreeNode = function(config){ - this.loaded = config && config.loaded === true; - this.loading = false; - Ext.tree.AsyncTreeNode.superclass.constructor.apply(this, arguments); - /** - * @event beforeload - * Fires before this node is loaded, return false to cancel - * @param {Node} this This node - */ - this.addEvents('beforeload', 'load'); - /** - * @event load - * Fires when this node is loaded - * @param {Node} this This node - */ - /** - * The loader used by this node (defaults to using the tree's defined loader) - * @type TreeLoader - * @property loader - */ -}; -Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, { - expand : function(deep, anim, callback, scope){ - if(this.loading){ // if an async load is already running, waiting til it's done - var timer; - var f = function(){ - if(!this.loading){ // done loading - clearInterval(timer); - this.expand(deep, anim, callback, scope); - } - }.createDelegate(this); - timer = setInterval(f, 200); - return; - } - if(!this.loaded){ - if(this.fireEvent("beforeload", this) === false){ - return; - } - this.loading = true; - this.ui.beforeLoad(this); - var loader = this.loader || this.attributes.loader || this.getOwnerTree().getLoader(); - if(loader){ - loader.load(this, this.loadComplete.createDelegate(this, [deep, anim, callback, scope]), this); - return; - } - } - Ext.tree.AsyncTreeNode.superclass.expand.call(this, deep, anim, callback, scope); - }, - - /** - * Returns true if this node is currently loading - * @return {Boolean} - */ - isLoading : function(){ - return this.loading; - }, - - loadComplete : function(deep, anim, callback, scope){ - this.loading = false; - this.loaded = true; - this.ui.afterLoad(this); - this.fireEvent("load", this); - this.expand(deep, anim, callback, scope); - }, - - /** - * Returns true if this node has been loaded - * @return {Boolean} - */ - isLoaded : function(){ - return this.loaded; - }, - - hasChildNodes : function(){ - if(!this.isLeaf() && !this.loaded){ - return true; - }else{ - return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this); - } - }, - - /** - * Trigger a reload for this node - * @param {Function} callback - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to this Node. - */ - reload : function(callback, scope){ - this.collapse(false, false); - while(this.firstChild){ - this.removeChild(this.firstChild).destroy(); - } - this.childrenRendered = false; - this.loaded = false; - if(this.isHiddenRoot()){ - this.expanded = false; - } - this.expand(false, false, callback, scope); - } -}); - -Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode;/** - * @class Ext.tree.TreeNodeUI - * This class provides the default UI implementation for Ext TreeNodes. - * The TreeNode UI implementation is separate from the - * tree implementation, and allows customizing of the appearance of - * tree nodes.
      - *

      - * If you are customizing the Tree's user interface, you - * may need to extend this class, but you should never need to instantiate this class.
      - *

      - * This class provides access to the user interface components of an Ext TreeNode, through - * {@link Ext.tree.TreeNode#getUI} - */ -Ext.tree.TreeNodeUI = Ext.extend(Object, { - - constructor : function(node){ - Ext.apply(this, { - node: node, - rendered: false, - animating: false, - wasLeaf: true, - ecc: 'x-tree-ec-icon x-tree-elbow', - emptyIcon: Ext.BLANK_IMAGE_URL - }); - }, - - // private - removeChild : function(node){ - if(this.rendered){ - this.ctNode.removeChild(node.ui.getEl()); - } - }, - - // private - beforeLoad : function(){ - this.addClass("x-tree-node-loading"); - }, - - // private - afterLoad : function(){ - this.removeClass("x-tree-node-loading"); - }, - - // private - onTextChange : function(node, text, oldText){ - if(this.rendered){ - this.textNode.innerHTML = text; - } - }, - - // private - onIconClsChange : function(node, cls, oldCls){ - if(this.rendered){ - Ext.fly(this.iconNode).replaceClass(oldCls, cls); - } - }, - - // private - onIconChange : function(node, icon){ - if(this.rendered){ - //'', - var empty = Ext.isEmpty(icon); - this.iconNode.src = empty ? this.emptyIcon : icon; - Ext.fly(this.iconNode)[empty ? 'removeClass' : 'addClass']('x-tree-node-inline-icon'); - } - }, - - // private - onTipChange : function(node, tip, title){ - if(this.rendered){ - var hasTitle = Ext.isDefined(title); - if(this.textNode.setAttributeNS){ - this.textNode.setAttributeNS("ext", "qtip", tip); - if(hasTitle){ - this.textNode.setAttributeNS("ext", "qtitle", title); - } - }else{ - this.textNode.setAttribute("ext:qtip", tip); - if(hasTitle){ - this.textNode.setAttribute("ext:qtitle", title); - } - } - } - }, - - // private - onHrefChange : function(node, href, target){ - if(this.rendered){ - this.anchor.href = this.getHref(href); - if(Ext.isDefined(target)){ - this.anchor.target = target; - } - } - }, - - // private - onClsChange : function(node, cls, oldCls){ - if(this.rendered){ - Ext.fly(this.elNode).replaceClass(oldCls, cls); - } - }, - - // private - onDisableChange : function(node, state){ - this.disabled = state; - if (this.checkbox) { - this.checkbox.disabled = state; - } - this[state ? 'addClass' : 'removeClass']('x-tree-node-disabled'); - }, - - // private - onSelectedChange : function(state){ - if(state){ - this.focus(); - this.addClass("x-tree-selected"); - }else{ - //this.blur(); - this.removeClass("x-tree-selected"); - } - }, - - // private - onMove : function(tree, node, oldParent, newParent, index, refNode){ - this.childIndent = null; - if(this.rendered){ - var targetNode = newParent.ui.getContainer(); - if(!targetNode){//target not rendered - this.holder = document.createElement("div"); - this.holder.appendChild(this.wrap); - return; - } - var insertBefore = refNode ? refNode.ui.getEl() : null; - if(insertBefore){ - targetNode.insertBefore(this.wrap, insertBefore); - }else{ - targetNode.appendChild(this.wrap); - } - this.node.renderIndent(true, oldParent != newParent); - } - }, - -/** - * Adds one or more CSS classes to the node's UI element. - * Duplicate classes are automatically filtered out. - * @param {String/Array} className The CSS class to add, or an array of classes - */ - addClass : function(cls){ - if(this.elNode){ - Ext.fly(this.elNode).addClass(cls); - } - }, - -/** - * Removes one or more CSS classes from the node's UI element. - * @param {String/Array} className The CSS class to remove, or an array of classes - */ - removeClass : function(cls){ - if(this.elNode){ - Ext.fly(this.elNode).removeClass(cls); - } - }, - - // private - remove : function(){ - if(this.rendered){ - this.holder = document.createElement("div"); - this.holder.appendChild(this.wrap); - } - }, - - // private - fireEvent : function(){ - return this.node.fireEvent.apply(this.node, arguments); - }, - - // private - initEvents : function(){ - this.node.on("move", this.onMove, this); - - if(this.node.disabled){ - this.onDisableChange(this.node, true); - } - if(this.node.hidden){ - this.hide(); - } - var ot = this.node.getOwnerTree(); - var dd = ot.enableDD || ot.enableDrag || ot.enableDrop; - if(dd && (!this.node.isRoot || ot.rootVisible)){ - Ext.dd.Registry.register(this.elNode, { - node: this.node, - handles: this.getDDHandles(), - isHandle: false - }); - } - }, - - // private - getDDHandles : function(){ - return [this.iconNode, this.textNode, this.elNode]; - }, - -/** - * Hides this node. - */ - hide : function(){ - this.node.hidden = true; - if(this.wrap){ - this.wrap.style.display = "none"; - } - }, - -/** - * Shows this node. - */ - show : function(){ - this.node.hidden = false; - if(this.wrap){ - this.wrap.style.display = ""; - } - }, - - // private - onContextMenu : function(e){ - if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu")) { - e.preventDefault(); - this.focus(); - this.fireEvent("contextmenu", this.node, e); - } - }, - - // private - onClick : function(e){ - if(this.dropping){ - e.stopEvent(); - return; - } - if(this.fireEvent("beforeclick", this.node, e) !== false){ - var a = e.getTarget('a'); - if(!this.disabled && this.node.attributes.href && a){ - this.fireEvent("click", this.node, e); - return; - }else if(a && e.ctrlKey){ - e.stopEvent(); - } - e.preventDefault(); - if(this.disabled){ - return; - } - - if(this.node.attributes.singleClickExpand && !this.animating && this.node.isExpandable()){ - this.node.toggle(); - } - - this.fireEvent("click", this.node, e); - }else{ - e.stopEvent(); - } - }, - - // private - onDblClick : function(e){ - e.preventDefault(); - if(this.disabled){ - return; - } - if(this.fireEvent("beforedblclick", this.node, e) !== false){ - if(this.checkbox){ - this.toggleCheck(); - } - if(!this.animating && this.node.isExpandable()){ - this.node.toggle(); - } - this.fireEvent("dblclick", this.node, e); - } - }, - - onOver : function(e){ - this.addClass('x-tree-node-over'); - }, - - onOut : function(e){ - this.removeClass('x-tree-node-over'); - }, - - // private - onCheckChange : function(){ - var checked = this.checkbox.checked; - // fix for IE6 - this.checkbox.defaultChecked = checked; - this.node.attributes.checked = checked; - this.fireEvent('checkchange', this.node, checked); - }, - - // private - ecClick : function(e){ - if(!this.animating && this.node.isExpandable()){ - this.node.toggle(); - } - }, - - // private - startDrop : function(){ - this.dropping = true; - }, - - // delayed drop so the click event doesn't get fired on a drop - endDrop : function(){ - setTimeout(function(){ - this.dropping = false; - }.createDelegate(this), 50); - }, - - // private - expand : function(){ - this.updateExpandIcon(); - this.ctNode.style.display = ""; - }, - - // private - focus : function(){ - if(!this.node.preventHScroll){ - try{this.anchor.focus(); - }catch(e){} - }else{ - try{ - var noscroll = this.node.getOwnerTree().getTreeEl().dom; - var l = noscroll.scrollLeft; - this.anchor.focus(); - noscroll.scrollLeft = l; - }catch(e){} - } - }, - -/** - * Sets the checked status of the tree node to the passed value, or, if no value was passed, - * toggles the checked status. If the node was rendered with no checkbox, this has no effect. - * @param {Boolean} value (optional) The new checked status. - */ - toggleCheck : function(value){ - var cb = this.checkbox; - if(cb){ - cb.checked = (value === undefined ? !cb.checked : value); - this.onCheckChange(); - } - }, - - // private - blur : function(){ - try{ - this.anchor.blur(); - }catch(e){} - }, - - // private - animExpand : function(callback){ - var ct = Ext.get(this.ctNode); - ct.stopFx(); - if(!this.node.isExpandable()){ - this.updateExpandIcon(); - this.ctNode.style.display = ""; - Ext.callback(callback); - return; - } - this.animating = true; - this.updateExpandIcon(); - - ct.slideIn('t', { - callback : function(){ - this.animating = false; - Ext.callback(callback); - }, - scope: this, - duration: this.node.ownerTree.duration || .25 - }); - }, - - // private - highlight : function(){ - var tree = this.node.getOwnerTree(); - Ext.fly(this.wrap).highlight( - tree.hlColor || "C3DAF9", - {endColor: tree.hlBaseColor} - ); - }, - - // private - collapse : function(){ - this.updateExpandIcon(); - this.ctNode.style.display = "none"; - }, - - // private - animCollapse : function(callback){ - var ct = Ext.get(this.ctNode); - ct.enableDisplayMode('block'); - ct.stopFx(); - - this.animating = true; - this.updateExpandIcon(); - - ct.slideOut('t', { - callback : function(){ - this.animating = false; - Ext.callback(callback); - }, - scope: this, - duration: this.node.ownerTree.duration || .25 - }); - }, - - // private - getContainer : function(){ - return this.ctNode; - }, - -/** - * Returns the element which encapsulates this node. - * @return {HtmlElement} The DOM element. The default implementation uses a <li>. - */ - getEl : function(){ - return this.wrap; - }, - - // private - appendDDGhost : function(ghostNode){ - ghostNode.appendChild(this.elNode.cloneNode(true)); - }, - - // private - getDDRepairXY : function(){ - return Ext.lib.Dom.getXY(this.iconNode); - }, - - // private - onRender : function(){ - this.render(); - }, - - // private - render : function(bulkRender){ - var n = this.node, a = n.attributes; - var targetNode = n.parentNode ? - n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom; - - if(!this.rendered){ - this.rendered = true; - - this.renderElements(n, a, targetNode, bulkRender); - - if(a.qtip){ - this.onTipChange(n, a.qtip, a.qtipTitle); - }else if(a.qtipCfg){ - a.qtipCfg.target = Ext.id(this.textNode); - Ext.QuickTips.register(a.qtipCfg); - } - this.initEvents(); - if(!this.node.expanded){ - this.updateExpandIcon(true); - } - }else{ - if(bulkRender === true) { - targetNode.appendChild(this.wrap); - } - } - }, - - // private - renderElements : function(n, a, targetNode, bulkRender){ - // add some indent caching, this helps performance when rendering a large tree - this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : ''; - - var cb = Ext.isBoolean(a.checked), - nel, - href = this.getHref(a.href), - buf = ['

    • ', - '',this.indentMarkup,"", - '', - '', - cb ? ('' : '/>')) : '', - '',n.text,"
      ", - '', - "
    • "].join(''); - - if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){ - this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf); - }else{ - this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf); - } - - this.elNode = this.wrap.childNodes[0]; - this.ctNode = this.wrap.childNodes[1]; - var cs = this.elNode.childNodes; - this.indentNode = cs[0]; - this.ecNode = cs[1]; - this.iconNode = cs[2]; - var index = 3; - if(cb){ - this.checkbox = cs[3]; - // fix for IE6 - this.checkbox.defaultChecked = this.checkbox.checked; - index++; - } - this.anchor = cs[index]; - this.textNode = cs[index].firstChild; - }, - - /** - * @private Gets a normalized href for the node. - * @param {String} href - */ - getHref : function(href){ - return Ext.isEmpty(href) ? (Ext.isGecko ? '' : '#') : href; - }, - -/** - * Returns the <a> element that provides focus for the node's UI. - * @return {HtmlElement} The DOM anchor element. - */ - getAnchor : function(){ - return this.anchor; - }, - -/** - * Returns the text node. - * @return {HtmlNode} The DOM text node. - */ - getTextEl : function(){ - return this.textNode; - }, - -/** - * Returns the icon <img> element. - * @return {HtmlElement} The DOM image element. - */ - getIconEl : function(){ - return this.iconNode; - }, - -/** - * Returns the checked status of the node. If the node was rendered with no - * checkbox, it returns false. - * @return {Boolean} The checked flag. - */ - isChecked : function(){ - return this.checkbox ? this.checkbox.checked : false; - }, - - // private - updateExpandIcon : function(){ - if(this.rendered){ - var n = this.node, - c1, - c2, - cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow", - hasChild = n.hasChildNodes(); - if(hasChild || n.attributes.expandable){ - if(n.expanded){ - cls += "-minus"; - c1 = "x-tree-node-collapsed"; - c2 = "x-tree-node-expanded"; - }else{ - cls += "-plus"; - c1 = "x-tree-node-expanded"; - c2 = "x-tree-node-collapsed"; - } - if(this.wasLeaf){ - this.removeClass("x-tree-node-leaf"); - this.wasLeaf = false; - } - if(this.c1 != c1 || this.c2 != c2){ - Ext.fly(this.elNode).replaceClass(c1, c2); - this.c1 = c1; this.c2 = c2; - } - }else{ - if(!this.wasLeaf){ - Ext.fly(this.elNode).replaceClass("x-tree-node-expanded", "x-tree-node-collapsed"); - delete this.c1; - delete this.c2; - this.wasLeaf = true; - } - } - var ecc = "x-tree-ec-icon "+cls; - if(this.ecc != ecc){ - this.ecNode.className = ecc; - this.ecc = ecc; - } - } - }, - - // private - onIdChange: function(id){ - if(this.rendered){ - this.elNode.setAttribute('ext:tree-node-id', id); - } - }, - - // private - getChildIndent : function(){ - if(!this.childIndent){ - var buf = [], - p = this.node; - while(p){ - if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){ - if(!p.isLast()) { - buf.unshift(''); - } else { - buf.unshift(''); - } - } - p = p.parentNode; - } - this.childIndent = buf.join(""); - } - return this.childIndent; - }, - - // private - renderIndent : function(){ - if(this.rendered){ - var indent = "", - p = this.node.parentNode; - if(p){ - indent = p.ui.getChildIndent(); - } - if(this.indentMarkup != indent){ // don't rerender if not required - this.indentNode.innerHTML = indent; - this.indentMarkup = indent; - } - this.updateExpandIcon(); - } - }, - - destroy : function(){ - if(this.elNode){ - Ext.dd.Registry.unregister(this.elNode.id); - } - - Ext.each(['textnode', 'anchor', 'checkbox', 'indentNode', 'ecNode', 'iconNode', 'elNode', 'ctNode', 'wrap', 'holder'], function(el){ - if(this[el]){ - Ext.fly(this[el]).remove(); - delete this[el]; - } - }, this); - delete this.node; - } -}); - -/** - * @class Ext.tree.RootTreeNodeUI - * This class provides the default UI implementation for root Ext TreeNodes. - * The RootTreeNode UI implementation allows customizing the appearance of the root tree node.
      - *

      - * If you are customizing the Tree's user interface, you - * may need to extend this class, but you should never need to instantiate this class.
      - */ -Ext.tree.RootTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, { - // private - render : function(){ - if(!this.rendered){ - var targetNode = this.node.ownerTree.innerCt.dom; - this.node.expanded = true; - targetNode.innerHTML = '

      '; - this.wrap = this.ctNode = targetNode.firstChild; - } - }, - collapse : Ext.emptyFn, - expand : Ext.emptyFn -});/** - * @class Ext.tree.TreeLoader - * @extends Ext.util.Observable - * A TreeLoader provides for lazy loading of an {@link Ext.tree.TreeNode}'s child - * nodes from a specified URL. The response must be a JavaScript Array definition - * whose elements are node definition objects. e.g.: - *
      
      -    [{
      -        id: 1,
      -        text: 'A leaf Node',
      -        leaf: true
      -    },{
      -        id: 2,
      -        text: 'A folder Node',
      -        children: [{
      -            id: 3,
      -            text: 'A child Node',
      -            leaf: true
      -        }]
      -   }]
      -
      - *

      - * A server request is sent, and child nodes are loaded only when a node is expanded. - * The loading node's id is passed to the server under the parameter name "node" to - * enable the server to produce the correct child nodes. - *

      - * To pass extra parameters, an event handler may be attached to the "beforeload" - * event, and the parameters specified in the TreeLoader's baseParams property: - *
      
      -    myTreeLoader.on("beforeload", function(treeLoader, node) {
      -        this.baseParams.category = node.attributes.category;
      -    }, this);
      -
      - * This would pass an HTTP parameter called "category" to the server containing - * the value of the Node's "category" attribute. - * @constructor - * Creates a new Treeloader. - * @param {Object} config A config object containing config properties. - */ -Ext.tree.TreeLoader = function(config){ - this.baseParams = {}; - Ext.apply(this, config); - - this.addEvents( - /** - * @event beforeload - * Fires before a network request is made to retrieve the Json text which specifies a node's children. - * @param {Object} This TreeLoader object. - * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded. - * @param {Object} callback The callback function specified in the {@link #load} call. - */ - "beforeload", - /** - * @event load - * Fires when the node has been successfuly loaded. - * @param {Object} This TreeLoader object. - * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded. - * @param {Object} response The response object containing the data from the server. - */ - "load", - /** - * @event loadexception - * Fires if the network request failed. - * @param {Object} This TreeLoader object. - * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded. - * @param {Object} response The response object containing the data from the server. - */ - "loadexception" - ); - Ext.tree.TreeLoader.superclass.constructor.call(this); - if(Ext.isString(this.paramOrder)){ - this.paramOrder = this.paramOrder.split(/[\s,|]/); - } -}; - -Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, { - /** - * @cfg {String} dataUrl The URL from which to request a Json string which - * specifies an array of node definition objects representing the child nodes - * to be loaded. - */ - /** - * @cfg {String} requestMethod The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}). - */ - /** - * @cfg {String} url Equivalent to {@link #dataUrl}. - */ - /** - * @cfg {Boolean} preloadChildren If set to true, the loader recursively loads "children" attributes when doing the first load on nodes. - */ - /** - * @cfg {Object} baseParams (optional) An object containing properties which - * specify HTTP parameters to be passed to each request for child nodes. - */ - /** - * @cfg {Object} baseAttrs (optional) An object containing attributes to be added to all nodes - * created by this loader. If the attributes sent by the server have an attribute in this object, - * they take priority. - */ - /** - * @cfg {Object} uiProviders (optional) An object containing properties which - * specify custom {@link Ext.tree.TreeNodeUI} implementations. If the optional - * uiProvider attribute of a returned child node is a string rather - * than a reference to a TreeNodeUI implementation, then that string value - * is used as a property name in the uiProviders object. - */ - uiProviders : {}, - - /** - * @cfg {Boolean} clearOnLoad (optional) Default to true. Remove previously existing - * child nodes before loading. - */ - clearOnLoad : true, - - /** - * @cfg {Array/String} paramOrder Defaults to undefined. Only used when using directFn. - * Specifies the params in the order in which they must be passed to the server-side Direct method - * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace, - * comma, or pipe. For example, - * any of the following would be acceptable:
      
      -nodeParameter: 'node',
      -paramOrder: ['param1','param2','param3']
      -paramOrder: 'node param1 param2 param3'
      -paramOrder: 'param1,node,param2,param3'
      -paramOrder: 'param1|param2|param|node'
      -     
      - */ - paramOrder: undefined, - - /** - * @cfg {Boolean} paramsAsHash Only used when using directFn. - * Send parameters as a collection of named arguments (defaults to false). Providing a - * {@link #paramOrder} nullifies this configuration. - */ - paramsAsHash: false, - - /** - * @cfg {String} nodeParameter The name of the parameter sent to the server which contains - * the identifier of the node. Defaults to 'node'. - */ - nodeParameter: 'node', - - /** - * @cfg {Function} directFn - * Function to call when executing a request. - */ - directFn : undefined, - - /** - * Load an {@link Ext.tree.TreeNode} from the URL specified in the constructor. - * This is called automatically when a node is expanded, but may be used to reload - * a node (or append new children if the {@link #clearOnLoad} option is false.) - * @param {Ext.tree.TreeNode} node - * @param {Function} callback Function to call after the node has been loaded. The - * function is passed the TreeNode which was requested to be loaded. - * @param {Object} scope The scope (this reference) in which the callback is executed. - * defaults to the loaded TreeNode. - */ - load : function(node, callback, scope){ - if(this.clearOnLoad){ - while(node.firstChild){ - node.removeChild(node.firstChild); - } - } - if(this.doPreload(node)){ // preloaded json children - this.runCallback(callback, scope || node, [node]); - }else if(this.directFn || this.dataUrl || this.url){ - this.requestData(node, callback, scope || node); - } - }, - - doPreload : function(node){ - if(node.attributes.children){ - if(node.childNodes.length < 1){ // preloaded? - var cs = node.attributes.children; - node.beginUpdate(); - for(var i = 0, len = cs.length; i < len; i++){ - var cn = node.appendChild(this.createNode(cs[i])); - if(this.preloadChildren){ - this.doPreload(cn); - } - } - node.endUpdate(); - } - return true; - } - return false; - }, - - getParams: function(node){ - var bp = Ext.apply({}, this.baseParams), - np = this.nodeParameter, - po = this.paramOrder; - - np && (bp[ np ] = node.id); - - if(this.directFn){ - var buf = [node.id]; - if(po){ - // reset 'buf' if the nodeParameter was included in paramOrder - if(np && po.indexOf(np) > -1){ - buf = []; - } - - for(var i = 0, len = po.length; i < len; i++){ - buf.push(bp[ po[i] ]); - } - }else if(this.paramsAsHash){ - buf = [bp]; - } - return buf; - }else{ - return bp; - } - }, - - requestData : function(node, callback, scope){ - if(this.fireEvent("beforeload", this, node, callback) !== false){ - if(this.directFn){ - var args = this.getParams(node); - args.push(this.processDirectResponse.createDelegate(this, [{callback: callback, node: node, scope: scope}], true)); - this.directFn.apply(window, args); - }else{ - this.transId = Ext.Ajax.request({ - method:this.requestMethod, - url: this.dataUrl||this.url, - success: this.handleResponse, - failure: this.handleFailure, - scope: this, - argument: {callback: callback, node: node, scope: scope}, - params: this.getParams(node) - }); - } - }else{ - // if the load is cancelled, make sure we notify - // the node that we are done - this.runCallback(callback, scope || node, []); - } - }, - - processDirectResponse: function(result, response, args){ - if(response.status){ - this.handleResponse({ - responseData: Ext.isArray(result) ? result : null, - responseText: result, - argument: args - }); - }else{ - this.handleFailure({ - argument: args - }); - } - }, - - // private - runCallback: function(cb, scope, args){ - if(Ext.isFunction(cb)){ - cb.apply(scope, args); - } - }, - - isLoading : function(){ - return !!this.transId; - }, - - abort : function(){ - if(this.isLoading()){ - Ext.Ajax.abort(this.transId); - } - }, - - /** - *

      Override this function for custom TreeNode node implementation, or to - * modify the attributes at creation time.

      - * Example:
      
      -new Ext.tree.TreePanel({
      -    ...
      -    loader: new Ext.tree.TreeLoader({
      -        url: 'dataUrl',
      -        createNode: function(attr) {
      -//          Allow consolidation consignments to have
      -//          consignments dropped into them.
      -            if (attr.isConsolidation) {
      -                attr.iconCls = 'x-consol',
      -                attr.allowDrop = true;
      -            }
      -            return Ext.tree.TreeLoader.prototype.createNode.call(this, attr);
      -        }
      -    }),
      -    ...
      -});
      -
      - * @param attr {Object} The attributes from which to create the new node. - */ - createNode : function(attr){ - // apply baseAttrs, nice idea Corey! - if(this.baseAttrs){ - Ext.applyIf(attr, this.baseAttrs); - } - if(this.applyLoader !== false && !attr.loader){ - attr.loader = this; - } - if(Ext.isString(attr.uiProvider)){ - attr.uiProvider = this.uiProviders[attr.uiProvider] || eval(attr.uiProvider); - } - if(attr.nodeType){ - return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr); - }else{ - return attr.leaf ? - new Ext.tree.TreeNode(attr) : - new Ext.tree.AsyncTreeNode(attr); - } - }, - - processResponse : function(response, node, callback, scope){ - var json = response.responseText; - try { - var o = response.responseData || Ext.decode(json); - node.beginUpdate(); - for(var i = 0, len = o.length; i < len; i++){ - var n = this.createNode(o[i]); - if(n){ - node.appendChild(n); - } - } - node.endUpdate(); - this.runCallback(callback, scope || node, [node]); - }catch(e){ - this.handleFailure(response); - } - }, - - handleResponse : function(response){ - this.transId = false; - var a = response.argument; - this.processResponse(response, a.node, a.callback, a.scope); - this.fireEvent("load", this, a.node, response); - }, - - handleFailure : function(response){ - this.transId = false; - var a = response.argument; - this.fireEvent("loadexception", this, a.node, response); - this.runCallback(a.callback, a.scope || a.node, [a.node]); - }, - - destroy : function(){ - this.abort(); - this.purgeListeners(); - } -});/** - * @class Ext.tree.TreeFilter - * Note this class is experimental and doesn't update the indent (lines) or expand collapse icons of the nodes - * @param {TreePanel} tree - * @param {Object} config (optional) - */ -Ext.tree.TreeFilter = function(tree, config){ - this.tree = tree; - this.filtered = {}; - Ext.apply(this, config); -}; - -Ext.tree.TreeFilter.prototype = { - clearBlank:false, - reverse:false, - autoClear:false, - remove:false, - - /** - * Filter the data by a specific attribute. - * @param {String/RegExp} value Either string that the attribute value - * should start with or a RegExp to test against the attribute - * @param {String} attr (optional) The attribute passed in your node's attributes collection. Defaults to "text". - * @param {TreeNode} startNode (optional) The node to start the filter at. - */ - filter : function(value, attr, startNode){ - attr = attr || "text"; - var f; - if(typeof value == "string"){ - var vlen = value.length; - // auto clear empty filter - if(vlen == 0 && this.clearBlank){ - this.clear(); - return; - } - value = value.toLowerCase(); - f = function(n){ - return n.attributes[attr].substr(0, vlen).toLowerCase() == value; - }; - }else if(value.exec){ // regex? - f = function(n){ - return value.test(n.attributes[attr]); - }; - }else{ - throw 'Illegal filter type, must be string or regex'; - } - this.filterBy(f, null, startNode); - }, - - /** - * Filter by a function. The passed function will be called with each - * node in the tree (or from the startNode). If the function returns true, the node is kept - * otherwise it is filtered. If a node is filtered, its children are also filtered. - * @param {Function} fn The filter function - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the current Node. - */ - filterBy : function(fn, scope, startNode){ - startNode = startNode || this.tree.root; - if(this.autoClear){ - this.clear(); - } - var af = this.filtered, rv = this.reverse; - var f = function(n){ - if(n == startNode){ - return true; - } - if(af[n.id]){ - return false; - } - var m = fn.call(scope || n, n); - if(!m || rv){ - af[n.id] = n; - n.ui.hide(); - return false; - } - return true; - }; - startNode.cascade(f); - if(this.remove){ - for(var id in af){ - if(typeof id != "function"){ - var n = af[id]; - if(n && n.parentNode){ - n.parentNode.removeChild(n); - } - } - } - } - }, - - /** - * Clears the current filter. Note: with the "remove" option - * set a filter cannot be cleared. - */ - clear : function(){ - var t = this.tree; - var af = this.filtered; - for(var id in af){ - if(typeof id != "function"){ - var n = af[id]; - if(n){ - n.ui.show(); - } - } - } - this.filtered = {}; - } -}; -/** - * @class Ext.tree.TreeSorter - * Provides sorting of nodes in a {@link Ext.tree.TreePanel}. The TreeSorter automatically monitors events on the - * associated TreePanel that might affect the tree's sort order (beforechildrenrendered, append, insert and textchange). - * Example usage:
      - *
      
      -new Ext.tree.TreeSorter(myTree, {
      -    folderSort: true,
      -    dir: "desc",
      -    sortType: function(node) {
      -        // sort by a custom, typed attribute:
      -        return parseInt(node.id, 10);
      -    }
      -});
      -
      - * @constructor - * @param {TreePanel} tree - * @param {Object} config - */ -Ext.tree.TreeSorter = Ext.extend(Object, { - - constructor: function(tree, config){ - /** - * @cfg {Boolean} folderSort True to sort leaf nodes under non-leaf nodes (defaults to false) - */ - /** - * @cfg {String} property The named attribute on the node to sort by (defaults to "text"). Note that this - * property is only used if no {@link #sortType} function is specified, otherwise it is ignored. - */ - /** - * @cfg {String} dir The direction to sort ("asc" or "desc," case-insensitive, defaults to "asc") - */ - /** - * @cfg {String} leafAttr The attribute used to determine leaf nodes when {@link #folderSort} = true (defaults to "leaf") - */ - /** - * @cfg {Boolean} caseSensitive true for case-sensitive sort (defaults to false) - */ - /** - * @cfg {Function} sortType A custom "casting" function used to convert node values before sorting. The function - * will be called with a single parameter (the {@link Ext.tree.TreeNode} being evaluated) and is expected to return - * the node's sort value cast to the specific data type required for sorting. This could be used, for example, when - * a node's text (or other attribute) should be sorted as a date or numeric value. See the class description for - * example usage. Note that if a sortType is specified, any {@link #property} config will be ignored. - */ - - Ext.apply(this, config); - tree.on({ - scope: this, - beforechildrenrendered: this.doSort, - append: this.updateSort, - insert: this.updateSort, - textchange: this.updateSortParent - }); - - var desc = this.dir && this.dir.toLowerCase() == 'desc', - prop = this.property || 'text', - sortType = this.sortType, - folderSort = this.folderSort, - caseSensitive = this.caseSensitive === true, - leafAttr = this.leafAttr || 'leaf'; - - if(Ext.isString(sortType)){ - sortType = Ext.data.SortTypes[sortType]; - } - this.sortFn = function(n1, n2){ - var attr1 = n1.attributes, - attr2 = n2.attributes; - - if(folderSort){ - if(attr1[leafAttr] && !attr2[leafAttr]){ - return 1; - } - if(!attr1[leafAttr] && attr2[leafAttr]){ - return -1; - } - } - var prop1 = attr1[prop], - prop2 = attr2[prop], - v1 = sortType ? sortType(prop1) : (caseSensitive ? prop1 : prop1.toUpperCase()), - v2 = sortType ? sortType(prop2) : (caseSensitive ? prop2 : prop2.toUpperCase()); - - if(v1 < v2){ - return desc ? 1 : -1; - }else if(v1 > v2){ - return desc ? -1 : 1; - } - return 0; - }; - }, - - doSort : function(node){ - node.sort(this.sortFn); - }, - - updateSort : function(tree, node){ - if(node.childrenRendered){ - this.doSort.defer(1, this, [node]); - } - }, - - updateSortParent : function(node){ - var p = node.parentNode; - if(p && p.childrenRendered){ - this.doSort.defer(1, this, [p]); - } - } -}); -/** - * @class Ext.tree.TreeDropZone - * @extends Ext.dd.DropZone - * @constructor - * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dropping - * @param {Object} config - */ -if(Ext.dd.DropZone){ - -Ext.tree.TreeDropZone = function(tree, config){ - /** - * @cfg {Boolean} allowParentInsert - * Allow inserting a dragged node between an expanded parent node and its first child that will become a - * sibling of the parent when dropped (defaults to false) - */ - this.allowParentInsert = config.allowParentInsert || false; - /** - * @cfg {String} allowContainerDrop - * True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false) - */ - this.allowContainerDrop = config.allowContainerDrop || false; - /** - * @cfg {String} appendOnly - * True if the tree should only allow append drops (use for trees which are sorted, defaults to false) - */ - this.appendOnly = config.appendOnly || false; - - Ext.tree.TreeDropZone.superclass.constructor.call(this, tree.getTreeEl(), config); - /** - * The TreePanel for this drop zone - * @type Ext.tree.TreePanel - * @property - */ - this.tree = tree; - /** - * Arbitrary data that can be associated with this tree and will be included in the event object that gets - * passed to any nodedragover event handler (defaults to {}) - * @type Ext.tree.TreePanel - * @property - */ - this.dragOverData = {}; - // private - this.lastInsertClass = "x-tree-no-status"; -}; - -Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, { - /** - * @cfg {String} ddGroup - * A named drag drop group to which this object belongs. If a group is specified, then this object will only - * interact with other drag drop objects in the same group (defaults to 'TreeDD'). - */ - ddGroup : "TreeDD", - - /** - * @cfg {String} expandDelay - * The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node - * over the target (defaults to 1000) - */ - expandDelay : 1000, - - // private - expandNode : function(node){ - if(node.hasChildNodes() && !node.isExpanded()){ - node.expand(false, null, this.triggerCacheRefresh.createDelegate(this)); - } - }, - - // private - queueExpand : function(node){ - this.expandProcId = this.expandNode.defer(this.expandDelay, this, [node]); - }, - - // private - cancelExpand : function(){ - if(this.expandProcId){ - clearTimeout(this.expandProcId); - this.expandProcId = false; - } - }, - - // private - isValidDropPoint : function(n, pt, dd, e, data){ - if(!n || !data){ return false; } - var targetNode = n.node; - var dropNode = data.node; - // default drop rules - if(!(targetNode && targetNode.isTarget && pt)){ - return false; - } - if(pt == "append" && targetNode.allowChildren === false){ - return false; - } - if((pt == "above" || pt == "below") && (targetNode.parentNode && targetNode.parentNode.allowChildren === false)){ - return false; - } - if(dropNode && (targetNode == dropNode || dropNode.contains(targetNode))){ - return false; - } - // reuse the object - var overEvent = this.dragOverData; - overEvent.tree = this.tree; - overEvent.target = targetNode; - overEvent.data = data; - overEvent.point = pt; - overEvent.source = dd; - overEvent.rawEvent = e; - overEvent.dropNode = dropNode; - overEvent.cancel = false; - var result = this.tree.fireEvent("nodedragover", overEvent); - return overEvent.cancel === false && result !== false; - }, - - // private - getDropPoint : function(e, n, dd){ - var tn = n.node; - if(tn.isRoot){ - return tn.allowChildren !== false ? "append" : false; // always append for root - } - var dragEl = n.ddel; - var t = Ext.lib.Dom.getY(dragEl), b = t + dragEl.offsetHeight; - var y = Ext.lib.Event.getPageY(e); - var noAppend = tn.allowChildren === false || tn.isLeaf(); - if(this.appendOnly || tn.parentNode.allowChildren === false){ - return noAppend ? false : "append"; - } - var noBelow = false; - if(!this.allowParentInsert){ - noBelow = tn.hasChildNodes() && tn.isExpanded(); - } - var q = (b - t) / (noAppend ? 2 : 3); - if(y >= t && y < (t + q)){ - return "above"; - }else if(!noBelow && (noAppend || y >= b-q && y <= b)){ - return "below"; - }else{ - return "append"; - } - }, - - // private - onNodeEnter : function(n, dd, e, data){ - this.cancelExpand(); - }, - - onContainerOver : function(dd, e, data) { - if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) { - return this.dropAllowed; - } - return this.dropNotAllowed; - }, - - // private - onNodeOver : function(n, dd, e, data){ - var pt = this.getDropPoint(e, n, dd); - var node = n.node; - - // auto node expand check - if(!this.expandProcId && pt == "append" && node.hasChildNodes() && !n.node.isExpanded()){ - this.queueExpand(node); - }else if(pt != "append"){ - this.cancelExpand(); - } - - // set the insert point style on the target node - var returnCls = this.dropNotAllowed; - if(this.isValidDropPoint(n, pt, dd, e, data)){ - if(pt){ - var el = n.ddel; - var cls; - if(pt == "above"){ - returnCls = n.node.isFirst() ? "x-tree-drop-ok-above" : "x-tree-drop-ok-between"; - cls = "x-tree-drag-insert-above"; - }else if(pt == "below"){ - returnCls = n.node.isLast() ? "x-tree-drop-ok-below" : "x-tree-drop-ok-between"; - cls = "x-tree-drag-insert-below"; - }else{ - returnCls = "x-tree-drop-ok-append"; - cls = "x-tree-drag-append"; - } - if(this.lastInsertClass != cls){ - Ext.fly(el).replaceClass(this.lastInsertClass, cls); - this.lastInsertClass = cls; - } - } - } - return returnCls; - }, - - // private - onNodeOut : function(n, dd, e, data){ - this.cancelExpand(); - this.removeDropIndicators(n); - }, - - // private - onNodeDrop : function(n, dd, e, data){ - var point = this.getDropPoint(e, n, dd); - var targetNode = n.node; - targetNode.ui.startDrop(); - if(!this.isValidDropPoint(n, point, dd, e, data)){ - targetNode.ui.endDrop(); - return false; - } - // first try to find the drop node - var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, point, e) : null); - return this.processDrop(targetNode, data, point, dd, e, dropNode); - }, - - onContainerDrop : function(dd, e, data){ - if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) { - var targetNode = this.tree.getRootNode(); - targetNode.ui.startDrop(); - var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, 'append', e) : null); - return this.processDrop(targetNode, data, 'append', dd, e, dropNode); - } - return false; - }, - - // private - processDrop: function(target, data, point, dd, e, dropNode){ - var dropEvent = { - tree : this.tree, - target: target, - data: data, - point: point, - source: dd, - rawEvent: e, - dropNode: dropNode, - cancel: !dropNode, - dropStatus: false - }; - var retval = this.tree.fireEvent("beforenodedrop", dropEvent); - if(retval === false || dropEvent.cancel === true || !dropEvent.dropNode){ - target.ui.endDrop(); - return dropEvent.dropStatus; - } - - target = dropEvent.target; - if(point == 'append' && !target.isExpanded()){ - target.expand(false, null, function(){ - this.completeDrop(dropEvent); - }.createDelegate(this)); - }else{ - this.completeDrop(dropEvent); - } - return true; - }, - - // private - completeDrop : function(de){ - var ns = de.dropNode, p = de.point, t = de.target; - if(!Ext.isArray(ns)){ - ns = [ns]; - } - var n; - for(var i = 0, len = ns.length; i < len; i++){ - n = ns[i]; - if(p == "above"){ - t.parentNode.insertBefore(n, t); - }else if(p == "below"){ - t.parentNode.insertBefore(n, t.nextSibling); - }else{ - t.appendChild(n); - } - } - n.ui.focus(); - if(Ext.enableFx && this.tree.hlDrop){ - n.ui.highlight(); - } - t.ui.endDrop(); - this.tree.fireEvent("nodedrop", de); - }, - - // private - afterNodeMoved : function(dd, data, e, targetNode, dropNode){ - if(Ext.enableFx && this.tree.hlDrop){ - dropNode.ui.focus(); - dropNode.ui.highlight(); - } - this.tree.fireEvent("nodedrop", this.tree, targetNode, data, dd, e); - }, - - // private - getTree : function(){ - return this.tree; - }, - - // private - removeDropIndicators : function(n){ - if(n && n.ddel){ - var el = n.ddel; - Ext.fly(el).removeClass([ - "x-tree-drag-insert-above", - "x-tree-drag-insert-below", - "x-tree-drag-append"]); - this.lastInsertClass = "_noclass"; - } - }, - - // private - beforeDragDrop : function(target, e, id){ - this.cancelExpand(); - return true; - }, - - // private - afterRepair : function(data){ - if(data && Ext.enableFx){ - data.node.ui.highlight(); - } - this.hideProxy(); - } -}); - -}/** - * @class Ext.tree.TreeDragZone - * @extends Ext.dd.DragZone - * @constructor - * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dragging - * @param {Object} config - */ -if(Ext.dd.DragZone){ -Ext.tree.TreeDragZone = function(tree, config){ - Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.innerCt, config); - /** - * The TreePanel for this drag zone - * @type Ext.tree.TreePanel - * @property - */ - this.tree = tree; -}; - -Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, { - /** - * @cfg {String} ddGroup - * A named drag drop group to which this object belongs. If a group is specified, then this object will only - * interact with other drag drop objects in the same group (defaults to 'TreeDD'). - */ - ddGroup : "TreeDD", - - // private - onBeforeDrag : function(data, e){ - var n = data.node; - return n && n.draggable && !n.disabled; - }, - - // private - onInitDrag : function(e){ - var data = this.dragData; - this.tree.getSelectionModel().select(data.node); - this.tree.eventModel.disable(); - this.proxy.update(""); - data.node.ui.appendDDGhost(this.proxy.ghost.dom); - this.tree.fireEvent("startdrag", this.tree, data.node, e); - }, - - // private - getRepairXY : function(e, data){ - return data.node.ui.getDDRepairXY(); - }, - - // private - onEndDrag : function(data, e){ - this.tree.eventModel.enable.defer(100, this.tree.eventModel); - this.tree.fireEvent("enddrag", this.tree, data.node, e); - }, - - // private - onValidDrop : function(dd, e, id){ - this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e); - this.hideProxy(); - }, - - // private - beforeInvalidDrop : function(e, id){ - // this scrolls the original position back into view - var sm = this.tree.getSelectionModel(); - sm.clearSelections(); - sm.select(this.dragData.node); - }, - - // private - afterRepair : function(){ - if (Ext.enableFx && this.tree.hlDrop) { - Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9"); - } - this.dragging = false; - } -}); -}/** - * @class Ext.tree.TreeEditor - * @extends Ext.Editor - * Provides editor functionality for inline tree node editing. Any valid {@link Ext.form.Field} subclass can be used - * as the editor field. - * @constructor - * @param {TreePanel} tree - * @param {Object} fieldConfig (optional) Either a prebuilt {@link Ext.form.Field} instance or a Field config object - * that will be applied to the default field instance (defaults to a {@link Ext.form.TextField}). - * @param {Object} config (optional) A TreeEditor config object - */ -Ext.tree.TreeEditor = function(tree, fc, config){ - fc = fc || {}; - var field = fc.events ? fc : new Ext.form.TextField(fc); - - Ext.tree.TreeEditor.superclass.constructor.call(this, field, config); - - this.tree = tree; - - if(!tree.rendered){ - tree.on('render', this.initEditor, this); - }else{ - this.initEditor(tree); - } -}; - -Ext.extend(Ext.tree.TreeEditor, Ext.Editor, { - /** - * @cfg {String} alignment - * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "l-l"). - */ - alignment: "l-l", - // inherit - autoSize: false, - /** - * @cfg {Boolean} hideEl - * True to hide the bound element while the editor is displayed (defaults to false) - */ - hideEl : false, - /** - * @cfg {String} cls - * CSS class to apply to the editor (defaults to "x-small-editor x-tree-editor") - */ - cls: "x-small-editor x-tree-editor", - /** - * @cfg {Boolean} shim - * True to shim the editor if selects/iframes could be displayed beneath it (defaults to false) - */ - shim:false, - // inherit - shadow:"frame", - /** - * @cfg {Number} maxWidth - * The maximum width in pixels of the editor field (defaults to 250). Note that if the maxWidth would exceed - * the containing tree element's size, it will be automatically limited for you to the container width, taking - * scroll and client offsets into account prior to each edit. - */ - maxWidth: 250, - /** - * @cfg {Number} editDelay The number of milliseconds between clicks to register a double-click that will trigger - * editing on the current node (defaults to 350). If two clicks occur on the same node within this time span, - * the editor for the node will display, otherwise it will be processed as a regular click. - */ - editDelay : 350, - - initEditor : function(tree){ - tree.on({ - scope : this, - beforeclick: this.beforeNodeClick, - dblclick : this.onNodeDblClick - }); - - this.on({ - scope : this, - complete : this.updateNode, - beforestartedit: this.fitToTree, - specialkey : this.onSpecialKey - }); - - this.on('startedit', this.bindScroll, this, {delay:10}); - }, - - // private - fitToTree : function(ed, el){ - var td = this.tree.getTreeEl().dom, nd = el.dom; - if(td.scrollLeft > nd.offsetLeft){ // ensure the node left point is visible - td.scrollLeft = nd.offsetLeft; - } - var w = Math.min( - this.maxWidth, - (td.clientWidth > 20 ? td.clientWidth : td.offsetWidth) - Math.max(0, nd.offsetLeft-td.scrollLeft) - /*cushion*/5); - this.setSize(w, ''); - }, - - /** - * Edit the text of the passed {@link Ext.tree.TreeNode TreeNode}. - * @param node {Ext.tree.TreeNode} The TreeNode to edit. The TreeNode must be {@link Ext.tree.TreeNode#editable editable}. - */ - triggerEdit : function(node, defer){ - this.completeEdit(); - if(node.attributes.editable !== false){ - /** - * The {@link Ext.tree.TreeNode TreeNode} this editor is bound to. Read-only. - * @type Ext.tree.TreeNode - * @property editNode - */ - this.editNode = node; - if(this.tree.autoScroll){ - Ext.fly(node.ui.getEl()).scrollIntoView(this.tree.body); - } - var value = node.text || ''; - if (!Ext.isGecko && Ext.isEmpty(node.text)){ - node.setText(' '); - } - this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, value]); - return false; - } - }, - - // private - bindScroll : function(){ - this.tree.getTreeEl().on('scroll', this.cancelEdit, this); - }, - - // private - beforeNodeClick : function(node, e){ - clearTimeout(this.autoEditTimer); - if(this.tree.getSelectionModel().isSelected(node)){ - e.stopEvent(); - return this.triggerEdit(node); - } - }, - - onNodeDblClick : function(node, e){ - clearTimeout(this.autoEditTimer); - }, - - // private - updateNode : function(ed, value){ - this.tree.getTreeEl().un('scroll', this.cancelEdit, this); - this.editNode.setText(value); - }, - - // private - onHide : function(){ - Ext.tree.TreeEditor.superclass.onHide.call(this); - if(this.editNode){ - this.editNode.ui.focus.defer(50, this.editNode.ui); - } - }, - - // private - onSpecialKey : function(field, e){ - var k = e.getKey(); - if(k == e.ESC){ - e.stopEvent(); - this.cancelEdit(); - }else if(k == e.ENTER && !e.hasModifier()){ - e.stopEvent(); - this.completeEdit(); - } - }, - - onDestroy : function(){ - clearTimeout(this.autoEditTimer); - Ext.tree.TreeEditor.superclass.onDestroy.call(this); - var tree = this.tree; - tree.un('beforeclick', this.beforeNodeClick, this); - tree.un('dblclick', this.onNodeDblClick, this); - } -}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tree.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tree.js deleted file mode 100644 index b7e5c364037..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-tree.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.tree.TreePanel=Ext.extend(Ext.Panel,{rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,pathSeparator:"/",bubbleEvents:[],initComponent:function(){Ext.tree.TreePanel.superclass.initComponent.call(this);if(!this.eventModel){this.eventModel=new Ext.tree.TreeEventModel(this)}var a=this.loader;if(!a){a=new Ext.tree.TreeLoader({dataUrl:this.dataUrl,requestMethod:this.requestMethod})}else{if(Ext.isObject(a)&&!a.load){a=new Ext.tree.TreeLoader(a)}}this.loader=a;this.nodeHash={};if(this.root){var b=this.root;delete this.root;this.setRootNode(b)}this.addEvents("append","remove","movenode","insert","beforeappend","beforeremove","beforemovenode","beforeinsert","beforeload","load","textchange","beforeexpandnode","beforecollapsenode","expandnode","disabledchange","collapsenode","beforeclick","click","containerclick","checkchange","beforedblclick","dblclick","containerdblclick","contextmenu","containercontextmenu","beforechildrenrendered","startdrag","enddrag","dragdrop","beforenodedrop","nodedrop","nodedragover");if(this.singleExpand){this.on("beforeexpandnode",this.restrictExpand,this)}},proxyNodeEvent:function(c,b,a,g,f,e,d){if(c=="collapse"||c=="expand"||c=="beforecollapse"||c=="beforeexpand"||c=="move"||c=="beforemove"){c=c+"node"}return this.fireEvent(c,b,a,g,f,e,d)},getRootNode:function(){return this.root},setRootNode:function(b){this.destroyRoot();if(!b.render){b=this.loader.createNode(b)}this.root=b;b.ownerTree=this;b.isRoot=true;this.registerNode(b);if(!this.rootVisible){var a=b.attributes.uiProvider;b.ui=a?new a(b):new Ext.tree.RootTreeNodeUI(b)}if(this.innerCt){this.clearInnerCt();this.renderRoot()}return b},clearInnerCt:function(){this.innerCt.update("")},renderRoot:function(){this.root.render();if(!this.rootVisible){this.root.renderChildren()}},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(a){this.nodeHash[a.id]=a},unregisterNode:function(a){delete this.nodeHash[a.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"},restrictExpand:function(a){var b=a.parentNode;if(b){if(b.expandedChild&&b.expandedChild.parentNode==b){b.expandedChild.collapse()}b.expandedChild=a}},getChecked:function(b,c){c=c||this.root;var d=[];var e=function(){if(this.attributes.checked){d.push(!b?this:(b=="id"?this.id:this.attributes[b]))}};c.cascade(e);return d},getLoader:function(){return this.loader},expandAll:function(){this.root.expand(true)},collapseAll:function(){this.root.collapse(true)},getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.tree.DefaultSelectionModel()}return this.selModel},expandPath:function(g,a,h){if(Ext.isEmpty(g)){if(h){h(false,undefined)}return}a=a||"id";var d=g.split(this.pathSeparator);var c=this.root;if(c.attributes[a]!=d[1]){if(h){h(false,null)}return}var b=1;var e=function(){if(++b==d.length){if(h){h(true,c)}return}var f=c.findChild(a,d[b]);if(!f){if(h){h(false,c)}return}c=f;f.expand(false,false,e)};c.expand(false,false,e)},selectPath:function(e,a,g){if(Ext.isEmpty(e)){if(g){g(false,undefined)}return}a=a||"id";var c=e.split(this.pathSeparator),b=c.pop();if(c.length>1){var d=function(h,f){if(h&&f){var i=f.findChild(a,b);if(i){i.select();if(g){g(true,i)}}else{if(g){g(false,i)}}}else{if(g){g(false,i)}}};this.expandPath(c.join(this.pathSeparator),a,d)}else{this.root.select();if(g){g(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(b,a){Ext.tree.TreePanel.superclass.onRender.call(this,b,a);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.renderRoot()},beforeDestroy:function(){if(this.rendered){Ext.dd.ScrollManager.unregister(this.body);Ext.destroy(this.dropZone,this.dragZone)}this.destroyRoot();Ext.destroy(this.loader);this.nodeHash=this.root=this.loader=null;Ext.tree.TreePanel.superclass.beforeDestroy.call(this)},destroyRoot:function(){if(this.root&&this.root.destroy){this.root.destroy(true)}}});Ext.tree.TreePanel.nodeTypes={};Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(a){this.tree=a;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var a=this.tree;if(a.trackMouseOver!==false){a.mon(a.innerCt,{scope:this,mouseover:this.delegateOver,mouseout:this.delegateOut})}a.mon(a.getTreeEl(),{scope:this,click:this.delegateClick,dblclick:this.delegateDblClick,contextmenu:this.delegateContextMenu})},getNode:function(b){var a;if(a=b.getTarget(".x-tree-node-el",10)){var c=Ext.fly(a,"_treeEvents").getAttribute("tree-node-id","ext");if(c){return this.tree.getNodeById(c)}}return null},getNodeTarget:function(b){var a=b.getTarget(".x-tree-node-icon",1);if(!a){a=b.getTarget(".x-tree-node-el",6)}return a},delegateOut:function(b,a){if(!this.beforeEvent(b)){return}if(b.getTarget(".x-tree-ec-icon",1)){var c=this.getNode(b);this.onIconOut(b,c);if(c==this.lastEcOver){delete this.lastEcOver}}if((a=this.getNodeTarget(b))&&!b.within(a,true)){this.onNodeOut(b,this.getNode(b))}},delegateOver:function(b,a){if(!this.beforeEvent(b)){return}if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on("mouseover",this.trackExit,this);this.trackingDoc=true}if(this.lastEcOver){this.onIconOut(b,this.lastEcOver);delete this.lastEcOver}if(b.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(b);this.onIconOver(b,this.lastEcOver)}if(a=this.getNodeTarget(b)){this.onNodeOver(b,this.getNode(b))}},trackExit:function(a){if(this.lastOverNode){if(this.lastOverNode.ui&&!a.within(this.lastOverNode.ui.getEl())){this.onNodeOut(a,this.lastOverNode)}delete this.lastOverNode;Ext.getBody().un("mouseover",this.trackExit,this);this.trackingDoc=false}},delegateClick:function(b,a){if(this.beforeEvent(b)){if(b.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(b,this.getNode(b))}else{if(b.getTarget(".x-tree-ec-icon",1)){this.onIconClick(b,this.getNode(b))}else{if(this.getNodeTarget(b)){this.onNodeClick(b,this.getNode(b))}}}}else{this.checkContainerEvent(b,"click")}},delegateDblClick:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeDblClick(b,this.getNode(b))}}else{this.checkContainerEvent(b,"dblclick")}},delegateContextMenu:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeContextMenu(b,this.getNode(b))}}else{this.checkContainerEvent(b,"contextmenu")}},checkContainerEvent:function(b,a){if(this.disabled){b.stopEvent();return false}this.onContainerEvent(b,a)},onContainerEvent:function(b,a){this.tree.fireEvent("container"+a,this.tree,b)},onNodeClick:function(b,a){a.ui.onClick(b)},onNodeOver:function(b,a){this.lastOverNode=a;a.ui.onOver(b)},onNodeOut:function(b,a){a.ui.onOut(b)},onIconOver:function(b,a){a.ui.addClass("x-tree-ec-over")},onIconOut:function(b,a){a.ui.removeClass("x-tree-ec-over")},onIconClick:function(b,a){a.ui.ecClick(b)},onCheckboxClick:function(b,a){a.ui.onCheckChange(b)},onNodeDblClick:function(b,a){a.ui.onDblClick(b)},onNodeContextMenu:function(b,a){a.ui.onContextMenu(b)},beforeEvent:function(b){var a=this.getNode(b);if(this.disabled||!a||!a.ui){b.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,a);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){this.select(a)},select:function(c,a){if(!Ext.fly(c.ui.wrap).isVisible()&&a){return a.call(this,c)}var b=this.selNode;if(c==b){c.ui.onSelectedChange(true)}else{if(this.fireEvent("beforeselect",this,c,b)!==false){if(b&&b.ui){b.ui.onSelectedChange(false)}this.selNode=c;c.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,c,b)}}return c},unselect:function(b,a){if(this.selNode==b){this.clearSelections(a)}},clearSelections:function(a){var b=this.selNode;if(b){b.ui.onSelectedChange(false);this.selNode=null;if(a!==true){this.fireEvent("selectionchange",this,null)}}return b},getSelectedNode:function(){return this.selNode},isSelected:function(a){return this.selNode==a},selectPrevious:function(a){if(!(a=a||this.selNode||this.lastSelNode)){return null}var c=a.previousSibling;if(c){if(!c.isExpanded()||c.childNodes.length<1){return this.select(c,this.selectPrevious)}else{var b=c.lastChild;while(b&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()&&b.childNodes.length>0){b=b.lastChild}return this.select(b,this.selectPrevious)}}else{if(a.parentNode&&(this.tree.rootVisible||!a.parentNode.isRoot)){return this.select(a.parentNode,this.selectPrevious)}}return null},selectNext:function(b){if(!(b=b||this.selNode||this.lastSelNode)){return null}if(b.firstChild&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()){return this.select(b.firstChild,this.selectNext)}else{if(b.nextSibling){return this.select(b.nextSibling,this.selectNext)}else{if(b.parentNode){var a=null;b.parentNode.bubble(function(){if(this.nextSibling){a=this.getOwnerTree().selModel.select(this.nextSibling,this.selectNext);return false}});return a}}}return null},onKeyDown:function(c){var b=this.selNode||this.lastSelNode;var d=this;if(!b){return}var a=c.getKey();switch(a){case c.DOWN:c.stopEvent();this.selectNext();break;case c.UP:c.stopEvent();this.selectPrevious();break;case c.RIGHT:c.preventDefault();if(b.hasChildNodes()){if(!b.isExpanded()){b.expand()}else{if(b.firstChild){this.select(b.firstChild,c)}}}break;case c.LEFT:c.preventDefault();if(b.hasChildNodes()&&b.isExpanded()){b.collapse()}else{if(b.parentNode&&(this.tree.rootVisible||b.parentNode!=this.tree.getRootNode())){this.select(b.parentNode,c)}}break}}});Ext.tree.MultiSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,a);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){if(b.ctrlKey&&this.isSelected(a)){this.unselect(a)}else{this.select(a,b,b.ctrlKey)}},select:function(a,c,b){if(b!==true){this.clearSelections(true)}if(this.isSelected(a)){this.lastSelNode=a;return a}this.selNodes.push(a);this.selMap[a.id]=a;this.lastSelNode=a;a.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return a},unselect:function(b){if(this.selMap[b.id]){b.ui.onSelectedChange(false);var c=this.selNodes;var a=c.indexOf(b);if(a!=-1){this.selNodes.splice(a,1)}delete this.selMap[b.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(b){var d=this.selNodes;if(d.length>0){for(var c=0,a=d.length;c0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(e){var f=false;if(Ext.isArray(e)){f=e}else{if(arguments.length>1){f=arguments}}if(f){for(var d=0,a=f.length;d0){var f=d?function(){e.apply(d,arguments)}:e;c.sort(f);for(var b=0;b
      ','',this.indentMarkup,"",'','',f?('':"/>")):"",'',e.text,"
      ",'',""].join("");if(k!==true&&e.nextSibling&&(b=e.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,d)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",i,d)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var h=this.elNode.childNodes;this.indentNode=h[0];this.ecNode=h[1];this.iconNode=h[2];var g=3;if(f){this.checkbox=h[3];this.checkbox.defaultChecked=this.checkbox.checked;g++}this.anchor=h[g];this.textNode=h[g].firstChild},getHref:function(a){return Ext.isEmpty(a)?(Ext.isGecko?"":"#"):a},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var f=this.node,d,c,a=f.isLast()?"x-tree-elbow-end":"x-tree-elbow",e=f.hasChildNodes();if(e||f.attributes.expandable){if(f.expanded){a+="-minus";d="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";d="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=d||this.c2!=c){Ext.fly(this.elNode).replaceClass(d,c);this.c1=d;this.c2=c}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-collapsed");delete this.c1;delete this.c2;this.wasLeaf=true}}var b="x-tree-ec-icon "+a;if(this.ecc!=b){this.ecNode.className=b;this.ecc=b}}},onIdChange:function(a){if(this.rendered){this.elNode.setAttribute("ext:tree-node-id",a)}},getChildIndent:function(){if(!this.childIndent){var a=[],b=this.node;while(b){if(!b.isRoot||(b.isRoot&&b.ownerTree.rootVisible)){if(!b.isLast()){a.unshift('')}else{a.unshift('')}}b=b.parentNode}this.childIndent=a.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var a="",b=this.node.parentNode;if(b){a=b.ui.getChildIndent()}if(this.indentMarkup!=a){this.indentNode.innerHTML=a;this.indentMarkup=a}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}Ext.each(["textnode","anchor","checkbox","indentNode","ecNode","iconNode","elNode","ctNode","wrap","holder"],function(a){if(this[a]){Ext.fly(this[a]).remove();delete this[a]}},this);delete this.node}});Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var a=this.node.ownerTree.innerCt.dom;this.node.expanded=true;a.innerHTML='
      ';this.wrap=this.ctNode=a.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeLoader=function(a){this.baseParams={};Ext.apply(this,a);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,paramOrder:undefined,paramsAsHash:false,nodeParameter:"node",directFn:undefined,load:function(b,c,a){if(this.clearOnLoad){while(b.firstChild){b.removeChild(b.firstChild)}}if(this.doPreload(b)){this.runCallback(c,a||b,[b])}else{if(this.directFn||this.dataUrl||this.url){this.requestData(b,c,a||b)}}},doPreload:function(d){if(d.attributes.children){if(d.childNodes.length<1){var c=d.attributes.children;d.beginUpdate();for(var b=0,a=c.length;b-1){c=[]}for(var d=0,a=b.length;do){return e?-1:1}}return 0}},doSort:function(a){a.sort(this.sortFn)},updateSort:function(a,b){if(b.childrenRendered){this.doSort.defer(1,this,[b])}},updateSortParent:function(a){var b=a.parentNode;if(b&&b.childrenRendered){this.doSort.defer(1,this,[b])}}});if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(a,b){this.allowParentInsert=b.allowParentInsert||false;this.allowContainerDrop=b.allowContainerDrop||false;this.appendOnly=b.appendOnly||false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.getTreeEl(),b);this.tree=a;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(a){if(a.hasChildNodes()&&!a.isExpanded()){a.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(a){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(a,j,h,d,c){if(!a||!c){return false}var f=a.node;var g=c.node;if(!(f&&f.isTarget&&j)){return false}if(j=="append"&&f.allowChildren===false){return false}if((j=="above"||j=="below")&&(f.parentNode&&f.parentNode.allowChildren===false)){return false}if(g&&(f==g||g.contains(f))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=f;b.data=c;b.point=j;b.source=h;b.rawEvent=d;b.dropNode=g;b.cancel=false;var i=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&i!==false},getDropPoint:function(g,f,k){var l=f.node;if(l.isRoot){return l.allowChildren!==false?"append":false}var c=f.ddel;var m=Ext.lib.Dom.getY(c),i=m+c.offsetHeight;var h=Ext.lib.Event.getPageY(g);var j=l.allowChildren===false||l.isLeaf();if(this.appendOnly||l.parentNode.allowChildren===false){return j?false:"append"}var d=false;if(!this.allowParentInsert){d=l.hasChildNodes()&&l.isExpanded()}var a=(i-m)/(j?2:3);if(h>=m&&h<(m+a)){return"above"}else{if(!d&&(j||h>=i-a&&h<=i)){return"below"}else{return"append"}}},onNodeEnter:function(d,a,c,b){this.cancelExpand()},onContainerOver:function(a,c,b){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,c,b)){return this.dropAllowed}return this.dropNotAllowed},onNodeOver:function(b,h,g,f){var j=this.getDropPoint(g,b,h);var c=b.node;if(!this.expandProcId&&j=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(j!="append"){this.cancelExpand()}}var d=this.dropNotAllowed;if(this.isValidDropPoint(b,j,h,g,f)){if(j){var a=b.ddel;var i;if(j=="above"){d=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";i="x-tree-drag-insert-above"}else{if(j=="below"){d=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";i="x-tree-drag-insert-below"}else{d="x-tree-drop-ok-append";i="x-tree-drag-append"}}if(this.lastInsertClass!=i){Ext.fly(a).replaceClass(this.lastInsertClass,i);this.lastInsertClass=i}}}return d},onNodeOut:function(d,a,c,b){this.cancelExpand();this.removeDropIndicators(d)},onNodeDrop:function(h,b,g,d){var a=this.getDropPoint(g,h,b);var f=h.node;f.ui.startDrop();if(!this.isValidDropPoint(h,a,b,g,d)){f.ui.endDrop();return false}var c=d.node||(b.getTreeNode?b.getTreeNode(d,f,a,g):null);return this.processDrop(f,d,a,b,g,c)},onContainerDrop:function(a,f,c){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,f,c)){var d=this.tree.getRootNode();d.ui.startDrop();var b=c.node||(a.getTreeNode?a.getTreeNode(c,d,"append",f):null);return this.processDrop(d,c,"append",a,f,b)}return false},processDrop:function(i,g,b,a,h,d){var f={tree:this.tree,target:i,data:g,point:b,source:a,rawEvent:h,dropNode:d,cancel:!d,dropStatus:false};var c=this.tree.fireEvent("beforenodedrop",f);if(c===false||f.cancel===true||!f.dropNode){i.ui.endDrop();return f.dropStatus}i=f.target;if(b=="append"&&!i.isExpanded()){i.expand(false,null,function(){this.completeDrop(f)}.createDelegate(this))}else{this.completeDrop(f)}return true},completeDrop:function(g){var d=g.dropNode,e=g.point,c=g.target;if(!Ext.isArray(d)){d=[d]}var f;for(var b=0,a=d.length;bd.offsetLeft){e.scrollLeft=d.offsetLeft}var a=Math.min(this.maxWidth,(e.clientWidth>20?e.clientWidth:e.offsetWidth)-Math.max(0,d.offsetLeft-e.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,c){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){Ext.fly(a.ui.getEl()).scrollIntoView(this.tree.body)}var b=a.text||"";if(!Ext.isGecko&&Ext.isEmpty(a.text)){a.setText(" ")}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,b]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(a,b){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(a)){b.stopEvent();return this.triggerEdit(a)}},onNodeDblClick:function(a,b){clearTimeout(this.autoEditTimer)},updateNode:function(a,b){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(b)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui)}},onSpecialKey:function(c,b){var a=b.getKey();if(a==b.ESC){b.stopEvent();this.cancelEdit()}else{if(a==b.ENTER&&!b.hasModifier()){b.stopEvent();this.completeEdit()}}},onDestroy:function(){clearTimeout(this.autoEditTimer);Ext.tree.TreeEditor.superclass.onDestroy.call(this);var a=this.tree;a.un("beforeclick",this.beforeNodeClick,this);a.un("dblclick",this.onNodeDblClick,this)}}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/resizable-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/resizable-debug.js deleted file mode 100644 index b9f0eb7fcd0..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/resizable-debug.js +++ /dev/null @@ -1,770 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.Resizable - * @extends Ext.util.Observable - *

      Applies drag handles to an element to make it resizable. The drag handles are inserted into the element - * and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap - * the textarea in a div and set 'resizeChild' to true (or to the id of the element), or set wrap:true in your config and - * the element will be wrapped for you automatically.

      - *

      Here is the list of valid resize handles:

      - *
      -Value   Description
      -------  -------------------
      - 'n'     north
      - 's'     south
      - 'e'     east
      - 'w'     west
      - 'nw'    northwest
      - 'sw'    southwest
      - 'se'    southeast
      - 'ne'    northeast
      - 'all'   all
      -
      - *

      Here's an example showing the creation of a typical Resizable:

      - *
      
      -var resizer = new Ext.Resizable('element-id', {
      -    handles: 'all',
      -    minWidth: 200,
      -    minHeight: 100,
      -    maxWidth: 500,
      -    maxHeight: 400,
      -    pinned: true
      -});
      -resizer.on('resize', myHandler);
      -
      - *

      To hide a particular handle, set its display to none in CSS, or through script:
      - * resizer.east.setDisplayed(false);

      - * @constructor - * Create a new resizable component - * @param {Mixed} el The id or element to resize - * @param {Object} config configuration options - */ -Ext.Resizable = Ext.extend(Ext.util.Observable, { - - constructor: function(el, config){ - this.el = Ext.get(el); - if(config && config.wrap){ - config.resizeChild = this.el; - this.el = this.el.wrap(typeof config.wrap == 'object' ? config.wrap : {cls:'xresizable-wrap'}); - this.el.id = this.el.dom.id = config.resizeChild.id + '-rzwrap'; - this.el.setStyle('overflow', 'hidden'); - this.el.setPositioning(config.resizeChild.getPositioning()); - config.resizeChild.clearPositioning(); - if(!config.width || !config.height){ - var csize = config.resizeChild.getSize(); - this.el.setSize(csize.width, csize.height); - } - if(config.pinned && !config.adjustments){ - config.adjustments = 'auto'; - } - } - - /** - * The proxy Element that is resized in place of the real Element during the resize operation. - * This may be queried using {@link Ext.Element#getBox} to provide the new area to resize to. - * Read only. - * @type Ext.Element. - * @property proxy - */ - this.proxy = this.el.createProxy({tag: 'div', cls: 'x-resizable-proxy', id: this.el.id + '-rzproxy'}, Ext.getBody()); - this.proxy.unselectable(); - this.proxy.enableDisplayMode('block'); - - Ext.apply(this, config); - - if(this.pinned){ - this.disableTrackOver = true; - this.el.addClass('x-resizable-pinned'); - } - // if the element isn't positioned, make it relative - var position = this.el.getStyle('position'); - if(position != 'absolute' && position != 'fixed'){ - this.el.setStyle('position', 'relative'); - } - if(!this.handles){ // no handles passed, must be legacy style - this.handles = 's,e,se'; - if(this.multiDirectional){ - this.handles += ',n,w'; - } - } - if(this.handles == 'all'){ - this.handles = 'n s e w ne nw se sw'; - } - var hs = this.handles.split(/\s*?[,;]\s*?| /); - var ps = Ext.Resizable.positions; - for(var i = 0, len = hs.length; i < len; i++){ - if(hs[i] && ps[hs[i]]){ - var pos = ps[hs[i]]; - this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent, this.handleCls); - } - } - // legacy - this.corner = this.southeast; - - if(this.handles.indexOf('n') != -1 || this.handles.indexOf('w') != -1){ - this.updateBox = true; - } - - this.activeHandle = null; - - if(this.resizeChild){ - if(typeof this.resizeChild == 'boolean'){ - this.resizeChild = Ext.get(this.el.dom.firstChild, true); - }else{ - this.resizeChild = Ext.get(this.resizeChild, true); - } - } - - if(this.adjustments == 'auto'){ - var rc = this.resizeChild; - var hw = this.west, he = this.east, hn = this.north, hs = this.south; - if(rc && (hw || hn)){ - rc.position('relative'); - rc.setLeft(hw ? hw.el.getWidth() : 0); - rc.setTop(hn ? hn.el.getHeight() : 0); - } - this.adjustments = [ - (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0), - (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0) -1 - ]; - } - - if(this.draggable){ - this.dd = this.dynamic ? - this.el.initDD(null) : this.el.initDDProxy(null, {dragElId: this.proxy.id}); - this.dd.setHandleElId(this.resizeChild ? this.resizeChild.id : this.el.id); - if(this.constrainTo){ - this.dd.constrainTo(this.constrainTo); - } - } - - this.addEvents( - /** - * @event beforeresize - * Fired before resize is allowed. Set {@link #enabled} to false to cancel resize. - * @param {Ext.Resizable} this - * @param {Ext.EventObject} e The mousedown event - */ - 'beforeresize', - /** - * @event resize - * Fired after a resize. - * @param {Ext.Resizable} this - * @param {Number} width The new width - * @param {Number} height The new height - * @param {Ext.EventObject} e The mouseup event - */ - 'resize' - ); - - if(this.width !== null && this.height !== null){ - this.resizeTo(this.width, this.height); - }else{ - this.updateChildSize(); - } - if(Ext.isIE){ - this.el.dom.style.zoom = 1; - } - Ext.Resizable.superclass.constructor.call(this); - }, - - /** - * @cfg {Array/String} adjustments String 'auto' or an array [width, height] with values to be added to the - * resize operation's new size (defaults to [0, 0]) - */ - adjustments : [0, 0], - /** - * @cfg {Boolean} animate True to animate the resize (not compatible with dynamic sizing, defaults to false) - */ - animate : false, - /** - * @cfg {Mixed} constrainTo Constrain the resize to a particular element - */ - /** - * @cfg {Boolean} disableTrackOver True to disable mouse tracking. This is only applied at config time. (defaults to false) - */ - disableTrackOver : false, - /** - * @cfg {Boolean} draggable Convenience to initialize drag drop (defaults to false) - */ - draggable: false, - /** - * @cfg {Number} duration Animation duration if animate = true (defaults to 0.35) - */ - duration : 0.35, - /** - * @cfg {Boolean} dynamic True to resize the element while dragging instead of using a proxy (defaults to false) - */ - dynamic : false, - /** - * @cfg {String} easing Animation easing if animate = true (defaults to 'easingOutStrong') - */ - easing : 'easeOutStrong', - /** - * @cfg {Boolean} enabled False to disable resizing (defaults to true) - */ - enabled : true, - /** - * @property enabled Writable. False if resizing is disabled. - * @type Boolean - */ - /** - * @cfg {String} handles String consisting of the resize handles to display (defaults to undefined). - * Specify either 'all' or any of 'n s e w ne nw se sw'. - */ - handles : false, - /** - * @cfg {Boolean} multiDirectional Deprecated. Deprecated style of adding multi-direction resize handles. - */ - multiDirectional : false, - /** - * @cfg {Number} height The height of the element in pixels (defaults to null) - */ - height : null, - /** - * @cfg {Number} width The width of the element in pixels (defaults to null) - */ - width : null, - /** - * @cfg {Number} heightIncrement The increment to snap the height resize in pixels - * (only applies if {@link #dynamic}==true). Defaults to 0. - */ - heightIncrement : 0, - /** - * @cfg {Number} widthIncrement The increment to snap the width resize in pixels - * (only applies if {@link #dynamic}==true). Defaults to 0. - */ - widthIncrement : 0, - /** - * @cfg {Number} minHeight The minimum height for the element (defaults to 5) - */ - minHeight : 5, - /** - * @cfg {Number} minWidth The minimum width for the element (defaults to 5) - */ - minWidth : 5, - /** - * @cfg {Number} maxHeight The maximum height for the element (defaults to 10000) - */ - maxHeight : 10000, - /** - * @cfg {Number} maxWidth The maximum width for the element (defaults to 10000) - */ - maxWidth : 10000, - /** - * @cfg {Number} minX The minimum x for the element (defaults to 0) - */ - minX: 0, - /** - * @cfg {Number} minY The minimum x for the element (defaults to 0) - */ - minY: 0, - /** - * @cfg {Boolean} pinned True to ensure that the resize handles are always visible, false to display them only when the - * user mouses over the resizable borders. This is only applied at config time. (defaults to false) - */ - pinned : false, - /** - * @cfg {Boolean} preserveRatio True to preserve the original ratio between height - * and width during resize (defaults to false) - */ - preserveRatio : false, - /** - * @cfg {Boolean/String/Element} resizeChild True to resize the first child, or id/element to resize (defaults to false) - */ - resizeChild : false, - /** - * @cfg {Boolean} transparent True for transparent handles. This is only applied at config time. (defaults to false) - */ - transparent: false, - /** - * @cfg {Ext.lib.Region} resizeRegion Constrain the resize to a particular region - */ - /** - * @cfg {Boolean} wrap True to wrap an element with a div if needed (required for textareas and images, defaults to false) - * in favor of the handles config option (defaults to false) - */ - /** - * @cfg {String} handleCls A css class to add to each handle. Defaults to ''. - */ - - - /** - * Perform a manual resize and fires the 'resize' event. - * @param {Number} width - * @param {Number} height - */ - resizeTo : function(width, height){ - this.el.setSize(width, height); - this.updateChildSize(); - this.fireEvent('resize', this, width, height, null); - }, - - // private - startSizing : function(e, handle){ - this.fireEvent('beforeresize', this, e); - if(this.enabled){ // 2nd enabled check in case disabled before beforeresize handler - - if(!this.overlay){ - this.overlay = this.el.createProxy({tag: 'div', cls: 'x-resizable-overlay', html: ' '}, Ext.getBody()); - this.overlay.unselectable(); - this.overlay.enableDisplayMode('block'); - this.overlay.on({ - scope: this, - mousemove: this.onMouseMove, - mouseup: this.onMouseUp - }); - } - this.overlay.setStyle('cursor', handle.el.getStyle('cursor')); - - this.resizing = true; - this.startBox = this.el.getBox(); - this.startPoint = e.getXY(); - this.offsets = [(this.startBox.x + this.startBox.width) - this.startPoint[0], - (this.startBox.y + this.startBox.height) - this.startPoint[1]]; - - this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); - this.overlay.show(); - - if(this.constrainTo) { - var ct = Ext.get(this.constrainTo); - this.resizeRegion = ct.getRegion().adjust( - ct.getFrameWidth('t'), - ct.getFrameWidth('l'), - -ct.getFrameWidth('b'), - -ct.getFrameWidth('r') - ); - } - - this.proxy.setStyle('visibility', 'hidden'); // workaround display none - this.proxy.show(); - this.proxy.setBox(this.startBox); - if(!this.dynamic){ - this.proxy.setStyle('visibility', 'visible'); - } - } - }, - - // private - onMouseDown : function(handle, e){ - if(this.enabled){ - e.stopEvent(); - this.activeHandle = handle; - this.startSizing(e, handle); - } - }, - - // private - onMouseUp : function(e){ - this.activeHandle = null; - var size = this.resizeElement(); - this.resizing = false; - this.handleOut(); - this.overlay.hide(); - this.proxy.hide(); - this.fireEvent('resize', this, size.width, size.height, e); - }, - - // private - updateChildSize : function(){ - if(this.resizeChild){ - var el = this.el; - var child = this.resizeChild; - var adj = this.adjustments; - if(el.dom.offsetWidth){ - var b = el.getSize(true); - child.setSize(b.width+adj[0], b.height+adj[1]); - } - // Second call here for IE - // The first call enables instant resizing and - // the second call corrects scroll bars if they - // exist - if(Ext.isIE){ - setTimeout(function(){ - if(el.dom.offsetWidth){ - var b = el.getSize(true); - child.setSize(b.width+adj[0], b.height+adj[1]); - } - }, 10); - } - } - }, - - // private - snap : function(value, inc, min){ - if(!inc || !value){ - return value; - } - var newValue = value; - var m = value % inc; - if(m > 0){ - if(m > (inc/2)){ - newValue = value + (inc-m); - }else{ - newValue = value - m; - } - } - return Math.max(min, newValue); - }, - - /** - *

      Performs resizing of the associated Element. This method is called internally by this - * class, and should not be called by user code.

      - *

      If a Resizable is being used to resize an Element which encapsulates a more complex UI - * component such as a Panel, this method may be overridden by specifying an implementation - * as a config option to provide appropriate behaviour at the end of the resize operation on - * mouseup, for example resizing the Panel, and relaying the Panel's content.

      - *

      The new area to be resized to is available by examining the state of the {@link #proxy} - * Element. Example: -

      
      -new Ext.Panel({
      -    title: 'Resize me',
      -    x: 100,
      -    y: 100,
      -    renderTo: Ext.getBody(),
      -    floating: true,
      -    frame: true,
      -    width: 400,
      -    height: 200,
      -    listeners: {
      -        render: function(p) {
      -            new Ext.Resizable(p.getEl(), {
      -                handles: 'all',
      -                pinned: true,
      -                transparent: true,
      -                resizeElement: function() {
      -                    var box = this.proxy.getBox();
      -                    p.updateBox(box);
      -                    if (p.layout) {
      -                        p.doLayout();
      -                    }
      -                    return box;
      -                }
      -           });
      -       }
      -    }
      -}).show();
      -
      - */ - resizeElement : function(){ - var box = this.proxy.getBox(); - if(this.updateBox){ - this.el.setBox(box, false, this.animate, this.duration, null, this.easing); - }else{ - this.el.setSize(box.width, box.height, this.animate, this.duration, null, this.easing); - } - this.updateChildSize(); - if(!this.dynamic){ - this.proxy.hide(); - } - if(this.draggable && this.constrainTo){ - this.dd.resetConstraints(); - this.dd.constrainTo(this.constrainTo); - } - return box; - }, - - // private - constrain : function(v, diff, m, mx){ - if(v - diff < m){ - diff = v - m; - }else if(v - diff > mx){ - diff = v - mx; - } - return diff; - }, - - // private - onMouseMove : function(e){ - if(this.enabled && this.activeHandle){ - try{// try catch so if something goes wrong the user doesn't get hung - - if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) { - return; - } - - //var curXY = this.startPoint; - var curSize = this.curSize || this.startBox, - x = this.startBox.x, y = this.startBox.y, - ox = x, - oy = y, - w = curSize.width, - h = curSize.height, - ow = w, - oh = h, - mw = this.minWidth, - mh = this.minHeight, - mxw = this.maxWidth, - mxh = this.maxHeight, - wi = this.widthIncrement, - hi = this.heightIncrement, - eventXY = e.getXY(), - diffX = -(this.startPoint[0] - Math.max(this.minX, eventXY[0])), - diffY = -(this.startPoint[1] - Math.max(this.minY, eventXY[1])), - pos = this.activeHandle.position, - tw, - th; - - switch(pos){ - case 'east': - w += diffX; - w = Math.min(Math.max(mw, w), mxw); - break; - case 'south': - h += diffY; - h = Math.min(Math.max(mh, h), mxh); - break; - case 'southeast': - w += diffX; - h += diffY; - w = Math.min(Math.max(mw, w), mxw); - h = Math.min(Math.max(mh, h), mxh); - break; - case 'north': - diffY = this.constrain(h, diffY, mh, mxh); - y += diffY; - h -= diffY; - break; - case 'west': - diffX = this.constrain(w, diffX, mw, mxw); - x += diffX; - w -= diffX; - break; - case 'northeast': - w += diffX; - w = Math.min(Math.max(mw, w), mxw); - diffY = this.constrain(h, diffY, mh, mxh); - y += diffY; - h -= diffY; - break; - case 'northwest': - diffX = this.constrain(w, diffX, mw, mxw); - diffY = this.constrain(h, diffY, mh, mxh); - y += diffY; - h -= diffY; - x += diffX; - w -= diffX; - break; - case 'southwest': - diffX = this.constrain(w, diffX, mw, mxw); - h += diffY; - h = Math.min(Math.max(mh, h), mxh); - x += diffX; - w -= diffX; - break; - } - - var sw = this.snap(w, wi, mw); - var sh = this.snap(h, hi, mh); - if(sw != w || sh != h){ - switch(pos){ - case 'northeast': - y -= sh - h; - break; - case 'north': - y -= sh - h; - break; - case 'southwest': - x -= sw - w; - break; - case 'west': - x -= sw - w; - break; - case 'northwest': - x -= sw - w; - y -= sh - h; - break; - } - w = sw; - h = sh; - } - - if(this.preserveRatio){ - switch(pos){ - case 'southeast': - case 'east': - h = oh * (w/ow); - h = Math.min(Math.max(mh, h), mxh); - w = ow * (h/oh); - break; - case 'south': - w = ow * (h/oh); - w = Math.min(Math.max(mw, w), mxw); - h = oh * (w/ow); - break; - case 'northeast': - w = ow * (h/oh); - w = Math.min(Math.max(mw, w), mxw); - h = oh * (w/ow); - break; - case 'north': - tw = w; - w = ow * (h/oh); - w = Math.min(Math.max(mw, w), mxw); - h = oh * (w/ow); - x += (tw - w) / 2; - break; - case 'southwest': - h = oh * (w/ow); - h = Math.min(Math.max(mh, h), mxh); - tw = w; - w = ow * (h/oh); - x += tw - w; - break; - case 'west': - th = h; - h = oh * (w/ow); - h = Math.min(Math.max(mh, h), mxh); - y += (th - h) / 2; - tw = w; - w = ow * (h/oh); - x += tw - w; - break; - case 'northwest': - tw = w; - th = h; - h = oh * (w/ow); - h = Math.min(Math.max(mh, h), mxh); - w = ow * (h/oh); - y += th - h; - x += tw - w; - break; - - } - } - this.proxy.setBounds(x, y, w, h); - if(this.dynamic){ - this.resizeElement(); - } - }catch(ex){} - } - }, - - // private - handleOver : function(){ - if(this.enabled){ - this.el.addClass('x-resizable-over'); - } - }, - - // private - handleOut : function(){ - if(!this.resizing){ - this.el.removeClass('x-resizable-over'); - } - }, - - /** - * Returns the element this component is bound to. - * @return {Ext.Element} - */ - getEl : function(){ - return this.el; - }, - - /** - * Returns the resizeChild element (or null). - * @return {Ext.Element} - */ - getResizeChild : function(){ - return this.resizeChild; - }, - - /** - * Destroys this resizable. If the element was wrapped and - * removeEl is not true then the element remains. - * @param {Boolean} removeEl (optional) true to remove the element from the DOM - */ - destroy : function(removeEl){ - Ext.destroy(this.dd, this.overlay, this.proxy); - this.overlay = null; - this.proxy = null; - - var ps = Ext.Resizable.positions; - for(var k in ps){ - if(typeof ps[k] != 'function' && this[ps[k]]){ - this[ps[k]].destroy(); - } - } - if(removeEl){ - this.el.update(''); - Ext.destroy(this.el); - this.el = null; - } - this.purgeListeners(); - }, - - syncHandleHeight : function(){ - var h = this.el.getHeight(true); - if(this.west){ - this.west.el.setHeight(h); - } - if(this.east){ - this.east.el.setHeight(h); - } - } -}); - -// private -// hash to map config positions to true positions -Ext.Resizable.positions = { - n: 'north', s: 'south', e: 'east', w: 'west', se: 'southeast', sw: 'southwest', nw: 'northwest', ne: 'northeast' -}; - -Ext.Resizable.Handle = Ext.extend(Object, { - constructor : function(rz, pos, disableTrackOver, transparent, cls){ - if(!this.tpl){ - // only initialize the template if resizable is used - var tpl = Ext.DomHelper.createTemplate( - {tag: 'div', cls: 'x-resizable-handle x-resizable-handle-{0}'} - ); - tpl.compile(); - Ext.Resizable.Handle.prototype.tpl = tpl; - } - this.position = pos; - this.rz = rz; - this.el = this.tpl.append(rz.el.dom, [this.position], true); - this.el.unselectable(); - if(transparent){ - this.el.setOpacity(0); - } - if(!Ext.isEmpty(cls)){ - this.el.addClass(cls); - } - this.el.on('mousedown', this.onMouseDown, this); - if(!disableTrackOver){ - this.el.on({ - scope: this, - mouseover: this.onMouseOver, - mouseout: this.onMouseOut - }); - } - }, - - // private - afterResize : function(rz){ - // do nothing - }, - // private - onMouseDown : function(e){ - this.rz.onMouseDown(this, e); - }, - // private - onMouseOver : function(e){ - this.rz.handleOver(this, e); - }, - // private - onMouseOut : function(e){ - this.rz.handleOut(this, e); - }, - // private - destroy : function(){ - Ext.destroy(this.el); - this.el = null; - } -}); diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/resizable.js b/web-client/src/main/resources/apps/js/ext/pkgs/resizable.js deleted file mode 100644 index d754330ef10..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/resizable.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var f=e.resizeChild.getSize();this.el.setSize(f.width,f.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var j=this.el.getStyle("position");if(j!="absolute"&&j!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var n=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var h=0,k=n.length;h0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}if(this.draggable&&this.constrainTo){this.dd.resetConstraints();this.dd.constrainTo(this.constrainTo)}return a},constrain:function(b,c,a,d){if(b-cd){c=b-d}}return c},onMouseMove:function(v){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(v.getPoint())){return}var s=this.curSize||this.startBox,k=this.startBox.x,j=this.startBox.y,c=k,b=j,l=s.width,t=s.height,d=l,n=t,m=this.minWidth,z=this.minHeight,r=this.maxWidth,C=this.maxHeight,g=this.widthIncrement,a=this.heightIncrement,A=v.getXY(),q=-(this.startPoint[0]-Math.max(this.minX,A[0])),o=-(this.startPoint[1]-Math.max(this.minY,A[1])),i=this.activeHandle.position,D,f;switch(i){case"east":l+=q;l=Math.min(Math.max(m,l),r);break;case"south":t+=o;t=Math.min(Math.max(z,t),C);break;case"southeast":l+=q;t+=o;l=Math.min(Math.max(m,l),r);t=Math.min(Math.max(z,t),C);break;case"north":o=this.constrain(t,o,z,C);j+=o;t-=o;break;case"west":q=this.constrain(l,q,m,r);k+=q;l-=q;break;case"northeast":l+=q;l=Math.min(Math.max(m,l),r);o=this.constrain(t,o,z,C);j+=o;t-=o;break;case"northwest":q=this.constrain(l,q,m,r);o=this.constrain(t,o,z,C);j+=o;t-=o;k+=q;l-=q;break;case"southwest":q=this.constrain(l,q,m,r);t+=o;t=Math.min(Math.max(z,t),C);k+=q;l-=q;break}var p=this.snap(l,g,m);var B=this.snap(t,a,z);if(p!=l||B!=t){switch(i){case"northeast":j-=B-t;break;case"north":j-=B-t;break;case"southwest":k-=p-l;break;case"west":k-=p-l;break;case"northwest":k-=p-l;j-=B-t;break}l=p;t=B}if(this.preserveRatio){switch(i){case"southeast":case"east":t=n*(l/d);t=Math.min(Math.max(z,t),C);l=d*(t/n);break;case"south":l=d*(t/n);l=Math.min(Math.max(m,l),r);t=n*(l/d);break;case"northeast":l=d*(t/n);l=Math.min(Math.max(m,l),r);t=n*(l/d);break;case"north":D=l;l=d*(t/n);l=Math.min(Math.max(m,l),r);t=n*(l/d);k+=(D-l)/2;break;case"southwest":t=n*(l/d);t=Math.min(Math.max(z,t),C);D=l;l=d*(t/n);k+=D-l;break;case"west":f=t;t=n*(l/d);t=Math.min(Math.max(z,t),C);j+=(f-t)/2;D=l;l=d*(t/n);k+=D-l;break;case"northwest":D=l;f=t;t=n*(l/d);t=Math.min(Math.max(z,t),C);l=d*(t/n);j+=f-t;k+=D-l;break}}this.proxy.setBounds(k,j,l,t);if(this.dynamic){this.resizeElement()}}catch(u){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=Ext.extend(Object,{constructor:function(d,f,c,e,a){if(!this.tpl){var b=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});b.compile();Ext.Resizable.Handle.prototype.tpl=b}this.position=f;this.rz=d;this.el=this.tpl.append(d.el.dom,[this.position],true);this.el.unselectable();if(e){this.el.setOpacity(0)}if(!Ext.isEmpty(a)){this.el.addClass(a)}this.el.on("mousedown",this.onMouseDown,this);if(!c){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}},afterResize:function(a){},onMouseDown:function(a){this.rz.onMouseDown(this,a)},onMouseOver:function(a){this.rz.handleOver(this,a)},onMouseOut:function(a){this.rz.handleOut(this,a)},destroy:function(){Ext.destroy(this.el);this.el=null}}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/state-debug.js b/web-client/src/main/resources/apps/js/ext/pkgs/state-debug.js deleted file mode 100644 index dbc5d37d63c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/state-debug.js +++ /dev/null @@ -1,304 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * @class Ext.state.Provider - * Abstract base class for state provider implementations. This class provides methods - * for encoding and decoding typed variables including dates and defines the - * Provider interface. - */ -Ext.state.Provider = Ext.extend(Ext.util.Observable, { - - constructor : function(){ - /** - * @event statechange - * Fires when a state change occurs. - * @param {Provider} this This state provider - * @param {String} key The state key which was changed - * @param {String} value The encoded value for the state - */ - this.addEvents("statechange"); - this.state = {}; - Ext.state.Provider.superclass.constructor.call(this); - }, - - /** - * Returns the current value for a key - * @param {String} name The key name - * @param {Mixed} defaultValue A default value to return if the key's value is not found - * @return {Mixed} The state data - */ - get : function(name, defaultValue){ - return typeof this.state[name] == "undefined" ? - defaultValue : this.state[name]; - }, - - /** - * Clears a value from the state - * @param {String} name The key name - */ - clear : function(name){ - delete this.state[name]; - this.fireEvent("statechange", this, name, null); - }, - - /** - * Sets the value for a key - * @param {String} name The key name - * @param {Mixed} value The value to set - */ - set : function(name, value){ - this.state[name] = value; - this.fireEvent("statechange", this, name, value); - }, - - /** - * Decodes a string previously encoded with {@link #encodeValue}. - * @param {String} value The value to decode - * @return {Mixed} The decoded value - */ - decodeValue : function(cookie){ - /** - * a -> Array - * n -> Number - * d -> Date - * b -> Boolean - * s -> String - * o -> Object - * -> Empty (null) - */ - var re = /^(a|n|d|b|s|o|e)\:(.*)$/, - matches = re.exec(unescape(cookie)), - all, - type, - v, - kv; - if(!matches || !matches[1]){ - return; // non state cookie - } - type = matches[1]; - v = matches[2]; - switch(type){ - case 'e': - return null; - case 'n': - return parseFloat(v); - case 'd': - return new Date(Date.parse(v)); - case 'b': - return (v == '1'); - case 'a': - all = []; - if(v != ''){ - Ext.each(v.split('^'), function(val){ - all.push(this.decodeValue(val)); - }, this); - } - return all; - case 'o': - all = {}; - if(v != ''){ - Ext.each(v.split('^'), function(val){ - kv = val.split('='); - all[kv[0]] = this.decodeValue(kv[1]); - }, this); - } - return all; - default: - return v; - } - }, - - /** - * Encodes a value including type information. Decode with {@link #decodeValue}. - * @param {Mixed} value The value to encode - * @return {String} The encoded value - */ - encodeValue : function(v){ - var enc, - flat = '', - i = 0, - len, - key; - if(v == null){ - return 'e:1'; - }else if(typeof v == 'number'){ - enc = 'n:' + v; - }else if(typeof v == 'boolean'){ - enc = 'b:' + (v ? '1' : '0'); - }else if(Ext.isDate(v)){ - enc = 'd:' + v.toGMTString(); - }else if(Ext.isArray(v)){ - for(len = v.length; i < len; i++){ - flat += this.encodeValue(v[i]); - if(i != len - 1){ - flat += '^'; - } - } - enc = 'a:' + flat; - }else if(typeof v == 'object'){ - for(key in v){ - if(typeof v[key] != 'function' && v[key] !== undefined){ - flat += key + '=' + this.encodeValue(v[key]) + '^'; - } - } - enc = 'o:' + flat.substring(0, flat.length-1); - }else{ - enc = 's:' + v; - } - return escape(enc); - } -}); -/** - * @class Ext.state.Manager - * This is the global state manager. By default all components that are "state aware" check this class - * for state information if you don't pass them a custom state provider. In order for this class - * to be useful, it must be initialized with a provider when your application initializes. Example usage: -
      
      -// in your initialization function
      -init : function(){
      -   Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
      -   var win = new Window(...);
      -   win.restoreState();
      -}
      - 
      - * @singleton - */ -Ext.state.Manager = function(){ - var provider = new Ext.state.Provider(); - - return { - /** - * Configures the default state provider for your application - * @param {Provider} stateProvider The state provider to set - */ - setProvider : function(stateProvider){ - provider = stateProvider; - }, - - /** - * Returns the current value for a key - * @param {String} name The key name - * @param {Mixed} defaultValue The default value to return if the key lookup does not match - * @return {Mixed} The state data - */ - get : function(key, defaultValue){ - return provider.get(key, defaultValue); - }, - - /** - * Sets the value for a key - * @param {String} name The key name - * @param {Mixed} value The state data - */ - set : function(key, value){ - provider.set(key, value); - }, - - /** - * Clears a value from the state - * @param {String} name The key name - */ - clear : function(key){ - provider.clear(key); - }, - - /** - * Gets the currently configured state provider - * @return {Provider} The state provider - */ - getProvider : function(){ - return provider; - } - }; -}(); -/** - * @class Ext.state.CookieProvider - * @extends Ext.state.Provider - * The default Provider implementation which saves state via cookies. - *
      Usage: -
      
      -   var cp = new Ext.state.CookieProvider({
      -       path: "/cgi-bin/",
      -       expires: new Date(new Date().getTime()+(1000*60*60*24*30)), //30 days
      -       domain: "extjs.com"
      -   });
      -   Ext.state.Manager.setProvider(cp);
      - 
      - * @cfg {String} path The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site) - * @cfg {Date} expires The cookie expiration date (defaults to 7 days from now) - * @cfg {String} domain The domain to save the cookie for. Note that you cannot specify a different domain than - * your page is on, but you can specify a sub-domain, or simply the domain itself like 'extjs.com' to include - * all sub-domains if you need to access cookies across different sub-domains (defaults to null which uses the same - * domain the page is running on including the 'www' like 'www.extjs.com') - * @cfg {Boolean} secure True if the site is using SSL (defaults to false) - * @constructor - * Create a new CookieProvider - * @param {Object} config The configuration object - */ -Ext.state.CookieProvider = Ext.extend(Ext.state.Provider, { - - constructor : function(config){ - Ext.state.CookieProvider.superclass.constructor.call(this); - this.path = "/"; - this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days - this.domain = null; - this.secure = false; - Ext.apply(this, config); - this.state = this.readCookies(); - }, - - // private - set : function(name, value){ - if(typeof value == "undefined" || value === null){ - this.clear(name); - return; - } - this.setCookie(name, value); - Ext.state.CookieProvider.superclass.set.call(this, name, value); - }, - - // private - clear : function(name){ - this.clearCookie(name); - Ext.state.CookieProvider.superclass.clear.call(this, name); - }, - - // private - readCookies : function(){ - var cookies = {}, - c = document.cookie + ";", - re = /\s?(.*?)=(.*?);/g, - matches, - name, - value; - while((matches = re.exec(c)) != null){ - name = matches[1]; - value = matches[2]; - if(name && name.substring(0,3) == "ys-"){ - cookies[name.substr(3)] = this.decodeValue(value); - } - } - return cookies; - }, - - // private - setCookie : function(name, value){ - document.cookie = "ys-"+ name + "=" + this.encodeValue(value) + - ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) + - ((this.path == null) ? "" : ("; path=" + this.path)) + - ((this.domain == null) ? "" : ("; domain=" + this.domain)) + - ((this.secure == true) ? "; secure" : ""); - }, - - // private - clearCookie : function(name){ - document.cookie = "ys-" + name + "=null; expires=Thu, 01-Jan-70 00:00:01 GMT" + - ((this.path == null) ? "" : ("; path=" + this.path)) + - ((this.domain == null) ? "" : ("; domain=" + this.domain)) + - ((this.secure == true) ? "; secure" : ""); - } -}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/state.js b/web-client/src/main/resources/apps/js/ext/pkgs/state.js deleted file mode 100644 index 6d60eed9cc1..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/state.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.state.Provider=Ext.extend(Ext.util.Observable,{constructor:function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){delete this.state[a];this.fireEvent("statechange",this,a,null)},set:function(a,b){this.state[a]=b;this.fireEvent("statechange",this,a,b)},decodeValue:function(b){var e=/^(a|n|d|b|s|o|e)\:(.*)$/,g=e.exec(unescape(b)),d,c,a,f;if(!g||!g[1]){return}c=g[1];a=g[2];switch(c){case"e":return null;case"n":return parseFloat(a);case"d":return new Date(Date.parse(a));case"b":return(a=="1");case"a":d=[];if(a!=""){Ext.each(a.split("^"),function(h){d.push(this.decodeValue(h))},this)}return d;case"o":d={};if(a!=""){Ext.each(a.split("^"),function(h){f=h.split("=");d[f[0]]=this.decodeValue(f[1])},this)}return d;default:return a}},encodeValue:function(c){var b,f="",e=0,a,d;if(c==null){return"e:1"}else{if(typeof c=="number"){b="n:"+c}else{if(typeof c=="boolean"){b="b:"+(c?"1":"0")}else{if(Ext.isDate(c)){b="d:"+c.toGMTString()}else{if(Ext.isArray(c)){for(a=c.length;eA specialized panel intended for use as an application window. Windows are floated, {@link #resizable}, and - * {@link #draggable} by default. Windows can be {@link #maximizable maximized} to fill the viewport, - * restored to their prior size, and can be {@link #minimize}d.

      - *

      Windows can also be linked to a {@link Ext.WindowGroup} or managed by the {@link Ext.WindowMgr} to provide - * grouping, activation, to front, to back and other application-specific behavior.

      - *

      By default, Windows will be rendered to document.body. To {@link #constrain} a Window to another element - * specify {@link Ext.Component#renderTo renderTo}.

      - *

      Note: By default, the {@link #closable close} header tool destroys the Window resulting in - * destruction of any child Components. This makes the Window object, and all its descendants unusable. To enable - * re-use of a Window, use {@link #closeAction closeAction: 'hide'}.

      - * @constructor - * @param {Object} config The config object - * @xtype window - */ -Ext.Window = Ext.extend(Ext.Panel, { - /** - * @cfg {Number} x - * The X position of the left edge of the window on initial showing. Defaults to centering the Window within - * the width of the Window's container {@link Ext.Element Element) (The Element that the Window is rendered to). - */ - /** - * @cfg {Number} y - * The Y position of the top edge of the window on initial showing. Defaults to centering the Window within - * the height of the Window's container {@link Ext.Element Element) (The Element that the Window is rendered to). - */ - /** - * @cfg {Boolean} modal - * True to make the window modal and mask everything behind it when displayed, false to display it without - * restricting access to other UI elements (defaults to false). - */ - /** - * @cfg {String/Element} animateTarget - * Id or element from which the window should animate while opening (defaults to null with no animation). - */ - /** - * @cfg {String} resizeHandles - * A valid {@link Ext.Resizable} handles config string (defaults to 'all'). Only applies when resizable = true. - */ - /** - * @cfg {Ext.WindowGroup} manager - * A reference to the WindowGroup that should manage this window (defaults to {@link Ext.WindowMgr}). - */ - /** - * @cfg {String/Number/Component} defaultButton - *

      Specifies a Component to receive focus when this Window is focussed.

      - *

      This may be one of:

        - *
      • The index of a footer Button.
      • - *
      • The id of a Component.
      • - *
      • A Component.
      • - *
      - */ - /** - * @cfg {Function} onEsc - * Allows override of the built-in processing for the escape key. Default action - * is to close the Window (performing whatever action is specified in {@link #closeAction}. - * To prevent the Window closing when the escape key is pressed, specify this as - * Ext.emptyFn (See {@link Ext#emptyFn}). - */ - /** - * @cfg {Boolean} collapsed - * True to render the window collapsed, false to render it expanded (defaults to false). Note that if - * {@link #expandOnShow} is true (the default) it will override the collapsed config and the window - * will always be expanded when shown. - */ - /** - * @cfg {Boolean} maximized - * True to initially display the window in a maximized state. (Defaults to false). - */ - - /** - * @cfg {String} baseCls - * The base CSS class to apply to this panel's element (defaults to 'x-window'). - */ - baseCls : 'x-window', - /** - * @cfg {Boolean} resizable - * True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true). - */ - resizable : true, - /** - * @cfg {Boolean} draggable - * True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true). Note - * that by default the window will be centered in the viewport, so if dragging is disabled the window may need - * to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);). - */ - draggable : true, - /** - * @cfg {Boolean} closable - *

      True to display the 'close' tool button and allow the user to close the window, false to - * hide the button and disallow closing the window (defaults to true).

      - *

      By default, when close is requested by either clicking the close button in the header - * or pressing ESC when the Window has focus, the {@link #close} method will be called. This - * will {@link Ext.Component#destroy destroy} the Window and its content meaning that - * it may not be reused.

      - *

      To make closing a Window hide the Window so that it may be reused, set - * {@link #closeAction} to 'hide'. - */ - closable : true, - /** - * @cfg {String} closeAction - *

      The action to take when the close header tool is clicked: - *

        - *
      • '{@link #close}' : Default
        - * {@link #close remove} the window from the DOM and {@link Ext.Component#destroy destroy} - * it and all descendant Components. The window will not be available to be - * redisplayed via the {@link #show} method. - *
      • - *
      • '{@link #hide}' :
        - * {@link #hide} the window by setting visibility to hidden and applying negative offsets. - * The window will be available to be redisplayed via the {@link #show} method. - *
      • - *
      - *

      Note: This setting does not affect the {@link #close} method - * which will always {@link Ext.Component#destroy destroy} the window. To - * programatically hide a window, call {@link #hide}.

      - */ - closeAction : 'close', - /** - * @cfg {Boolean} constrain - * True to constrain the window within its containing element, false to allow it to fall outside of its - * containing element. By default the window will be rendered to document.body. To render and constrain the - * window within another element specify {@link #renderTo}. - * (defaults to false). Optionally the header only can be constrained using {@link #constrainHeader}. - */ - constrain : false, - /** - * @cfg {Boolean} constrainHeader - * True to constrain the window header within its containing element (allowing the window body to fall outside - * of its containing element) or false to allow the header to fall outside its containing element (defaults to - * false). Optionally the entire window can be constrained using {@link #constrain}. - */ - constrainHeader : false, - /** - * @cfg {Boolean} plain - * True to render the window body with a transparent background so that it will blend into the framing - * elements, false to add a lighter background color to visually highlight the body element and separate it - * more distinctly from the surrounding frame (defaults to false). - */ - plain : false, - /** - * @cfg {Boolean} minimizable - * True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button - * and disallow minimizing the window (defaults to false). Note that this button provides no implementation -- - * the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a - * custom minimize behavior implemented for this option to be useful. - */ - minimizable : false, - /** - * @cfg {Boolean} maximizable - * True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button - * and disallow maximizing the window (defaults to false). Note that when a window is maximized, the tool button - * will automatically change to a 'restore' button with the appropriate behavior already built-in that will - * restore the window to its previous size. - */ - maximizable : false, - /** - * @cfg {Number} minHeight - * The minimum height in pixels allowed for this window (defaults to 100). Only applies when resizable = true. - */ - minHeight : 100, - /** - * @cfg {Number} minWidth - * The minimum width in pixels allowed for this window (defaults to 200). Only applies when resizable = true. - */ - minWidth : 200, - /** - * @cfg {Boolean} expandOnShow - * True to always expand the window when it is displayed, false to keep it in its current state (which may be - * {@link #collapsed}) when displayed (defaults to true). - */ - expandOnShow : true, - - /** - * @cfg {Number} showAnimDuration The number of seconds that the window show animation takes if enabled. - * Defaults to 0.25 - */ - showAnimDuration: 0.25, - - /** - * @cfg {Number} hideAnimDuration The number of seconds that the window hide animation takes if enabled. - * Defaults to 0.25 - */ - hideAnimDuration: 0.25, - - // inherited docs, same default - collapsible : false, - - /** - * @cfg {Boolean} initHidden - * True to hide the window until show() is explicitly called (defaults to true). - * @deprecated - */ - initHidden : undefined, - - /** - * @cfg {Boolean} hidden - * Render this component hidden (default is true). If true, the - * {@link #hide} method will be called internally. - */ - hidden : true, - - // The following configs are set to provide the basic functionality of a window. - // Changing them would require additional code to handle correctly and should - // usually only be done in subclasses that can provide custom behavior. Changing them - // may have unexpected or undesirable results. - /** @cfg {String} elements @hide */ - elements : 'header,body', - /** @cfg {Boolean} frame @hide */ - frame : true, - /** @cfg {Boolean} floating @hide */ - floating : true, - - // private - initComponent : function(){ - this.initTools(); - Ext.Window.superclass.initComponent.call(this); - this.addEvents( - /** - * @event activate - * Fires after the window has been visually activated via {@link #setActive}. - * @param {Ext.Window} this - */ - /** - * @event deactivate - * Fires after the window has been visually deactivated via {@link #setActive}. - * @param {Ext.Window} this - */ - /** - * @event resize - * Fires after the window has been resized. - * @param {Ext.Window} this - * @param {Number} width The window's new width - * @param {Number} height The window's new height - */ - 'resize', - /** - * @event maximize - * Fires after the window has been maximized. - * @param {Ext.Window} this - */ - 'maximize', - /** - * @event minimize - * Fires after the window has been minimized. - * @param {Ext.Window} this - */ - 'minimize', - /** - * @event restore - * Fires after the window has been restored to its original size after being maximized. - * @param {Ext.Window} this - */ - 'restore' - ); - // for backwards compat, this should be removed at some point - if(Ext.isDefined(this.initHidden)){ - this.hidden = this.initHidden; - } - if(this.hidden === false){ - this.hidden = true; - this.show(); - } - }, - - // private - getState : function(){ - return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox(true)); - }, - - // private - onRender : function(ct, position){ - Ext.Window.superclass.onRender.call(this, ct, position); - - if(this.plain){ - this.el.addClass('x-window-plain'); - } - - // this element allows the Window to be focused for keyboard events - this.focusEl = this.el.createChild({ - tag: 'a', href:'#', cls:'x-dlg-focus', - tabIndex:'-1', html: ' '}); - this.focusEl.swallowEvent('click', true); - - this.proxy = this.el.createProxy('x-window-proxy'); - this.proxy.enableDisplayMode('block'); - - if(this.modal){ - this.mask = this.container.createChild({cls:'ext-el-mask'}, this.el.dom); - this.mask.enableDisplayMode('block'); - this.mask.hide(); - this.mon(this.mask, 'click', this.focus, this); - } - if(this.maximizable){ - this.mon(this.header, 'dblclick', this.toggleMaximize, this); - } - }, - - // private - initEvents : function(){ - Ext.Window.superclass.initEvents.call(this); - if(this.animateTarget){ - this.setAnimateTarget(this.animateTarget); - } - - if(this.resizable){ - this.resizer = new Ext.Resizable(this.el, { - minWidth: this.minWidth, - minHeight:this.minHeight, - handles: this.resizeHandles || 'all', - pinned: true, - resizeElement : this.resizerAction, - handleCls: 'x-window-handle' - }); - this.resizer.window = this; - this.mon(this.resizer, 'beforeresize', this.beforeResize, this); - } - - if(this.draggable){ - this.header.addClass('x-window-draggable'); - } - this.mon(this.el, 'mousedown', this.toFront, this); - this.manager = this.manager || Ext.WindowMgr; - this.manager.register(this); - if(this.maximized){ - this.maximized = false; - this.maximize(); - } - if(this.closable){ - var km = this.getKeyMap(); - km.on(27, this.onEsc, this); - km.disable(); - } - }, - - initDraggable : function(){ - /** - *

      If this Window is configured {@link #draggable}, this property will contain - * an instance of {@link Ext.dd.DD} which handles dragging the Window's DOM Element.

      - *

      This has implementations of startDrag, onDrag and endDrag - * which perform the dragging action. If extra logic is needed at these points, use - * {@link Function#createInterceptor createInterceptor} or {@link Function#createSequence createSequence} to - * augment the existing implementations.

      - * @type Ext.dd.DD - * @property dd - */ - this.dd = new Ext.Window.DD(this); - }, - - // private - onEsc : function(k, e){ - if (this.activeGhost) { - this.unghost(); - } - e.stopEvent(); - this[this.closeAction](); - }, - - // private - beforeDestroy : function(){ - if(this.rendered){ - this.hide(); - this.clearAnchor(); - Ext.destroy( - this.focusEl, - this.resizer, - this.dd, - this.proxy, - this.mask - ); - } - Ext.Window.superclass.beforeDestroy.call(this); - }, - - // private - onDestroy : function(){ - if(this.manager){ - this.manager.unregister(this); - } - Ext.Window.superclass.onDestroy.call(this); - }, - - // private - initTools : function(){ - if(this.minimizable){ - this.addTool({ - id: 'minimize', - handler: this.minimize.createDelegate(this, []) - }); - } - if(this.maximizable){ - this.addTool({ - id: 'maximize', - handler: this.maximize.createDelegate(this, []) - }); - this.addTool({ - id: 'restore', - handler: this.restore.createDelegate(this, []), - hidden:true - }); - } - if(this.closable){ - this.addTool({ - id: 'close', - handler: this[this.closeAction].createDelegate(this, []) - }); - } - }, - - // private - resizerAction : function(){ - var box = this.proxy.getBox(); - this.proxy.hide(); - this.window.handleResize(box); - return box; - }, - - // private - beforeResize : function(){ - this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40); // 40 is a magic minimum content size? - this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40); - this.resizeBox = this.el.getBox(); - }, - - // private - updateHandles : function(){ - if(Ext.isIE && this.resizer){ - this.resizer.syncHandleHeight(); - this.el.repaint(); - } - }, - - // private - handleResize : function(box){ - var rz = this.resizeBox; - if(rz.x != box.x || rz.y != box.y){ - this.updateBox(box); - }else{ - this.setSize(box); - if (Ext.isIE6 && Ext.isStrict) { - this.doLayout(); - } - } - this.focus(); - this.updateHandles(); - this.saveState(); - }, - - /** - * Focuses the window. If a defaultButton is set, it will receive focus, otherwise the - * window itself will receive focus. - */ - focus : function(){ - var f = this.focusEl, - db = this.defaultButton, - t = typeof db, - el, - ct; - if(Ext.isDefined(db)){ - if(Ext.isNumber(db) && this.fbar){ - f = this.fbar.items.get(db); - }else if(Ext.isString(db)){ - f = Ext.getCmp(db); - }else{ - f = db; - } - el = f.getEl(); - ct = Ext.getDom(this.container); - if (el && ct) { - if (ct != document.body && !Ext.lib.Region.getRegion(ct).contains(Ext.lib.Region.getRegion(el.dom))){ - return; - } - } - } - f = f || this.focusEl; - f.focus.defer(10, f); - }, - - /** - * Sets the target element from which the window should animate while opening. - * @param {String/Element} el The target element or id - */ - setAnimateTarget : function(el){ - el = Ext.get(el); - this.animateTarget = el; - }, - - // private - beforeShow : function(){ - delete this.el.lastXY; - delete this.el.lastLT; - if(this.x === undefined || this.y === undefined){ - var xy = this.el.getAlignToXY(this.container, 'c-c'); - var pos = this.el.translatePoints(xy[0], xy[1]); - this.x = this.x === undefined? pos.left : this.x; - this.y = this.y === undefined? pos.top : this.y; - } - this.el.setLeftTop(this.x, this.y); - - if(this.expandOnShow){ - this.expand(false); - } - - if(this.modal){ - Ext.getBody().addClass('x-body-masked'); - this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); - this.mask.show(); - } - }, - - /** - * Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden. - * @param {String/Element} animateTarget (optional) The target element or id from which the window should - * animate while opening (defaults to null with no animation) - * @param {Function} callback (optional) A callback function to call after the window is displayed - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to this Window. - * @return {Ext.Window} this - */ - show : function(animateTarget, cb, scope){ - if(!this.rendered){ - this.render(Ext.getBody()); - } - if(this.hidden === false){ - this.toFront(); - return this; - } - if(this.fireEvent('beforeshow', this) === false){ - return this; - } - if(cb){ - this.on('show', cb, scope, {single:true}); - } - this.hidden = false; - if(Ext.isDefined(animateTarget)){ - this.setAnimateTarget(animateTarget); - } - this.beforeShow(); - if(this.animateTarget){ - this.animShow(); - }else{ - this.afterShow(); - } - return this; - }, - - // private - afterShow : function(isAnim){ - if (this.isDestroyed){ - return false; - } - this.proxy.hide(); - this.el.setStyle('display', 'block'); - this.el.show(); - if(this.maximized){ - this.fitContainer(); - } - if(Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug - this.cascade(this.setAutoScroll); - } - - if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){ - Ext.EventManager.onWindowResize(this.onWindowResize, this); - } - this.doConstrain(); - this.doLayout(); - if(this.keyMap){ - this.keyMap.enable(); - } - this.toFront(); - this.updateHandles(); - if(isAnim && (Ext.isIE || Ext.isWebKit)){ - var sz = this.getSize(); - this.onResize(sz.width, sz.height); - } - this.onShow(); - this.fireEvent('show', this); - }, - - // private - animShow : function(){ - this.proxy.show(); - this.proxy.setBox(this.animateTarget.getBox()); - this.proxy.setOpacity(0); - var b = this.getBox(); - this.el.setStyle('display', 'none'); - this.proxy.shift(Ext.apply(b, { - callback: this.afterShow.createDelegate(this, [true], false), - scope: this, - easing: 'easeNone', - duration: this.showAnimDuration, - opacity: 0.5 - })); - }, - - /** - * Hides the window, setting it to invisible and applying negative offsets. - * @param {String/Element} animateTarget (optional) The target element or id to which the window should - * animate while hiding (defaults to null with no animation) - * @param {Function} callback (optional) A callback function to call after the window is hidden - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to this Window. - * @return {Ext.Window} this - */ - hide : function(animateTarget, cb, scope){ - if(this.hidden || this.fireEvent('beforehide', this) === false){ - return this; - } - if(cb){ - this.on('hide', cb, scope, {single:true}); - } - this.hidden = true; - if(animateTarget !== undefined){ - this.setAnimateTarget(animateTarget); - } - if(this.modal){ - this.mask.hide(); - Ext.getBody().removeClass('x-body-masked'); - } - if(this.animateTarget){ - this.animHide(); - }else{ - this.el.hide(); - this.afterHide(); - } - return this; - }, - - // private - afterHide : function(){ - this.proxy.hide(); - if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){ - Ext.EventManager.removeResizeListener(this.onWindowResize, this); - } - if(this.keyMap){ - this.keyMap.disable(); - } - this.onHide(); - this.fireEvent('hide', this); - }, - - // private - animHide : function(){ - this.proxy.setOpacity(0.5); - this.proxy.show(); - var tb = this.getBox(false); - this.proxy.setBox(tb); - this.el.hide(); - this.proxy.shift(Ext.apply(this.animateTarget.getBox(), { - callback: this.afterHide, - scope: this, - duration: this.hideAnimDuration, - easing: 'easeNone', - opacity: 0 - })); - }, - - /** - * Method that is called immediately before the show event is fired. - * Defaults to Ext.emptyFn. - */ - onShow : Ext.emptyFn, - - /** - * Method that is called immediately before the hide event is fired. - * Defaults to Ext.emptyFn. - */ - onHide : Ext.emptyFn, - - // private - onWindowResize : function(){ - if(this.maximized){ - this.fitContainer(); - } - if(this.modal){ - this.mask.setSize('100%', '100%'); - var force = this.mask.dom.offsetHeight; - this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); - } - this.doConstrain(); - }, - - // private - doConstrain : function(){ - if(this.constrain || this.constrainHeader){ - var offsets; - if(this.constrain){ - offsets = { - right:this.el.shadowOffset, - left:this.el.shadowOffset, - bottom:this.el.shadowOffset - }; - }else { - var s = this.getSize(); - offsets = { - right:-(s.width - 100), - bottom:-(s.height - 25 + this.el.getConstrainOffset()) - }; - } - - var xy = this.el.getConstrainToXY(this.container, true, offsets); - if(xy){ - this.setPosition(xy[0], xy[1]); - } - } - }, - - // private - used for dragging - ghost : function(cls){ - var ghost = this.createGhost(cls); - var box = this.getBox(true); - ghost.setLeftTop(box.x, box.y); - ghost.setWidth(box.width); - this.el.hide(); - this.activeGhost = ghost; - return ghost; - }, - - // private - unghost : function(show, matchPosition){ - if(!this.activeGhost) { - return; - } - if(show !== false){ - this.el.show(); - this.focus.defer(10, this); - if(Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug - this.cascade(this.setAutoScroll); - } - } - if(matchPosition !== false){ - this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true)); - } - this.activeGhost.hide(); - this.activeGhost.remove(); - delete this.activeGhost; - }, - - /** - * Placeholder method for minimizing the window. By default, this method simply fires the {@link #minimize} event - * since the behavior of minimizing a window is application-specific. To implement custom minimize behavior, - * either the minimize event can be handled or this method can be overridden. - * @return {Ext.Window} this - */ - minimize : function(){ - this.fireEvent('minimize', this); - return this; - }, - - /** - *

      Closes the Window, removes it from the DOM, {@link Ext.Component#destroy destroy}s - * the Window object and all its descendant Components. The {@link Ext.Panel#beforeclose beforeclose} - * event is fired before the close happens and will cancel the close action if it returns false.

      - *

      Note: This method is not affected by the {@link #closeAction} setting which - * only affects the action triggered when clicking the {@link #closable 'close' tool in the header}. - * To hide the Window without destroying it, call {@link #hide}.

      - */ - close : function(){ - if(this.fireEvent('beforeclose', this) !== false){ - if(this.hidden){ - this.doClose(); - }else{ - this.hide(null, this.doClose, this); - } - } - }, - - // private - doClose : function(){ - this.fireEvent('close', this); - this.destroy(); - }, - - /** - * Fits the window within its current container and automatically replaces - * the {@link #maximizable 'maximize' tool button} with the 'restore' tool button. - * Also see {@link #toggleMaximize}. - * @return {Ext.Window} this - */ - maximize : function(){ - if(!this.maximized){ - this.expand(false); - this.restoreSize = this.getSize(); - this.restorePos = this.getPosition(true); - if (this.maximizable){ - this.tools.maximize.hide(); - this.tools.restore.show(); - } - this.maximized = true; - this.el.disableShadow(); - - if(this.dd){ - this.dd.lock(); - } - if(this.collapsible){ - this.tools.toggle.hide(); - } - this.el.addClass('x-window-maximized'); - this.container.addClass('x-window-maximized-ct'); - - this.setPosition(0, 0); - this.fitContainer(); - this.fireEvent('maximize', this); - } - return this; - }, - - /** - * Restores a {@link #maximizable maximized} window back to its original - * size and position prior to being maximized and also replaces - * the 'restore' tool button with the 'maximize' tool button. - * Also see {@link #toggleMaximize}. - * @return {Ext.Window} this - */ - restore : function(){ - if(this.maximized){ - var t = this.tools; - this.el.removeClass('x-window-maximized'); - if(t.restore){ - t.restore.hide(); - } - if(t.maximize){ - t.maximize.show(); - } - this.setPosition(this.restorePos[0], this.restorePos[1]); - this.setSize(this.restoreSize.width, this.restoreSize.height); - delete this.restorePos; - delete this.restoreSize; - this.maximized = false; - this.el.enableShadow(true); - - if(this.dd){ - this.dd.unlock(); - } - if(this.collapsible && t.toggle){ - t.toggle.show(); - } - this.container.removeClass('x-window-maximized-ct'); - - this.doConstrain(); - this.fireEvent('restore', this); - } - return this; - }, - - /** - * A shortcut method for toggling between {@link #maximize} and {@link #restore} based on the current maximized - * state of the window. - * @return {Ext.Window} this - */ - toggleMaximize : function(){ - return this[this.maximized ? 'restore' : 'maximize'](); - }, - - // private - fitContainer : function(){ - var vs = this.container.getViewSize(false); - this.setSize(vs.width, vs.height); - }, - - // private - // z-index is managed by the WindowManager and may be overwritten at any time - setZIndex : function(index){ - if(this.modal){ - this.mask.setStyle('z-index', index); - } - this.el.setZIndex(++index); - index += 5; - - if(this.resizer){ - this.resizer.proxy.setStyle('z-index', ++index); - } - - this.lastZIndex = index; - }, - - /** - * Aligns the window to the specified element - * @param {Mixed} element The element to align to. - * @param {String} position (optional, defaults to "tl-bl?") The position to align to (see {@link Ext.Element#alignTo} for more details). - * @param {Array} offsets (optional) Offset the positioning by [x, y] - * @return {Ext.Window} this - */ - alignTo : function(element, position, offsets){ - var xy = this.el.getAlignToXY(element, position, offsets); - this.setPagePosition(xy[0], xy[1]); - return this; - }, - - /** - * Anchors this window to another element and realigns it when the window is resized or scrolled. - * @param {Mixed} element The element to align to. - * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details) - * @param {Array} offsets (optional) Offset the positioning by [x, y] - * @param {Boolean/Number} monitorScroll (optional) true to monitor body scroll and reposition. If this parameter - * is a number, it is used as the buffer delay (defaults to 50ms). - * @return {Ext.Window} this - */ - anchorTo : function(el, alignment, offsets, monitorScroll){ - this.clearAnchor(); - this.anchorTarget = { - el: el, - alignment: alignment, - offsets: offsets - }; - - Ext.EventManager.onWindowResize(this.doAnchor, this); - var tm = typeof monitorScroll; - if(tm != 'undefined'){ - Ext.EventManager.on(window, 'scroll', this.doAnchor, this, - {buffer: tm == 'number' ? monitorScroll : 50}); - } - return this.doAnchor(); - }, - - /** - * Performs the anchor, using the saved anchorTarget property. - * @return {Ext.Window} this - * @private - */ - doAnchor : function(){ - var o = this.anchorTarget; - this.alignTo(o.el, o.alignment, o.offsets); - return this; - }, - - /** - * Removes any existing anchor from this window. See {@link #anchorTo}. - * @return {Ext.Window} this - */ - clearAnchor : function(){ - if(this.anchorTarget){ - Ext.EventManager.removeResizeListener(this.doAnchor, this); - Ext.EventManager.un(window, 'scroll', this.doAnchor, this); - delete this.anchorTarget; - } - return this; - }, - - /** - * Brings this window to the front of any other visible windows - * @param {Boolean} e (optional) Specify false to prevent the window from being focused. - * @return {Ext.Window} this - */ - toFront : function(e){ - if(this.manager.bringToFront(this)){ - if(!e || !e.getTarget().focus){ - this.focus(); - } - } - return this; - }, - - /** - * Makes this the active window by showing its shadow, or deactivates it by hiding its shadow. This method also - * fires the {@link #activate} or {@link #deactivate} event depending on which action occurred. This method is - * called internally by {@link Ext.WindowMgr}. - * @param {Boolean} active True to activate the window, false to deactivate it (defaults to false) - */ - setActive : function(active){ - if(active){ - if(!this.maximized){ - this.el.enableShadow(true); - } - this.fireEvent('activate', this); - }else{ - this.el.disableShadow(); - this.fireEvent('deactivate', this); - } - }, - - /** - * Sends this window to the back of (lower z-index than) any other visible windows - * @return {Ext.Window} this - */ - toBack : function(){ - this.manager.sendToBack(this); - return this; - }, - - /** - * Centers this window in the viewport - * @return {Ext.Window} this - */ - center : function(){ - var xy = this.el.getAlignToXY(this.container, 'c-c'); - this.setPagePosition(xy[0], xy[1]); - return this; - } - - /** - * @cfg {Boolean} autoWidth @hide - **/ -}); -Ext.reg('window', Ext.Window); - -// private - custom Window DD implementation -Ext.Window.DD = Ext.extend(Ext.dd.DD, { - - constructor : function(win){ - this.win = win; - Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id); - this.setHandleElId(win.header.id); - this.scroll = false; - }, - - moveOnly:true, - headerOffsets:[100, 25], - startDrag : function(){ - var w = this.win; - this.proxy = w.ghost(w.initialConfig.cls); - if(w.constrain !== false){ - var so = w.el.shadowOffset; - this.constrainTo(w.container, {right: so, left: so, bottom: so}); - }else if(w.constrainHeader !== false){ - var s = this.proxy.getSize(); - this.constrainTo(w.container, {right: -(s.width-this.headerOffsets[0]), bottom: -(s.height-this.headerOffsets[1])}); - } - }, - b4Drag : Ext.emptyFn, - - onDrag : function(e){ - this.alignElWithMouse(this.proxy, e.getPageX(), e.getPageY()); - }, - - endDrag : function(e){ - this.win.unghost(); - this.win.saveState(); - } -}); -/** - * @class Ext.WindowGroup - * An object that manages a group of {@link Ext.Window} instances and provides z-order management - * and window activation behavior. - * @constructor - */ -Ext.WindowGroup = function(){ - var list = {}; - var accessList = []; - var front = null; - - // private - var sortWindows = function(d1, d2){ - return (!d1._lastAccess || d1._lastAccess < d2._lastAccess) ? -1 : 1; - }; - - // private - var orderWindows = function(){ - var a = accessList, len = a.length; - if(len > 0){ - a.sort(sortWindows); - var seed = a[0].manager.zseed; - for(var i = 0; i < len; i++){ - var win = a[i]; - if(win && !win.hidden){ - win.setZIndex(seed + (i*10)); - } - } - } - activateLast(); - }; - - // private - var setActiveWin = function(win){ - if(win != front){ - if(front){ - front.setActive(false); - } - front = win; - if(win){ - win.setActive(true); - } - } - }; - - // private - var activateLast = function(){ - for(var i = accessList.length-1; i >=0; --i) { - if(!accessList[i].hidden){ - setActiveWin(accessList[i]); - return; - } - } - // none to activate - setActiveWin(null); - }; - - return { - /** - * The starting z-index for windows in this WindowGroup (defaults to 9000) - * @type Number The z-index value - */ - zseed : 9000, - - /** - *

      Registers a {@link Ext.Window Window} with this WindowManager. This should not - * need to be called under normal circumstances. Windows are automatically registered - * with a {@link Ext.Window#manager manager} at construction time.

      - *

      Where this may be useful is moving Windows between two WindowManagers. For example, - * to bring the Ext.MessageBox dialog under the same manager as the Desktop's - * WindowManager in the desktop sample app:

      -var msgWin = Ext.MessageBox.getDialog();
      -MyDesktop.getDesktop().getManager().register(msgWin);
      -
      - * @param {Window} win The Window to register. - */ - register : function(win){ - if(win.manager){ - win.manager.unregister(win); - } - win.manager = this; - - list[win.id] = win; - accessList.push(win); - win.on('hide', activateLast); - }, - - /** - *

      Unregisters a {@link Ext.Window Window} from this WindowManager. This should not - * need to be called. Windows are automatically unregistered upon destruction. - * See {@link #register}.

      - * @param {Window} win The Window to unregister. - */ - unregister : function(win){ - delete win.manager; - delete list[win.id]; - win.un('hide', activateLast); - accessList.remove(win); - }, - - /** - * Gets a registered window by id. - * @param {String/Object} id The id of the window or a {@link Ext.Window} instance - * @return {Ext.Window} - */ - get : function(id){ - return typeof id == "object" ? id : list[id]; - }, - - /** - * Brings the specified window to the front of any other active windows in this WindowGroup. - * @param {String/Object} win The id of the window or a {@link Ext.Window} instance - * @return {Boolean} True if the dialog was brought to the front, else false - * if it was already in front - */ - bringToFront : function(win){ - win = this.get(win); - if(win != front){ - win._lastAccess = new Date().getTime(); - orderWindows(); - return true; - } - return false; - }, - - /** - * Sends the specified window to the back of other active windows in this WindowGroup. - * @param {String/Object} win The id of the window or a {@link Ext.Window} instance - * @return {Ext.Window} The window - */ - sendToBack : function(win){ - win = this.get(win); - win._lastAccess = -(new Date().getTime()); - orderWindows(); - return win; - }, - - /** - * Hides all windows in this WindowGroup. - */ - hideAll : function(){ - for(var id in list){ - if(list[id] && typeof list[id] != "function" && list[id].isVisible()){ - list[id].hide(); - } - } - }, - - /** - * Gets the currently-active window in this WindowGroup. - * @return {Ext.Window} The active window - */ - getActive : function(){ - return front; - }, - - /** - * Returns zero or more windows in this WindowGroup using the custom search function passed to this method. - * The function should accept a single {@link Ext.Window} reference as its only argument and should - * return true if the window matches the search criteria, otherwise it should return false. - * @param {Function} fn The search function - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the Window being tested. - * that gets passed to the function if not specified) - * @return {Array} An array of zero or more matching windows - */ - getBy : function(fn, scope){ - var r = []; - for(var i = accessList.length-1; i >=0; --i) { - var win = accessList[i]; - if(fn.call(scope||win, win) !== false){ - r.push(win); - } - } - return r; - }, - - /** - * Executes the specified function once for every window in this WindowGroup, passing each - * window as the only parameter. Returning false from the function will stop the iteration. - * @param {Function} fn The function to execute for each item - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the current Window in the iteration. - */ - each : function(fn, scope){ - for(var id in list){ - if(list[id] && typeof list[id] != "function"){ - if(fn.call(scope || list[id], list[id]) === false){ - return; - } - } - } - } - }; -}; - - -/** - * @class Ext.WindowMgr - * @extends Ext.WindowGroup - * The default global window group that is available automatically. To have more than one group of windows - * with separate z-order stacks, create additional instances of {@link Ext.WindowGroup} as needed. - * @singleton - */ -Ext.WindowMgr = new Ext.WindowGroup();/** - * @class Ext.MessageBox - *

      Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.

      - *

      Note that the MessageBox is asynchronous. Unlike a regular JavaScript alert (which will halt - * browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code - * that should only run after some user feedback from the MessageBox, you must use a callback function - * (see the function parameter for {@link #show} for more details).

      - *

      Example usage:

      - *
      
      -// Basic alert:
      -Ext.Msg.alert('Status', 'Changes saved successfully.');
      -
      -// Prompt for user data and process the result using a callback:
      -Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
      -    if (btn == 'ok'){
      -        // process text value and close...
      -    }
      -});
      -
      -// Show a dialog using config options:
      -Ext.Msg.show({
      -   title:'Save Changes?',
      -   msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
      -   buttons: Ext.Msg.YESNOCANCEL,
      -   fn: processResult,
      -   animEl: 'elId',
      -   icon: Ext.MessageBox.QUESTION
      -});
      -
      - * @singleton - */ -Ext.MessageBox = function(){ - var dlg, opt, mask, waitTimer, - bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl, - buttons, activeTextEl, bwidth, bufferIcon = '', iconCls = '', - buttonNames = ['ok', 'yes', 'no', 'cancel']; - - // private - var handleButton = function(button){ - buttons[button].blur(); - if(dlg.isVisible()){ - dlg.hide(); - handleHide(); - Ext.callback(opt.fn, opt.scope||window, [button, activeTextEl.dom.value, opt], 1); - } - }; - - // private - var handleHide = function(){ - if(opt && opt.cls){ - dlg.el.removeClass(opt.cls); - } - progressBar.reset(); - }; - - // private - var handleEsc = function(d, k, e){ - if(opt && opt.closable !== false){ - dlg.hide(); - handleHide(); - } - if(e){ - e.stopEvent(); - } - }; - - // private - var updateButtons = function(b){ - var width = 0, - cfg; - if(!b){ - Ext.each(buttonNames, function(name){ - buttons[name].hide(); - }); - return width; - } - dlg.footer.dom.style.display = ''; - Ext.iterate(buttons, function(name, btn){ - cfg = b[name]; - if(cfg){ - btn.show(); - btn.setText(Ext.isString(cfg) ? cfg : Ext.MessageBox.buttonText[name]); - width += btn.getEl().getWidth() + 15; - }else{ - btn.hide(); - } - }); - return width; - }; - - return { - /** - * Returns a reference to the underlying {@link Ext.Window} element - * @return {Ext.Window} The window - */ - getDialog : function(titleText){ - if(!dlg){ - var btns = []; - - buttons = {}; - Ext.each(buttonNames, function(name){ - btns.push(buttons[name] = new Ext.Button({ - text: this.buttonText[name], - handler: handleButton.createCallback(name), - hideMode: 'offsets' - })); - }, this); - dlg = new Ext.Window({ - autoCreate : true, - title:titleText, - resizable:false, - constrain:true, - constrainHeader:true, - minimizable : false, - maximizable : false, - stateful: false, - modal: true, - shim:true, - buttonAlign:"center", - width:400, - height:100, - minHeight: 80, - plain:true, - footer:true, - closable:true, - close : function(){ - if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ - handleButton("no"); - }else{ - handleButton("cancel"); - } - }, - fbar: new Ext.Toolbar({ - items: btns, - enableOverflow: false - }) - }); - dlg.render(document.body); - dlg.getEl().addClass('x-window-dlg'); - mask = dlg.mask; - bodyEl = dlg.body.createChild({ - html:'

      ' - }); - iconEl = Ext.get(bodyEl.dom.firstChild); - var contentEl = bodyEl.dom.childNodes[1]; - msgEl = Ext.get(contentEl.firstChild); - textboxEl = Ext.get(contentEl.childNodes[2].firstChild); - textboxEl.enableDisplayMode(); - textboxEl.addKeyListener([10,13], function(){ - if(dlg.isVisible() && opt && opt.buttons){ - if(opt.buttons.ok){ - handleButton("ok"); - }else if(opt.buttons.yes){ - handleButton("yes"); - } - } - }); - textareaEl = Ext.get(contentEl.childNodes[2].childNodes[1]); - textareaEl.enableDisplayMode(); - progressBar = new Ext.ProgressBar({ - renderTo:bodyEl - }); - bodyEl.createChild({cls:'x-clear'}); - } - return dlg; - }, - - /** - * Updates the message box body text - * @param {String} text (optional) Replaces the message box element's innerHTML with the specified string (defaults to - * the XHTML-compliant non-breaking space character '&#160;') - * @return {Ext.MessageBox} this - */ - updateText : function(text){ - if(!dlg.isVisible() && !opt.width){ - dlg.setSize(this.maxWidth, 100); // resize first so content is never clipped from previous shows - } - // Append a space here for sizing. In IE, for some reason, it wraps text incorrectly without one in some cases - msgEl.update(text ? text + ' ' : ' '); - - var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0, - mw = msgEl.getWidth() + msgEl.getMargins('lr'), - fw = dlg.getFrameWidth('lr'), - bw = dlg.body.getFrameWidth('lr'), - w; - - w = Math.max(Math.min(opt.width || iw+mw+fw+bw, opt.maxWidth || this.maxWidth), - Math.max(opt.minWidth || this.minWidth, bwidth || 0)); - - if(opt.prompt === true){ - activeTextEl.setWidth(w-iw-fw-bw); - } - if(opt.progress === true || opt.wait === true){ - progressBar.setSize(w-iw-fw-bw); - } - if(Ext.isIE && w == bwidth){ - w += 4; //Add offset when the content width is smaller than the buttons. - } - msgEl.update(text || ' '); - dlg.setSize(w, 'auto').center(); - return this; - }, - - /** - * Updates a progress-style message box's text and progress bar. Only relevant on message boxes - * initiated via {@link Ext.MessageBox#progress} or {@link Ext.MessageBox#wait}, - * or by calling {@link Ext.MessageBox#show} with progress: true. - * @param {Number} value Any number between 0 and 1 (e.g., .5, defaults to 0) - * @param {String} progressText The progress text to display inside the progress bar (defaults to '') - * @param {String} msg The message box's body text is replaced with the specified string (defaults to undefined - * so that any existing body text will not get overwritten by default unless a new value is passed in) - * @return {Ext.MessageBox} this - */ - updateProgress : function(value, progressText, msg){ - progressBar.updateProgress(value, progressText); - if(msg){ - this.updateText(msg); - } - return this; - }, - - /** - * Returns true if the message box is currently displayed - * @return {Boolean} True if the message box is visible, else false - */ - isVisible : function(){ - return dlg && dlg.isVisible(); - }, - - /** - * Hides the message box if it is displayed - * @return {Ext.MessageBox} this - */ - hide : function(){ - var proxy = dlg ? dlg.activeGhost : null; - if(this.isVisible() || proxy){ - dlg.hide(); - handleHide(); - if (proxy){ - // unghost is a private function, but i saw no better solution - // to fix the locking problem when dragging while it closes - dlg.unghost(false, false); - } - } - return this; - }, - - /** - * Displays a new message box, or reinitializes an existing message box, based on the config options - * passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally, - * although those calls are basic shortcuts and do not support all of the config options allowed here. - * @param {Object} config The following config options are supported:
        - *
      • animEl : String/Element
        An id or Element from which the message box should animate as it - * opens and closes (defaults to undefined)
      • - *
      • buttons : Object/Boolean
        A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo', - * cancel:'Bar'}), or false to not show any buttons (defaults to false)
      • - *
      • closable : Boolean
        False to hide the top-right close button (defaults to true). Note that - * progress and wait dialogs will ignore this property and always hide the close button as they can only - * be closed programmatically.
      • - *
      • cls : String
        A custom CSS class to apply to the message box's container element
      • - *
      • defaultTextHeight : Number
        The default height in pixels of the message box's multiline textarea - * if displayed (defaults to 75)
      • - *
      • fn : Function
        A callback function which is called when the dialog is dismissed either - * by clicking on the configured buttons, or on the dialog close button, or by pressing - * the return button to enter input. - *

        Progress and wait dialogs will ignore this option since they do not respond to user - * actions and can only be closed programmatically, so any required function should be called - * by the same code after it closes the dialog. Parameters passed:

          - *
        • buttonId : String
          The ID of the button pressed, one of:
            - *
          • ok
          • - *
          • yes
          • - *
          • no
          • - *
          • cancel
          • - *
        • - *
        • text : String
          Value of the input field if either prompt - * or multiline is true
        • - *
        • opt : Object
          The config object passed to show.
        • - *

      • - *
      • scope : Object
        The scope of the callback function
      • - *
      • icon : String
        A CSS class that provides a background image to be used as the body icon for the - * dialog (e.g. Ext.MessageBox.WARNING or 'custom-class') (defaults to '')
      • - *
      • iconCls : String
        The standard {@link Ext.Window#iconCls} to - * add an optional header icon (defaults to '')
      • - *
      • maxWidth : Number
        The maximum width in pixels of the message box (defaults to 600)
      • - *
      • minWidth : Number
        The minimum width in pixels of the message box (defaults to 100)
      • - *
      • modal : Boolean
        False to allow user interaction with the page while the message box is - * displayed (defaults to true)
      • - *
      • msg : String
        A string that will replace the existing message box body text (defaults to the - * XHTML-compliant non-breaking space character '&#160;')
      • - *
      • multiline : Boolean
        - * True to prompt the user to enter multi-line text (defaults to false)
      • - *
      • progress : Boolean
        True to display a progress bar (defaults to false)
      • - *
      • progressText : String
        The text to display inside the progress bar if progress = true (defaults to '')
      • - *
      • prompt : Boolean
        True to prompt the user to enter single-line text (defaults to false)
      • - *
      • proxyDrag : Boolean
        True to display a lightweight proxy while dragging (defaults to false)
      • - *
      • title : String
        The title text
      • - *
      • value : String
        The string value to set into the active textbox element if displayed
      • - *
      • wait : Boolean
        True to display a progress bar (defaults to false)
      • - *
      • waitConfig : Object
        A {@link Ext.ProgressBar#waitConfig} object (applies only if wait = true)
      • - *
      • width : Number
        The width of the dialog in pixels
      • - *
      - * Example usage: - *
      
      -Ext.Msg.show({
      -   title: 'Address',
      -   msg: 'Please enter your address:',
      -   width: 300,
      -   buttons: Ext.MessageBox.OKCANCEL,
      -   multiline: true,
      -   fn: saveAddress,
      -   animEl: 'addAddressBtn',
      -   icon: Ext.MessageBox.INFO
      -});
      -
      - * @return {Ext.MessageBox} this - */ - show : function(options){ - if(this.isVisible()){ - this.hide(); - } - opt = options; - var d = this.getDialog(opt.title || " "); - - d.setTitle(opt.title || " "); - var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true); - d.tools.close.setDisplayed(allowClose); - activeTextEl = textboxEl; - opt.prompt = opt.prompt || (opt.multiline ? true : false); - if(opt.prompt){ - if(opt.multiline){ - textboxEl.hide(); - textareaEl.show(); - textareaEl.setHeight(Ext.isNumber(opt.multiline) ? opt.multiline : this.defaultTextHeight); - activeTextEl = textareaEl; - }else{ - textboxEl.show(); - textareaEl.hide(); - } - }else{ - textboxEl.hide(); - textareaEl.hide(); - } - activeTextEl.dom.value = opt.value || ""; - if(opt.prompt){ - d.focusEl = activeTextEl; - }else{ - var bs = opt.buttons; - var db = null; - if(bs && bs.ok){ - db = buttons["ok"]; - }else if(bs && bs.yes){ - db = buttons["yes"]; - } - if (db){ - d.focusEl = db; - } - } - if(Ext.isDefined(opt.iconCls)){ - d.setIconClass(opt.iconCls); - } - this.setIcon(Ext.isDefined(opt.icon) ? opt.icon : bufferIcon); - bwidth = updateButtons(opt.buttons); - progressBar.setVisible(opt.progress === true || opt.wait === true); - this.updateProgress(0, opt.progressText); - this.updateText(opt.msg); - if(opt.cls){ - d.el.addClass(opt.cls); - } - d.proxyDrag = opt.proxyDrag === true; - d.modal = opt.modal !== false; - d.mask = opt.modal !== false ? mask : false; - if(!d.isVisible()){ - // force it to the end of the z-index stack so it gets a cursor in FF - document.body.appendChild(dlg.el.dom); - d.setAnimateTarget(opt.animEl); - //workaround for window internally enabling keymap in afterShow - d.on('show', function(){ - if(allowClose === true){ - d.keyMap.enable(); - }else{ - d.keyMap.disable(); - } - }, this, {single:true}); - d.show(opt.animEl); - } - if(opt.wait === true){ - progressBar.wait(opt.waitConfig); - } - return this; - }, - - /** - * Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default - * styling, and the class passed in is expected to supply the background image url. Pass in empty string ('') - * to clear any existing icon. This method must be called before the MessageBox is shown. - * The following built-in icon classes are supported, but you can also pass in a custom class name: - *
      -Ext.MessageBox.INFO
      -Ext.MessageBox.WARNING
      -Ext.MessageBox.QUESTION
      -Ext.MessageBox.ERROR
      -         *
      - * @param {String} icon A CSS classname specifying the icon's background image url, or empty string to clear the icon - * @return {Ext.MessageBox} this - */ - setIcon : function(icon){ - if(!dlg){ - bufferIcon = icon; - return; - } - bufferIcon = undefined; - if(icon && icon != ''){ - iconEl.removeClass('x-hidden'); - iconEl.replaceClass(iconCls, icon); - bodyEl.addClass('x-dlg-icon'); - iconCls = icon; - }else{ - iconEl.replaceClass(iconCls, 'x-hidden'); - bodyEl.removeClass('x-dlg-icon'); - iconCls = ''; - } - return this; - }, - - /** - * Displays a message box with a progress bar. This message box has no buttons and is not closeable by - * the user. You are responsible for updating the progress bar as needed via {@link Ext.MessageBox#updateProgress} - * and closing the message box when the process is complete. - * @param {String} title The title bar text - * @param {String} msg The message box body text - * @param {String} progressText (optional) The text to display inside the progress bar (defaults to '') - * @return {Ext.MessageBox} this - */ - progress : function(title, msg, progressText){ - this.show({ - title : title, - msg : msg, - buttons: false, - progress:true, - closable:false, - minWidth: this.minProgressWidth, - progressText: progressText - }); - return this; - }, - - /** - * Displays a message box with an infinitely auto-updating progress bar. This can be used to block user - * interaction while waiting for a long-running process to complete that does not have defined intervals. - * You are responsible for closing the message box when the process is complete. - * @param {String} msg The message box body text - * @param {String} title (optional) The title bar text - * @param {Object} config (optional) A {@link Ext.ProgressBar#waitConfig} object - * @return {Ext.MessageBox} this - */ - wait : function(msg, title, config){ - this.show({ - title : title, - msg : msg, - buttons: false, - closable:false, - wait:true, - modal:true, - minWidth: this.minProgressWidth, - waitConfig: config - }); - return this; - }, - - /** - * Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt). - * If a callback function is passed it will be called after the user clicks the button, and the - * id of the button that was clicked will be passed as the only parameter to the callback - * (could also be the top-right close button). - * @param {String} title The title bar text - * @param {String} msg The message box body text - * @param {Function} fn (optional) The callback function invoked after the message box is closed - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to the browser wnidow. - * @return {Ext.MessageBox} this - */ - alert : function(title, msg, fn, scope){ - this.show({ - title : title, - msg : msg, - buttons: this.OK, - fn: fn, - scope : scope, - minWidth: this.minWidth - }); - return this; - }, - - /** - * Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm). - * If a callback function is passed it will be called after the user clicks either button, - * and the id of the button that was clicked will be passed as the only parameter to the callback - * (could also be the top-right close button). - * @param {String} title The title bar text - * @param {String} msg The message box body text - * @param {Function} fn (optional) The callback function invoked after the message box is closed - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to the browser wnidow. - * @return {Ext.MessageBox} this - */ - confirm : function(title, msg, fn, scope){ - this.show({ - title : title, - msg : msg, - buttons: this.YESNO, - fn: fn, - scope : scope, - icon: this.QUESTION, - minWidth: this.minWidth - }); - return this; - }, - - /** - * Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). - * The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user - * clicks either button, and the id of the button that was clicked (could also be the top-right - * close button) and the text that was entered will be passed as the two parameters to the callback. - * @param {String} title The title bar text - * @param {String} msg The message box body text - * @param {Function} fn (optional) The callback function invoked after the message box is closed - * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to the browser wnidow. - * @param {Boolean/Number} multiline (optional) True to create a multiline textbox using the defaultTextHeight - * property, or the height in pixels to create the textbox (defaults to false / single-line) - * @param {String} value (optional) Default value of the text input element (defaults to '') - * @return {Ext.MessageBox} this - */ - prompt : function(title, msg, fn, scope, multiline, value){ - this.show({ - title : title, - msg : msg, - buttons: this.OKCANCEL, - fn: fn, - minWidth: this.minPromptWidth, - scope : scope, - prompt:true, - multiline: multiline, - value: value - }); - return this; - }, - - /** - * Button config that displays a single OK button - * @type Object - */ - OK : {ok:true}, - /** - * Button config that displays a single Cancel button - * @type Object - */ - CANCEL : {cancel:true}, - /** - * Button config that displays OK and Cancel buttons - * @type Object - */ - OKCANCEL : {ok:true, cancel:true}, - /** - * Button config that displays Yes and No buttons - * @type Object - */ - YESNO : {yes:true, no:true}, - /** - * Button config that displays Yes, No and Cancel buttons - * @type Object - */ - YESNOCANCEL : {yes:true, no:true, cancel:true}, - /** - * The CSS class that provides the INFO icon image - * @type String - */ - INFO : 'ext-mb-info', - /** - * The CSS class that provides the WARNING icon image - * @type String - */ - WARNING : 'ext-mb-warning', - /** - * The CSS class that provides the QUESTION icon image - * @type String - */ - QUESTION : 'ext-mb-question', - /** - * The CSS class that provides the ERROR icon image - * @type String - */ - ERROR : 'ext-mb-error', - - /** - * The default height in pixels of the message box's multiline textarea if displayed (defaults to 75) - * @type Number - */ - defaultTextHeight : 75, - /** - * The maximum width in pixels of the message box (defaults to 600) - * @type Number - */ - maxWidth : 600, - /** - * The minimum width in pixels of the message box (defaults to 100) - * @type Number - */ - minWidth : 100, - /** - * The minimum width in pixels of the message box if it is a progress-style dialog. This is useful - * for setting a different minimum width than text-only dialogs may need (defaults to 250). - * @type Number - */ - minProgressWidth : 250, - /** - * The minimum width in pixels of the message box if it is a prompt dialog. This is useful - * for setting a different minimum width than text-only dialogs may need (defaults to 250). - * @type Number - */ - minPromptWidth: 250, - /** - * An object containing the default button text strings that can be overriden for localized language support. - * Supported properties are: ok, cancel, yes and no. Generally you should include a locale-specific - * resource file for handling language support across the framework. - * Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french - * @type Object - */ - buttonText : { - ok : "OK", - cancel : "Cancel", - yes : "Yes", - no : "No" - } - }; -}(); - -/** - * Shorthand for {@link Ext.MessageBox} - */ -Ext.Msg = Ext.MessageBox;/** - * @class Ext.dd.PanelProxy - * A custom drag proxy implementation specific to {@link Ext.Panel}s. This class is primarily used internally - * for the Panel's drag drop implementation, and should never need to be created directly. - * @constructor - * @param panel The {@link Ext.Panel} to proxy for - * @param config Configuration options - */ -Ext.dd.PanelProxy = Ext.extend(Object, { - - constructor : function(panel, config){ - this.panel = panel; - this.id = this.panel.id +'-ddproxy'; - Ext.apply(this, config); - }, - - /** - * @cfg {Boolean} insertProxy True to insert a placeholder proxy element while dragging the panel, - * false to drag with no proxy (defaults to true). - */ - insertProxy : true, - - // private overrides - setStatus : Ext.emptyFn, - reset : Ext.emptyFn, - update : Ext.emptyFn, - stop : Ext.emptyFn, - sync: Ext.emptyFn, - - /** - * Gets the proxy's element - * @return {Element} The proxy's element - */ - getEl : function(){ - return this.ghost; - }, - - /** - * Gets the proxy's ghost element - * @return {Element} The proxy's ghost element - */ - getGhost : function(){ - return this.ghost; - }, - - /** - * Gets the proxy's element - * @return {Element} The proxy's element - */ - getProxy : function(){ - return this.proxy; - }, - - /** - * Hides the proxy - */ - hide : function(){ - if(this.ghost){ - if(this.proxy){ - this.proxy.remove(); - delete this.proxy; - } - this.panel.el.dom.style.display = ''; - this.ghost.remove(); - delete this.ghost; - } - }, - - /** - * Shows the proxy - */ - show : function(){ - if(!this.ghost){ - this.ghost = this.panel.createGhost(this.panel.initialConfig.cls, undefined, Ext.getBody()); - this.ghost.setXY(this.panel.el.getXY()); - if(this.insertProxy){ - this.proxy = this.panel.el.insertSibling({cls:'x-panel-dd-spacer'}); - this.proxy.setSize(this.panel.getSize()); - } - this.panel.el.dom.style.display = 'none'; - } - }, - - // private - repair : function(xy, callback, scope){ - this.hide(); - if(typeof callback == "function"){ - callback.call(scope || this); - } - }, - - /** - * Moves the proxy to a different position in the DOM. This is typically called while dragging the Panel - * to keep the proxy sync'd to the Panel's location. - * @param {HTMLElement} parentNode The proxy's parent DOM node - * @param {HTMLElement} before (optional) The sibling node before which the proxy should be inserted (defaults - * to the parent's last child if not specified) - */ - moveProxy : function(parentNode, before){ - if(this.proxy){ - parentNode.insertBefore(this.proxy.dom, before); - } - } -}); - -// private - DD implementation for Panels -Ext.Panel.DD = Ext.extend(Ext.dd.DragSource, { - - constructor : function(panel, cfg){ - this.panel = panel; - this.dragData = {panel: panel}; - this.proxy = new Ext.dd.PanelProxy(panel, cfg); - Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg); - var h = panel.header, - el = panel.body; - if(h){ - this.setHandleElId(h.id); - el = panel.header; - } - el.setStyle('cursor', 'move'); - this.scroll = false; - }, - - showFrame: Ext.emptyFn, - startDrag: Ext.emptyFn, - b4StartDrag: function(x, y) { - this.proxy.show(); - }, - b4MouseDown: function(e) { - var x = e.getPageX(), - y = e.getPageY(); - this.autoOffset(x, y); - }, - onInitDrag : function(x, y){ - this.onStartDrag(x, y); - return true; - }, - createFrame : Ext.emptyFn, - getDragEl : function(e){ - return this.proxy.ghost.dom; - }, - endDrag : function(e){ - this.proxy.hide(); - this.panel.saveState(); - }, - - autoOffset : function(x, y) { - x -= this.startPageX; - y -= this.startPageY; - this.setDelta(x, y); - } -}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/window.js b/web-client/src/main/resources/apps/js/ext/pkgs/window.js deleted file mode 100644 index 5da1d440aae..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/window.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,showAnimDuration:0.25,hideAnimDuration:0.25,collapsible:false,initHidden:undefined,hidden:true,elements:"header,body",frame:true,floating:true,initComponent:function(){this.initTools();Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(Ext.isDefined(this.initHidden)){this.hidden=this.initHidden}if(this.hidden===false){this.hidden=true;this.show()}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},onRender:function(b,a){Ext.Window.superclass.onRender.call(this,b,a);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:" "});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide();this.mon(this.mask,"click",this.focus,this)}if(this.maximizable){this.mon(this.header,"dblclick",this.toggleMaximize,this)}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction,handleCls:"x-window-handle"});this.resizer.window=this;this.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var a=this.getKeyMap();a.on(27,this.onEsc,this);a.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(a,b){if(this.activeGhost){this.unghost()}b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){if(this.rendered){this.hide();this.clearAnchor();Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask)}Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager){this.manager.unregister(this)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true})}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var a=this.proxy.getBox();this.proxy.hide();this.window.handleResize(a);return a},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(b){var a=this.resizeBox;if(a.x!=b.x||a.y!=b.y){this.updateBox(b)}else{this.setSize(b);if(Ext.isIE6&&Ext.isStrict){this.doLayout()}}this.focus();this.updateHandles();this.saveState()},focus:function(){var e=this.focusEl,a=this.defaultButton,c=typeof a,d,b;if(Ext.isDefined(a)){if(Ext.isNumber(a)&&this.fbar){e=this.fbar.items.get(a)}else{if(Ext.isString(a)){e=Ext.getCmp(a)}else{e=a}}d=e.getEl();b=Ext.getDom(this.container);if(d&&b){if(b!=document.body&&!Ext.lib.Region.getRegion(b).contains(Ext.lib.Region.getRegion(d.dom))){return}}}e=e||this.focusEl;e.focus.defer(10,e)},setAnimateTarget:function(a){a=Ext.get(a);this.animateTarget=a},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var a=this.el.getAlignToXY(this.container,"c-c");var b=this.el.translatePoints(a[0],a[1]);this.x=this.x===undefined?b.left:this.x;this.y=this.y===undefined?b.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(c,a,b){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return this}if(this.fireEvent("beforeshow",this)===false){return this}if(a){this.on("show",a,b,{single:true})}this.hidden=false;if(Ext.isDefined(c)){this.setAnimateTarget(c)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}return this},afterShow:function(b){if(this.isDestroyed){return false}this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}this.onShow();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var a=this.getBox();this.el.setStyle("display","none");this.proxy.shift(Ext.apply(a,{callback:this.afterShow.createDelegate(this,[true],false),scope:this,easing:"easeNone",duration:this.showAnimDuration,opacity:0.5}))},hide:function(c,a,b){if(this.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.keyMap){this.keyMap.disable()}this.onHide();this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var a=this.getBox(false);this.proxy.setBox(a);this.el.hide();this.proxy.shift(Ext.apply(this.animateTarget.getBox(),{callback:this.afterHide,scope:this,duration:this.hideAnimDuration,easing:"easeNone",opacity:0}))},onShow:Ext.emptyFn,onHide:Ext.emptyFn,onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var a=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var b;if(this.constrain){b={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var a=this.getSize();b={right:-(a.width-100),bottom:-(a.height-25+this.el.getConstrainOffset())}}var c=this.el.getConstrainToXY(this.container,true,b);if(c){this.setPosition(c[0],c[1])}}},ghost:function(a){var c=this.createGhost(a);var b=this.getBox(true);c.setLeftTop(b.x,b.y);c.setWidth(b.width);this.el.hide();this.activeGhost=c;return c},unghost:function(b,a){if(!this.activeGhost){return}if(b!==false){this.el.show();this.focus.defer(10,this);if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}}if(a!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this);return this},close:function(){if(this.fireEvent("beforeclose",this)!==false){if(this.hidden){this.doClose()}else{this.hide(null,this.doClose,this)}}},doClose:function(){this.fireEvent("close",this);this.destroy()},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();this.tools.restore.show()}this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock()}if(this.collapsible){this.tools.toggle.hide()}this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}return this},restore:function(){if(this.maximized){var a=this.tools;this.el.removeClass("x-window-maximized");if(a.restore){a.restore.hide()}if(a.maximize){a.maximize.show()}this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock()}if(this.collapsible&&a.toggle){a.toggle.show()}this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize(false);this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){this.clearAnchor();this.anchorTarget={el:c,alignment:e,offsets:d};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}return this.doAnchor()},doAnchor:function(){var a=this.anchorTarget;this.alignTo(a.el,a.alignment,a.offsets);return this},clearAnchor:function(){if(this.anchorTarget){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this);delete this.anchorTarget}return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){this.focus()}}return this},setActive:function(a){if(a){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a[0],a[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=Ext.extend(Ext.dd.DD,{constructor:function(a){this.win=a;Ext.Window.DD.superclass.constructor.call(this,a.el.id,"WindowDD-"+a.id);this.setHandleElId(a.header.id);this.scroll=false},moveOnly:true,headerOffsets:[100,25],startDrag:function(){var a=this.win;this.proxy=a.ghost(a.initialConfig.cls);if(a.constrain!==false){var c=a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.constrainHeader!==false){var b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b.width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(a){this.alignElWithMouse(this.proxy,a.getPageX(),a.getPageY())},endDrag:function(a){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var f={};var d=[];var e=null;var c=function(i,h){return(!i._lastAccess||i._lastAccess0){k.sort(c);var j=k[0].manager.zseed;for(var l=0;l=0;--h){if(!d[h].hidden){b(d[h]);return}}b(null)};return{zseed:9000,register:function(h){if(h.manager){h.manager.unregister(h)}h.manager=this;f[h.id]=h;d.push(h);h.on("hide",a)},unregister:function(h){delete h.manager;delete f[h.id];h.un("hide",a);d.remove(h)},get:function(h){return typeof h=="object"?h:f[h]},bringToFront:function(h){h=this.get(h);if(h!=e){h._lastAccess=new Date().getTime();g();return true}return false},sendToBack:function(h){h=this.get(h);h._lastAccess=-(new Date().getTime());g();return h},hideAll:function(){for(var h in f){if(f[h]&&typeof f[h]!="function"&&f[h].isVisible()){f[h].hide()}}},getActive:function(){return e},getBy:function(k,j){var l=[];for(var h=d.length-1;h>=0;--h){var m=d[h];if(k.call(j||m,m)!==false){l.push(m)}}return l},each:function(i,h){for(var j in f){if(f[j]&&typeof f[j]!="function"){if(i.call(h||f[j],f[j])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var t,b,p,s,g,k,r,a,m,o,i,f,q,u,n,h="",d="",l=["ok","yes","no","cancel"];var c=function(w){q[w].blur();if(t.isVisible()){t.hide();v();Ext.callback(b.fn,b.scope||window,[w,u.dom.value,b],1)}};var v=function(){if(b&&b.cls){t.el.removeClass(b.cls)}m.reset()};var e=function(y,w,x){if(b&&b.closable!==false){t.hide();v()}if(x){x.stopEvent()}};var j=function(w){var y=0,x;if(!w){Ext.each(l,function(z){q[z].hide()});return y}t.footer.dom.style.display="";Ext.iterate(q,function(z,A){x=w[z];if(x){A.show();A.setText(Ext.isString(x)?x:Ext.MessageBox.buttonText[z]);y+=A.getEl().getWidth()+15}else{A.hide()}});return y};return{getDialog:function(w){if(!t){var y=[];q={};Ext.each(l,function(z){y.push(q[z]=new Ext.Button({text:this.buttonText[z],handler:c.createCallback(z),hideMode:"offsets"}))},this);t=new Ext.Window({autoCreate:true,title:w,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){c("no")}else{c("cancel")}},fbar:new Ext.Toolbar({items:y,enableOverflow:false})});t.render(document.body);t.getEl().addClass("x-window-dlg");p=t.mask;g=t.body.createChild({html:'

      '});i=Ext.get(g.dom.firstChild);var x=g.dom.childNodes[1];k=Ext.get(x.firstChild);r=Ext.get(x.childNodes[2].firstChild);r.enableDisplayMode();r.addKeyListener([10,13],function(){if(t.isVisible()&&b&&b.buttons){if(b.buttons.ok){c("ok")}else{if(b.buttons.yes){c("yes")}}}});a=Ext.get(x.childNodes[2].childNodes[1]);a.enableDisplayMode();m=new Ext.ProgressBar({renderTo:g});g.createChild({cls:"x-clear"})}return t},updateText:function(A){if(!t.isVisible()&&!b.width){t.setSize(this.maxWidth,100)}k.update(A?A+" ":" ");var y=d!=""?(i.getWidth()+i.getMargins("lr")):0,C=k.getWidth()+k.getMargins("lr"),z=t.getFrameWidth("lr"),B=t.body.getFrameWidth("lr"),x;x=Math.max(Math.min(b.width||y+C+z+B,b.maxWidth||this.maxWidth),Math.max(b.minWidth||this.minWidth,n||0));if(b.prompt===true){u.setWidth(x-y-z-B)}if(b.progress===true||b.wait===true){m.setSize(x-y-z-B)}if(Ext.isIE&&x==n){x+=4}k.update(A||" ");t.setSize(x,"auto").center();return this},updateProgress:function(x,w,y){m.updateProgress(x,w);if(y){this.updateText(y)}return this},isVisible:function(){return t&&t.isVisible()},hide:function(){var w=t?t.activeGhost:null;if(this.isVisible()||w){t.hide();v();if(w){t.unghost(false,false)}}return this},show:function(z){if(this.isVisible()){this.hide()}b=z;var A=this.getDialog(b.title||" ");A.setTitle(b.title||" ");var w=(b.closable!==false&&b.progress!==true&&b.wait!==true);A.tools.close.setDisplayed(w);u=r;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){r.hide();a.show();a.setHeight(Ext.isNumber(b.multiline)?b.multiline:this.defaultTextHeight);u=a}else{r.show();a.hide()}}else{r.hide();a.hide()}u.dom.value=b.value||"";if(b.prompt){A.focusEl=u}else{var y=b.buttons;var x=null;if(y&&y.ok){x=q.ok}else{if(y&&y.yes){x=q.yes}}if(x){A.focusEl=x}}if(Ext.isDefined(b.iconCls)){A.setIconClass(b.iconCls)}this.setIcon(Ext.isDefined(b.icon)?b.icon:h);n=j(b.buttons);m.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.cls){A.el.addClass(b.cls)}A.proxyDrag=b.proxyDrag===true;A.modal=b.modal!==false;A.mask=b.modal!==false?p:false;if(!A.isVisible()){document.body.appendChild(t.el.dom);A.setAnimateTarget(b.animEl);A.on("show",function(){if(w===true){A.keyMap.enable()}else{A.keyMap.disable()}},this,{single:true});A.show(b.animEl)}if(b.wait===true){m.wait(b.waitConfig)}return this},setIcon:function(w){if(!t){h=w;return}h=undefined;if(w&&w!=""){i.removeClass("x-hidden");i.replaceClass(d,w);g.addClass("x-dlg-icon");d=w}else{i.replaceClass(d,"x-hidden");g.removeClass("x-dlg-icon");d=""}return this},progress:function(y,x,w){this.show({title:y,msg:x,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:w});return this},wait:function(y,x,w){this.show({title:x,msg:y,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:w});return this},alert:function(z,y,x,w){this.show({title:z,msg:y,buttons:this.OK,fn:x,scope:w,minWidth:this.minWidth});return this},confirm:function(z,y,x,w){this.show({title:z,msg:y,buttons:this.YESNO,fn:x,scope:w,icon:this.QUESTION,minWidth:this.minWidth});return this},prompt:function(B,A,y,x,w,z){this.show({title:B,msg:A,buttons:this.OKCANCEL,fn:y,minWidth:this.minPromptWidth,scope:x,prompt:true,multiline:w,value:z});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;Ext.dd.PanelProxy=Ext.extend(Object,{constructor:function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(this.panel.initialConfig.cls,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.Panel.DD=Ext.extend(Ext.dd.DragSource,{constructor:function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=new Ext.dd.PanelProxy(b,a);Ext.Panel.DD.superclass.constructor.call(this,b.el,a);var d=b.header,c=b.body;if(d){this.setHandleElId(d.id);c=b.header}c.setStyle("cursor","move");this.scroll=false},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/release-notes.html b/web-client/src/main/resources/apps/js/ext/release-notes.html deleted file mode 100644 index f76f1daffba..00000000000 --- a/web-client/src/main/resources/apps/js/ext/release-notes.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - Release Notes for Ext JS 3.4.0 - - - - -

      - -

      -

      - Release Notes for Ext JS 3.4.0 -

      -

      - Release Date: June 9, 2011
      - Current Version: 3.4.0 (rev 7395/288)
      - Previous Version: 3.3.3 (rev 7389/286) -

      -

      - Changes -

      -

      - Menu -

      -
        -
      • Incorrect menu width on IE9 -
      • -
      • Fix Reorderable example -
      • -
      -

      - Form/Field -

      -
        -
      • Fix an issue with composite fields being marked incorrectly -
      • -
      • Trigger fields are now flushed with fields on IE9 -
      • -
      • Fix field width in IE9 -
      • -
      • Fix fieldset header checkboxes in IE9 quirks -
      • -
      -

      - Misc -

      -
        -
      • Allow altText to be specified on a per item basis for grid columns -
      • -
      • Ensure there's no bottom margin on the multi-select -
      • -
      • Apply additional css classes for IE9 (ext-ie9 and x-quirks) -
      • -
      • Apply additional boolean flags for IE9 (Ext.isIE9 and Ext.isIEQuirks) -
      • -
      • Add support to insertHTML method to prevent createContextualFragment errors with IE9 -
      • -
      - - diff --git a/web-client/src/main/resources/apps/js/ext/resources/charts.swf b/web-client/src/main/resources/apps/js/ext/resources/charts.swf deleted file mode 100644 index 472ca22e792..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/charts.swf and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/README.txt b/web-client/src/main/resources/apps/js/ext/resources/css/README.txt deleted file mode 100644 index 84ec2e7f89e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -2010-03-16 jwr: -The CSS file, yourtheme.css, is an exact copy of xtheme-blue.css. Feel free to edit the images inside the yourtheme image directory to build your custom theme--just remember to update your background-image file paths in yourtheme.css. - -2006-11-21 jvs: -ext-all.css contains all of the other css files combined and stripped of comments (except themes). - diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/debug.css b/web-client/src/main/resources/apps/js/ext/resources/css/debug.css deleted file mode 100644 index 23a7cfe1137..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/debug.css +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -#x-debug-browser .x-tree .x-tree-node a span { - padding-top:2px; - line-height:18px; -} - -#x-debug-browser .x-tool-toggle { - background-position:0 -75px; -} - -#x-debug-browser .x-tool-toggle-over { - background-position:-15px -75px; -} - -#x-debug-browser.x-panel-collapsed .x-tool-toggle { - background-position:0 -60px; -} - -#x-debug-browser.x-panel-collapsed .x-tool-toggle-over { - background-position:-15px -60px; -}#x-debug-browser .x-tree .x-tree-node a span { - color:#222297; - font-size:11px; - font-family:"monotype","courier new",sans-serif; -} - -#x-debug-browser .x-tree a i { - color:#ff4545; - font-style:normal; -} - -#x-debug-browser .x-tree a em { - color:#999; -} - -#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ - background-color:#c3daf9; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/ext-all-notheme.css b/web-client/src/main/resources/apps/js/ext/resources/css/ext-all-notheme.css deleted file mode 100644 index 6bc67656899..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/ext-all-notheme.css +++ /dev/null @@ -1,5326 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} - -.ext-forced-border-box, .ext-forced-border-box * { - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -.ext-el-mask { - z-index: 100; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - width: 100%; - height: 100%; - zoom: 1; -} - -.ext-el-mask-msg { - z-index: 20001; - position: absolute; - top: 0; - left: 0; - border:1px solid; - background:repeat-x 0 -16px; - padding:2px; -} - -.ext-el-mask-msg div { - padding:5px 10px 5px 10px; - border:1px solid; - cursor:wait; -} - -.ext-shim { - position:absolute; - visibility:hidden; - left:0; - top:0; - overflow:hidden; -} - -.ext-ie .ext-shim { - filter: alpha(opacity=0); -} - -.ext-ie6 .ext-shim { - margin-left: 5px; - margin-top: 3px; -} - -.x-mask-loading div { - padding:5px 10px 5px 25px; - background:no-repeat 5px 5px; - line-height:16px; -} - -/* class for hiding elements without using display:none */ -.x-hidden, .x-hide-offsets { - position:absolute !important; - left:-10000px; - top:-10000px; - visibility:hidden; -} - -.x-hide-display { - display:none !important; -} - -.x-hide-nosize, -.x-hide-nosize * /* Emulate display:none for children */ - { - height:0px!important; - width:0px!important; - visibility:hidden!important; - border:none!important; - zoom:1; -} - -.x-hide-visibility { - visibility:hidden !important; -} - -.x-masked { - overflow: hidden !important; -} -.x-masked-relative { - position: relative !important; -} - -.x-masked select, .x-masked object, .x-masked embed { - visibility: hidden; -} - -.x-layer { - visibility: hidden; -} - -.x-unselectable, .x-unselectable * { - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select:ignore; -} - -.x-repaint { - zoom: 1; - background-color: transparent; - -moz-outline: none; - outline: none; -} - -.x-item-disabled { - cursor: default; - opacity: .6; - -moz-opacity: .6; - filter: alpha(opacity=60); -} - -.x-item-disabled * { - cursor: default !important; -} - -.x-form-radio-group .x-item-disabled { - filter: none; -} - -.x-splitbar-proxy { - position: absolute; - visibility: hidden; - z-index: 20001; - zoom: 1; - line-height: 1px; - font-size: 1px; - overflow: hidden; -} - -.x-splitbar-h, .x-splitbar-proxy-h { - cursor: e-resize; - cursor: col-resize; -} - -.x-splitbar-v, .x-splitbar-proxy-v { - cursor: s-resize; - cursor: row-resize; -} - -.x-color-palette { - width: 150px; - height: 92px; - cursor: pointer; -} - -.x-color-palette a { - border: 1px solid; - float: left; - padding: 2px; - text-decoration: none; - -moz-outline: 0 none; - outline: 0 none; - cursor: pointer; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border: 1px solid; -} - -.x-color-palette em { - display: block; - border: 1px solid; -} - -.x-color-palette em span { - cursor: pointer; - display: block; - height: 10px; - line-height: 10px; - width: 10px; -} - -.x-ie-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; - zoom:1; -} - -.x-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; -} - -.x-shadow * { - overflow: hidden; -} - -.x-shadow * { - padding: 0; - border: 0; - margin: 0; - clear: none; - zoom: 1; -} - -/* top bottom */ -.x-shadow .xstc, .x-shadow .xsbc { - height: 6px; - float: left; -} - -/* corners */ -.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { - width: 6px; - height: 6px; - float: left; -} - -/* sides */ -.x-shadow .xsc { - width: 100%; -} - -.x-shadow .xsml, .x-shadow .xsmr { - width: 6px; - float: left; - height: 100%; -} - -.x-shadow .xsmc { - float: left; - height: 100%; - background-color: transparent; -} - -.x-shadow .xst, .x-shadow .xsb { - height: 6px; - overflow: hidden; - width: 100%; -} - -.x-shadow .xsml { - background: transparent repeat-y 0 0; -} - -.x-shadow .xsmr { - background: transparent repeat-y -6px 0; -} - -.x-shadow .xstl { - background: transparent no-repeat 0 0; -} - -.x-shadow .xstc { - background: transparent repeat-x 0 -30px; -} - -.x-shadow .xstr { - background: transparent repeat-x 0 -18px; -} - -.x-shadow .xsbl { - background: transparent no-repeat 0 -12px; -} - -.x-shadow .xsbc { - background: transparent repeat-x 0 -36px; -} - -.x-shadow .xsbr { - background: transparent repeat-x 0 -6px; -} - -.loading-indicator { - background: no-repeat left; - padding-left: 20px; - line-height: 16px; - margin: 3px; -} - -.x-text-resize { - position: absolute; - left: -1000px; - top: -1000px; - visibility: hidden; - zoom: 1; -} - -.x-drag-overlay { - width: 100%; - height: 100%; - display: none; - position: absolute; - left: 0; - top: 0; - background-image:url(../images/default/s.gif); - z-index: 20000; -} - -.x-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - -.x-spotlight { - z-index: 8999; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - width:0; - height:0; - zoom: 1; -} - -#x-history-frame { - position:absolute; - top:-1px; - left:0; - width:1px; - height:1px; - visibility:hidden; -} - -#x-history-field { - position:absolute; - top:0; - left:-1px; - width:1px; - height:1px; - visibility:hidden; -} -.x-resizable-handle { - position:absolute; - z-index:100; - /* ie needs these */ - font-size:1px; - line-height:6px; - overflow:hidden; - filter:alpha(opacity=0); - opacity:0; - zoom:1; -} - -.x-resizable-handle-east{ - width:6px; - cursor:e-resize; - right:0; - top:0; - height:100%; -} - -.ext-ie .x-resizable-handle-east { - margin-right:-1px; /*IE rounding error*/ -} - -.x-resizable-handle-south{ - width:100%; - cursor:s-resize; - left:0; - bottom:0; - height:6px; -} - -.ext-ie .x-resizable-handle-south { - margin-bottom:-1px; /*IE rounding error*/ -} - -.x-resizable-handle-west{ - width:6px; - cursor:w-resize; - left:0; - top:0; - height:100%; -} - -.x-resizable-handle-north{ - width:100%; - cursor:n-resize; - left:0; - top:0; - height:6px; -} - -.x-resizable-handle-southeast{ - width:6px; - cursor:se-resize; - right:0; - bottom:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-northwest{ - width:6px; - cursor:nw-resize; - left:0; - top:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-northeast{ - width:6px; - cursor:ne-resize; - right:0; - top:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-southwest{ - width:6px; - cursor:sw-resize; - left:0; - bottom:0; - height:6px; - z-index:101; -} - -.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ - filter:alpha(opacity=100); - opacity:1; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-position: left; -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-position: top; -} - -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-position: top left; -} - -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-position:bottom right; -} - -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-position: bottom left; -} - -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-position: top right; -} - -.x-resizable-proxy{ - border: 1px dashed; - position:absolute; - overflow:hidden; - display:none; - left:0; - top:0; - z-index:50000; -} - -.x-resizable-overlay{ - width:100%; - height:100%; - display:none; - position:absolute; - left:0; - top:0; - z-index:200000; - -moz-opacity: 0; - opacity:0; - filter: alpha(opacity=0); -} -.x-tab-panel { - overflow:hidden; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border: 1px solid; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header { - border: 1px solid; - padding-bottom: 2px; -} - -.x-tab-panel-footer { - border: 1px solid; - padding-top: 2px; -} - -.x-tab-strip-wrap { - width:100%; - overflow:hidden; - position:relative; - zoom:1; -} - -ul.x-tab-strip { - display:block; - width:5000px; - zoom:1; -} - -ul.x-tab-strip-top{ - padding-top: 1px; - background: repeat-x bottom; - border-bottom: 1px solid; -} - -ul.x-tab-strip-bottom{ - padding-bottom: 1px; - background: repeat-x top; - border-top: 1px solid; - border-bottom: 0 none; -} - -.x-tab-panel-header-plain .x-tab-strip-top { - background:transparent !important; - padding-top:0 !important; -} - -.x-tab-panel-header-plain { - background:transparent !important; - border-width:0 !important; - padding-bottom:0 !important; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border:1px solid; - height:2px; - font-size:1px; - line-height:1px; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer { - border-top: 0 none; -} - -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-bottom: 0 none; -} - -.x-tab-panel-footer-plain .x-tab-strip-bottom { - background:transparent !important; - padding-bottom:0 !important; -} - -.x-tab-panel-footer-plain { - background:transparent !important; - border-width:0 !important; - padding-top:0 !important; -} - -.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, -.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { - height:3px; -} - -ul.x-tab-strip li { - float:left; - margin-left:2px; -} - -ul.x-tab-strip li.x-tab-edge { - float:left; - margin:0 !important; - padding:0 !important; - border:0 none !important; - font-size:1px !important; - line-height:1px !important; - overflow:hidden; - zoom:1; - background:transparent !important; - width:1px; -} - -.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { - display:block; -} - -.x-tab-strip a { - text-decoration:none !important; - -moz-outline: none; - outline: none; - cursor:pointer; -} - -.x-tab-strip-inner { - overflow:hidden; - text-overflow: ellipsis; -} - -.x-tab-strip span.x-tab-strip-text { - white-space: nowrap; - cursor:pointer; - padding:4px 0; -} - -.x-tab-strip-top .x-tab-with-icon .x-tab-right { - padding-left:6px; -} - -.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { - padding-left:20px; - background-position: 0 3px; - background-repeat: no-repeat; -} - -.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { - cursor:default; -} - -.x-tab-strip-active span.x-tab-strip-text { - cursor:default; -} - -.x-tab-strip-disabled .x-tabs-text { - cursor:default; -} - -.x-tab-panel-body { - overflow:hidden; -} - -.x-tab-panel-bwrap { - overflow:hidden; -} - -.ext-ie .x-tab-strip .x-tab-right { - position:relative; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-right { - margin-bottom:-1px; -} - -/* - * Horrible hack for IE8 in quirks mode - */ -.ext-ie8 .x-tab-strip li { - position: relative; -} -.ext-border-box .ext-ie8 .x-tab-strip-top .x-tab-right { - top: 1px; -} -.ext-ie8 .x-tab-strip-top { - padding-top: 1; -} -.ext-border-box .ext-ie8 .x-tab-strip-top { - padding-top: 0; -} -.ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - top:3px; -} -.ext-border-box .ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - top:4px; -} -.ext-ie8 .x-tab-strip-bottom .x-tab-right{ - top:0; -} - - -.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { - padding-bottom:5px; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - margin-top:-1px; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text { - padding-top:5px; -} - -.x-tab-strip-top .x-tab-right { - background: transparent no-repeat 0 -51px; - padding-left:10px; -} - -.x-tab-strip-top .x-tab-left { - background: transparent no-repeat right -351px; - padding-right:10px; -} - -.x-tab-strip-top .x-tab-strip-inner { - background: transparent repeat-x 0 -201px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-right { - background-position:0 -101px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-left { - background-position:right -401px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner { - background-position:0 -251px; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-right { - background-position: 0 0; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-left { - background-position: right -301px; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner { - background-position: 0 -151px; -} - -.x-tab-strip-bottom .x-tab-right { - background: no-repeat bottom right; -} - -.x-tab-strip-bottom .x-tab-left { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background: no-repeat bottom right; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-left { - margin-right: 3px; - padding:0 10px; -} - -.x-tab-strip-bottom .x-tab-right { - padding:0; -} - -.x-tab-strip .x-tab-strip-close { - display:none; -} - -.x-tab-strip-closable { - position:relative; -} - -.x-tab-strip-closable .x-tab-left { - padding-right:19px; -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - opacity:.6; - -moz-opacity:.6; - background-repeat:no-repeat; - display:block; - width:11px; - height:11px; - position:absolute; - top:3px; - right:3px; - cursor:pointer; - z-index:2; -} - -.x-tab-strip .x-tab-strip-active a.x-tab-strip-close { - opacity:.8; - -moz-opacity:.8; -} -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - opacity:1; - -moz-opacity:1; -} - -.x-tab-panel-body { - border: 1px solid; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background: transparent no-repeat -18px 0; - border-bottom: 1px solid; - width:18px; - position:absolute; - left:0; - top:0; - z-index:10; - cursor:pointer; -} -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background: transparent no-repeat 0 0; - border-bottom: 1px solid; - width:18px; - position:absolute; - right:0; - top:0; - z-index:10; - cursor:pointer; -} - -.x-tab-scroller-right-over { - background-position: -18px 0; -} - -.x-tab-scroller-right-disabled { - background-position: 0 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{ - margin-top: 1px; -} - -.x-tab-scrolling .x-tab-strip-wrap { - margin-left:18px; - margin-right:18px; -} - -.x-tab-scrolling { - position:relative; -} - -.x-tab-panel-bbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} - -.x-tab-panel-tbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -}/* all fields */ -.x-form-field{ - margin: 0 0 0 0; -} - -.ext-webkit *:focus{ - outline: none !important; -} - -/* ---- text fields ---- */ -.x-form-text, textarea.x-form-field{ - padding:1px 3px; - background:repeat-x 0 0; - border:1px solid; -} - -textarea.x-form-field { - padding:2px 3px; -} - -.x-form-text, .ext-ie .x-form-file { - height:22px; - line-height:18px; - vertical-align:middle; -} - -.ext-ie6 .x-form-text, .ext-ie7 .x-form-text { - margin:-1px 0; /* ie bogus margin bug */ - height:22px; /* ie quirks */ - line-height:18px; -} - -.x-quirks .ext-ie9 .x-form-text { - height: 22px; - padding-top: 3px; - padding-bottom: 0px; -} - -/* Ugly hacks for the bogus 1px margin bug in IE9 quirks */ -.x-quirks .ext-ie9 .x-input-wrapper .x-form-text, -.x-quirks .ext-ie9 .x-form-field-trigger-wrap .x-form-text { - margin-top: -1px; - margin-bottom: -1px; -} -.x-quirks .ext-ie9 .x-input-wrapper .x-form-element { - margin-bottom: -1px; -} - -.ext-ie6 .x-form-field-wrap .x-form-file-btn, .ext-ie7 .x-form-field-wrap .x-form-file-btn { - top: -1px; /* because of all these margin hacks, these buttons are off by one pixel in IE6,7 */ -} - -.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field { - margin:-1px 0; /* ie bogus margin bug */ -} - -.ext-strict .x-form-text { - height:18px; -} - -.ext-safari.ext-mac textarea.x-form-field { - margin-bottom:-2px; /* another bogus margin bug, safari/mac only */ -} - -/* -.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field { - margin-bottom: 1px; -} -*/ - -.ext-gecko .x-form-text , .ext-ie8 .x-form-text { - padding-top:2px; /* FF won't center the text vertically */ - padding-bottom:0; -} - -.ext-ie6 .x-form-composite .x-form-text.x-box-item, .ext-ie7 .x-form-composite .x-form-text.x-box-item { - margin: 0 !important; /* clear ie bogus margin bug fix */ -} - -textarea { - resize: none; /* Disable browser resizable textarea */ -} - -/* select boxes */ -.x-form-select-one { - height:20px; - line-height:18px; - vertical-align:middle; - border: 1px solid; -} - -/* multi select boxes */ - -/* --- TODO --- */ - -/* 2.0.2 style */ -.x-form-check-wrap { - line-height:18px; - height: auto; -} - -.ext-ie .x-form-check-wrap input { - width:15px; - height:15px; -} - -.x-form-check-wrap input{ - vertical-align: bottom; -} - -.x-editor .x-form-check-wrap { - padding:3px; -} - -.x-editor .x-form-checkbox { - height:13px; -} - -.x-form-check-group-label { - border-bottom: 1px solid; - margin-bottom: 5px; - padding-left: 3px !important; - float: none !important; -} - -/* wrapped fields and triggers */ -.x-form-field-wrap .x-form-trigger{ - width:17px; - height:21px; - border:0; - background:transparent no-repeat 0 0; - cursor:pointer; - border-bottom: 1px solid; - position:absolute; - top:0; -} - -.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{ - cursor:pointer; -} - -.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ - position:static; - top:auto; - vertical-align:top; -} - -.x-form-field-wrap { - position:relative; - left:0;top:0; - text-align: left; - zoom:1; - white-space: nowrap; -} - -.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-trigger { - right: 0; /* IE8 Strict mode trigger bug */ -} - -.x-form-field-wrap .x-form-trigger-over{ - background-position:-17px 0; -} - -.x-form-field-wrap .x-form-trigger-click{ - background-position:-34px 0; -} - -.x-trigger-wrap-focus .x-form-trigger{ - background-position:-51px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-over{ - background-position:-68px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-click{ - background-position:-85px 0; -} - -.x-trigger-wrap-focus .x-form-trigger{ - border-bottom: 1px solid; -} - -.x-item-disabled .x-form-trigger-over{ - background-position:0 0 !important; - border-bottom: 1px solid; -} - -.x-item-disabled .x-form-trigger-click{ - background-position:0 0 !important; - border-bottom: 1px solid; -} - -.x-trigger-noedit{ - cursor:pointer; -} - -/* field focus style */ -.x-form-focus, textarea.x-form-focus{ - border: 1px solid; -} - -/* invalid fields */ -.x-form-invalid, textarea.x-form-invalid{ - background:repeat-x bottom; - border: 1px solid; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid{ - background:repeat-x bottom; -} - -/* editors */ -.x-editor { - visibility:hidden; - padding:0; - margin:0; -} - -.x-form-grow-sizer { - left: -10000px; - padding: 8px 3px; - position: absolute; - visibility:hidden; - top: -10000px; - white-space: pre-wrap; - white-space: -moz-pre-wrap; - white-space: -pre-wrap; - white-space: -o-pre-wrap; - word-wrap: break-word; - zoom:1; -} - -.x-form-grow-sizer p { - margin:0 !important; - border:0 none !important; - padding:0 !important; -} - -/* Form Items CSS */ - -.x-form-item { - display:block; - margin-bottom:4px; - zoom:1; -} - -.x-form-item label.x-form-item-label { - display:block; - float:left; - width:100px; - padding:3px; - padding-left:0; - clear:left; - z-index:2; - position:relative; -} - -.x-form-element { - padding-left:105px; - position:relative; -} - -.x-form-invalid-msg { - padding:2px; - padding-left:18px; - background: transparent no-repeat 0 2px; - line-height:16px; - width:200px; -} - -.x-form-label-left label.x-form-item-label { - text-align:left; -} - -.x-form-label-right label.x-form-item-label { - text-align:right; -} - -.x-form-label-top .x-form-item label.x-form-item-label { - width:auto; - float:none; - clear:none; - display:inline; - margin-bottom:4px; - position:static; -} - -.x-form-label-top .x-form-element { - padding-left:0; - padding-top:4px; -} - -.x-form-label-top .x-form-item { - padding-bottom:4px; -} - -/* Editor small font for grid, toolbar and tree */ -.x-small-editor .x-form-text { - height:20px; - line-height:16px; - vertical-align:middle; -} - -.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { - margin-top:-1px !important; /* ie bogus margin bug */ - margin-bottom:-1px !important; - height:20px !important; /* ie quirks */ - line-height:16px !important; -} - -.ext-strict .x-small-editor .x-form-text { - height:16px !important; -} - -.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { - height:20px; - line-height:16px; -} - -.ext-border-box .x-small-editor .x-form-text { - height:20px; -} - -.x-small-editor .x-form-select-one { - height:20px; - line-height:16px; - vertical-align:middle; -} - -.x-small-editor .x-form-num-field { - text-align:right; -} - -.x-small-editor .x-form-field-wrap .x-form-trigger{ - height:19px; -} - -.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;} - -.ext-strict .ext-webkit .x-small-editor .x-form-text{ - height:14px !important; -} - -.x-form-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} -.x-form-clear-left { - clear:left; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - -.ext-ie6 .x-form-check-wrap input, .ext-border-box .x-form-check-wrap input{ - margin-top: 3px; -} - -.x-form-cb-label { - position: relative; - margin-left:4px; - top: 2px; -} - -.ext-ie .x-form-cb-label{ - top: 1px; -} - -.ext-ie6 .x-form-cb-label, .ext-border-box .x-form-cb-label{ - top: 3px; -} - -.x-form-display-field{ - padding-top: 2px; -} - -.ext-gecko .x-form-display-field, .ext-strict .ext-ie7 .x-form-display-field{ - padding-top: 1px; -} - -.ext-ie .x-form-display-field{ - padding-top: 3px; -} - -.ext-strict .ext-ie8 .x-form-display-field{ - padding-top: 0; -} - -.x-form-column { - float:left; - padding:0; - margin:0; - width:48%; - overflow:hidden; - zoom:1; -} - -/* buttons */ -.x-form .x-form-btns-ct .x-btn{ - float:right; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns td { - border:0; - padding:0; -} - -.x-form .x-form-btns-ct .x-form-btns-right table{ - float:right; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns-left table{ - float:left; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns-center{ - text-align:center; /*ie*/ -} - -.x-form .x-form-btns-ct .x-form-btns-center table{ - margin:0 auto; /*everyone else*/ -} - -.x-form .x-form-btns-ct table td.x-form-btn-td{ - padding:3px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ - background-position:0 -147px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ - background-position:0 -168px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ - background-position:0 -189px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-center{ - background-position:0 -126px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-right{ - background-position:0 -84px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-left{ - background-position:0 -63px; -} - -.x-form-invalid-icon { - width:16px; - height:18px; - visibility:hidden; - position:absolute; - left:0; - top:0; - display:block; - background:transparent no-repeat 0 2px; -} - -/* fieldsets */ -.x-fieldset { - border:1px solid; - padding:10px; - margin-bottom:10px; - display:block; /* preserve margins in IE */ -} - -/* make top of checkbox/tools visible in webkit */ -.ext-webkit .x-fieldset-header { - padding-top: 1px; -} - -.ext-ie .x-fieldset legend { - margin-bottom:10px; -} - -.ext-strict .ext-ie9 .x-fieldset legend.x-fieldset-header { - padding-top: 1px; -} - -.ext-ie .x-fieldset { - padding-top: 0; - padding-bottom:10px; -} - -.x-fieldset legend .x-tool-toggle { - margin-right:3px; - margin-left:0; - float:left !important; -} - -.x-fieldset legend input { - margin-right:3px; - float:left !important; - height:13px; - width:13px; -} - -fieldset.x-panel-collapsed { - padding-bottom:0 !important; - border-width: 1px 1px 0 1px !important; - border-left-color: transparent; - border-right-color: transparent; -} - -.ext-ie6 fieldset.x-panel-collapsed{ - padding-bottom:0 !important; - border-width: 1px 0 0 0 !important; - margin-left: 1px; - margin-right: 1px; -} - -fieldset.x-panel-collapsed .x-fieldset-bwrap { - visibility:hidden; - position:absolute; - left:-1000px; - top:-1000px; -} - -.ext-ie .x-fieldset-bwrap { - zoom:1; -} - -.x-fieldset-noborder { - border:0px none transparent; -} - -.x-fieldset-noborder legend { - margin-left:-3px; -} - -/* IE legend positioning bug */ -.ext-ie .x-fieldset-noborder legend { - position: relative; - margin-bottom:23px; -} -.ext-ie .x-fieldset-noborder legend span { - position: absolute; - left:16px; -} - -.ext-gecko .x-window-body .x-form-item { - -moz-outline: none; - outline: none; - overflow: auto; -} - -.ext-mac.ext-gecko .x-window-body .x-form-item { - overflow:hidden; -} - -.ext-gecko .x-form-item { - -moz-outline: none; - outline: none; -} - -.x-hide-label label.x-form-item-label { - display:none; -} - -.x-hide-label .x-form-element { - padding-left: 0 !important; -} - -.x-form-label-top .x-hide-label label.x-form-item-label{ - display: none; -} - -.x-fieldset { - overflow:hidden; -} - -.x-fieldset-bwrap { - overflow:hidden; - zoom:1; -} - -.x-fieldset-body { - overflow:hidden; -} -.x-btn{ - cursor:pointer; - white-space: nowrap; -} - -.x-btn button{ - border:0 none; - background-color:transparent; - padding-left:3px; - padding-right:3px; - cursor:pointer; - margin:0; - overflow:visible; - width:auto; - -moz-outline:0 none; - outline:0 none; -} - -* html .ext-ie .x-btn button { - width:1px; -} - -.ext-gecko .x-btn button, .ext-webkit .x-btn button { - padding-left:0; - padding-right:0; -} - -.ext-gecko .x-btn button::-moz-focus-inner { - padding:0; -} - -.ext-ie .x-btn button { - padding-top:2px; -} - -.x-btn td { - padding:0 !important; -} - -.x-btn-text { - cursor:pointer; - white-space: nowrap; - padding:0; -} - -/* icon placement and sizing styles */ - -/* Only text */ -.x-btn-noicon .x-btn-small .x-btn-text{ - height: 16px; -} - -.x-btn-noicon .x-btn-medium .x-btn-text{ - height: 24px; -} - -.x-btn-noicon .x-btn-large .x-btn-text{ - height: 32px; -} - -/* Only icons */ -.x-btn-icon .x-btn-text{ - background-position: center; - background-repeat: no-repeat; -} - -.x-btn-icon .x-btn-small .x-btn-text{ - height: 16px; - width: 16px; -} - -.x-btn-icon .x-btn-medium .x-btn-text{ - height: 24px; - width: 24px; -} - -.x-btn-icon .x-btn-large .x-btn-text{ - height: 32px; - width: 32px; -} - -/* Icons and text */ -/* left */ -.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:18px; - height:16px; -} - -.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:26px; - height:24px; -} - -.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:34px; - height:32px; -} - -/* top */ -.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:18px; -} - -.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:26px; -} - -.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:34px; -} - -/* right */ -.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:18px; - height:16px; -} - -.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:26px; - height:24px; -} - -.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:34px; - height:32px; -} - -/* bottom */ -.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:18px; -} - -.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:26px; -} - -.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:34px; -} - -/* background positioning */ -.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ - font-size:1px; - line-height:1px; - width:3px; - display:block; - overflow:hidden; -} - -.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ - height:3px; -} - -.x-btn-tl{ - width:3px; - height:3px; - background:no-repeat 0 0; -} -.x-btn-tr{ - width:3px; - height:3px; - background:no-repeat -3px 0; -} -.x-btn-tc{ - height:3px; - background:repeat-x 0 -6px; -} - -.x-btn-ml{ - width:3px; - background:no-repeat 0 -24px; -} -.x-btn-mr{ - width:3px; - background:no-repeat -3px -24px; -} - -.x-btn-mc{ - background:repeat-x 0 -1096px; - vertical-align: middle; - text-align:center; - padding:0 5px; - cursor:pointer; - white-space:nowrap; -} - -/* Fixes an issue with the button height */ -.ext-strict .ext-ie6 .x-btn-mc, .ext-strict .ext-ie7 .x-btn-mc { - height: 100%; -} - -.x-btn-bl{ - width:3px; - height:3px; - background:no-repeat 0 -3px; -} - -.x-btn-br{ - width:3px; - height:3px; - background:no-repeat -3px -3px; -} - -.x-btn-bc{ - height:3px; - background:repeat-x 0 -15px; -} - -.x-btn-over .x-btn-tl{ - background-position: -6px 0; -} - -.x-btn-over .x-btn-tr{ - background-position: -9px 0; -} - -.x-btn-over .x-btn-tc{ - background-position: 0 -9px; -} - -.x-btn-over .x-btn-ml{ - background-position: -6px -24px; -} - -.x-btn-over .x-btn-mr{ - background-position: -9px -24px; -} - -.x-btn-over .x-btn-mc{ - background-position: 0 -2168px; -} - -.x-btn-over .x-btn-bl{ - background-position: -6px -3px; -} - -.x-btn-over .x-btn-br{ - background-position: -9px -3px; -} - -.x-btn-over .x-btn-bc{ - background-position: 0 -18px; -} - -.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ - background-position: -12px 0; -} - -.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ - background-position: -15px 0; -} - -.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ - background-position: 0 -12px; -} - -.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ - background-position: -12px -24px; -} - -.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ - background-position: -15px -24px; -} - -.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ - background-position: 0 -3240px; -} - -.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ - background-position: -12px -3px; -} - -.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ - background-position: -15px -3px; -} - -.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ - background-position: 0 -21px; -} - -.x-btn-disabled *{ - cursor:default !important; -} - - -/* With a menu arrow */ -/* right */ -.x-btn-mc em.x-btn-arrow { - display:block; - background:transparent no-repeat right center; - padding-right:10px; -} - -.x-btn-mc em.x-btn-split { - display:block; - background:transparent no-repeat right center; - padding-right:14px; -} - -/* bottom */ -.x-btn-mc em.x-btn-arrow-bottom { - display:block; - background:transparent no-repeat center bottom; - padding-bottom:14px; -} - -.x-btn-mc em.x-btn-split-bottom { - display:block; - background:transparent no-repeat center bottom; - padding-bottom:14px; -} - -/* height adjustment class */ -.x-btn-as-arrow .x-btn-mc em { - display:block; - background-color:transparent; - padding-bottom:14px; -} - -/* groups */ -.x-btn-group { - padding:1px; -} - -.x-btn-group-header { - padding:2px; - text-align:center; -} - -.x-btn-group-tc { - background: transparent repeat-x 0 0; - overflow:hidden; -} - -.x-btn-group-tl { - background: transparent no-repeat 0 0; - padding-left:3px; - zoom:1; -} - -.x-btn-group-tr { - background: transparent no-repeat right 0; - zoom:1; - padding-right:3px; -} - -.x-btn-group-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-btn-group-bc .x-panel-footer { - zoom:1; -} - -.x-btn-group-bl { - background: transparent no-repeat 0 bottom; - padding-left:3px; - zoom:1; -} - -.x-btn-group-br { - background: transparent no-repeat right bottom; - padding-right:3px; - zoom:1; -} - -.x-btn-group-mc { - border:0 none; - padding:1px 0 0 0; - margin:0; -} - -.x-btn-group-mc .x-btn-group-body { - background-color:transparent; - border: 0 none; -} - -.x-btn-group-ml { - background: transparent repeat-y 0 0; - padding-left:3px; - zoom:1; -} - -.x-btn-group-mr { - background: transparent repeat-y right 0; - padding-right:3px; - zoom:1; -} - -.x-btn-group-bc .x-btn-group-footer { - padding-bottom:6px; -} - -.x-panel-nofooter .x-btn-group-bc { - height:3px; - font-size:0; - line-height:0; -} - -.x-btn-group-bwrap { - overflow:hidden; - zoom:1; -} - -.x-btn-group-body { - overflow:hidden; - zoom:1; -} - -.x-btn-group-notitle .x-btn-group-tc { - background: transparent repeat-x 0 0; - overflow:hidden; - height:2px; -}.x-toolbar{ - border-style:solid; - border-width:0 0 1px 0; - display: block; - padding:2px; - background:repeat-x top left; - position:relative; - left:0; - top:0; - zoom:1; - overflow:hidden; -} - -.x-toolbar-left { - width: 100%; -} - -.x-toolbar .x-item-disabled .x-btn-icon { - opacity: .35; - -moz-opacity: .35; - filter: alpha(opacity=35); -} - -.x-toolbar td { - vertical-align:middle; -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - white-space: nowrap; -} - -.x-toolbar .x-item-disabled { - cursor:default; - opacity:.6; - -moz-opacity:.6; - filter:alpha(opacity=60); -} - -.x-toolbar .x-item-disabled * { - cursor:default; -} - -.x-toolbar .x-toolbar-cell { - vertical-align:middle; -} - -.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, -.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc -{ - background-position: 500px 500px; -} - -/* These rules are duplicated from button.css to give priority of x-toolbar rules above */ -.x-toolbar .x-btn-over .x-btn-tl{ - background-position: -6px 0; -} - -.x-toolbar .x-btn-over .x-btn-tr{ - background-position: -9px 0; -} - -.x-toolbar .x-btn-over .x-btn-tc{ - background-position: 0 -9px; -} - -.x-toolbar .x-btn-over .x-btn-ml{ - background-position: -6px -24px; -} - -.x-toolbar .x-btn-over .x-btn-mr{ - background-position: -9px -24px; -} - -.x-toolbar .x-btn-over .x-btn-mc{ - background-position: 0 -2168px; -} - -.x-toolbar .x-btn-over .x-btn-bl{ - background-position: -6px -3px; -} - -.x-toolbar .x-btn-over .x-btn-br{ - background-position: -9px -3px; -} - -.x-toolbar .x-btn-over .x-btn-bc{ - background-position: 0 -18px; -} - -.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ - background-position: -12px 0; -} - -.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ - background-position: -15px 0; -} - -.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ - background-position: 0 -12px; -} - -.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ - background-position: -12px -24px; -} - -.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ - background-position: -15px -24px; -} - -.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ - background-position: 0 -3240px; -} - -.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ - background-position: -12px -3px; -} - -.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ - background-position: -15px -3px; -} - -.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ - background-position: 0 -21px; -} - -.x-toolbar div.xtb-text{ - padding:2px 2px 0; - line-height:16px; - display:block; -} - -.x-toolbar .xtb-sep { - background-position: center; - background-repeat: no-repeat; - display: block; - font-size: 1px; - height: 16px; - width:4px; - overflow: hidden; - cursor:default; - margin: 0 2px 0; - border:0; -} - -.x-toolbar .xtb-spacer { - width:2px; -} - -/* Paging Toolbar */ -.x-tbar-page-number{ - width:30px; - height:14px; -} - -.ext-ie .x-tbar-page-number{ - margin-top: 2px; -} - -.x-paging-info { - position:absolute; - top:5px; - right: 8px; -} - -/* floating */ -.x-toolbar-ct { - width:100%; -} - -.x-toolbar-right td { - text-align: center; -} - -.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { - overflow:hidden; - zoom:1; -} - -.x-toolbar-more .x-btn-small .x-btn-text{ - height: 16px; - width: 12px; -} - -.x-toolbar-more em.x-btn-arrow { - display:inline; - background-color:transparent; - padding-right:0; -} - -.x-toolbar-more .x-btn-mc em.x-btn-arrow { - background-image: none; -} - -div.x-toolbar-no-items { - color:gray !important; - padding:5px 10px !important; -} - -/* fix ie toolbar form items */ -.ext-border-box .x-toolbar-cell .x-form-text { - margin-bottom:-1px !important; -} - -.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { - margin:0 !important; -} - -.ext-ie .x-toolbar-cell .x-form-field-wrap { - height:21px; -} - -.ext-ie .x-toolbar-cell .x-form-text { - position:relative; - top:-1px; -} - -.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text { - top: 0px; -} - -.x-toolbar-right td .x-form-field-trigger-wrap{ - text-align: left; -} - -.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{ - margin-top: 5px; -} - -.x-toolbar-cell .x-form-cb-label{ - vertical-align: bottom; - top: 1px; -} - -.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{ - margin-top: 4px; -} - -.ext-ie .x-toolbar-cell .x-form-cb-label{ - top: 0; -} -/* Grid3 styles */ -.x-grid3 { - position:relative; - overflow:hidden; -} - -.x-grid-panel .x-panel-body { - overflow:hidden !important; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border:1px solid; -} - -.x-grid3 table { - table-layout:fixed; -} - -.x-grid3-viewport{ - overflow:hidden; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - -moz-outline: none; - outline: none; - -moz-user-focus: normal; -} - -.x-grid3-row td, .x-grid3-summary-row td { - line-height:13px; - vertical-align: top; - padding-left:1px; - padding-right:1px; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-cell{ - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-hd-row td { - line-height:15px; - vertical-align:middle; - border-left:1px solid; - border-right:1px solid; -} - -.x-grid3-hd-row .x-grid3-marker-hd { - padding:3px; -} - -.x-grid3-row .x-grid3-marker { - padding:3px; -} - -.x-grid3-cell-inner, .x-grid3-hd-inner{ - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - padding:3px 3px 3px 5px; - white-space: nowrap; -} - -/* ActionColumn, reduce padding to accommodate 16x16 icons in normal row height */ -.x-action-col-cell .x-grid3-cell-inner { - padding-top: 1px; - padding-bottom: 1px; -} - -.x-action-col-icon { - cursor: pointer; -} - -.x-grid3-hd-inner { - position:relative; - cursor:inherit; - padding:4px 3px 4px 5px; -} - -.x-grid3-row-body { - white-space:normal; -} - -.x-grid3-body-cell { - -moz-outline:0 none; - outline:0 none; -} - -/* IE Quirks to clip */ -.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ - width:100%; -} - -/* reverse above in strict mode */ -.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ - width:auto; -} - -.x-grid-row-loading { - background: no-repeat center center; -} - -.x-grid-page { - overflow:hidden; -} - -.x-grid3-row { - cursor: default; - border: 1px solid; - width:100%; -} - -.x-grid3-row-over { - border:1px solid; - background: repeat-x left top; -} - -.x-grid3-resize-proxy { - width:1px; - left:0; - cursor: e-resize; - cursor: col-resize; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} - -.x-grid3-resize-marker { - width:1px; - left:0; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} - -.x-grid3-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: text; - -khtml-user-select: text; - -webkit-user-select:ignore; -} - -/* header styles */ -.x-grid3-header{ - background: repeat-x 0 bottom; - cursor:default; - zoom:1; - padding:1px 0 0 0; -} - -.x-grid3-header-pop { - border-left:1px solid; - float:right; - clear:none; -} - -.x-grid3-header-pop-inner { - border-left:1px solid; - width:14px; - height:19px; - background: transparent no-repeat center center; -} - -.ext-ie .x-grid3-header-pop-inner { - width:15px; -} - -.ext-strict .x-grid3-header-pop-inner { - width:14px; -} - -.x-grid3-header-inner { - overflow:hidden; - zoom:1; - float:left; -} - -.x-grid3-header-offset { - padding-left:1px; - text-align: left; -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left:1px solid; - border-right:1px solid; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background: repeat-x left bottom; - -} - -.x-grid3-sort-icon{ - background-repeat: no-repeat; - display: none; - height: 4px; - width: 13px; - margin-left:3px; - vertical-align: middle; -} - -.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon { - display: inline; -} - -/* Header position fixes for IE strict mode */ -.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd { - position:relative; -} - -.ext-strict .ext-ie6 .x-grid3-hd-inner{ - position:static; -} - -/* Body Styles */ -.x-grid3-body { - zoom:1; -} - -.x-grid3-scroller { - overflow:auto; - zoom:1; - position:relative; -} - -.x-grid3-cell-text, .x-grid3-hd-text { - display: block; - padding: 3px 5px 3px 5px; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select:ignore; -} - -.x-grid3-split { - background-position: center; - background-repeat: no-repeat; - cursor: e-resize; - cursor: col-resize; - display: block; - font-size: 1px; - height: 16px; - overflow: hidden; - position: absolute; - top: 2px; - width: 6px; - z-index: 3; -} - -/* Column Reorder DD */ -.x-dd-drag-proxy .x-grid3-hd-inner{ - background: repeat-x left bottom; - width:120px; - padding:3px; - border:1px solid; - overflow:hidden; -} - -.col-move-top, .col-move-bottom{ - width:9px; - height:9px; - position:absolute; - top:0; - line-height:1px; - font-size:1px; - overflow:hidden; - visibility:hidden; - z-index:20000; - background:transparent no-repeat left top; -} - -/* Selection Styles */ -.x-grid3-row-selected { - border:1px dotted; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background: repeat-x 0 bottom !important; - vertical-align:middle !important; - padding:0; - border-top:1px solid; - border-bottom:none !important; - border-right:1px solid !important; - text-align:center; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - padding:0 4px; - text-align:center; -} - -/* dirty cells */ -.x-grid3-dirty-cell { - background: transparent no-repeat 0 0; -} - -/* Grid Toolbars */ -.x-grid3-topbar, .x-grid3-bottombar{ - overflow:hidden; - display:none; - zoom:1; - position:relative; -} - -.x-grid3-topbar .x-toolbar{ - border-right:0 none; -} - -.x-grid3-bottombar .x-toolbar{ - border-right:0 none; - border-bottom:0 none; - border-top:1px solid; -} - -/* Props Grid Styles */ -.x-props-grid .x-grid3-cell{ - padding:1px; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background:transparent repeat-y -16px !important; - padding-left:12px; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - padding:1px; - padding-right:0; - border:0 none; - border-right:1px solid; -} - -/* dd */ -.x-grid3-col-dd { - border:0 none; - padding:0; - background-color:transparent; -} - -.x-dd-drag-ghost .x-grid3-dd-wrap { - padding:1px 3px 3px 1px; -} - -.x-grid3-hd { - -moz-user-select:none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-hd-btn { - display:none; - position:absolute; - width:14px; - background:no-repeat left center; - right:0; - top:0; - z-index:2; - cursor:pointer; -} - -.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { - display:block; -} - -a.x-grid3-hd-btn:hover { - background-position:-14px center; -} - -/* Expanders */ -.x-grid3-body .x-grid3-td-expander { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-expander { - width:100%; - height:18px; - background-position:4px 2px; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-row-collapsed .x-grid3-row-expander { - background-position:4px 2px; -} - -.x-grid3-row-expanded .x-grid3-row-expander { - background-position:-21px 2px; -} - -.x-grid3-row-collapsed .x-grid3-row-body { - display:none !important; -} - -.x-grid3-row-expanded .x-grid3-row-body { - display:block !important; -} - -/* Checkers */ -.x-grid3-body .x-grid3-td-checker { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - width:100%; - height:18px; - background-position:2px 2px; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-row .x-grid3-row-checker { - background-position:2px 2px; -} - -.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker { - background-position:-23px 2px; -} - -.x-grid3-hd-checker { - background-position:2px 1px; -} - -.ext-border-box .x-grid3-hd-checker { - background-position:2px 3px; -} - -.x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 1px; -} - -.ext-border-box .x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 3px; -} - -/* Numberer */ -.x-grid3-body .x-grid3-td-numberer { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - padding:3px 5px 0 0 !important; - text-align:right; -} - -/* Row Icon */ - -.x-grid3-body .x-grid3-td-row-icon { - background:transparent repeat-y right; - vertical-align:top; - text-align:center; -} - -.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { - padding:0 !important; - background-position:center center; - background-repeat:no-repeat; - width:16px; - height:16px; - margin-left:2px; - margin-top:3px; -} - -/* All specials */ -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { - padding: 1px 0 0 0 !important; -} - -.x-grid3-check-col { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-check-col-on { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; -} - -/* Grouping classes */ -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom: 2px solid; - cursor:pointer; - padding-top:6px; -} - -.x-grid-group-hd div.x-grid-group-title { - background:transparent no-repeat 3px 3px; - padding:4px 4px 4px 17px; -} - -.x-grid-group-collapsed .x-grid-group-body { - display:none; -} - -.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text { - position:relative; - top:-1px; -} - -.ext-ie .x-props-grid .x-editor .x-form-text { - position:static; - top:0; -} - -.x-grid-empty { - padding:10px; -} - -/* fix floating toolbar issue */ -.ext-ie7 .x-grid-panel .x-panel-bbar { - position:relative; -} - - -/* Reset position to static when Grid Panel has been framed */ -/* to resolve 'snapping' from top to bottom behavior. */ -/* @forumThread 86656 */ -.ext-ie7 .x-grid-panel .x-panel-mc .x-panel-bbar { - position: static; -} - -.ext-ie6 .x-grid3-header { - position: relative; -} - -/* Fix WebKit bug in Grids */ -.ext-webkit .x-grid-panel .x-panel-bwrap{ - -webkit-user-select:none; -} -.ext-webkit .x-tbar-page-number{ - -webkit-user-select:ignore; -} -/* end*/ - -/* column lines */ -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - padding-right:0; - border-right:1px solid; -} -.x-pivotgrid .x-grid3-header-offset table { - width: 100%; - border-collapse: collapse; -} - -.x-pivotgrid .x-grid3-header-offset table td { - padding: 4px 3px 4px 5px; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-size: 11px; - line-height: 13px; - font-family: tahoma; -} - -.x-pivotgrid .x-grid3-row-headers { - display: block; - float: left; -} - -.x-pivotgrid .x-grid3-row-headers table { - height: 100%; - width: 100%; - border-collapse: collapse; -} - -.x-pivotgrid .x-grid3-row-headers table td { - height: 18px; - padding: 2px 7px 0 0; - text-align: right; - text-overflow: ellipsis; - font-size: 11px; - font-family: tahoma; -} - -.ext-gecko .x-pivotgrid .x-grid3-row-headers table td { - height: 21px; -} - -.x-grid3-header-title { - top: 0%; - left: 0%; - position: absolute; - text-align: center; - vertical-align: middle; - font-family: tahoma; - font-size: 11px; - padding: auto 1px; - display: table-cell; -} - -.x-grid3-header-title span { - position: absolute; - top: 50%; - left: 0%; - width: 100%; - margin-top: -6px; -}.x-dd-drag-proxy{ - position:absolute; - left:0; - top:0; - visibility:hidden; - z-index:15000; -} - -.x-dd-drag-ghost{ - -moz-opacity: 0.85; - opacity:.85; - filter: alpha(opacity=85); - border: 1px solid; - padding:3px; - padding-left:20px; - white-space:nowrap; -} - -.x-dd-drag-repair .x-dd-drag-ghost{ - -moz-opacity: 0.4; - opacity:.4; - filter: alpha(opacity=40); - border:0 none; - padding:0; - background-color:transparent; -} - -.x-dd-drag-repair .x-dd-drop-icon{ - visibility:hidden; -} - -.x-dd-drop-icon{ - position:absolute; - top:3px; - left:3px; - display:block; - width:16px; - height:16px; - background-color:transparent; - background-position: center; - background-repeat: no-repeat; - z-index:1; -} - -.x-view-selector { - position:absolute; - left:0; - top:0; - width:0; - border:1px dotted; - opacity: .5; - -moz-opacity: .5; - filter:alpha(opacity=50); - zoom:1; -}.ext-strict .ext-ie .x-tree .x-panel-bwrap{ - position:relative; - overflow:hidden; -} - -.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-repeat: no-repeat; -} - -.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-position:center; - background-repeat: no-repeat; -} - -.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { - vertical-align: middle !important; -} - -.ext-strict .ext-ie8 .x-tree-node-indent img, .ext-strict .ext-ie8 .x-tree-node-icon, .ext-strict .ext-ie8 .x-tree-ec-icon { - vertical-align: top !important; -} - -/* checkboxes */ - -input.x-tree-node-cb { - margin-left:1px; - height: 19px; - vertical-align: bottom; -} - -.ext-ie input.x-tree-node-cb { - margin-left:0; - margin-top: 1px; - width: 16px; - height: 16px; - vertical-align: middle; -} - -.ext-strict .ext-ie8 input.x-tree-node-cb{ - margin: 1px 1px; - height: 14px; - vertical-align: bottom; -} - -.ext-strict .ext-ie8 input.x-tree-node-cb + a{ - vertical-align: bottom; -} - -.ext-opera input.x-tree-node-cb { - height: 14px; - vertical-align: middle; -} - -.x-tree-noicon .x-tree-node-icon{ - width:0; height:0; -} - -/* No line styles */ -.x-tree-no-lines .x-tree-elbow{ - background-color:transparent; -} - -.x-tree-no-lines .x-tree-elbow-end{ - background-color:transparent; -} - -.x-tree-no-lines .x-tree-elbow-line{ - background-color:transparent; -} - -/* Arrows */ -.x-tree-arrows .x-tree-elbow{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-elbow-plus{ - background:transparent no-repeat 0 0; -} - -.x-tree-arrows .x-tree-elbow-minus{ - background:transparent no-repeat -16px 0; -} - -.x-tree-arrows .x-tree-elbow-end{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background:transparent no-repeat 0 0; -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background:transparent no-repeat -16px 0; -} - -.x-tree-arrows .x-tree-elbow-line{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ - background-position:-32px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ - background-position:-48px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ - background-position:-32px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ - background-position:-48px 0; -} - -.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - cursor:pointer; -} - -.ext-ie ul.x-tree-node-ct{ - font-size:0; - line-height:0; - zoom:1; -} - -.x-tree-node{ - white-space: nowrap; -} - -.x-tree-node-el { - line-height:18px; - cursor:pointer; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - text-decoration:none; - -khtml-user-select:none; - -moz-user-select:none; - -webkit-user-select:ignore; - -kthml-user-focus:normal; - -moz-user-focus:normal; - -moz-outline: 0 none; - outline:0 none; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - text-decoration:none; - padding:1px 3px 1px 2px; -} - -.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ - -moz-opacity: 0.5; - opacity:.5; - filter: alpha(opacity=50); -} - -.x-tree-node .x-tree-node-inline-icon{ - background-color:transparent; -} - -.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ - text-decoration:none; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom:1px dotted; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top:1px dotted; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ - border-bottom:0 none; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ - border-top:0 none; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom:2px solid; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top:2px solid; -} - -.x-tree-node .x-tree-drag-append a span{ - border:1px dotted; -} - -.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ - display:none !important; -} - -/* Fix for ie rootVisible:false issue */ -.x-tree-root-ct { - zoom:1; -} -.x-date-picker { - border: 1px solid; - border-top:0 none; - position:relative; -} - -.x-date-picker a { - -moz-outline:0 none; - outline:0 none; -} - -.x-date-inner, .x-date-inner td, .x-date-inner th{ - border-collapse:separate; -} - -.x-date-middle,.x-date-left,.x-date-right { - background: repeat-x 0 -83px; - overflow:hidden; -} - -.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, -.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, -.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ - background:transparent !important; - vertical-align:middle; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background:transparent no-repeat right 0; -} - -.x-date-right, .x-date-left { - width:18px; -} - -.x-date-right{ - text-align:right; -} - -.x-date-middle { - padding-top:2px; - padding-bottom:2px; - width:130px; /* FF3 */ -} - -.x-date-right a, .x-date-left a{ - display:block; - width:16px; - height:16px; - background-position: center; - background-repeat: no-repeat; - cursor:pointer; - -moz-opacity: 0.6; - opacity:.6; - filter: alpha(opacity=60); -} - -.x-date-right a:hover, .x-date-left a:hover{ - -moz-opacity: 1; - opacity:1; - filter: alpha(opacity=100); -} - -.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{ - -moz-opacity: 0.6; - opacity:.6; - filter: alpha(opacity=60); -} - -.x-date-right a { - margin-right:2px; - text-decoration:none !important; -} - -.x-date-left a{ - margin-left:2px; - text-decoration:none !important; -} - -table.x-date-inner { - width: 100%; - table-layout:fixed; -} - -.ext-webkit table.x-date-inner{ - /* Fix for webkit browsers */ - width: 175px; -} - - -.x-date-inner th { - width:25px; -} - -.x-date-inner th { - background: repeat-x left top; - text-align:right !important; - border-bottom: 1px solid; - cursor:default; - padding:0; - border-collapse:separate; -} - -.x-date-inner th span { - display:block; - padding:2px; - padding-right:7px; -} - -.x-date-inner td { - border: 1px solid; - text-align:right; - padding:0; -} - -.x-date-inner a { - padding:2px 5px; - display:block; - text-decoration:none; - text-align:right; - zoom:1; -} - -.x-date-inner .x-date-active{ - cursor:pointer; - color:black; -} - -.x-date-inner .x-date-selected a{ - background: repeat-x left top; - border:1px solid; - padding:1px 4px; -} - -.x-date-inner .x-date-today a{ - border: 1px solid; - padding:1px 4px; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - text-decoration:none !important; -} - -.x-date-bottom { - padding:4px; - border-top: 1px solid; - background: repeat-x left top; -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - text-decoration:none !important; -} - -.x-item-disabled .x-date-inner a:hover{ - background: none; -} - -.x-date-inner .x-date-disabled a { - cursor:default; -} - -.x-date-menu .x-menu-item { - padding:1px 24px 1px 4px; - white-space: nowrap; -} - -.x-date-menu .x-menu-item .x-menu-item-icon { - width:10px; - height:10px; - margin-right:5px; - background-position:center -4px !important; -} - -.x-date-mp { - position:absolute; - left:0; - top:0; - display:none; -} - -.x-date-mp td { - padding:2px; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn { - border: 0 none; - text-align:center; - vertical-align: middle; - width:25%; -} - -.x-date-mp-ok { - margin-right:3px; -} - -.x-date-mp-btns button { - text-decoration:none; - text-align:center; - text-decoration:none !important; - border:1px solid; - padding:1px 3px 1px; - cursor:pointer; -} - -.x-date-mp-btns { - background: repeat-x left top; -} - -.x-date-mp-btns td { - border-top: 1px solid; - text-align:center; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - display:block; - padding:2px 4px; - text-decoration:none; - text-align:center; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - text-decoration:none; - cursor:pointer; -} - -td.x-date-mp-sel a { - padding:1px 3px; - background: repeat-x left top; - border:1px solid; -} - -.x-date-mp-ybtn a { - overflow:hidden; - width:15px; - height:15px; - cursor:pointer; - background:transparent no-repeat; - display:block; - margin:0 auto; -} - -.x-date-mp-ybtn a.x-date-mp-next { - background-position:0 -120px; -} - -.x-date-mp-ybtn a.x-date-mp-next:hover { - background-position:-15px -120px; -} - -.x-date-mp-ybtn a.x-date-mp-prev { - background-position:0 -105px; -} - -.x-date-mp-ybtn a.x-date-mp-prev:hover { - background-position:-15px -105px; -} - -.x-date-mp-ybtn { - text-align:center; -} - -td.x-date-mp-sep { - border-right:1px solid; -}.x-tip{ - position: absolute; - top: 0; - left:0; - visibility: hidden; - z-index: 20002; - border:0 none; -} - -.x-tip .x-tip-close{ - height: 15px; - float:right; - width: 15px; - margin:0 0 2px 2px; - cursor:pointer; - display:none; -} - -.x-tip .x-tip-tc { - background: transparent no-repeat 0 -62px; - padding-top:3px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-tr { - background: transparent no-repeat right 0; - padding-right:6px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-bc { - background: transparent no-repeat 0 -121px; - height:3px; - overflow:hidden; -} - -.x-tip .x-tip-bl { - background: transparent no-repeat 0 -59px; - padding-left:6px; - zoom:1; -} - -.x-tip .x-tip-br { - background: transparent no-repeat right -59px; - padding-right:6px; - zoom:1; -} - -.x-tip .x-tip-mc { - border:0 none; -} - -.x-tip .x-tip-ml { - background: no-repeat 0 -124px; - padding-left:6px; - zoom:1; -} - -.x-tip .x-tip-mr { - background: transparent no-repeat right -124px; - padding-right:6px; - zoom:1; -} - -.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { - font-size:0; - line-height:0; -} - -.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{ - line-height: 1px; -} - -.x-tip .x-tip-header-text { - padding:0; - margin:0 0 2px 0; -} - -.x-tip .x-tip-body { - margin:0 !important; - line-height:14px; - padding:0; -} - -.x-tip .x-tip-body .loading-indicator { - margin:0; -} - -.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { - cursor:move; -} - -.x-form-invalid-tip .x-tip-tc { - background: repeat-x 0 -12px; - padding-top:6px; -} - -.x-form-invalid-tip .x-tip-bc { - background: repeat-x 0 -18px; - height:6px; -} - -.x-form-invalid-tip .x-tip-bl { - background: no-repeat 0 -6px; -} - -.x-form-invalid-tip .x-tip-br { - background: no-repeat right -6px; -} - -.x-form-invalid-tip .x-tip-body { - padding:2px; -} - -.x-form-invalid-tip .x-tip-body { - padding-left:24px; - background:transparent no-repeat 2px 2px; -} - -.x-tip-anchor { - position: absolute; - width: 9px; - height: 10px; - overflow:hidden; - background: transparent no-repeat 0 0; - zoom:1; -} -.x-tip-anchor-bottom { - background-position: -9px 0; -} -.x-tip-anchor-right { - background-position: -18px 0; - width: 10px; -} -.x-tip-anchor-left { - background-position: -28px 0; - width: 10px; -}.x-menu { - z-index: 15000; - zoom: 1; - background: repeat-y; -} - -.x-menu-floating{ - border: 1px solid; -} - -.x-menu a { - text-decoration: none !important; -} - -.ext-ie .x-menu { - zoom:1; - overflow:hidden; -} - -.x-menu-list{ - padding: 2px; - background-color:transparent; - border:0 none; - overflow:hidden; - overflow-y: hidden; -} - -.ext-strict .ext-ie .x-menu-list{ - position: relative; -} - -.x-menu li{ - line-height:100%; -} - -.x-menu li.x-menu-sep-li{ - font-size:1px; - line-height:1px; -} - -.x-menu-list-item{ - white-space: nowrap; - display:block; - padding:1px; -} - -.x-menu-item{ - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-menu-item-arrow{ - background:transparent no-repeat right; -} - -.x-menu-sep { - display:block; - font-size:1px; - line-height:1px; - margin: 2px 3px; - border-bottom:1px solid; - overflow:hidden; -} - -.x-menu-focus { - position:absolute; - left:-1px; - top:-1px; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; - overflow:hidden; - display:block; -} - -a.x-menu-item { - cursor: pointer; - display: block; - line-height: 16px; - outline-color: -moz-use-text-color; - outline-style: none; - outline-width: 0; - padding: 3px 21px 3px 27px; - position: relative; - text-decoration: none; - white-space: nowrap; -} - -.x-menu-item-active { - background-repeat: repeat-x; - background-position: left bottom; - border-style:solid; - border-width: 1px 0; - margin:0 1px; - padding: 0; -} - -.x-menu-item-active a.x-menu-item { - border-style:solid; - border-width:0 1px; - margin:0 -1px; -} - -.x-menu-item-icon { - border: 0 none; - height: 16px; - padding: 0; - vertical-align: top; - width: 16px; - position: absolute; - left: 3px; - top: 3px; - margin: 0; - background-position:center; -} - -.ext-ie .x-menu-item-icon { - left: -24px; -} -.ext-strict .x-menu-item-icon { - left: 3px; -} - -.ext-ie6 .x-menu-item-icon { - left: -24px; -} - -.ext-ie .x-menu-item-icon { - vertical-align: middle; -} - -.x-menu-check-item .x-menu-item-icon{ - background: transparent no-repeat center; -} - -.x-menu-group-item .x-menu-item-icon{ - background-color: transparent; -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background: transparent no-repeat center; -} - -.x-date-menu .x-menu-list{ - padding: 0; -} - -.x-menu-date-item{ - padding:0; -} - -.x-menu .x-color-palette, .x-menu .x-date-picker{ - margin-left: 26px; - margin-right:4px; -} - -.x-menu .x-date-picker{ - border:1px solid; - margin-top:2px; - margin-bottom:2px; -} - -.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ - margin: 0; - border: 0 none; -} - -.x-date-menu { - padding:0 !important; -} - -/* - * fixes separator visibility problem in IE 6 - */ -.ext-strict .ext-ie6 .x-menu-sep-li { - padding: 3px 4px; -} -.ext-strict .ext-ie6 .x-menu-sep { - margin: 0; - height: 1px; -} - -/* - * Fixes an issue with "fat" separators in webkit - */ -.ext-webkit .x-menu-sep{ - height: 1px; -} - -/* - * Ugly mess to remove the white border under the picker - */ -.ext-ie .x-date-menu{ - height: 199px; -} - -.ext-strict .ext-ie .x-date-menu, .ext-border-box .ext-ie8 .x-date-menu{ - height: 197px; -} - -.ext-strict .ext-ie7 .x-date-menu{ - height: 195px; -} - -.ext-strict .ext-ie8 .x-date-menu{ - height: auto; -} - -.x-cycle-menu .x-menu-item-checked { - border:1px dotted !important; - padding:0; -} - -.x-menu .x-menu-scroller { - width: 100%; - background-repeat:no-repeat; - background-position:center; - height:8px; - line-height: 8px; - cursor:pointer; - margin: 0; - padding: 0; -} - -.x-menu .x-menu-scroller-active{ - height: 6px; - line-height: 6px; -} - -.x-menu-list-item-indent{ - padding-left: 27px; -}/* - Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: -
      -
      -
      -

      YOUR TITLE HERE (optional)

      -
      YOUR CONTENT HERE
      -
      -
      -
      - */ - -.x-box-tl { - background: transparent no-repeat 0 0; - zoom:1; -} - -.x-box-tc { - height: 8px; - background: transparent repeat-x 0 0; - overflow: hidden; -} - -.x-box-tr { - background: transparent no-repeat right -8px; -} - -.x-box-ml { - background: transparent repeat-y 0; - padding-left: 4px; - overflow: hidden; - zoom:1; -} - -.x-box-mc { - background: repeat-x 0 -16px; - padding: 4px 10px; -} - -.x-box-mc h3 { - margin: 0 0 4px 0; - zoom:1; -} - -.x-box-mr { - background: transparent repeat-y right; - padding-right: 4px; - overflow: hidden; -} - -.x-box-bl { - background: transparent no-repeat 0 -16px; - zoom:1; -} - -.x-box-bc { - background: transparent repeat-x 0 -8px; - height: 8px; - overflow: hidden; -} - -.x-box-br { - background: transparent no-repeat right -24px; -} - -.x-box-tl, .x-box-bl { - padding-left: 8px; - overflow: hidden; -} - -.x-box-tr, .x-box-br { - padding-right: 8px; - overflow: hidden; -}.x-combo-list { - border:1px solid; - zoom:1; - overflow:hidden; -} - -.x-combo-list-inner { - overflow:auto; - position:relative; /* for calculating scroll offsets */ - zoom:1; - overflow-x:hidden; -} - -.x-combo-list-hd { - border-bottom:1px solid; - padding:3px; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom:1px solid; -} - -.x-combo-list-item { - padding:2px; - border:1px solid; - white-space: nowrap; - overflow:hidden; - text-overflow: ellipsis; -} - -.x-combo-list .x-combo-selected{ - border:1px dotted !important; - cursor:pointer; -} - -.x-combo-list .x-toolbar { - border-top:1px solid; - border-bottom:0 none; -}.x-panel { - border-style: solid; - border-width:0; -} - -.x-panel-header { - overflow:hidden; - zoom:1; - padding:5px 3px 4px 5px; - border:1px solid; - line-height: 15px; - background: transparent repeat-x 0 -1px; -} - -.x-panel-body { - border:1px solid; - border-top:0 none; - overflow:hidden; - position: relative; /* added for item scroll positioning */ -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top:1px solid; - border-bottom: 0 none; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top:1px solid; -} - -.x-panel-header { - overflow:hidden; - zoom:1; -} - -.x-panel-tl .x-panel-header { - padding:5px 0 4px 0; - border:0 none; - background:transparent no-repeat; -} - -.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { - padding-left:20px !important; - background-repeat:no-repeat; - background-position:0 4px; - zoom:1; -} - -.x-panel-inline-icon { - width:16px; - height:16px; - background-repeat:no-repeat; - background-position:0 0; - vertical-align:middle; - margin-right:4px; - margin-top:-1px; - margin-bottom:-1px; -} - -.x-panel-tc { - background: transparent repeat-x 0 0; - overflow:hidden; -} - -/* fix ie7 strict mode bug */ -.ext-strict .ext-ie7 .x-panel-tc { - overflow: visible; -} - -.x-panel-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - zoom:1; - border-bottom:1px solid; -} - -.x-panel-tr { - background: transparent no-repeat right 0; - zoom:1; - padding-right:6px; -} - -.x-panel-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-panel-bc .x-panel-footer { - zoom:1; -} - -.x-panel-bl { - background: transparent no-repeat 0 bottom; - padding-left:6px; - zoom:1; -} - -.x-panel-br { - background: transparent no-repeat right bottom; - padding-right:6px; - zoom:1; -} - -.x-panel-mc { - border:0 none; - padding:0; - margin:0; - padding-top:6px; -} - -.x-panel-mc .x-panel-body { - background-color:transparent; - border: 0 none; -} - -.x-panel-ml { - background: repeat-y 0 0; - padding-left:6px; - zoom:1; -} - -.x-panel-mr { - background: transparent repeat-y right 0; - padding-right:6px; - zoom:1; -} - -.x-panel-bc .x-panel-footer { - padding-bottom:6px; -} - -.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc { - height:6px; - font-size:0; - line-height:0; -} - -.x-panel-bwrap { - overflow:hidden; - zoom:1; - left:0; - top:0; -} -.x-panel-body { - overflow:hidden; - zoom:1; -} - -.x-panel-collapsed .x-resizable-handle{ - display:none; -} - -.ext-gecko .x-panel-animated div { - overflow:hidden !important; -} - -/* Plain */ -.x-plain-body { - overflow:hidden; -} - -.x-plain-bbar .x-toolbar { - overflow:hidden; - padding:2px; -} - -.x-plain-tbar .x-toolbar { - overflow:hidden; - padding:2px; -} - -.x-plain-bwrap { - overflow:hidden; - zoom:1; -} - -.x-plain { - overflow:hidden; -} - -/* Tools */ -.x-tool { - overflow:hidden; - width:15px; - height:15px; - float:right; - cursor:pointer; - background:transparent no-repeat; - margin-left:2px; -} - -/* expand / collapse tools */ -.x-tool-toggle { - background-position:0 -60px; -} - -.x-tool-toggle-over { - background-position:-15px -60px; -} - -.x-panel-collapsed .x-tool-toggle { - background-position:0 -75px; -} - -.x-panel-collapsed .x-tool-toggle-over { - background-position:-15px -75px; -} - - -.x-tool-close { - background-position:0 -0; -} - -.x-tool-close-over { - background-position:-15px 0; -} - -.x-tool-minimize { - background-position:0 -15px; -} - -.x-tool-minimize-over { - background-position:-15px -15px; -} - -.x-tool-maximize { - background-position:0 -30px; -} - -.x-tool-maximize-over { - background-position:-15px -30px; -} - -.x-tool-restore { - background-position:0 -45px; -} - -.x-tool-restore-over { - background-position:-15px -45px; -} - -.x-tool-gear { - background-position:0 -90px; -} - -.x-tool-gear-over { - background-position:-15px -90px; -} - -.x-tool-prev { - background-position:0 -105px; -} - -.x-tool-prev-over { - background-position:-15px -105px; -} - -.x-tool-next { - background-position:0 -120px; -} - -.x-tool-next-over { - background-position:-15px -120px; -} - -.x-tool-pin { - background-position:0 -135px; -} - -.x-tool-pin-over { - background-position:-15px -135px; -} - -.x-tool-unpin { - background-position:0 -150px; -} - -.x-tool-unpin-over { - background-position:-15px -150px; -} - -.x-tool-right { - background-position:0 -165px; -} - -.x-tool-right-over { - background-position:-15px -165px; -} - -.x-tool-left { - background-position:0 -180px; -} - -.x-tool-left-over { - background-position:-15px -180px; -} - -.x-tool-down { - background-position:0 -195px; -} - -.x-tool-down-over { - background-position:-15px -195px; -} - -.x-tool-up { - background-position:0 -210px; -} - -.x-tool-up-over { - background-position:-15px -210px; -} - -.x-tool-refresh { - background-position:0 -225px; -} - -.x-tool-refresh-over { - background-position:-15px -225px; -} - -.x-tool-plus { - background-position:0 -240px; -} - -.x-tool-plus-over { - background-position:-15px -240px; -} - -.x-tool-minus { - background-position:0 -255px; -} - -.x-tool-minus-over { - background-position:-15px -255px; -} - -.x-tool-search { - background-position:0 -270px; -} - -.x-tool-search-over { - background-position:-15px -270px; -} - -.x-tool-save { - background-position:0 -285px; -} - -.x-tool-save-over { - background-position:-15px -285px; -} - -.x-tool-help { - background-position:0 -300px; -} - -.x-tool-help-over { - background-position:-15px -300px; -} - -.x-tool-print { - background-position:0 -315px; -} - -.x-tool-print-over { - background-position:-15px -315px; -} - -.x-tool-expand { - background-position:0 -330px; -} - -.x-tool-expand-over { - background-position:-15px -330px; -} - -.x-tool-collapse { - background-position:0 -345px; -} - -.x-tool-collapse-over { - background-position:-15px -345px; -} - -.x-tool-resize { - background-position:0 -360px; -} - -.x-tool-resize-over { - background-position:-15px -360px; -} - -.x-tool-move { - background-position:0 -375px; -} - -.x-tool-move-over { - background-position:-15px -375px; -} - -/* Ghosting */ -.x-panel-ghost { - z-index:12000; - overflow:hidden; - position:absolute; - left:0;top:0; - opacity:.65; - -moz-opacity:.65; - filter:alpha(opacity=65); -} - -.x-panel-ghost ul { - margin:0; - padding:0; - overflow:hidden; - font-size:0; - line-height:0; - border:1px solid; - border-top:0 none; - display:block; -} - -.x-panel-ghost * { - cursor:move !important; -} - -.x-panel-dd-spacer { - border:2px dashed; -} - -/* Buttons */ -.x-panel-btns { - padding:5px; - overflow:hidden; -} - -.x-panel-btns td.x-toolbar-cell{ - padding:3px; -} - -.x-panel-btns .x-btn-focus .x-btn-left{ - background-position:0 -147px; -} - -.x-panel-btns .x-btn-focus .x-btn-right{ - background-position:0 -168px; -} - -.x-panel-btns .x-btn-focus .x-btn-center{ - background-position:0 -189px; -} - -.x-panel-btns .x-btn-over .x-btn-left{ - background-position:0 -63px; -} - -.x-panel-btns .x-btn-over .x-btn-right{ - background-position:0 -84px; -} - -.x-panel-btns .x-btn-over .x-btn-center{ - background-position:0 -105px; -} - -.x-panel-btns .x-btn-click .x-btn-center{ - background-position:0 -126px; -} - -.x-panel-btns .x-btn-click .x-btn-right{ - background-position:0 -84px; -} - -.x-panel-btns .x-btn-click .x-btn-left{ - background-position:0 -63px; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - white-space: nowrap; -} -/** - * W3C Suggested Default style sheet for HTML 4 - * http://www.w3.org/TR/CSS21/sample.html - * - * Resets for Ext.Panel @cfg normal: true - */ -.x-panel-reset .x-panel-body html, -.x-panel-reset .x-panel-body address, -.x-panel-reset .x-panel-body blockquote, -.x-panel-reset .x-panel-body body, -.x-panel-reset .x-panel-body dd, -.x-panel-reset .x-panel-body div, -.x-panel-reset .x-panel-body dl, -.x-panel-reset .x-panel-body dt, -.x-panel-reset .x-panel-body fieldset, -.x-panel-reset .x-panel-body form, -.x-panel-reset .x-panel-body frame, frameset, -.x-panel-reset .x-panel-body h1, -.x-panel-reset .x-panel-body h2, -.x-panel-reset .x-panel-body h3, -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body h5, -.x-panel-reset .x-panel-body h6, -.x-panel-reset .x-panel-body noframes, -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body p, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body center, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body hr, -.x-panel-reset .x-panel-body menu, -.x-panel-reset .x-panel-body pre { display: block } -.x-panel-reset .x-panel-body li { display: list-item } -.x-panel-reset .x-panel-body head { display: none } -.x-panel-reset .x-panel-body table { display: table } -.x-panel-reset .x-panel-body tr { display: table-row } -.x-panel-reset .x-panel-body thead { display: table-header-group } -.x-panel-reset .x-panel-body tbody { display: table-row-group } -.x-panel-reset .x-panel-body tfoot { display: table-footer-group } -.x-panel-reset .x-panel-body col { display: table-column } -.x-panel-reset .x-panel-body colgroup { display: table-column-group } -.x-panel-reset .x-panel-body td, -.x-panel-reset .x-panel-body th { display: table-cell } -.x-panel-reset .x-panel-body caption { display: table-caption } -.x-panel-reset .x-panel-body th { font-weight: bolder; text-align: center } -.x-panel-reset .x-panel-body caption { text-align: center } -.x-panel-reset .x-panel-body body { margin: 8px } -.x-panel-reset .x-panel-body h1 { font-size: 2em; margin: .67em 0 } -.x-panel-reset .x-panel-body h2 { font-size: 1.5em; margin: .75em 0 } -.x-panel-reset .x-panel-body h3 { font-size: 1.17em; margin: .83em 0 } -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body p, -.x-panel-reset .x-panel-body blockquote, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body fieldset, -.x-panel-reset .x-panel-body form, -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body dl, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body menu { margin: 1.12em 0 } -.x-panel-reset .x-panel-body h5 { font-size: .83em; margin: 1.5em 0 } -.x-panel-reset .x-panel-body h6 { font-size: .75em; margin: 1.67em 0 } -.x-panel-reset .x-panel-body h1, -.x-panel-reset .x-panel-body h2, -.x-panel-reset .x-panel-body h3, -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body h5, -.x-panel-reset .x-panel-body h6, -.x-panel-reset .x-panel-body b, -.x-panel-reset .x-panel-body strong { font-weight: bolder } -.x-panel-reset .x-panel-body blockquote { margin-left: 40px; margin-right: 40px } -.x-panel-reset .x-panel-body i, -.x-panel-reset .x-panel-body cite, -.x-panel-reset .x-panel-body em, -.x-panel-reset .x-panel-body var, -.x-panel-reset .x-panel-body address { font-style: italic } -.x-panel-reset .x-panel-body pre, -.x-panel-reset .x-panel-body tt, -.x-panel-reset .x-panel-body code, -.x-panel-reset .x-panel-body kbd, -.x-panel-reset .x-panel-body samp { font-family: monospace } -.x-panel-reset .x-panel-body pre { white-space: pre } -.x-panel-reset .x-panel-body button, -.x-panel-reset .x-panel-body textarea, -.x-panel-reset .x-panel-body input, -.x-panel-reset .x-panel-body select { display: inline-block } -.x-panel-reset .x-panel-body big { font-size: 1.17em } -.x-panel-reset .x-panel-body small, -.x-panel-reset .x-panel-body sub, -.x-panel-reset .x-panel-body sup { font-size: .83em } -.x-panel-reset .x-panel-body sub { vertical-align: sub } -.x-panel-reset .x-panel-body sup { vertical-align: super } -.x-panel-reset .x-panel-body table { border-spacing: 2px; } -.x-panel-reset .x-panel-body thead, -.x-panel-reset .x-panel-body tbody, -.x-panel-reset .x-panel-body tfoot { vertical-align: middle } -.x-panel-reset .x-panel-body td, -.x-panel-reset .x-panel-body th { vertical-align: inherit } -.x-panel-reset .x-panel-body s, -.x-panel-reset .x-panel-body strike, -.x-panel-reset .x-panel-body del { text-decoration: line-through } -.x-panel-reset .x-panel-body hr { border: 1px inset } -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body menu, -.x-panel-reset .x-panel-body dd { margin-left: 40px } -.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;} -.x-panel-reset .x-panel-body ol { list-style-type: decimal } -.x-panel-reset .x-panel-body ol ul, -.x-panel-reset .x-panel-body ul ol, -.x-panel-reset .x-panel-body ul ul, -.x-panel-reset .x-panel-body ol ol { margin-top: 0; margin-bottom: 0 } -.x-panel-reset .x-panel-body u, -.x-panel-reset .x-panel-body ins { text-decoration: underline } -.x-panel-reset .x-panel-body br:before { content: "\A" } -.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line } -.x-panel-reset .x-panel-body center { text-align: center } -.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline } -.x-panel-reset .x-panel-body :focus { outline: invert dotted thin } - -/* Begin bidirectionality settings (do not change) */ -.x-panel-reset .x-panel-body BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } -.x-panel-reset .x-panel-body BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } -.x-window { - zoom:1; -} - -.x-window .x-window-handle { - opacity:0; - -moz-opacity:0; - filter:alpha(opacity=0); -} - -.x-window-proxy { - border:1px solid; - z-index:12000; - overflow:hidden; - position:absolute; - left:0;top:0; - display:none; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); -} - -.x-window-header { - overflow:hidden; - zoom:1; -} - -.x-window-bwrap { - z-index:1; - position:relative; - zoom:1; - left:0;top:0; -} - -.x-window-tl .x-window-header { - padding:5px 0 4px 0; -} - -.x-window-header-text { - cursor:pointer; -} - -.x-window-tc { - background: transparent repeat-x 0 0; - overflow:hidden; - zoom:1; -} - -.x-window-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - zoom:1; - z-index:1; - position:relative; -} - -.x-window-tr { - background: transparent no-repeat right 0; - padding-right:6px; -} - -.x-window-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-window-bc .x-window-footer { - padding-bottom:6px; - zoom:1; - font-size:0; - line-height:0; -} - -.x-window-bl { - background: transparent no-repeat 0 bottom; - padding-left:6px; - zoom:1; -} - -.x-window-br { - background: transparent no-repeat right bottom; - padding-right:6px; - zoom:1; -} - -.x-window-mc { - border:1px solid; - padding:0; - margin:0; -} - -.x-window-ml { - background: transparent repeat-y 0 0; - padding-left:6px; - zoom:1; -} - -.x-window-mr { - background: transparent repeat-y right 0; - padding-right:6px; - zoom:1; -} - -.x-window-body { - overflow:hidden; -} - -.x-window-bwrap { - overflow:hidden; -} - -.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br, - .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr, - .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr { - padding:0; -} - -.x-window-maximized .x-window-footer { - padding-bottom:0; -} - -.x-window-maximized .x-window-tc { - padding-left:3px; - padding-right:3px; -} - -.x-window-maximized .x-window-mc { - border-left:0 none; - border-right:0 none; -} - -.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar { - border-left:0 none; - border-right: 0 none; -} - -.x-window-bbar .x-toolbar { - border-top:1px solid; - border-bottom:0 none; -} - -.x-window-draggable, .x-window-draggable .x-window-header-text { - cursor:move; -} - -.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text { - cursor:default; -} - -.x-window-body { - background-color:transparent; -} - -.x-panel-ghost .x-window-tl { - border-bottom:1px solid; -} - -.x-panel-collapsed .x-window-tl { - border-bottom:1px solid; -} - -.x-window-maximized-ct { - overflow:hidden; -} - -.x-window-maximized .x-window-handle { - display:none; -} - -.x-window-sizing-ghost ul { - border:0 none !important; -} - -.x-dlg-focus{ - -moz-outline:0 none; - outline:0 none; - width:0; - height:0; - overflow:hidden; - position:absolute; - top:0; - left:0; -} - -.ext-webkit .x-dlg-focus{ - width: 1px; - height: 1px; -} - -.x-dlg-mask{ - z-index:10000; - display:none; - position:absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity:.50; - filter: alpha(opacity=50); -} - -body.ext-ie6.x-body-masked select { - visibility:hidden; -} - -body.ext-ie6.x-body-masked .x-window select { - visibility:visible; -} - -.x-window-plain .x-window-mc { - border: 1px solid; -} - -.x-window-plain .x-window-body { - border: 1px solid; - background:transparent !important; -}.x-html-editor-wrap { - border:1px solid; -} - -.x-html-editor-tb .x-btn-text { - background:transparent no-repeat; -} - -.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold { - background-position:0 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic { - background-position:-16px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline { - background-position:-32px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor { - background-position:-160px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor { - background-position:-176px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft { - background-position:-112px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter { - background-position:-128px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright { - background-position:-144px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist { - background-position:-80px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist { - background-position:-96px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize { - background-position:-48px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize { - background-position:-64px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit { - background-position:-192px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink { - background-position:-208px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { - padding:5px; - padding-bottom:1px; -} - -.x-html-editor-tb .x-toolbar { - position:static !important; -}.x-panel-noborder .x-panel-body-noborder { - border-width:0; -} - -.x-panel-noborder .x-panel-header-noborder { - border-width:0 0 1px; - border-style:solid; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-width:0 0 1px; - border-style:solid; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-width:1px 0 0 0; - border-style:solid; -} - -.x-window-noborder .x-window-mc { - border-width:0; -} - -.x-window-plain .x-window-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-header-noborder { - border-width: 0 0 1px 0; -} - -.x-tab-panel-noborder .x-tab-panel-footer-noborder { - border-width: 1px 0 0 0; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-width: 1px 0 0 0; - border-style:solid; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-width:0 0 1px; - border-style:solid; -}.x-border-layout-ct { - position: relative; -} - -.x-border-panel { - position:absolute; - left:0; - top:0; -} - -.x-tool-collapse-south { - background-position:0 -195px; -} - -.x-tool-collapse-south-over { - background-position:-15px -195px; -} - -.x-tool-collapse-north { - background-position:0 -210px; -} - -.x-tool-collapse-north-over { - background-position:-15px -210px; -} - -.x-tool-collapse-west { - background-position:0 -180px; -} - -.x-tool-collapse-west-over { - background-position:-15px -180px; -} - -.x-tool-collapse-east { - background-position:0 -165px; -} - -.x-tool-collapse-east-over { - background-position:-15px -165px; -} - -.x-tool-expand-south { - background-position:0 -210px; -} - -.x-tool-expand-south-over { - background-position:-15px -210px; -} - -.x-tool-expand-north { - background-position:0 -195px; -} -.x-tool-expand-north-over { - background-position:-15px -195px; -} - -.x-tool-expand-west { - background-position:0 -165px; -} - -.x-tool-expand-west-over { - background-position:-15px -165px; -} - -.x-tool-expand-east { - background-position:0 -180px; -} - -.x-tool-expand-east-over { - background-position:-15px -180px; -} - -.x-tool-expand-north, .x-tool-expand-south { - float:right; - margin:3px; -} - -.x-tool-expand-east, .x-tool-expand-west { - float:none; - margin:3px 2px; -} - -.x-accordion-hd .x-tool-toggle { - background-position:0 -255px; -} - -.x-accordion-hd .x-tool-toggle-over { - background-position:-15px -255px; -} - -.x-panel-collapsed .x-accordion-hd .x-tool-toggle { - background-position:0 -240px; -} - -.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over { - background-position:-15px -240px; -} - -.x-accordion-hd { - padding-top:4px; - padding-bottom:3px; - border-top:0 none; - background: transparent repeat-x 0 -9px; -} - -.x-layout-collapsed{ - position:absolute; - left:-10000px; - top:-10000px; - visibility:hidden; - width:20px; - height:20px; - overflow:hidden; - border:1px solid; - z-index:20; -} - -.ext-border-box .x-layout-collapsed{ - width:22px; - height:22px; -} - -.x-layout-collapsed-over{ - cursor:pointer; -} - -.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{ - position:absolute; - top:0; - left:0; - width:20px; - height:20px; -} - - -.x-layout-split{ - position:absolute; - height:5px; - width:5px; - line-height:1px; - font-size:1px; - z-index:3; - background-color:transparent; -} - -/* IE6 strict won't drag w/out a color */ -.ext-strict .ext-ie6 .x-layout-split{ - background-color: #fff !important; - filter: alpha(opacity=1); -} - -.x-layout-split-h{ - background-image:url(../images/default/s.gif); - background-position: left; -} - -.x-layout-split-v{ - background-image:url(../images/default/s.gif); - background-position: top; -} - -.x-column-layout-ct { - overflow:hidden; - zoom:1; -} - -.x-column { - float:left; - padding:0; - margin:0; - overflow:hidden; - zoom:1; -} - -.x-column-inner { - overflow:hidden; - zoom:1; -} - -/* mini mode */ -.x-layout-mini { - position:absolute; - top:0; - left:0; - display:block; - width:5px; - height:35px; - cursor:pointer; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); -} - -.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{ - opacity:1; - -moz-opacity:1; - filter:none; -} - -.x-layout-split-west .x-layout-mini { - top:48%; -} - -.x-layout-split-east .x-layout-mini { - top:48%; -} - -.x-layout-split-north .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-split-south .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-west .x-layout-mini { - top:48%; -} - -.x-layout-cmini-east .x-layout-mini { - top:48%; -} - -.x-layout-cmini-north .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-south .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-west, .x-layout-cmini-east { - border:0 none; - width:5px !important; - padding:0; - background-color:transparent; -} - -.x-layout-cmini-north, .x-layout-cmini-south { - border:0 none; - height:5px !important; - padding:0; - background-color:transparent; -} - -.x-viewport, .x-viewport body { - margin: 0; - padding: 0; - border: 0 none; - overflow: hidden; - height: 100%; -} - -.x-abs-layout-item { - position:absolute; - left:0; - top:0; -} - -.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { - margin:0; -} - -.x-box-layout-ct { - overflow:hidden; - zoom:1; -} - -.x-box-inner { - overflow:hidden; - zoom:1; - position:relative; - left:0; - top:0; -} - -.x-box-item { - position:absolute; - left:0; - top:0; -}.x-progress-wrap { - border:1px solid; - overflow:hidden; -} - -.x-progress-inner { - height:18px; - background:repeat-x; - position:relative; -} - -.x-progress-bar { - height:18px; - float:left; - width:0; - background: repeat-x left center; - border-top:1px solid; - border-bottom:1px solid; - border-right:1px solid; -} - -.x-progress-text { - padding:1px 5px; - overflow:hidden; - position:absolute; - left:0; - text-align:center; -} - -.x-progress-text-back { - line-height:16px; -} - -.ext-ie .x-progress-text-back { - line-height:15px; -} - -.ext-strict .ext-ie7 .x-progress-text-back{ - width: 100%; -} -.x-list-header{ - background: repeat-x 0 bottom; - cursor:default; - zoom:1; - height:22px; -} - -.x-list-header-inner div { - display:block; - float:left; - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; -} - -.x-list-header-inner div em { - display:block; - border-left:1px solid; - padding:4px 4px; - overflow:hidden; - -moz-user-select: none; - -khtml-user-select: none; - line-height:14px; -} - -.x-list-body { - overflow:auto; - overflow-x:hidden; - overflow-y:auto; - zoom:1; - float: left; - width: 100%; -} - -.x-list-body dl { - zoom:1; -} - -.x-list-body dt { - display:block; - float:left; - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; - cursor:pointer; - zoom:1; -} - -.x-list-body dt em { - display:block; - padding:3px 4px; - overflow:hidden; - -moz-user-select: none; - -khtml-user-select: none; -} - -.x-list-resizer { - border-left:1px solid; - border-right:1px solid; - position:absolute; - left:0; - top:0; -} - -.x-list-header-inner em.sort-asc { - background: transparent no-repeat center 0; - border-style:solid; - border-width: 0 1px 1px; - padding-bottom:3px; -} - -.x-list-header-inner em.sort-desc { - background: transparent no-repeat center -23px; - border-style:solid; - border-width: 0 1px 1px; - padding-bottom:3px; -} - -/* Shared styles */ -.x-slider { - zoom:1; -} - -.x-slider-inner { - position:relative; - left:0; - top:0; - overflow:visible; - zoom:1; -} - -.x-slider-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; - display:block; - overflow:hidden; -} - -/* Horizontal styles */ -.x-slider-horz { - padding-left:7px; - background:transparent no-repeat 0 -22px; -} - -.x-slider-horz .x-slider-end { - padding-right:7px; - zoom:1; - background:transparent no-repeat right -44px; -} - -.x-slider-horz .x-slider-inner { - background:transparent repeat-x 0 0; - height:22px; -} - -.x-slider-horz .x-slider-thumb { - width:14px; - height:15px; - position:absolute; - left:0; - top:3px; - background:transparent no-repeat 0 0; -} - -.x-slider-horz .x-slider-thumb-over { - background-position: -14px -15px; -} - -.x-slider-horz .x-slider-thumb-drag { - background-position: -28px -30px; -} - -/* Vertical styles */ -.x-slider-vert { - padding-top:7px; - background:transparent no-repeat -44px 0; - width:22px; -} - -.x-slider-vert .x-slider-end { - padding-bottom:7px; - zoom:1; - background:transparent no-repeat -22px bottom; -} - -.x-slider-vert .x-slider-inner { - background:transparent repeat-y 0 0; -} - -.x-slider-vert .x-slider-thumb { - width:15px; - height:14px; - position:absolute; - left:3px; - bottom:0; - background:transparent no-repeat 0 0; -} - -.x-slider-vert .x-slider-thumb-over { - background-position: -15px -14px; -} - -.x-slider-vert .x-slider-thumb-drag { - background-position: -30px -28px; -}.x-window-dlg .x-window-body { - border:0 none !important; - padding:5px 10px; - overflow:hidden !important; -} - -.x-window-dlg .x-window-mc { - border:0 none !important; -} - -.x-window-dlg .ext-mb-input { - margin-top:4px; - width:95%; -} - -.x-window-dlg .ext-mb-textarea { - margin-top:4px; -} - -.x-window-dlg .x-progress-wrap { - margin-top:4px; -} - -.ext-ie .x-window-dlg .x-progress-wrap { - margin-top:6px; -} - -.x-window-dlg .x-msg-box-wait { - background:transparent no-repeat left; - display:block; - width:300px; - padding-left:18px; - line-height:18px; -} - -.x-window-dlg .ext-mb-icon { - float:left; - width:47px; - height:32px; -} - -.x-window-dlg .x-dlg-icon .ext-mb-content{ - zoom: 1; - margin-left: 47px; -} - -.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error { - background:transparent no-repeat top left; -} - -.ext-gecko2 .ext-mb-fix-cursor { - overflow:auto; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/ext-all.css b/web-client/src/main/resources/apps/js/ext/resources/css/ext-all.css deleted file mode 100644 index 38dff3e08e6..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/ext-all.css +++ /dev/null @@ -1,6993 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} - -.ext-forced-border-box, .ext-forced-border-box * { - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -.ext-el-mask { - z-index: 100; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - width: 100%; - height: 100%; - zoom: 1; -} - -.ext-el-mask-msg { - z-index: 20001; - position: absolute; - top: 0; - left: 0; - border:1px solid; - background:repeat-x 0 -16px; - padding:2px; -} - -.ext-el-mask-msg div { - padding:5px 10px 5px 10px; - border:1px solid; - cursor:wait; -} - -.ext-shim { - position:absolute; - visibility:hidden; - left:0; - top:0; - overflow:hidden; -} - -.ext-ie .ext-shim { - filter: alpha(opacity=0); -} - -.ext-ie6 .ext-shim { - margin-left: 5px; - margin-top: 3px; -} - -.x-mask-loading div { - padding:5px 10px 5px 25px; - background:no-repeat 5px 5px; - line-height:16px; -} - -/* class for hiding elements without using display:none */ -.x-hidden, .x-hide-offsets { - position:absolute !important; - left:-10000px; - top:-10000px; - visibility:hidden; -} - -.x-hide-display { - display:none !important; -} - -.x-hide-nosize, -.x-hide-nosize * /* Emulate display:none for children */ - { - height:0px!important; - width:0px!important; - visibility:hidden!important; - border:none!important; - zoom:1; -} - -.x-hide-visibility { - visibility:hidden !important; -} - -.x-masked { - overflow: hidden !important; -} -.x-masked-relative { - position: relative !important; -} - -.x-masked select, .x-masked object, .x-masked embed { - visibility: hidden; -} - -.x-layer { - visibility: hidden; -} - -.x-unselectable, .x-unselectable * { - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select:ignore; -} - -.x-repaint { - zoom: 1; - background-color: transparent; - -moz-outline: none; - outline: none; -} - -.x-item-disabled { - cursor: default; - opacity: .6; - -moz-opacity: .6; - filter: alpha(opacity=60); -} - -.x-item-disabled * { - cursor: default !important; -} - -.x-form-radio-group .x-item-disabled { - filter: none; -} - -.x-splitbar-proxy { - position: absolute; - visibility: hidden; - z-index: 20001; - zoom: 1; - line-height: 1px; - font-size: 1px; - overflow: hidden; -} - -.x-splitbar-h, .x-splitbar-proxy-h { - cursor: e-resize; - cursor: col-resize; -} - -.x-splitbar-v, .x-splitbar-proxy-v { - cursor: s-resize; - cursor: row-resize; -} - -.x-color-palette { - width: 150px; - height: 92px; - cursor: pointer; -} - -.x-color-palette a { - border: 1px solid; - float: left; - padding: 2px; - text-decoration: none; - -moz-outline: 0 none; - outline: 0 none; - cursor: pointer; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border: 1px solid; -} - -.x-color-palette em { - display: block; - border: 1px solid; -} - -.x-color-palette em span { - cursor: pointer; - display: block; - height: 10px; - line-height: 10px; - width: 10px; -} - -.x-ie-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; - zoom:1; -} - -.x-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; -} - -.x-shadow * { - overflow: hidden; -} - -.x-shadow * { - padding: 0; - border: 0; - margin: 0; - clear: none; - zoom: 1; -} - -/* top bottom */ -.x-shadow .xstc, .x-shadow .xsbc { - height: 6px; - float: left; -} - -/* corners */ -.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { - width: 6px; - height: 6px; - float: left; -} - -/* sides */ -.x-shadow .xsc { - width: 100%; -} - -.x-shadow .xsml, .x-shadow .xsmr { - width: 6px; - float: left; - height: 100%; -} - -.x-shadow .xsmc { - float: left; - height: 100%; - background-color: transparent; -} - -.x-shadow .xst, .x-shadow .xsb { - height: 6px; - overflow: hidden; - width: 100%; -} - -.x-shadow .xsml { - background: transparent repeat-y 0 0; -} - -.x-shadow .xsmr { - background: transparent repeat-y -6px 0; -} - -.x-shadow .xstl { - background: transparent no-repeat 0 0; -} - -.x-shadow .xstc { - background: transparent repeat-x 0 -30px; -} - -.x-shadow .xstr { - background: transparent repeat-x 0 -18px; -} - -.x-shadow .xsbl { - background: transparent no-repeat 0 -12px; -} - -.x-shadow .xsbc { - background: transparent repeat-x 0 -36px; -} - -.x-shadow .xsbr { - background: transparent repeat-x 0 -6px; -} - -.loading-indicator { - background: no-repeat left; - padding-left: 20px; - line-height: 16px; - margin: 3px; -} - -.x-text-resize { - position: absolute; - left: -1000px; - top: -1000px; - visibility: hidden; - zoom: 1; -} - -.x-drag-overlay { - width: 100%; - height: 100%; - display: none; - position: absolute; - left: 0; - top: 0; - background-image:url(../images/default/s.gif); - z-index: 20000; -} - -.x-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - -.x-spotlight { - z-index: 8999; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - width:0; - height:0; - zoom: 1; -} - -#x-history-frame { - position:absolute; - top:-1px; - left:0; - width:1px; - height:1px; - visibility:hidden; -} - -#x-history-field { - position:absolute; - top:0; - left:-1px; - width:1px; - height:1px; - visibility:hidden; -} -.x-resizable-handle { - position:absolute; - z-index:100; - /* ie needs these */ - font-size:1px; - line-height:6px; - overflow:hidden; - filter:alpha(opacity=0); - opacity:0; - zoom:1; -} - -.x-resizable-handle-east{ - width:6px; - cursor:e-resize; - right:0; - top:0; - height:100%; -} - -.ext-ie .x-resizable-handle-east { - margin-right:-1px; /*IE rounding error*/ -} - -.x-resizable-handle-south{ - width:100%; - cursor:s-resize; - left:0; - bottom:0; - height:6px; -} - -.ext-ie .x-resizable-handle-south { - margin-bottom:-1px; /*IE rounding error*/ -} - -.x-resizable-handle-west{ - width:6px; - cursor:w-resize; - left:0; - top:0; - height:100%; -} - -.x-resizable-handle-north{ - width:100%; - cursor:n-resize; - left:0; - top:0; - height:6px; -} - -.x-resizable-handle-southeast{ - width:6px; - cursor:se-resize; - right:0; - bottom:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-northwest{ - width:6px; - cursor:nw-resize; - left:0; - top:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-northeast{ - width:6px; - cursor:ne-resize; - right:0; - top:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-southwest{ - width:6px; - cursor:sw-resize; - left:0; - bottom:0; - height:6px; - z-index:101; -} - -.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ - filter:alpha(opacity=100); - opacity:1; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-position: left; -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-position: top; -} - -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-position: top left; -} - -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-position:bottom right; -} - -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-position: bottom left; -} - -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-position: top right; -} - -.x-resizable-proxy{ - border: 1px dashed; - position:absolute; - overflow:hidden; - display:none; - left:0; - top:0; - z-index:50000; -} - -.x-resizable-overlay{ - width:100%; - height:100%; - display:none; - position:absolute; - left:0; - top:0; - z-index:200000; - -moz-opacity: 0; - opacity:0; - filter: alpha(opacity=0); -} -.x-tab-panel { - overflow:hidden; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border: 1px solid; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header { - border: 1px solid; - padding-bottom: 2px; -} - -.x-tab-panel-footer { - border: 1px solid; - padding-top: 2px; -} - -.x-tab-strip-wrap { - width:100%; - overflow:hidden; - position:relative; - zoom:1; -} - -ul.x-tab-strip { - display:block; - width:5000px; - zoom:1; -} - -ul.x-tab-strip-top{ - padding-top: 1px; - background: repeat-x bottom; - border-bottom: 1px solid; -} - -ul.x-tab-strip-bottom{ - padding-bottom: 1px; - background: repeat-x top; - border-top: 1px solid; - border-bottom: 0 none; -} - -.x-tab-panel-header-plain .x-tab-strip-top { - background:transparent !important; - padding-top:0 !important; -} - -.x-tab-panel-header-plain { - background:transparent !important; - border-width:0 !important; - padding-bottom:0 !important; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border:1px solid; - height:2px; - font-size:1px; - line-height:1px; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer { - border-top: 0 none; -} - -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-bottom: 0 none; -} - -.x-tab-panel-footer-plain .x-tab-strip-bottom { - background:transparent !important; - padding-bottom:0 !important; -} - -.x-tab-panel-footer-plain { - background:transparent !important; - border-width:0 !important; - padding-top:0 !important; -} - -.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, -.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { - height:3px; -} - -ul.x-tab-strip li { - float:left; - margin-left:2px; -} - -ul.x-tab-strip li.x-tab-edge { - float:left; - margin:0 !important; - padding:0 !important; - border:0 none !important; - font-size:1px !important; - line-height:1px !important; - overflow:hidden; - zoom:1; - background:transparent !important; - width:1px; -} - -.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { - display:block; -} - -.x-tab-strip a { - text-decoration:none !important; - -moz-outline: none; - outline: none; - cursor:pointer; -} - -.x-tab-strip-inner { - overflow:hidden; - text-overflow: ellipsis; -} - -.x-tab-strip span.x-tab-strip-text { - white-space: nowrap; - cursor:pointer; - padding:4px 0; -} - -.x-tab-strip-top .x-tab-with-icon .x-tab-right { - padding-left:6px; -} - -.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { - padding-left:20px; - background-position: 0 3px; - background-repeat: no-repeat; -} - -.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { - cursor:default; -} - -.x-tab-strip-active span.x-tab-strip-text { - cursor:default; -} - -.x-tab-strip-disabled .x-tabs-text { - cursor:default; -} - -.x-tab-panel-body { - overflow:hidden; -} - -.x-tab-panel-bwrap { - overflow:hidden; -} - -.ext-ie .x-tab-strip .x-tab-right { - position:relative; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-right { - margin-bottom:-1px; -} - -/* - * Horrible hack for IE8 in quirks mode - */ -.ext-ie8 .x-tab-strip li { - position: relative; -} -.ext-border-box .ext-ie8 .x-tab-strip-top .x-tab-right { - top: 1px; -} -.ext-ie8 .x-tab-strip-top { - padding-top: 1; -} -.ext-border-box .ext-ie8 .x-tab-strip-top { - padding-top: 0; -} -.ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - top:3px; -} -.ext-border-box .ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - top:4px; -} -.ext-ie8 .x-tab-strip-bottom .x-tab-right{ - top:0; -} - - -.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { - padding-bottom:5px; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - margin-top:-1px; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text { - padding-top:5px; -} - -.x-tab-strip-top .x-tab-right { - background: transparent no-repeat 0 -51px; - padding-left:10px; -} - -.x-tab-strip-top .x-tab-left { - background: transparent no-repeat right -351px; - padding-right:10px; -} - -.x-tab-strip-top .x-tab-strip-inner { - background: transparent repeat-x 0 -201px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-right { - background-position:0 -101px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-left { - background-position:right -401px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner { - background-position:0 -251px; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-right { - background-position: 0 0; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-left { - background-position: right -301px; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner { - background-position: 0 -151px; -} - -.x-tab-strip-bottom .x-tab-right { - background: no-repeat bottom right; -} - -.x-tab-strip-bottom .x-tab-left { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background: no-repeat bottom right; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-left { - margin-right: 3px; - padding:0 10px; -} - -.x-tab-strip-bottom .x-tab-right { - padding:0; -} - -.x-tab-strip .x-tab-strip-close { - display:none; -} - -.x-tab-strip-closable { - position:relative; -} - -.x-tab-strip-closable .x-tab-left { - padding-right:19px; -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - opacity:.6; - -moz-opacity:.6; - background-repeat:no-repeat; - display:block; - width:11px; - height:11px; - position:absolute; - top:3px; - right:3px; - cursor:pointer; - z-index:2; -} - -.x-tab-strip .x-tab-strip-active a.x-tab-strip-close { - opacity:.8; - -moz-opacity:.8; -} -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - opacity:1; - -moz-opacity:1; -} - -.x-tab-panel-body { - border: 1px solid; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background: transparent no-repeat -18px 0; - border-bottom: 1px solid; - width:18px; - position:absolute; - left:0; - top:0; - z-index:10; - cursor:pointer; -} -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background: transparent no-repeat 0 0; - border-bottom: 1px solid; - width:18px; - position:absolute; - right:0; - top:0; - z-index:10; - cursor:pointer; -} - -.x-tab-scroller-right-over { - background-position: -18px 0; -} - -.x-tab-scroller-right-disabled { - background-position: 0 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{ - margin-top: 1px; -} - -.x-tab-scrolling .x-tab-strip-wrap { - margin-left:18px; - margin-right:18px; -} - -.x-tab-scrolling { - position:relative; -} - -.x-tab-panel-bbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} - -.x-tab-panel-tbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -}/* all fields */ -.x-form-field{ - margin: 0 0 0 0; -} - -.ext-webkit *:focus{ - outline: none !important; -} - -/* ---- text fields ---- */ -.x-form-text, textarea.x-form-field{ - padding:1px 3px; - background:repeat-x 0 0; - border:1px solid; -} - -textarea.x-form-field { - padding:2px 3px; -} - -.x-form-text, .ext-ie .x-form-file { - height:22px; - line-height:18px; - vertical-align:middle; -} - -.ext-ie6 .x-form-text, .ext-ie7 .x-form-text { - margin:-1px 0; /* ie bogus margin bug */ - height:22px; /* ie quirks */ - line-height:18px; -} - -.x-quirks .ext-ie9 .x-form-text { - height: 22px; - padding-top: 3px; - padding-bottom: 0px; -} - -/* Ugly hacks for the bogus 1px margin bug in IE9 quirks */ -.x-quirks .ext-ie9 .x-input-wrapper .x-form-text, -.x-quirks .ext-ie9 .x-form-field-trigger-wrap .x-form-text { - margin-top: -1px; - margin-bottom: -1px; -} -.x-quirks .ext-ie9 .x-input-wrapper .x-form-element { - margin-bottom: -1px; -} - -.ext-ie6 .x-form-field-wrap .x-form-file-btn, .ext-ie7 .x-form-field-wrap .x-form-file-btn { - top: -1px; /* because of all these margin hacks, these buttons are off by one pixel in IE6,7 */ -} - -.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field { - margin:-1px 0; /* ie bogus margin bug */ -} - -.ext-strict .x-form-text { - height:18px; -} - -.ext-safari.ext-mac textarea.x-form-field { - margin-bottom:-2px; /* another bogus margin bug, safari/mac only */ -} - -/* -.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field { - margin-bottom: 1px; -} -*/ - -.ext-gecko .x-form-text , .ext-ie8 .x-form-text { - padding-top:2px; /* FF won't center the text vertically */ - padding-bottom:0; -} - -.ext-ie6 .x-form-composite .x-form-text.x-box-item, .ext-ie7 .x-form-composite .x-form-text.x-box-item { - margin: 0 !important; /* clear ie bogus margin bug fix */ -} - -textarea { - resize: none; /* Disable browser resizable textarea */ -} - -/* select boxes */ -.x-form-select-one { - height:20px; - line-height:18px; - vertical-align:middle; - border: 1px solid; -} - -/* multi select boxes */ - -/* --- TODO --- */ - -/* 2.0.2 style */ -.x-form-check-wrap { - line-height:18px; - height: auto; -} - -.ext-ie .x-form-check-wrap input { - width:15px; - height:15px; -} - -.x-form-check-wrap input{ - vertical-align: bottom; -} - -.x-editor .x-form-check-wrap { - padding:3px; -} - -.x-editor .x-form-checkbox { - height:13px; -} - -.x-form-check-group-label { - border-bottom: 1px solid; - margin-bottom: 5px; - padding-left: 3px !important; - float: none !important; -} - -/* wrapped fields and triggers */ -.x-form-field-wrap .x-form-trigger{ - width:17px; - height:21px; - border:0; - background:transparent no-repeat 0 0; - cursor:pointer; - border-bottom: 1px solid; - position:absolute; - top:0; -} - -.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{ - cursor:pointer; -} - -.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ - position:static; - top:auto; - vertical-align:top; -} - -.x-form-field-wrap { - position:relative; - left:0;top:0; - text-align: left; - zoom:1; - white-space: nowrap; -} - -.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-trigger { - right: 0; /* IE8 Strict mode trigger bug */ -} - -.x-form-field-wrap .x-form-trigger-over{ - background-position:-17px 0; -} - -.x-form-field-wrap .x-form-trigger-click{ - background-position:-34px 0; -} - -.x-trigger-wrap-focus .x-form-trigger{ - background-position:-51px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-over{ - background-position:-68px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-click{ - background-position:-85px 0; -} - -.x-trigger-wrap-focus .x-form-trigger{ - border-bottom: 1px solid; -} - -.x-item-disabled .x-form-trigger-over{ - background-position:0 0 !important; - border-bottom: 1px solid; -} - -.x-item-disabled .x-form-trigger-click{ - background-position:0 0 !important; - border-bottom: 1px solid; -} - -.x-trigger-noedit{ - cursor:pointer; -} - -/* field focus style */ -.x-form-focus, textarea.x-form-focus{ - border: 1px solid; -} - -/* invalid fields */ -.x-form-invalid, textarea.x-form-invalid{ - background:repeat-x bottom; - border: 1px solid; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid{ - background:repeat-x bottom; -} - -/* editors */ -.x-editor { - visibility:hidden; - padding:0; - margin:0; -} - -.x-form-grow-sizer { - left: -10000px; - padding: 8px 3px; - position: absolute; - visibility:hidden; - top: -10000px; - white-space: pre-wrap; - white-space: -moz-pre-wrap; - white-space: -pre-wrap; - white-space: -o-pre-wrap; - word-wrap: break-word; - zoom:1; -} - -.x-form-grow-sizer p { - margin:0 !important; - border:0 none !important; - padding:0 !important; -} - -/* Form Items CSS */ - -.x-form-item { - display:block; - margin-bottom:4px; - zoom:1; -} - -.x-form-item label.x-form-item-label { - display:block; - float:left; - width:100px; - padding:3px; - padding-left:0; - clear:left; - z-index:2; - position:relative; -} - -.x-form-element { - padding-left:105px; - position:relative; -} - -.x-form-invalid-msg { - padding:2px; - padding-left:18px; - background: transparent no-repeat 0 2px; - line-height:16px; - width:200px; -} - -.x-form-label-left label.x-form-item-label { - text-align:left; -} - -.x-form-label-right label.x-form-item-label { - text-align:right; -} - -.x-form-label-top .x-form-item label.x-form-item-label { - width:auto; - float:none; - clear:none; - display:inline; - margin-bottom:4px; - position:static; -} - -.x-form-label-top .x-form-element { - padding-left:0; - padding-top:4px; -} - -.x-form-label-top .x-form-item { - padding-bottom:4px; -} - -/* Editor small font for grid, toolbar and tree */ -.x-small-editor .x-form-text { - height:20px; - line-height:16px; - vertical-align:middle; -} - -.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { - margin-top:-1px !important; /* ie bogus margin bug */ - margin-bottom:-1px !important; - height:20px !important; /* ie quirks */ - line-height:16px !important; -} - -.ext-strict .x-small-editor .x-form-text { - height:16px !important; -} - -.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { - height:20px; - line-height:16px; -} - -.ext-border-box .x-small-editor .x-form-text { - height:20px; -} - -.x-small-editor .x-form-select-one { - height:20px; - line-height:16px; - vertical-align:middle; -} - -.x-small-editor .x-form-num-field { - text-align:right; -} - -.x-small-editor .x-form-field-wrap .x-form-trigger{ - height:19px; -} - -.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;} - -.ext-strict .ext-webkit .x-small-editor .x-form-text{ - height:14px !important; -} - -.x-form-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} -.x-form-clear-left { - clear:left; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - -.ext-ie6 .x-form-check-wrap input, .ext-border-box .x-form-check-wrap input{ - margin-top: 3px; -} - -.x-form-cb-label { - position: relative; - margin-left:4px; - top: 2px; -} - -.ext-ie .x-form-cb-label{ - top: 1px; -} - -.ext-ie6 .x-form-cb-label, .ext-border-box .x-form-cb-label{ - top: 3px; -} - -.x-form-display-field{ - padding-top: 2px; -} - -.ext-gecko .x-form-display-field, .ext-strict .ext-ie7 .x-form-display-field{ - padding-top: 1px; -} - -.ext-ie .x-form-display-field{ - padding-top: 3px; -} - -.ext-strict .ext-ie8 .x-form-display-field{ - padding-top: 0; -} - -.x-form-column { - float:left; - padding:0; - margin:0; - width:48%; - overflow:hidden; - zoom:1; -} - -/* buttons */ -.x-form .x-form-btns-ct .x-btn{ - float:right; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns td { - border:0; - padding:0; -} - -.x-form .x-form-btns-ct .x-form-btns-right table{ - float:right; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns-left table{ - float:left; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns-center{ - text-align:center; /*ie*/ -} - -.x-form .x-form-btns-ct .x-form-btns-center table{ - margin:0 auto; /*everyone else*/ -} - -.x-form .x-form-btns-ct table td.x-form-btn-td{ - padding:3px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ - background-position:0 -147px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ - background-position:0 -168px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ - background-position:0 -189px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-center{ - background-position:0 -126px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-right{ - background-position:0 -84px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-left{ - background-position:0 -63px; -} - -.x-form-invalid-icon { - width:16px; - height:18px; - visibility:hidden; - position:absolute; - left:0; - top:0; - display:block; - background:transparent no-repeat 0 2px; -} - -/* fieldsets */ -.x-fieldset { - border:1px solid; - padding:10px; - margin-bottom:10px; - display:block; /* preserve margins in IE */ -} - -/* make top of checkbox/tools visible in webkit */ -.ext-webkit .x-fieldset-header { - padding-top: 1px; -} - -.ext-ie .x-fieldset legend { - margin-bottom:10px; -} - -.ext-strict .ext-ie9 .x-fieldset legend.x-fieldset-header { - padding-top: 1px; -} - -.ext-ie .x-fieldset { - padding-top: 0; - padding-bottom:10px; -} - -.x-fieldset legend .x-tool-toggle { - margin-right:3px; - margin-left:0; - float:left !important; -} - -.x-fieldset legend input { - margin-right:3px; - float:left !important; - height:13px; - width:13px; -} - -fieldset.x-panel-collapsed { - padding-bottom:0 !important; - border-width: 1px 1px 0 1px !important; - border-left-color: transparent; - border-right-color: transparent; -} - -.ext-ie6 fieldset.x-panel-collapsed{ - padding-bottom:0 !important; - border-width: 1px 0 0 0 !important; - margin-left: 1px; - margin-right: 1px; -} - -fieldset.x-panel-collapsed .x-fieldset-bwrap { - visibility:hidden; - position:absolute; - left:-1000px; - top:-1000px; -} - -.ext-ie .x-fieldset-bwrap { - zoom:1; -} - -.x-fieldset-noborder { - border:0px none transparent; -} - -.x-fieldset-noborder legend { - margin-left:-3px; -} - -/* IE legend positioning bug */ -.ext-ie .x-fieldset-noborder legend { - position: relative; - margin-bottom:23px; -} -.ext-ie .x-fieldset-noborder legend span { - position: absolute; - left:16px; -} - -.ext-gecko .x-window-body .x-form-item { - -moz-outline: none; - outline: none; - overflow: auto; -} - -.ext-mac.ext-gecko .x-window-body .x-form-item { - overflow:hidden; -} - -.ext-gecko .x-form-item { - -moz-outline: none; - outline: none; -} - -.x-hide-label label.x-form-item-label { - display:none; -} - -.x-hide-label .x-form-element { - padding-left: 0 !important; -} - -.x-form-label-top .x-hide-label label.x-form-item-label{ - display: none; -} - -.x-fieldset { - overflow:hidden; -} - -.x-fieldset-bwrap { - overflow:hidden; - zoom:1; -} - -.x-fieldset-body { - overflow:hidden; -} -.x-btn{ - cursor:pointer; - white-space: nowrap; -} - -.x-btn button{ - border:0 none; - background-color:transparent; - padding-left:3px; - padding-right:3px; - cursor:pointer; - margin:0; - overflow:visible; - width:auto; - -moz-outline:0 none; - outline:0 none; -} - -* html .ext-ie .x-btn button { - width:1px; -} - -.ext-gecko .x-btn button, .ext-webkit .x-btn button { - padding-left:0; - padding-right:0; -} - -.ext-gecko .x-btn button::-moz-focus-inner { - padding:0; -} - -.ext-ie .x-btn button { - padding-top:2px; -} - -.x-btn td { - padding:0 !important; -} - -.x-btn-text { - cursor:pointer; - white-space: nowrap; - padding:0; -} - -/* icon placement and sizing styles */ - -/* Only text */ -.x-btn-noicon .x-btn-small .x-btn-text{ - height: 16px; -} - -.x-btn-noicon .x-btn-medium .x-btn-text{ - height: 24px; -} - -.x-btn-noicon .x-btn-large .x-btn-text{ - height: 32px; -} - -/* Only icons */ -.x-btn-icon .x-btn-text{ - background-position: center; - background-repeat: no-repeat; -} - -.x-btn-icon .x-btn-small .x-btn-text{ - height: 16px; - width: 16px; -} - -.x-btn-icon .x-btn-medium .x-btn-text{ - height: 24px; - width: 24px; -} - -.x-btn-icon .x-btn-large .x-btn-text{ - height: 32px; - width: 32px; -} - -/* Icons and text */ -/* left */ -.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:18px; - height:16px; -} - -.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:26px; - height:24px; -} - -.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:34px; - height:32px; -} - -/* top */ -.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:18px; -} - -.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:26px; -} - -.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:34px; -} - -/* right */ -.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:18px; - height:16px; -} - -.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:26px; - height:24px; -} - -.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:34px; - height:32px; -} - -/* bottom */ -.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:18px; -} - -.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:26px; -} - -.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:34px; -} - -/* background positioning */ -.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ - font-size:1px; - line-height:1px; - width:3px; - display:block; - overflow:hidden; -} - -.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ - height:3px; -} - -.x-btn-tl{ - width:3px; - height:3px; - background:no-repeat 0 0; -} -.x-btn-tr{ - width:3px; - height:3px; - background:no-repeat -3px 0; -} -.x-btn-tc{ - height:3px; - background:repeat-x 0 -6px; -} - -.x-btn-ml{ - width:3px; - background:no-repeat 0 -24px; -} -.x-btn-mr{ - width:3px; - background:no-repeat -3px -24px; -} - -.x-btn-mc{ - background:repeat-x 0 -1096px; - vertical-align: middle; - text-align:center; - padding:0 5px; - cursor:pointer; - white-space:nowrap; -} - -/* Fixes an issue with the button height */ -.ext-strict .ext-ie6 .x-btn-mc, .ext-strict .ext-ie7 .x-btn-mc { - height: 100%; -} - -.x-btn-bl{ - width:3px; - height:3px; - background:no-repeat 0 -3px; -} - -.x-btn-br{ - width:3px; - height:3px; - background:no-repeat -3px -3px; -} - -.x-btn-bc{ - height:3px; - background:repeat-x 0 -15px; -} - -.x-btn-over .x-btn-tl{ - background-position: -6px 0; -} - -.x-btn-over .x-btn-tr{ - background-position: -9px 0; -} - -.x-btn-over .x-btn-tc{ - background-position: 0 -9px; -} - -.x-btn-over .x-btn-ml{ - background-position: -6px -24px; -} - -.x-btn-over .x-btn-mr{ - background-position: -9px -24px; -} - -.x-btn-over .x-btn-mc{ - background-position: 0 -2168px; -} - -.x-btn-over .x-btn-bl{ - background-position: -6px -3px; -} - -.x-btn-over .x-btn-br{ - background-position: -9px -3px; -} - -.x-btn-over .x-btn-bc{ - background-position: 0 -18px; -} - -.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ - background-position: -12px 0; -} - -.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ - background-position: -15px 0; -} - -.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ - background-position: 0 -12px; -} - -.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ - background-position: -12px -24px; -} - -.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ - background-position: -15px -24px; -} - -.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ - background-position: 0 -3240px; -} - -.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ - background-position: -12px -3px; -} - -.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ - background-position: -15px -3px; -} - -.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ - background-position: 0 -21px; -} - -.x-btn-disabled *{ - cursor:default !important; -} - - -/* With a menu arrow */ -/* right */ -.x-btn-mc em.x-btn-arrow { - display:block; - background:transparent no-repeat right center; - padding-right:10px; -} - -.x-btn-mc em.x-btn-split { - display:block; - background:transparent no-repeat right center; - padding-right:14px; -} - -/* bottom */ -.x-btn-mc em.x-btn-arrow-bottom { - display:block; - background:transparent no-repeat center bottom; - padding-bottom:14px; -} - -.x-btn-mc em.x-btn-split-bottom { - display:block; - background:transparent no-repeat center bottom; - padding-bottom:14px; -} - -/* height adjustment class */ -.x-btn-as-arrow .x-btn-mc em { - display:block; - background-color:transparent; - padding-bottom:14px; -} - -/* groups */ -.x-btn-group { - padding:1px; -} - -.x-btn-group-header { - padding:2px; - text-align:center; -} - -.x-btn-group-tc { - background: transparent repeat-x 0 0; - overflow:hidden; -} - -.x-btn-group-tl { - background: transparent no-repeat 0 0; - padding-left:3px; - zoom:1; -} - -.x-btn-group-tr { - background: transparent no-repeat right 0; - zoom:1; - padding-right:3px; -} - -.x-btn-group-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-btn-group-bc .x-panel-footer { - zoom:1; -} - -.x-btn-group-bl { - background: transparent no-repeat 0 bottom; - padding-left:3px; - zoom:1; -} - -.x-btn-group-br { - background: transparent no-repeat right bottom; - padding-right:3px; - zoom:1; -} - -.x-btn-group-mc { - border:0 none; - padding:1px 0 0 0; - margin:0; -} - -.x-btn-group-mc .x-btn-group-body { - background-color:transparent; - border: 0 none; -} - -.x-btn-group-ml { - background: transparent repeat-y 0 0; - padding-left:3px; - zoom:1; -} - -.x-btn-group-mr { - background: transparent repeat-y right 0; - padding-right:3px; - zoom:1; -} - -.x-btn-group-bc .x-btn-group-footer { - padding-bottom:6px; -} - -.x-panel-nofooter .x-btn-group-bc { - height:3px; - font-size:0; - line-height:0; -} - -.x-btn-group-bwrap { - overflow:hidden; - zoom:1; -} - -.x-btn-group-body { - overflow:hidden; - zoom:1; -} - -.x-btn-group-notitle .x-btn-group-tc { - background: transparent repeat-x 0 0; - overflow:hidden; - height:2px; -}.x-toolbar{ - border-style:solid; - border-width:0 0 1px 0; - display: block; - padding:2px; - background:repeat-x top left; - position:relative; - left:0; - top:0; - zoom:1; - overflow:hidden; -} - -.x-toolbar-left { - width: 100%; -} - -.x-toolbar .x-item-disabled .x-btn-icon { - opacity: .35; - -moz-opacity: .35; - filter: alpha(opacity=35); -} - -.x-toolbar td { - vertical-align:middle; -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - white-space: nowrap; -} - -.x-toolbar .x-item-disabled { - cursor:default; - opacity:.6; - -moz-opacity:.6; - filter:alpha(opacity=60); -} - -.x-toolbar .x-item-disabled * { - cursor:default; -} - -.x-toolbar .x-toolbar-cell { - vertical-align:middle; -} - -.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, -.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc -{ - background-position: 500px 500px; -} - -/* These rules are duplicated from button.css to give priority of x-toolbar rules above */ -.x-toolbar .x-btn-over .x-btn-tl{ - background-position: -6px 0; -} - -.x-toolbar .x-btn-over .x-btn-tr{ - background-position: -9px 0; -} - -.x-toolbar .x-btn-over .x-btn-tc{ - background-position: 0 -9px; -} - -.x-toolbar .x-btn-over .x-btn-ml{ - background-position: -6px -24px; -} - -.x-toolbar .x-btn-over .x-btn-mr{ - background-position: -9px -24px; -} - -.x-toolbar .x-btn-over .x-btn-mc{ - background-position: 0 -2168px; -} - -.x-toolbar .x-btn-over .x-btn-bl{ - background-position: -6px -3px; -} - -.x-toolbar .x-btn-over .x-btn-br{ - background-position: -9px -3px; -} - -.x-toolbar .x-btn-over .x-btn-bc{ - background-position: 0 -18px; -} - -.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ - background-position: -12px 0; -} - -.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ - background-position: -15px 0; -} - -.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ - background-position: 0 -12px; -} - -.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ - background-position: -12px -24px; -} - -.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ - background-position: -15px -24px; -} - -.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ - background-position: 0 -3240px; -} - -.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ - background-position: -12px -3px; -} - -.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ - background-position: -15px -3px; -} - -.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ - background-position: 0 -21px; -} - -.x-toolbar div.xtb-text{ - padding:2px 2px 0; - line-height:16px; - display:block; -} - -.x-toolbar .xtb-sep { - background-position: center; - background-repeat: no-repeat; - display: block; - font-size: 1px; - height: 16px; - width:4px; - overflow: hidden; - cursor:default; - margin: 0 2px 0; - border:0; -} - -.x-toolbar .xtb-spacer { - width:2px; -} - -/* Paging Toolbar */ -.x-tbar-page-number{ - width:30px; - height:14px; -} - -.ext-ie .x-tbar-page-number{ - margin-top: 2px; -} - -.x-paging-info { - position:absolute; - top:5px; - right: 8px; -} - -/* floating */ -.x-toolbar-ct { - width:100%; -} - -.x-toolbar-right td { - text-align: center; -} - -.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { - overflow:hidden; - zoom:1; -} - -.x-toolbar-more .x-btn-small .x-btn-text{ - height: 16px; - width: 12px; -} - -.x-toolbar-more em.x-btn-arrow { - display:inline; - background-color:transparent; - padding-right:0; -} - -.x-toolbar-more .x-btn-mc em.x-btn-arrow { - background-image: none; -} - -div.x-toolbar-no-items { - color:gray !important; - padding:5px 10px !important; -} - -/* fix ie toolbar form items */ -.ext-border-box .x-toolbar-cell .x-form-text { - margin-bottom:-1px !important; -} - -.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { - margin:0 !important; -} - -.ext-ie .x-toolbar-cell .x-form-field-wrap { - height:21px; -} - -.ext-ie .x-toolbar-cell .x-form-text { - position:relative; - top:-1px; -} - -.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text { - top: 0px; -} - -.x-toolbar-right td .x-form-field-trigger-wrap{ - text-align: left; -} - -.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{ - margin-top: 5px; -} - -.x-toolbar-cell .x-form-cb-label{ - vertical-align: bottom; - top: 1px; -} - -.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{ - margin-top: 4px; -} - -.ext-ie .x-toolbar-cell .x-form-cb-label{ - top: 0; -} -/* Grid3 styles */ -.x-grid3 { - position:relative; - overflow:hidden; -} - -.x-grid-panel .x-panel-body { - overflow:hidden !important; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border:1px solid; -} - -.x-grid3 table { - table-layout:fixed; -} - -.x-grid3-viewport{ - overflow:hidden; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - -moz-outline: none; - outline: none; - -moz-user-focus: normal; -} - -.x-grid3-row td, .x-grid3-summary-row td { - line-height:13px; - vertical-align: top; - padding-left:1px; - padding-right:1px; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-cell{ - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-hd-row td { - line-height:15px; - vertical-align:middle; - border-left:1px solid; - border-right:1px solid; -} - -.x-grid3-hd-row .x-grid3-marker-hd { - padding:3px; -} - -.x-grid3-row .x-grid3-marker { - padding:3px; -} - -.x-grid3-cell-inner, .x-grid3-hd-inner{ - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - padding:3px 3px 3px 5px; - white-space: nowrap; -} - -/* ActionColumn, reduce padding to accommodate 16x16 icons in normal row height */ -.x-action-col-cell .x-grid3-cell-inner { - padding-top: 1px; - padding-bottom: 1px; -} - -.x-action-col-icon { - cursor: pointer; -} - -.x-grid3-hd-inner { - position:relative; - cursor:inherit; - padding:4px 3px 4px 5px; -} - -.x-grid3-row-body { - white-space:normal; -} - -.x-grid3-body-cell { - -moz-outline:0 none; - outline:0 none; -} - -/* IE Quirks to clip */ -.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ - width:100%; -} - -/* reverse above in strict mode */ -.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ - width:auto; -} - -.x-grid-row-loading { - background: no-repeat center center; -} - -.x-grid-page { - overflow:hidden; -} - -.x-grid3-row { - cursor: default; - border: 1px solid; - width:100%; -} - -.x-grid3-row-over { - border:1px solid; - background: repeat-x left top; -} - -.x-grid3-resize-proxy { - width:1px; - left:0; - cursor: e-resize; - cursor: col-resize; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} - -.x-grid3-resize-marker { - width:1px; - left:0; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} - -.x-grid3-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: text; - -khtml-user-select: text; - -webkit-user-select:ignore; -} - -/* header styles */ -.x-grid3-header{ - background: repeat-x 0 bottom; - cursor:default; - zoom:1; - padding:1px 0 0 0; -} - -.x-grid3-header-pop { - border-left:1px solid; - float:right; - clear:none; -} - -.x-grid3-header-pop-inner { - border-left:1px solid; - width:14px; - height:19px; - background: transparent no-repeat center center; -} - -.ext-ie .x-grid3-header-pop-inner { - width:15px; -} - -.ext-strict .x-grid3-header-pop-inner { - width:14px; -} - -.x-grid3-header-inner { - overflow:hidden; - zoom:1; - float:left; -} - -.x-grid3-header-offset { - padding-left:1px; - text-align: left; -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left:1px solid; - border-right:1px solid; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background: repeat-x left bottom; - -} - -.x-grid3-sort-icon{ - background-repeat: no-repeat; - display: none; - height: 4px; - width: 13px; - margin-left:3px; - vertical-align: middle; -} - -.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon { - display: inline; -} - -/* Header position fixes for IE strict mode */ -.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd { - position:relative; -} - -.ext-strict .ext-ie6 .x-grid3-hd-inner{ - position:static; -} - -/* Body Styles */ -.x-grid3-body { - zoom:1; -} - -.x-grid3-scroller { - overflow:auto; - zoom:1; - position:relative; -} - -.x-grid3-cell-text, .x-grid3-hd-text { - display: block; - padding: 3px 5px 3px 5px; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select:ignore; -} - -.x-grid3-split { - background-position: center; - background-repeat: no-repeat; - cursor: e-resize; - cursor: col-resize; - display: block; - font-size: 1px; - height: 16px; - overflow: hidden; - position: absolute; - top: 2px; - width: 6px; - z-index: 3; -} - -/* Column Reorder DD */ -.x-dd-drag-proxy .x-grid3-hd-inner{ - background: repeat-x left bottom; - width:120px; - padding:3px; - border:1px solid; - overflow:hidden; -} - -.col-move-top, .col-move-bottom{ - width:9px; - height:9px; - position:absolute; - top:0; - line-height:1px; - font-size:1px; - overflow:hidden; - visibility:hidden; - z-index:20000; - background:transparent no-repeat left top; -} - -/* Selection Styles */ -.x-grid3-row-selected { - border:1px dotted; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background: repeat-x 0 bottom !important; - vertical-align:middle !important; - padding:0; - border-top:1px solid; - border-bottom:none !important; - border-right:1px solid !important; - text-align:center; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - padding:0 4px; - text-align:center; -} - -/* dirty cells */ -.x-grid3-dirty-cell { - background: transparent no-repeat 0 0; -} - -/* Grid Toolbars */ -.x-grid3-topbar, .x-grid3-bottombar{ - overflow:hidden; - display:none; - zoom:1; - position:relative; -} - -.x-grid3-topbar .x-toolbar{ - border-right:0 none; -} - -.x-grid3-bottombar .x-toolbar{ - border-right:0 none; - border-bottom:0 none; - border-top:1px solid; -} - -/* Props Grid Styles */ -.x-props-grid .x-grid3-cell{ - padding:1px; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background:transparent repeat-y -16px !important; - padding-left:12px; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - padding:1px; - padding-right:0; - border:0 none; - border-right:1px solid; -} - -/* dd */ -.x-grid3-col-dd { - border:0 none; - padding:0; - background-color:transparent; -} - -.x-dd-drag-ghost .x-grid3-dd-wrap { - padding:1px 3px 3px 1px; -} - -.x-grid3-hd { - -moz-user-select:none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-hd-btn { - display:none; - position:absolute; - width:14px; - background:no-repeat left center; - right:0; - top:0; - z-index:2; - cursor:pointer; -} - -.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { - display:block; -} - -a.x-grid3-hd-btn:hover { - background-position:-14px center; -} - -/* Expanders */ -.x-grid3-body .x-grid3-td-expander { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-expander { - width:100%; - height:18px; - background-position:4px 2px; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-row-collapsed .x-grid3-row-expander { - background-position:4px 2px; -} - -.x-grid3-row-expanded .x-grid3-row-expander { - background-position:-21px 2px; -} - -.x-grid3-row-collapsed .x-grid3-row-body { - display:none !important; -} - -.x-grid3-row-expanded .x-grid3-row-body { - display:block !important; -} - -/* Checkers */ -.x-grid3-body .x-grid3-td-checker { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - width:100%; - height:18px; - background-position:2px 2px; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-row .x-grid3-row-checker { - background-position:2px 2px; -} - -.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker { - background-position:-23px 2px; -} - -.x-grid3-hd-checker { - background-position:2px 1px; -} - -.ext-border-box .x-grid3-hd-checker { - background-position:2px 3px; -} - -.x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 1px; -} - -.ext-border-box .x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 3px; -} - -/* Numberer */ -.x-grid3-body .x-grid3-td-numberer { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - padding:3px 5px 0 0 !important; - text-align:right; -} - -/* Row Icon */ - -.x-grid3-body .x-grid3-td-row-icon { - background:transparent repeat-y right; - vertical-align:top; - text-align:center; -} - -.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { - padding:0 !important; - background-position:center center; - background-repeat:no-repeat; - width:16px; - height:16px; - margin-left:2px; - margin-top:3px; -} - -/* All specials */ -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { - padding: 1px 0 0 0 !important; -} - -.x-grid3-check-col { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-check-col-on { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; -} - -/* Grouping classes */ -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom: 2px solid; - cursor:pointer; - padding-top:6px; -} - -.x-grid-group-hd div.x-grid-group-title { - background:transparent no-repeat 3px 3px; - padding:4px 4px 4px 17px; -} - -.x-grid-group-collapsed .x-grid-group-body { - display:none; -} - -.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text { - position:relative; - top:-1px; -} - -.ext-ie .x-props-grid .x-editor .x-form-text { - position:static; - top:0; -} - -.x-grid-empty { - padding:10px; -} - -/* fix floating toolbar issue */ -.ext-ie7 .x-grid-panel .x-panel-bbar { - position:relative; -} - - -/* Reset position to static when Grid Panel has been framed */ -/* to resolve 'snapping' from top to bottom behavior. */ -/* @forumThread 86656 */ -.ext-ie7 .x-grid-panel .x-panel-mc .x-panel-bbar { - position: static; -} - -.ext-ie6 .x-grid3-header { - position: relative; -} - -/* Fix WebKit bug in Grids */ -.ext-webkit .x-grid-panel .x-panel-bwrap{ - -webkit-user-select:none; -} -.ext-webkit .x-tbar-page-number{ - -webkit-user-select:ignore; -} -/* end*/ - -/* column lines */ -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - padding-right:0; - border-right:1px solid; -} -.x-pivotgrid .x-grid3-header-offset table { - width: 100%; - border-collapse: collapse; -} - -.x-pivotgrid .x-grid3-header-offset table td { - padding: 4px 3px 4px 5px; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-size: 11px; - line-height: 13px; - font-family: tahoma; -} - -.x-pivotgrid .x-grid3-row-headers { - display: block; - float: left; -} - -.x-pivotgrid .x-grid3-row-headers table { - height: 100%; - width: 100%; - border-collapse: collapse; -} - -.x-pivotgrid .x-grid3-row-headers table td { - height: 18px; - padding: 2px 7px 0 0; - text-align: right; - text-overflow: ellipsis; - font-size: 11px; - font-family: tahoma; -} - -.ext-gecko .x-pivotgrid .x-grid3-row-headers table td { - height: 21px; -} - -.x-grid3-header-title { - top: 0%; - left: 0%; - position: absolute; - text-align: center; - vertical-align: middle; - font-family: tahoma; - font-size: 11px; - padding: auto 1px; - display: table-cell; -} - -.x-grid3-header-title span { - position: absolute; - top: 50%; - left: 0%; - width: 100%; - margin-top: -6px; -}.x-dd-drag-proxy{ - position:absolute; - left:0; - top:0; - visibility:hidden; - z-index:15000; -} - -.x-dd-drag-ghost{ - -moz-opacity: 0.85; - opacity:.85; - filter: alpha(opacity=85); - border: 1px solid; - padding:3px; - padding-left:20px; - white-space:nowrap; -} - -.x-dd-drag-repair .x-dd-drag-ghost{ - -moz-opacity: 0.4; - opacity:.4; - filter: alpha(opacity=40); - border:0 none; - padding:0; - background-color:transparent; -} - -.x-dd-drag-repair .x-dd-drop-icon{ - visibility:hidden; -} - -.x-dd-drop-icon{ - position:absolute; - top:3px; - left:3px; - display:block; - width:16px; - height:16px; - background-color:transparent; - background-position: center; - background-repeat: no-repeat; - z-index:1; -} - -.x-view-selector { - position:absolute; - left:0; - top:0; - width:0; - border:1px dotted; - opacity: .5; - -moz-opacity: .5; - filter:alpha(opacity=50); - zoom:1; -}.ext-strict .ext-ie .x-tree .x-panel-bwrap{ - position:relative; - overflow:hidden; -} - -.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-repeat: no-repeat; -} - -.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-position:center; - background-repeat: no-repeat; -} - -.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { - vertical-align: middle !important; -} - -.ext-strict .ext-ie8 .x-tree-node-indent img, .ext-strict .ext-ie8 .x-tree-node-icon, .ext-strict .ext-ie8 .x-tree-ec-icon { - vertical-align: top !important; -} - -/* checkboxes */ - -input.x-tree-node-cb { - margin-left:1px; - height: 19px; - vertical-align: bottom; -} - -.ext-ie input.x-tree-node-cb { - margin-left:0; - margin-top: 1px; - width: 16px; - height: 16px; - vertical-align: middle; -} - -.ext-strict .ext-ie8 input.x-tree-node-cb{ - margin: 1px 1px; - height: 14px; - vertical-align: bottom; -} - -.ext-strict .ext-ie8 input.x-tree-node-cb + a{ - vertical-align: bottom; -} - -.ext-opera input.x-tree-node-cb { - height: 14px; - vertical-align: middle; -} - -.x-tree-noicon .x-tree-node-icon{ - width:0; height:0; -} - -/* No line styles */ -.x-tree-no-lines .x-tree-elbow{ - background-color:transparent; -} - -.x-tree-no-lines .x-tree-elbow-end{ - background-color:transparent; -} - -.x-tree-no-lines .x-tree-elbow-line{ - background-color:transparent; -} - -/* Arrows */ -.x-tree-arrows .x-tree-elbow{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-elbow-plus{ - background:transparent no-repeat 0 0; -} - -.x-tree-arrows .x-tree-elbow-minus{ - background:transparent no-repeat -16px 0; -} - -.x-tree-arrows .x-tree-elbow-end{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background:transparent no-repeat 0 0; -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background:transparent no-repeat -16px 0; -} - -.x-tree-arrows .x-tree-elbow-line{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ - background-position:-32px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ - background-position:-48px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ - background-position:-32px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ - background-position:-48px 0; -} - -.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - cursor:pointer; -} - -.ext-ie ul.x-tree-node-ct{ - font-size:0; - line-height:0; - zoom:1; -} - -.x-tree-node{ - white-space: nowrap; -} - -.x-tree-node-el { - line-height:18px; - cursor:pointer; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - text-decoration:none; - -khtml-user-select:none; - -moz-user-select:none; - -webkit-user-select:ignore; - -kthml-user-focus:normal; - -moz-user-focus:normal; - -moz-outline: 0 none; - outline:0 none; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - text-decoration:none; - padding:1px 3px 1px 2px; -} - -.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ - -moz-opacity: 0.5; - opacity:.5; - filter: alpha(opacity=50); -} - -.x-tree-node .x-tree-node-inline-icon{ - background-color:transparent; -} - -.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ - text-decoration:none; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom:1px dotted; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top:1px dotted; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ - border-bottom:0 none; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ - border-top:0 none; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom:2px solid; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top:2px solid; -} - -.x-tree-node .x-tree-drag-append a span{ - border:1px dotted; -} - -.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ - display:none !important; -} - -/* Fix for ie rootVisible:false issue */ -.x-tree-root-ct { - zoom:1; -} -.x-date-picker { - border: 1px solid; - border-top:0 none; - position:relative; -} - -.x-date-picker a { - -moz-outline:0 none; - outline:0 none; -} - -.x-date-inner, .x-date-inner td, .x-date-inner th{ - border-collapse:separate; -} - -.x-date-middle,.x-date-left,.x-date-right { - background: repeat-x 0 -83px; - overflow:hidden; -} - -.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, -.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, -.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ - background:transparent !important; - vertical-align:middle; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background:transparent no-repeat right 0; -} - -.x-date-right, .x-date-left { - width:18px; -} - -.x-date-right{ - text-align:right; -} - -.x-date-middle { - padding-top:2px; - padding-bottom:2px; - width:130px; /* FF3 */ -} - -.x-date-right a, .x-date-left a{ - display:block; - width:16px; - height:16px; - background-position: center; - background-repeat: no-repeat; - cursor:pointer; - -moz-opacity: 0.6; - opacity:.6; - filter: alpha(opacity=60); -} - -.x-date-right a:hover, .x-date-left a:hover{ - -moz-opacity: 1; - opacity:1; - filter: alpha(opacity=100); -} - -.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{ - -moz-opacity: 0.6; - opacity:.6; - filter: alpha(opacity=60); -} - -.x-date-right a { - margin-right:2px; - text-decoration:none !important; -} - -.x-date-left a{ - margin-left:2px; - text-decoration:none !important; -} - -table.x-date-inner { - width: 100%; - table-layout:fixed; -} - -.ext-webkit table.x-date-inner{ - /* Fix for webkit browsers */ - width: 175px; -} - - -.x-date-inner th { - width:25px; -} - -.x-date-inner th { - background: repeat-x left top; - text-align:right !important; - border-bottom: 1px solid; - cursor:default; - padding:0; - border-collapse:separate; -} - -.x-date-inner th span { - display:block; - padding:2px; - padding-right:7px; -} - -.x-date-inner td { - border: 1px solid; - text-align:right; - padding:0; -} - -.x-date-inner a { - padding:2px 5px; - display:block; - text-decoration:none; - text-align:right; - zoom:1; -} - -.x-date-inner .x-date-active{ - cursor:pointer; - color:black; -} - -.x-date-inner .x-date-selected a{ - background: repeat-x left top; - border:1px solid; - padding:1px 4px; -} - -.x-date-inner .x-date-today a{ - border: 1px solid; - padding:1px 4px; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - text-decoration:none !important; -} - -.x-date-bottom { - padding:4px; - border-top: 1px solid; - background: repeat-x left top; -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - text-decoration:none !important; -} - -.x-item-disabled .x-date-inner a:hover{ - background: none; -} - -.x-date-inner .x-date-disabled a { - cursor:default; -} - -.x-date-menu .x-menu-item { - padding:1px 24px 1px 4px; - white-space: nowrap; -} - -.x-date-menu .x-menu-item .x-menu-item-icon { - width:10px; - height:10px; - margin-right:5px; - background-position:center -4px !important; -} - -.x-date-mp { - position:absolute; - left:0; - top:0; - display:none; -} - -.x-date-mp td { - padding:2px; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn { - border: 0 none; - text-align:center; - vertical-align: middle; - width:25%; -} - -.x-date-mp-ok { - margin-right:3px; -} - -.x-date-mp-btns button { - text-decoration:none; - text-align:center; - text-decoration:none !important; - border:1px solid; - padding:1px 3px 1px; - cursor:pointer; -} - -.x-date-mp-btns { - background: repeat-x left top; -} - -.x-date-mp-btns td { - border-top: 1px solid; - text-align:center; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - display:block; - padding:2px 4px; - text-decoration:none; - text-align:center; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - text-decoration:none; - cursor:pointer; -} - -td.x-date-mp-sel a { - padding:1px 3px; - background: repeat-x left top; - border:1px solid; -} - -.x-date-mp-ybtn a { - overflow:hidden; - width:15px; - height:15px; - cursor:pointer; - background:transparent no-repeat; - display:block; - margin:0 auto; -} - -.x-date-mp-ybtn a.x-date-mp-next { - background-position:0 -120px; -} - -.x-date-mp-ybtn a.x-date-mp-next:hover { - background-position:-15px -120px; -} - -.x-date-mp-ybtn a.x-date-mp-prev { - background-position:0 -105px; -} - -.x-date-mp-ybtn a.x-date-mp-prev:hover { - background-position:-15px -105px; -} - -.x-date-mp-ybtn { - text-align:center; -} - -td.x-date-mp-sep { - border-right:1px solid; -}.x-tip{ - position: absolute; - top: 0; - left:0; - visibility: hidden; - z-index: 20002; - border:0 none; -} - -.x-tip .x-tip-close{ - height: 15px; - float:right; - width: 15px; - margin:0 0 2px 2px; - cursor:pointer; - display:none; -} - -.x-tip .x-tip-tc { - background: transparent no-repeat 0 -62px; - padding-top:3px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-tr { - background: transparent no-repeat right 0; - padding-right:6px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-bc { - background: transparent no-repeat 0 -121px; - height:3px; - overflow:hidden; -} - -.x-tip .x-tip-bl { - background: transparent no-repeat 0 -59px; - padding-left:6px; - zoom:1; -} - -.x-tip .x-tip-br { - background: transparent no-repeat right -59px; - padding-right:6px; - zoom:1; -} - -.x-tip .x-tip-mc { - border:0 none; -} - -.x-tip .x-tip-ml { - background: no-repeat 0 -124px; - padding-left:6px; - zoom:1; -} - -.x-tip .x-tip-mr { - background: transparent no-repeat right -124px; - padding-right:6px; - zoom:1; -} - -.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { - font-size:0; - line-height:0; -} - -.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{ - line-height: 1px; -} - -.x-tip .x-tip-header-text { - padding:0; - margin:0 0 2px 0; -} - -.x-tip .x-tip-body { - margin:0 !important; - line-height:14px; - padding:0; -} - -.x-tip .x-tip-body .loading-indicator { - margin:0; -} - -.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { - cursor:move; -} - -.x-form-invalid-tip .x-tip-tc { - background: repeat-x 0 -12px; - padding-top:6px; -} - -.x-form-invalid-tip .x-tip-bc { - background: repeat-x 0 -18px; - height:6px; -} - -.x-form-invalid-tip .x-tip-bl { - background: no-repeat 0 -6px; -} - -.x-form-invalid-tip .x-tip-br { - background: no-repeat right -6px; -} - -.x-form-invalid-tip .x-tip-body { - padding:2px; -} - -.x-form-invalid-tip .x-tip-body { - padding-left:24px; - background:transparent no-repeat 2px 2px; -} - -.x-tip-anchor { - position: absolute; - width: 9px; - height: 10px; - overflow:hidden; - background: transparent no-repeat 0 0; - zoom:1; -} -.x-tip-anchor-bottom { - background-position: -9px 0; -} -.x-tip-anchor-right { - background-position: -18px 0; - width: 10px; -} -.x-tip-anchor-left { - background-position: -28px 0; - width: 10px; -}.x-menu { - z-index: 15000; - zoom: 1; - background: repeat-y; -} - -.x-menu-floating{ - border: 1px solid; -} - -.x-menu a { - text-decoration: none !important; -} - -.ext-ie .x-menu { - zoom:1; - overflow:hidden; -} - -.x-menu-list{ - padding: 2px; - background-color:transparent; - border:0 none; - overflow:hidden; - overflow-y: hidden; -} - -.ext-strict .ext-ie .x-menu-list{ - position: relative; -} - -.x-menu li{ - line-height:100%; -} - -.x-menu li.x-menu-sep-li{ - font-size:1px; - line-height:1px; -} - -.x-menu-list-item{ - white-space: nowrap; - display:block; - padding:1px; -} - -.x-menu-item{ - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-menu-item-arrow{ - background:transparent no-repeat right; -} - -.x-menu-sep { - display:block; - font-size:1px; - line-height:1px; - margin: 2px 3px; - border-bottom:1px solid; - overflow:hidden; -} - -.x-menu-focus { - position:absolute; - left:-1px; - top:-1px; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; - overflow:hidden; - display:block; -} - -a.x-menu-item { - cursor: pointer; - display: block; - line-height: 16px; - outline-color: -moz-use-text-color; - outline-style: none; - outline-width: 0; - padding: 3px 21px 3px 27px; - position: relative; - text-decoration: none; - white-space: nowrap; -} - -.x-menu-item-active { - background-repeat: repeat-x; - background-position: left bottom; - border-style:solid; - border-width: 1px 0; - margin:0 1px; - padding: 0; -} - -.x-menu-item-active a.x-menu-item { - border-style:solid; - border-width:0 1px; - margin:0 -1px; -} - -.x-menu-item-icon { - border: 0 none; - height: 16px; - padding: 0; - vertical-align: top; - width: 16px; - position: absolute; - left: 3px; - top: 3px; - margin: 0; - background-position:center; -} - -.ext-ie .x-menu-item-icon { - left: -24px; -} -.ext-strict .x-menu-item-icon { - left: 3px; -} - -.ext-ie6 .x-menu-item-icon { - left: -24px; -} - -.ext-ie .x-menu-item-icon { - vertical-align: middle; -} - -.x-menu-check-item .x-menu-item-icon{ - background: transparent no-repeat center; -} - -.x-menu-group-item .x-menu-item-icon{ - background-color: transparent; -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background: transparent no-repeat center; -} - -.x-date-menu .x-menu-list{ - padding: 0; -} - -.x-menu-date-item{ - padding:0; -} - -.x-menu .x-color-palette, .x-menu .x-date-picker{ - margin-left: 26px; - margin-right:4px; -} - -.x-menu .x-date-picker{ - border:1px solid; - margin-top:2px; - margin-bottom:2px; -} - -.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ - margin: 0; - border: 0 none; -} - -.x-date-menu { - padding:0 !important; -} - -/* - * fixes separator visibility problem in IE 6 - */ -.ext-strict .ext-ie6 .x-menu-sep-li { - padding: 3px 4px; -} -.ext-strict .ext-ie6 .x-menu-sep { - margin: 0; - height: 1px; -} - -/* - * Fixes an issue with "fat" separators in webkit - */ -.ext-webkit .x-menu-sep{ - height: 1px; -} - -/* - * Ugly mess to remove the white border under the picker - */ -.ext-ie .x-date-menu{ - height: 199px; -} - -.ext-strict .ext-ie .x-date-menu, .ext-border-box .ext-ie8 .x-date-menu{ - height: 197px; -} - -.ext-strict .ext-ie7 .x-date-menu{ - height: 195px; -} - -.ext-strict .ext-ie8 .x-date-menu{ - height: auto; -} - -.x-cycle-menu .x-menu-item-checked { - border:1px dotted !important; - padding:0; -} - -.x-menu .x-menu-scroller { - width: 100%; - background-repeat:no-repeat; - background-position:center; - height:8px; - line-height: 8px; - cursor:pointer; - margin: 0; - padding: 0; -} - -.x-menu .x-menu-scroller-active{ - height: 6px; - line-height: 6px; -} - -.x-menu-list-item-indent{ - padding-left: 27px; -}/* - Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: -
      -
      -
      -

      YOUR TITLE HERE (optional)

      -
      YOUR CONTENT HERE
      -
      -
      -
      - */ - -.x-box-tl { - background: transparent no-repeat 0 0; - zoom:1; -} - -.x-box-tc { - height: 8px; - background: transparent repeat-x 0 0; - overflow: hidden; -} - -.x-box-tr { - background: transparent no-repeat right -8px; -} - -.x-box-ml { - background: transparent repeat-y 0; - padding-left: 4px; - overflow: hidden; - zoom:1; -} - -.x-box-mc { - background: repeat-x 0 -16px; - padding: 4px 10px; -} - -.x-box-mc h3 { - margin: 0 0 4px 0; - zoom:1; -} - -.x-box-mr { - background: transparent repeat-y right; - padding-right: 4px; - overflow: hidden; -} - -.x-box-bl { - background: transparent no-repeat 0 -16px; - zoom:1; -} - -.x-box-bc { - background: transparent repeat-x 0 -8px; - height: 8px; - overflow: hidden; -} - -.x-box-br { - background: transparent no-repeat right -24px; -} - -.x-box-tl, .x-box-bl { - padding-left: 8px; - overflow: hidden; -} - -.x-box-tr, .x-box-br { - padding-right: 8px; - overflow: hidden; -}.x-combo-list { - border:1px solid; - zoom:1; - overflow:hidden; -} - -.x-combo-list-inner { - overflow:auto; - position:relative; /* for calculating scroll offsets */ - zoom:1; - overflow-x:hidden; -} - -.x-combo-list-hd { - border-bottom:1px solid; - padding:3px; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom:1px solid; -} - -.x-combo-list-item { - padding:2px; - border:1px solid; - white-space: nowrap; - overflow:hidden; - text-overflow: ellipsis; -} - -.x-combo-list .x-combo-selected{ - border:1px dotted !important; - cursor:pointer; -} - -.x-combo-list .x-toolbar { - border-top:1px solid; - border-bottom:0 none; -}.x-panel { - border-style: solid; - border-width:0; -} - -.x-panel-header { - overflow:hidden; - zoom:1; - padding:5px 3px 4px 5px; - border:1px solid; - line-height: 15px; - background: transparent repeat-x 0 -1px; -} - -.x-panel-body { - border:1px solid; - border-top:0 none; - overflow:hidden; - position: relative; /* added for item scroll positioning */ -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top:1px solid; - border-bottom: 0 none; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top:1px solid; -} - -.x-panel-header { - overflow:hidden; - zoom:1; -} - -.x-panel-tl .x-panel-header { - padding:5px 0 4px 0; - border:0 none; - background:transparent no-repeat; -} - -.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { - padding-left:20px !important; - background-repeat:no-repeat; - background-position:0 4px; - zoom:1; -} - -.x-panel-inline-icon { - width:16px; - height:16px; - background-repeat:no-repeat; - background-position:0 0; - vertical-align:middle; - margin-right:4px; - margin-top:-1px; - margin-bottom:-1px; -} - -.x-panel-tc { - background: transparent repeat-x 0 0; - overflow:hidden; -} - -/* fix ie7 strict mode bug */ -.ext-strict .ext-ie7 .x-panel-tc { - overflow: visible; -} - -.x-panel-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - zoom:1; - border-bottom:1px solid; -} - -.x-panel-tr { - background: transparent no-repeat right 0; - zoom:1; - padding-right:6px; -} - -.x-panel-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-panel-bc .x-panel-footer { - zoom:1; -} - -.x-panel-bl { - background: transparent no-repeat 0 bottom; - padding-left:6px; - zoom:1; -} - -.x-panel-br { - background: transparent no-repeat right bottom; - padding-right:6px; - zoom:1; -} - -.x-panel-mc { - border:0 none; - padding:0; - margin:0; - padding-top:6px; -} - -.x-panel-mc .x-panel-body { - background-color:transparent; - border: 0 none; -} - -.x-panel-ml { - background: repeat-y 0 0; - padding-left:6px; - zoom:1; -} - -.x-panel-mr { - background: transparent repeat-y right 0; - padding-right:6px; - zoom:1; -} - -.x-panel-bc .x-panel-footer { - padding-bottom:6px; -} - -.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc { - height:6px; - font-size:0; - line-height:0; -} - -.x-panel-bwrap { - overflow:hidden; - zoom:1; - left:0; - top:0; -} -.x-panel-body { - overflow:hidden; - zoom:1; -} - -.x-panel-collapsed .x-resizable-handle{ - display:none; -} - -.ext-gecko .x-panel-animated div { - overflow:hidden !important; -} - -/* Plain */ -.x-plain-body { - overflow:hidden; -} - -.x-plain-bbar .x-toolbar { - overflow:hidden; - padding:2px; -} - -.x-plain-tbar .x-toolbar { - overflow:hidden; - padding:2px; -} - -.x-plain-bwrap { - overflow:hidden; - zoom:1; -} - -.x-plain { - overflow:hidden; -} - -/* Tools */ -.x-tool { - overflow:hidden; - width:15px; - height:15px; - float:right; - cursor:pointer; - background:transparent no-repeat; - margin-left:2px; -} - -/* expand / collapse tools */ -.x-tool-toggle { - background-position:0 -60px; -} - -.x-tool-toggle-over { - background-position:-15px -60px; -} - -.x-panel-collapsed .x-tool-toggle { - background-position:0 -75px; -} - -.x-panel-collapsed .x-tool-toggle-over { - background-position:-15px -75px; -} - - -.x-tool-close { - background-position:0 -0; -} - -.x-tool-close-over { - background-position:-15px 0; -} - -.x-tool-minimize { - background-position:0 -15px; -} - -.x-tool-minimize-over { - background-position:-15px -15px; -} - -.x-tool-maximize { - background-position:0 -30px; -} - -.x-tool-maximize-over { - background-position:-15px -30px; -} - -.x-tool-restore { - background-position:0 -45px; -} - -.x-tool-restore-over { - background-position:-15px -45px; -} - -.x-tool-gear { - background-position:0 -90px; -} - -.x-tool-gear-over { - background-position:-15px -90px; -} - -.x-tool-prev { - background-position:0 -105px; -} - -.x-tool-prev-over { - background-position:-15px -105px; -} - -.x-tool-next { - background-position:0 -120px; -} - -.x-tool-next-over { - background-position:-15px -120px; -} - -.x-tool-pin { - background-position:0 -135px; -} - -.x-tool-pin-over { - background-position:-15px -135px; -} - -.x-tool-unpin { - background-position:0 -150px; -} - -.x-tool-unpin-over { - background-position:-15px -150px; -} - -.x-tool-right { - background-position:0 -165px; -} - -.x-tool-right-over { - background-position:-15px -165px; -} - -.x-tool-left { - background-position:0 -180px; -} - -.x-tool-left-over { - background-position:-15px -180px; -} - -.x-tool-down { - background-position:0 -195px; -} - -.x-tool-down-over { - background-position:-15px -195px; -} - -.x-tool-up { - background-position:0 -210px; -} - -.x-tool-up-over { - background-position:-15px -210px; -} - -.x-tool-refresh { - background-position:0 -225px; -} - -.x-tool-refresh-over { - background-position:-15px -225px; -} - -.x-tool-plus { - background-position:0 -240px; -} - -.x-tool-plus-over { - background-position:-15px -240px; -} - -.x-tool-minus { - background-position:0 -255px; -} - -.x-tool-minus-over { - background-position:-15px -255px; -} - -.x-tool-search { - background-position:0 -270px; -} - -.x-tool-search-over { - background-position:-15px -270px; -} - -.x-tool-save { - background-position:0 -285px; -} - -.x-tool-save-over { - background-position:-15px -285px; -} - -.x-tool-help { - background-position:0 -300px; -} - -.x-tool-help-over { - background-position:-15px -300px; -} - -.x-tool-print { - background-position:0 -315px; -} - -.x-tool-print-over { - background-position:-15px -315px; -} - -.x-tool-expand { - background-position:0 -330px; -} - -.x-tool-expand-over { - background-position:-15px -330px; -} - -.x-tool-collapse { - background-position:0 -345px; -} - -.x-tool-collapse-over { - background-position:-15px -345px; -} - -.x-tool-resize { - background-position:0 -360px; -} - -.x-tool-resize-over { - background-position:-15px -360px; -} - -.x-tool-move { - background-position:0 -375px; -} - -.x-tool-move-over { - background-position:-15px -375px; -} - -/* Ghosting */ -.x-panel-ghost { - z-index:12000; - overflow:hidden; - position:absolute; - left:0;top:0; - opacity:.65; - -moz-opacity:.65; - filter:alpha(opacity=65); -} - -.x-panel-ghost ul { - margin:0; - padding:0; - overflow:hidden; - font-size:0; - line-height:0; - border:1px solid; - border-top:0 none; - display:block; -} - -.x-panel-ghost * { - cursor:move !important; -} - -.x-panel-dd-spacer { - border:2px dashed; -} - -/* Buttons */ -.x-panel-btns { - padding:5px; - overflow:hidden; -} - -.x-panel-btns td.x-toolbar-cell{ - padding:3px; -} - -.x-panel-btns .x-btn-focus .x-btn-left{ - background-position:0 -147px; -} - -.x-panel-btns .x-btn-focus .x-btn-right{ - background-position:0 -168px; -} - -.x-panel-btns .x-btn-focus .x-btn-center{ - background-position:0 -189px; -} - -.x-panel-btns .x-btn-over .x-btn-left{ - background-position:0 -63px; -} - -.x-panel-btns .x-btn-over .x-btn-right{ - background-position:0 -84px; -} - -.x-panel-btns .x-btn-over .x-btn-center{ - background-position:0 -105px; -} - -.x-panel-btns .x-btn-click .x-btn-center{ - background-position:0 -126px; -} - -.x-panel-btns .x-btn-click .x-btn-right{ - background-position:0 -84px; -} - -.x-panel-btns .x-btn-click .x-btn-left{ - background-position:0 -63px; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - white-space: nowrap; -} -/** - * W3C Suggested Default style sheet for HTML 4 - * http://www.w3.org/TR/CSS21/sample.html - * - * Resets for Ext.Panel @cfg normal: true - */ -.x-panel-reset .x-panel-body html, -.x-panel-reset .x-panel-body address, -.x-panel-reset .x-panel-body blockquote, -.x-panel-reset .x-panel-body body, -.x-panel-reset .x-panel-body dd, -.x-panel-reset .x-panel-body div, -.x-panel-reset .x-panel-body dl, -.x-panel-reset .x-panel-body dt, -.x-panel-reset .x-panel-body fieldset, -.x-panel-reset .x-panel-body form, -.x-panel-reset .x-panel-body frame, frameset, -.x-panel-reset .x-panel-body h1, -.x-panel-reset .x-panel-body h2, -.x-panel-reset .x-panel-body h3, -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body h5, -.x-panel-reset .x-panel-body h6, -.x-panel-reset .x-panel-body noframes, -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body p, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body center, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body hr, -.x-panel-reset .x-panel-body menu, -.x-panel-reset .x-panel-body pre { display: block } -.x-panel-reset .x-panel-body li { display: list-item } -.x-panel-reset .x-panel-body head { display: none } -.x-panel-reset .x-panel-body table { display: table } -.x-panel-reset .x-panel-body tr { display: table-row } -.x-panel-reset .x-panel-body thead { display: table-header-group } -.x-panel-reset .x-panel-body tbody { display: table-row-group } -.x-panel-reset .x-panel-body tfoot { display: table-footer-group } -.x-panel-reset .x-panel-body col { display: table-column } -.x-panel-reset .x-panel-body colgroup { display: table-column-group } -.x-panel-reset .x-panel-body td, -.x-panel-reset .x-panel-body th { display: table-cell } -.x-panel-reset .x-panel-body caption { display: table-caption } -.x-panel-reset .x-panel-body th { font-weight: bolder; text-align: center } -.x-panel-reset .x-panel-body caption { text-align: center } -.x-panel-reset .x-panel-body body { margin: 8px } -.x-panel-reset .x-panel-body h1 { font-size: 2em; margin: .67em 0 } -.x-panel-reset .x-panel-body h2 { font-size: 1.5em; margin: .75em 0 } -.x-panel-reset .x-panel-body h3 { font-size: 1.17em; margin: .83em 0 } -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body p, -.x-panel-reset .x-panel-body blockquote, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body fieldset, -.x-panel-reset .x-panel-body form, -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body dl, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body menu { margin: 1.12em 0 } -.x-panel-reset .x-panel-body h5 { font-size: .83em; margin: 1.5em 0 } -.x-panel-reset .x-panel-body h6 { font-size: .75em; margin: 1.67em 0 } -.x-panel-reset .x-panel-body h1, -.x-panel-reset .x-panel-body h2, -.x-panel-reset .x-panel-body h3, -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body h5, -.x-panel-reset .x-panel-body h6, -.x-panel-reset .x-panel-body b, -.x-panel-reset .x-panel-body strong { font-weight: bolder } -.x-panel-reset .x-panel-body blockquote { margin-left: 40px; margin-right: 40px } -.x-panel-reset .x-panel-body i, -.x-panel-reset .x-panel-body cite, -.x-panel-reset .x-panel-body em, -.x-panel-reset .x-panel-body var, -.x-panel-reset .x-panel-body address { font-style: italic } -.x-panel-reset .x-panel-body pre, -.x-panel-reset .x-panel-body tt, -.x-panel-reset .x-panel-body code, -.x-panel-reset .x-panel-body kbd, -.x-panel-reset .x-panel-body samp { font-family: monospace } -.x-panel-reset .x-panel-body pre { white-space: pre } -.x-panel-reset .x-panel-body button, -.x-panel-reset .x-panel-body textarea, -.x-panel-reset .x-panel-body input, -.x-panel-reset .x-panel-body select { display: inline-block } -.x-panel-reset .x-panel-body big { font-size: 1.17em } -.x-panel-reset .x-panel-body small, -.x-panel-reset .x-panel-body sub, -.x-panel-reset .x-panel-body sup { font-size: .83em } -.x-panel-reset .x-panel-body sub { vertical-align: sub } -.x-panel-reset .x-panel-body sup { vertical-align: super } -.x-panel-reset .x-panel-body table { border-spacing: 2px; } -.x-panel-reset .x-panel-body thead, -.x-panel-reset .x-panel-body tbody, -.x-panel-reset .x-panel-body tfoot { vertical-align: middle } -.x-panel-reset .x-panel-body td, -.x-panel-reset .x-panel-body th { vertical-align: inherit } -.x-panel-reset .x-panel-body s, -.x-panel-reset .x-panel-body strike, -.x-panel-reset .x-panel-body del { text-decoration: line-through } -.x-panel-reset .x-panel-body hr { border: 1px inset } -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body menu, -.x-panel-reset .x-panel-body dd { margin-left: 40px } -.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;} -.x-panel-reset .x-panel-body ol { list-style-type: decimal } -.x-panel-reset .x-panel-body ol ul, -.x-panel-reset .x-panel-body ul ol, -.x-panel-reset .x-panel-body ul ul, -.x-panel-reset .x-panel-body ol ol { margin-top: 0; margin-bottom: 0 } -.x-panel-reset .x-panel-body u, -.x-panel-reset .x-panel-body ins { text-decoration: underline } -.x-panel-reset .x-panel-body br:before { content: "\A" } -.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line } -.x-panel-reset .x-panel-body center { text-align: center } -.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline } -.x-panel-reset .x-panel-body :focus { outline: invert dotted thin } - -/* Begin bidirectionality settings (do not change) */ -.x-panel-reset .x-panel-body BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } -.x-panel-reset .x-panel-body BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } -.x-window { - zoom:1; -} - -.x-window .x-window-handle { - opacity:0; - -moz-opacity:0; - filter:alpha(opacity=0); -} - -.x-window-proxy { - border:1px solid; - z-index:12000; - overflow:hidden; - position:absolute; - left:0;top:0; - display:none; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); -} - -.x-window-header { - overflow:hidden; - zoom:1; -} - -.x-window-bwrap { - z-index:1; - position:relative; - zoom:1; - left:0;top:0; -} - -.x-window-tl .x-window-header { - padding:5px 0 4px 0; -} - -.x-window-header-text { - cursor:pointer; -} - -.x-window-tc { - background: transparent repeat-x 0 0; - overflow:hidden; - zoom:1; -} - -.x-window-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - zoom:1; - z-index:1; - position:relative; -} - -.x-window-tr { - background: transparent no-repeat right 0; - padding-right:6px; -} - -.x-window-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-window-bc .x-window-footer { - padding-bottom:6px; - zoom:1; - font-size:0; - line-height:0; -} - -.x-window-bl { - background: transparent no-repeat 0 bottom; - padding-left:6px; - zoom:1; -} - -.x-window-br { - background: transparent no-repeat right bottom; - padding-right:6px; - zoom:1; -} - -.x-window-mc { - border:1px solid; - padding:0; - margin:0; -} - -.x-window-ml { - background: transparent repeat-y 0 0; - padding-left:6px; - zoom:1; -} - -.x-window-mr { - background: transparent repeat-y right 0; - padding-right:6px; - zoom:1; -} - -.x-window-body { - overflow:hidden; -} - -.x-window-bwrap { - overflow:hidden; -} - -.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br, - .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr, - .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr { - padding:0; -} - -.x-window-maximized .x-window-footer { - padding-bottom:0; -} - -.x-window-maximized .x-window-tc { - padding-left:3px; - padding-right:3px; -} - -.x-window-maximized .x-window-mc { - border-left:0 none; - border-right:0 none; -} - -.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar { - border-left:0 none; - border-right: 0 none; -} - -.x-window-bbar .x-toolbar { - border-top:1px solid; - border-bottom:0 none; -} - -.x-window-draggable, .x-window-draggable .x-window-header-text { - cursor:move; -} - -.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text { - cursor:default; -} - -.x-window-body { - background-color:transparent; -} - -.x-panel-ghost .x-window-tl { - border-bottom:1px solid; -} - -.x-panel-collapsed .x-window-tl { - border-bottom:1px solid; -} - -.x-window-maximized-ct { - overflow:hidden; -} - -.x-window-maximized .x-window-handle { - display:none; -} - -.x-window-sizing-ghost ul { - border:0 none !important; -} - -.x-dlg-focus{ - -moz-outline:0 none; - outline:0 none; - width:0; - height:0; - overflow:hidden; - position:absolute; - top:0; - left:0; -} - -.ext-webkit .x-dlg-focus{ - width: 1px; - height: 1px; -} - -.x-dlg-mask{ - z-index:10000; - display:none; - position:absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity:.50; - filter: alpha(opacity=50); -} - -body.ext-ie6.x-body-masked select { - visibility:hidden; -} - -body.ext-ie6.x-body-masked .x-window select { - visibility:visible; -} - -.x-window-plain .x-window-mc { - border: 1px solid; -} - -.x-window-plain .x-window-body { - border: 1px solid; - background:transparent !important; -}.x-html-editor-wrap { - border:1px solid; -} - -.x-html-editor-tb .x-btn-text { - background:transparent no-repeat; -} - -.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold { - background-position:0 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic { - background-position:-16px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline { - background-position:-32px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor { - background-position:-160px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor { - background-position:-176px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft { - background-position:-112px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter { - background-position:-128px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright { - background-position:-144px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist { - background-position:-80px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist { - background-position:-96px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize { - background-position:-48px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize { - background-position:-64px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit { - background-position:-192px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink { - background-position:-208px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { - padding:5px; - padding-bottom:1px; -} - -.x-html-editor-tb .x-toolbar { - position:static !important; -}.x-panel-noborder .x-panel-body-noborder { - border-width:0; -} - -.x-panel-noborder .x-panel-header-noborder { - border-width:0 0 1px; - border-style:solid; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-width:0 0 1px; - border-style:solid; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-width:1px 0 0 0; - border-style:solid; -} - -.x-window-noborder .x-window-mc { - border-width:0; -} - -.x-window-plain .x-window-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-header-noborder { - border-width: 0 0 1px 0; -} - -.x-tab-panel-noborder .x-tab-panel-footer-noborder { - border-width: 1px 0 0 0; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-width: 1px 0 0 0; - border-style:solid; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-width:0 0 1px; - border-style:solid; -}.x-border-layout-ct { - position: relative; -} - -.x-border-panel { - position:absolute; - left:0; - top:0; -} - -.x-tool-collapse-south { - background-position:0 -195px; -} - -.x-tool-collapse-south-over { - background-position:-15px -195px; -} - -.x-tool-collapse-north { - background-position:0 -210px; -} - -.x-tool-collapse-north-over { - background-position:-15px -210px; -} - -.x-tool-collapse-west { - background-position:0 -180px; -} - -.x-tool-collapse-west-over { - background-position:-15px -180px; -} - -.x-tool-collapse-east { - background-position:0 -165px; -} - -.x-tool-collapse-east-over { - background-position:-15px -165px; -} - -.x-tool-expand-south { - background-position:0 -210px; -} - -.x-tool-expand-south-over { - background-position:-15px -210px; -} - -.x-tool-expand-north { - background-position:0 -195px; -} -.x-tool-expand-north-over { - background-position:-15px -195px; -} - -.x-tool-expand-west { - background-position:0 -165px; -} - -.x-tool-expand-west-over { - background-position:-15px -165px; -} - -.x-tool-expand-east { - background-position:0 -180px; -} - -.x-tool-expand-east-over { - background-position:-15px -180px; -} - -.x-tool-expand-north, .x-tool-expand-south { - float:right; - margin:3px; -} - -.x-tool-expand-east, .x-tool-expand-west { - float:none; - margin:3px 2px; -} - -.x-accordion-hd .x-tool-toggle { - background-position:0 -255px; -} - -.x-accordion-hd .x-tool-toggle-over { - background-position:-15px -255px; -} - -.x-panel-collapsed .x-accordion-hd .x-tool-toggle { - background-position:0 -240px; -} - -.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over { - background-position:-15px -240px; -} - -.x-accordion-hd { - padding-top:4px; - padding-bottom:3px; - border-top:0 none; - background: transparent repeat-x 0 -9px; -} - -.x-layout-collapsed{ - position:absolute; - left:-10000px; - top:-10000px; - visibility:hidden; - width:20px; - height:20px; - overflow:hidden; - border:1px solid; - z-index:20; -} - -.ext-border-box .x-layout-collapsed{ - width:22px; - height:22px; -} - -.x-layout-collapsed-over{ - cursor:pointer; -} - -.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{ - position:absolute; - top:0; - left:0; - width:20px; - height:20px; -} - - -.x-layout-split{ - position:absolute; - height:5px; - width:5px; - line-height:1px; - font-size:1px; - z-index:3; - background-color:transparent; -} - -/* IE6 strict won't drag w/out a color */ -.ext-strict .ext-ie6 .x-layout-split{ - background-color: #fff !important; - filter: alpha(opacity=1); -} - -.x-layout-split-h{ - background-image:url(../images/default/s.gif); - background-position: left; -} - -.x-layout-split-v{ - background-image:url(../images/default/s.gif); - background-position: top; -} - -.x-column-layout-ct { - overflow:hidden; - zoom:1; -} - -.x-column { - float:left; - padding:0; - margin:0; - overflow:hidden; - zoom:1; -} - -.x-column-inner { - overflow:hidden; - zoom:1; -} - -/* mini mode */ -.x-layout-mini { - position:absolute; - top:0; - left:0; - display:block; - width:5px; - height:35px; - cursor:pointer; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); -} - -.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{ - opacity:1; - -moz-opacity:1; - filter:none; -} - -.x-layout-split-west .x-layout-mini { - top:48%; -} - -.x-layout-split-east .x-layout-mini { - top:48%; -} - -.x-layout-split-north .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-split-south .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-west .x-layout-mini { - top:48%; -} - -.x-layout-cmini-east .x-layout-mini { - top:48%; -} - -.x-layout-cmini-north .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-south .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-west, .x-layout-cmini-east { - border:0 none; - width:5px !important; - padding:0; - background-color:transparent; -} - -.x-layout-cmini-north, .x-layout-cmini-south { - border:0 none; - height:5px !important; - padding:0; - background-color:transparent; -} - -.x-viewport, .x-viewport body { - margin: 0; - padding: 0; - border: 0 none; - overflow: hidden; - height: 100%; -} - -.x-abs-layout-item { - position:absolute; - left:0; - top:0; -} - -.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { - margin:0; -} - -.x-box-layout-ct { - overflow:hidden; - zoom:1; -} - -.x-box-inner { - overflow:hidden; - zoom:1; - position:relative; - left:0; - top:0; -} - -.x-box-item { - position:absolute; - left:0; - top:0; -}.x-progress-wrap { - border:1px solid; - overflow:hidden; -} - -.x-progress-inner { - height:18px; - background:repeat-x; - position:relative; -} - -.x-progress-bar { - height:18px; - float:left; - width:0; - background: repeat-x left center; - border-top:1px solid; - border-bottom:1px solid; - border-right:1px solid; -} - -.x-progress-text { - padding:1px 5px; - overflow:hidden; - position:absolute; - left:0; - text-align:center; -} - -.x-progress-text-back { - line-height:16px; -} - -.ext-ie .x-progress-text-back { - line-height:15px; -} - -.ext-strict .ext-ie7 .x-progress-text-back{ - width: 100%; -} -.x-list-header{ - background: repeat-x 0 bottom; - cursor:default; - zoom:1; - height:22px; -} - -.x-list-header-inner div { - display:block; - float:left; - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; -} - -.x-list-header-inner div em { - display:block; - border-left:1px solid; - padding:4px 4px; - overflow:hidden; - -moz-user-select: none; - -khtml-user-select: none; - line-height:14px; -} - -.x-list-body { - overflow:auto; - overflow-x:hidden; - overflow-y:auto; - zoom:1; - float: left; - width: 100%; -} - -.x-list-body dl { - zoom:1; -} - -.x-list-body dt { - display:block; - float:left; - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; - cursor:pointer; - zoom:1; -} - -.x-list-body dt em { - display:block; - padding:3px 4px; - overflow:hidden; - -moz-user-select: none; - -khtml-user-select: none; -} - -.x-list-resizer { - border-left:1px solid; - border-right:1px solid; - position:absolute; - left:0; - top:0; -} - -.x-list-header-inner em.sort-asc { - background: transparent no-repeat center 0; - border-style:solid; - border-width: 0 1px 1px; - padding-bottom:3px; -} - -.x-list-header-inner em.sort-desc { - background: transparent no-repeat center -23px; - border-style:solid; - border-width: 0 1px 1px; - padding-bottom:3px; -} - -/* Shared styles */ -.x-slider { - zoom:1; -} - -.x-slider-inner { - position:relative; - left:0; - top:0; - overflow:visible; - zoom:1; -} - -.x-slider-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; - display:block; - overflow:hidden; -} - -/* Horizontal styles */ -.x-slider-horz { - padding-left:7px; - background:transparent no-repeat 0 -22px; -} - -.x-slider-horz .x-slider-end { - padding-right:7px; - zoom:1; - background:transparent no-repeat right -44px; -} - -.x-slider-horz .x-slider-inner { - background:transparent repeat-x 0 0; - height:22px; -} - -.x-slider-horz .x-slider-thumb { - width:14px; - height:15px; - position:absolute; - left:0; - top:3px; - background:transparent no-repeat 0 0; -} - -.x-slider-horz .x-slider-thumb-over { - background-position: -14px -15px; -} - -.x-slider-horz .x-slider-thumb-drag { - background-position: -28px -30px; -} - -/* Vertical styles */ -.x-slider-vert { - padding-top:7px; - background:transparent no-repeat -44px 0; - width:22px; -} - -.x-slider-vert .x-slider-end { - padding-bottom:7px; - zoom:1; - background:transparent no-repeat -22px bottom; -} - -.x-slider-vert .x-slider-inner { - background:transparent repeat-y 0 0; -} - -.x-slider-vert .x-slider-thumb { - width:15px; - height:14px; - position:absolute; - left:3px; - bottom:0; - background:transparent no-repeat 0 0; -} - -.x-slider-vert .x-slider-thumb-over { - background-position: -15px -14px; -} - -.x-slider-vert .x-slider-thumb-drag { - background-position: -30px -28px; -}.x-window-dlg .x-window-body { - border:0 none !important; - padding:5px 10px; - overflow:hidden !important; -} - -.x-window-dlg .x-window-mc { - border:0 none !important; -} - -.x-window-dlg .ext-mb-input { - margin-top:4px; - width:95%; -} - -.x-window-dlg .ext-mb-textarea { - margin-top:4px; -} - -.x-window-dlg .x-progress-wrap { - margin-top:4px; -} - -.ext-ie .x-window-dlg .x-progress-wrap { - margin-top:6px; -} - -.x-window-dlg .x-msg-box-wait { - background:transparent no-repeat left; - display:block; - width:300px; - padding-left:18px; - line-height:18px; -} - -.x-window-dlg .ext-mb-icon { - float:left; - width:47px; - height:32px; -} - -.x-window-dlg .x-dlg-icon .ext-mb-content{ - zoom: 1; - margin-left: 47px; -} - -.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error { - background:transparent no-repeat top left; -} - -.ext-gecko2 .ext-mb-fix-cursor { - overflow:auto; -}.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#6593cf; - background-color:#c3daf9; - background-image:url(../images/default/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#a3bad9; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -/* -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #deecfd; -} -*/ - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -} -.x-tab-panel-header, .x-tab-panel-footer { - background-color: #deecfd; - border-color:#8db2e3; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#8db2e3; -} - -ul.x-tab-strip-top{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-bg.gif); - border-bottom-color:#8db2e3; -} - -ul.x-tab-strip-bottom{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); - border-top-color:#8db2e3; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#8db2e3; - background-color: #deecfd; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 11px tahoma,arial,helvetica; - color:#416aa3; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#15428b; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#15428b; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/default/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#8db2e3; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/default/tabs/scroll-left.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/default/tabs/scroll-right.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#99bbe8; -}.x-form-field { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field { - background-color:#fff; - background-image:url(../images/default/form/text-bg.gif); - border-color:#b5b8c8; -} - -.x-form-select-one { - background-color:#fff; - border-color:#b5b8c8; -} - -.x-form-check-group-label { - border-bottom: 1px solid #99bbe8; - color: #15428b; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger { - background-image:url(../images/default/form/trigger.gif); - border-bottom-color:#b5b8c8; -} - -.x-form-field-wrap .x-form-date-trigger { - background-image: url(../images/default/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger { - background-image: url(../images/default/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger { - background-image: url(../images/default/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger { - border-bottom-color:#7eadd9; -} - -.x-item-disabled .x-form-trigger-over { - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click { - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus { - border-color:#7eadd9; -} - -.x-form-invalid, textarea.x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-invalid.x-form-composite { - border: none; - background-image: none; -} - -.x-form-invalid.x-form-composite .x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 11px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:gray; -} - -.x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.ext-webkit .x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-fieldset { - border-color:#b5b8c8; -} - -.x-fieldset legend { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; -} -.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/default/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #3e6aaa; -} - -.x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/default/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/default/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -}.x-toolbar{ - border-color:#a9bfd3; - background-color:#d0def0; - background-image:url(../images/default/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-blue-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/default/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/default/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/default/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/default/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/refresh-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/default/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/default/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/default/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/default/toolbar/more.gif) !important; -}.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/default/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/default/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/default/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/default/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/default/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/default/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/default/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#99bbe8; -} - -.x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px/13px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - font:normal 11px/15px arial, tahoma, helvetica, sans-serif; -} - - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#aaccf6; - border-right-color:#aaccf6; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#15428b; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -td.grid-hd-group-cell { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; -} - -.x-grid3-row-selected { - background-color: #dfe8f6 !important; - background-image: none; - border-color:#a3bae9; -} - -.x-grid3-cell-selected{ - background-color: #b8cfee !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#15428b !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c3daf9; - background-image:url(../images/default/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/default/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#99bbe8; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-collapse.gif); - color:#3764a0; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -}.x-pivotgrid .x-grid3-header-offset table td { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x 50% 100%; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; -} - -.x-pivotgrid .x-grid3-row-headers { - background-color: #f9f9f9; -} - -.x-pivotgrid .x-grid3-row-headers table td { - background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; - border-bottom: 1px solid; - border-bottom-color: #D0D0D0; - height: 18px; -} -.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -}.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #d9e8fb; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -}.x-date-picker { - border-color: #1b376c; - background-color:#fff; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/default/shared/hd-sprite.gif); - color:#fff; - font:bold 11px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/default/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/default/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-bottom-color:#a3bad9; - font:normal 10px arial, helvetica,tahoma,sans-serif; - color:#233d6d; -} - -.x-date-inner td { - border-color:#fff; -} - -.x-date-inner a { - font:normal 11px arial, helvetica,tahoma,sans-serif; - color:#000; -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-inner .x-date-today a{ - border-color:darkred; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#a3bad9; - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#000; - background-color:#ddecfe; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:10px; - color:#000; -} - -.x-date-mp { - background-color:#fff; -} - -.x-date-mp td { - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#083772; - color:#fff; - border-color: #3366cc #000055 #000055 #3366cc; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); -} - -.x-date-mp-btns td { - border-top-color: #c5d2df; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color:#15428b; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#15428b; - background-color: #ddecfe; -} - -td.x-date-mp-sel a { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-mp-ybtn a { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#c5d2df; -}.x-tip .x-tip-close{ - background-image: url(../images/default/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/default/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/default/qtip/tip-anchor-sprite.gif); -}.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#718bb7; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/default/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/default/menu/item-over.gif); - background-color: #dbecf4; - border-color:#aaccf6; -} - -.x-menu-item-active a.x-menu-item { - border-color:#aaccf6; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/default/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#f0f0f0 !important; - background-image: none; -} - -.x-date-menu, .x-color-menu{ - background-color: #fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} -.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 12px; -} - -.x-box-mc h3 { - font-size: 14px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -}.x-combo-list { - border-color:#98c0f4; - background-color:#ddecfe; - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#fff; -} - -.x-combo-list-hd { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#98c0f4; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#98c0f4; -} - -.x-combo-list-item { - border-color:#fff; -} - -.x-combo-list .x-combo-selected{ - border-color:#a3bae9 !important; - background-color:#dfe8f6; -} - -.x-combo-list .x-toolbar { - border-top-color:#98c0f4; -} - -.x-combo-list-small { - font:normal 11px tahoma, arial, helvetica, sans-serif; -}.x-panel { - border-color: #99bbe8; -} - -.x-panel-header { - color:#15428b; - font-weight:bold; - font-size: 11px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#99bbe8; - background-image: url(../images/default/panel/white-top-bottom.gif); -} - -.x-panel-body { - border-color:#99bbe8; - background-color:#fff; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#99bbe8; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#99bbe8; -} - -.x-panel-tl .x-panel-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/default/panel/corners-sprite.gif); - border-bottom-color:#99bbe8; -} - -.x-panel-bc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-panel-ml { - background-color: #fff; - background-image:url(../images/default/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/default/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#cbddf3; -} - -.x-panel-ghost ul { - border-color:#99bbe8; -} - -.x-panel-dd-spacer { - border-color:#99bbe8; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} -.x-window-proxy { - background-color:#c7dffc; - border-color:#99bbe8; -} - -.x-window-tl .x-window-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-mc { - border-color:#99bbe8; - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-window-ml { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#99bbe8; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#84a0c4; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #ccd9e8; - border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; -} - -.x-window-plain .x-window-body { - border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #ccd9e8; -}.x-html-editor-wrap { - border-color:#a9bfd3; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -}.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -}.x-border-layout-ct { - background-color:#dfe8f6; -} - -.x-accordion-hd { - color:#222; - font-weight:normal; - background-image: url(../images/default/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#d2e0f2; - border-color:#98c0f4; -} - -.x-layout-collapsed-over{ - background-color:#d9e8fb; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -}.x-progress-wrap { - border-color:#6593cf; -} - -.x-progress-inner { - background-color:#e0e8f3; - background-image:url(../images/default/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#9cbfee; - background-image:url(../images/default/progress/progress-bg.gif); - border-top-color:#d1e4fd; - border-bottom-color:#7fa9e4; - border-right-color:#7fa9e4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#396095; -}.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#dfe8f6; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/default/grid/sort-hd.gif); - border-color: #99bbe8; -}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/default/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/default/slider/slider-v-thumb.png); -}.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/default/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/default/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/default/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/default/window/icon-error.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/reset-min.css b/web-client/src/main/resources/apps/js/ext/resources/css/reset-min.css deleted file mode 100644 index f503196be0d..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/reset-min.css +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/borders.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/borders.css deleted file mode 100644 index 61512a33d5b..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/borders.css +++ /dev/null @@ -1,54 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-panel-noborder .x-panel-body-noborder { - border-width:0; -} - -.x-panel-noborder .x-panel-header-noborder { - border-width:0 0 1px; - border-style:solid; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-width:0 0 1px; - border-style:solid; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-width:1px 0 0 0; - border-style:solid; -} - -.x-window-noborder .x-window-mc { - border-width:0; -} - -.x-window-plain .x-window-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-header-noborder { - border-width: 0 0 1px 0; -} - -.x-tab-panel-noborder .x-tab-panel-footer-noborder { - border-width: 1px 0 0 0; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-width: 1px 0 0 0; - border-style:solid; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-width:0 0 1px; - border-style:solid; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/box.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/box.css deleted file mode 100644 index f6583042882..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/box.css +++ /dev/null @@ -1,80 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/* - Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: -
      -
      -
      -

      YOUR TITLE HERE (optional)

      -
      YOUR CONTENT HERE
      -
      -
      -
      - */ - -.x-box-tl { - background: transparent no-repeat 0 0; - zoom:1; -} - -.x-box-tc { - height: 8px; - background: transparent repeat-x 0 0; - overflow: hidden; -} - -.x-box-tr { - background: transparent no-repeat right -8px; -} - -.x-box-ml { - background: transparent repeat-y 0; - padding-left: 4px; - overflow: hidden; - zoom:1; -} - -.x-box-mc { - background: repeat-x 0 -16px; - padding: 4px 10px; -} - -.x-box-mc h3 { - margin: 0 0 4px 0; - zoom:1; -} - -.x-box-mr { - background: transparent repeat-y right; - padding-right: 4px; - overflow: hidden; -} - -.x-box-bl { - background: transparent no-repeat 0 -16px; - zoom:1; -} - -.x-box-bc { - background: transparent repeat-x 0 -8px; - height: 8px; - overflow: hidden; -} - -.x-box-br { - background: transparent no-repeat right -24px; -} - -.x-box-tl, .x-box-bl { - padding-left: 8px; - overflow: hidden; -} - -.x-box-tr, .x-box-br { - padding-right: 8px; - overflow: hidden; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/button.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/button.css deleted file mode 100644 index fb8cdc289f0..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/button.css +++ /dev/null @@ -1,445 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-btn{ - cursor:pointer; - white-space: nowrap; -} - -.x-btn button{ - border:0 none; - background-color:transparent; - padding-left:3px; - padding-right:3px; - cursor:pointer; - margin:0; - overflow:visible; - width:auto; - -moz-outline:0 none; - outline:0 none; -} - -* html .ext-ie .x-btn button { - width:1px; -} - -.ext-gecko .x-btn button, .ext-webkit .x-btn button { - padding-left:0; - padding-right:0; -} - -.ext-gecko .x-btn button::-moz-focus-inner { - padding:0; -} - -.ext-ie .x-btn button { - padding-top:2px; -} - -.x-btn td { - padding:0 !important; -} - -.x-btn-text { - cursor:pointer; - white-space: nowrap; - padding:0; -} - -/* icon placement and sizing styles */ - -/* Only text */ -.x-btn-noicon .x-btn-small .x-btn-text{ - height: 16px; -} - -.x-btn-noicon .x-btn-medium .x-btn-text{ - height: 24px; -} - -.x-btn-noicon .x-btn-large .x-btn-text{ - height: 32px; -} - -/* Only icons */ -.x-btn-icon .x-btn-text{ - background-position: center; - background-repeat: no-repeat; -} - -.x-btn-icon .x-btn-small .x-btn-text{ - height: 16px; - width: 16px; -} - -.x-btn-icon .x-btn-medium .x-btn-text{ - height: 24px; - width: 24px; -} - -.x-btn-icon .x-btn-large .x-btn-text{ - height: 32px; - width: 32px; -} - -/* Icons and text */ -/* left */ -.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:18px; - height:16px; -} - -.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:26px; - height:24px; -} - -.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:34px; - height:32px; -} - -/* top */ -.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:18px; -} - -.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:26px; -} - -.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:34px; -} - -/* right */ -.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:18px; - height:16px; -} - -.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:26px; - height:24px; -} - -.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:34px; - height:32px; -} - -/* bottom */ -.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:18px; -} - -.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:26px; -} - -.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:34px; -} - -/* background positioning */ -.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ - font-size:1px; - line-height:1px; - width:3px; - display:block; - overflow:hidden; -} - -.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ - height:3px; -} - -.x-btn-tl{ - width:3px; - height:3px; - background:no-repeat 0 0; -} -.x-btn-tr{ - width:3px; - height:3px; - background:no-repeat -3px 0; -} -.x-btn-tc{ - height:3px; - background:repeat-x 0 -6px; -} - -.x-btn-ml{ - width:3px; - background:no-repeat 0 -24px; -} -.x-btn-mr{ - width:3px; - background:no-repeat -3px -24px; -} - -.x-btn-mc{ - background:repeat-x 0 -1096px; - vertical-align: middle; - text-align:center; - padding:0 5px; - cursor:pointer; - white-space:nowrap; -} - -/* Fixes an issue with the button height */ -.ext-strict .ext-ie6 .x-btn-mc, .ext-strict .ext-ie7 .x-btn-mc { - height: 100%; -} - -.x-btn-bl{ - width:3px; - height:3px; - background:no-repeat 0 -3px; -} - -.x-btn-br{ - width:3px; - height:3px; - background:no-repeat -3px -3px; -} - -.x-btn-bc{ - height:3px; - background:repeat-x 0 -15px; -} - -.x-btn-over .x-btn-tl{ - background-position: -6px 0; -} - -.x-btn-over .x-btn-tr{ - background-position: -9px 0; -} - -.x-btn-over .x-btn-tc{ - background-position: 0 -9px; -} - -.x-btn-over .x-btn-ml{ - background-position: -6px -24px; -} - -.x-btn-over .x-btn-mr{ - background-position: -9px -24px; -} - -.x-btn-over .x-btn-mc{ - background-position: 0 -2168px; -} - -.x-btn-over .x-btn-bl{ - background-position: -6px -3px; -} - -.x-btn-over .x-btn-br{ - background-position: -9px -3px; -} - -.x-btn-over .x-btn-bc{ - background-position: 0 -18px; -} - -.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ - background-position: -12px 0; -} - -.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ - background-position: -15px 0; -} - -.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ - background-position: 0 -12px; -} - -.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ - background-position: -12px -24px; -} - -.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ - background-position: -15px -24px; -} - -.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ - background-position: 0 -3240px; -} - -.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ - background-position: -12px -3px; -} - -.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ - background-position: -15px -3px; -} - -.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ - background-position: 0 -21px; -} - -.x-btn-disabled *{ - cursor:default !important; -} - - -/* With a menu arrow */ -/* right */ -.x-btn-mc em.x-btn-arrow { - display:block; - background:transparent no-repeat right center; - padding-right:10px; -} - -.x-btn-mc em.x-btn-split { - display:block; - background:transparent no-repeat right center; - padding-right:14px; -} - -/* bottom */ -.x-btn-mc em.x-btn-arrow-bottom { - display:block; - background:transparent no-repeat center bottom; - padding-bottom:14px; -} - -.x-btn-mc em.x-btn-split-bottom { - display:block; - background:transparent no-repeat center bottom; - padding-bottom:14px; -} - -/* height adjustment class */ -.x-btn-as-arrow .x-btn-mc em { - display:block; - background-color:transparent; - padding-bottom:14px; -} - -/* groups */ -.x-btn-group { - padding:1px; -} - -.x-btn-group-header { - padding:2px; - text-align:center; -} - -.x-btn-group-tc { - background: transparent repeat-x 0 0; - overflow:hidden; -} - -.x-btn-group-tl { - background: transparent no-repeat 0 0; - padding-left:3px; - zoom:1; -} - -.x-btn-group-tr { - background: transparent no-repeat right 0; - zoom:1; - padding-right:3px; -} - -.x-btn-group-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-btn-group-bc .x-panel-footer { - zoom:1; -} - -.x-btn-group-bl { - background: transparent no-repeat 0 bottom; - padding-left:3px; - zoom:1; -} - -.x-btn-group-br { - background: transparent no-repeat right bottom; - padding-right:3px; - zoom:1; -} - -.x-btn-group-mc { - border:0 none; - padding:1px 0 0 0; - margin:0; -} - -.x-btn-group-mc .x-btn-group-body { - background-color:transparent; - border: 0 none; -} - -.x-btn-group-ml { - background: transparent repeat-y 0 0; - padding-left:3px; - zoom:1; -} - -.x-btn-group-mr { - background: transparent repeat-y right 0; - padding-right:3px; - zoom:1; -} - -.x-btn-group-bc .x-btn-group-footer { - padding-bottom:6px; -} - -.x-panel-nofooter .x-btn-group-bc { - height:3px; - font-size:0; - line-height:0; -} - -.x-btn-group-bwrap { - overflow:hidden; - zoom:1; -} - -.x-btn-group-body { - overflow:hidden; - zoom:1; -} - -.x-btn-group-notitle .x-btn-group-tc { - background: transparent repeat-x 0 0; - overflow:hidden; - height:2px; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/combo.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/combo.css deleted file mode 100644 index 3edeea1b80d..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/combo.css +++ /dev/null @@ -1,45 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-combo-list { - border:1px solid; - zoom:1; - overflow:hidden; -} - -.x-combo-list-inner { - overflow:auto; - position:relative; /* for calculating scroll offsets */ - zoom:1; - overflow-x:hidden; -} - -.x-combo-list-hd { - border-bottom:1px solid; - padding:3px; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom:1px solid; -} - -.x-combo-list-item { - padding:2px; - border:1px solid; - white-space: nowrap; - overflow:hidden; - text-overflow: ellipsis; -} - -.x-combo-list .x-combo-selected{ - border:1px dotted !important; - cursor:pointer; -} - -.x-combo-list .x-toolbar { - border-top:1px solid; - border-bottom:0 none; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/core.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/core.css deleted file mode 100644 index caf75a3b4bf..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/core.css +++ /dev/null @@ -1,341 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.ext-el-mask { - z-index: 100; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - width: 100%; - height: 100%; - zoom: 1; -} - -.ext-el-mask-msg { - z-index: 20001; - position: absolute; - top: 0; - left: 0; - border:1px solid; - background:repeat-x 0 -16px; - padding:2px; -} - -.ext-el-mask-msg div { - padding:5px 10px 5px 10px; - border:1px solid; - cursor:wait; -} - -.ext-shim { - position:absolute; - visibility:hidden; - left:0; - top:0; - overflow:hidden; -} - -.ext-ie .ext-shim { - filter: alpha(opacity=0); -} - -.ext-ie6 .ext-shim { - margin-left: 5px; - margin-top: 3px; -} - -.x-mask-loading div { - padding:5px 10px 5px 25px; - background:no-repeat 5px 5px; - line-height:16px; -} - -/* class for hiding elements without using display:none */ -.x-hidden, .x-hide-offsets { - position:absolute !important; - left:-10000px; - top:-10000px; - visibility:hidden; -} - -.x-hide-display { - display:none !important; -} - -.x-hide-nosize, -.x-hide-nosize * /* Emulate display:none for children */ - { - height:0px!important; - width:0px!important; - visibility:hidden!important; - border:none!important; - zoom:1; -} - -.x-hide-visibility { - visibility:hidden !important; -} - -.x-masked { - overflow: hidden !important; -} -.x-masked-relative { - position: relative !important; -} - -.x-masked select, .x-masked object, .x-masked embed { - visibility: hidden; -} - -.x-layer { - visibility: hidden; -} - -.x-unselectable, .x-unselectable * { - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select:ignore; -} - -.x-repaint { - zoom: 1; - background-color: transparent; - -moz-outline: none; - outline: none; -} - -.x-item-disabled { - cursor: default; - opacity: .6; - -moz-opacity: .6; - filter: alpha(opacity=60); -} - -.x-item-disabled * { - cursor: default !important; -} - -.x-form-radio-group .x-item-disabled { - filter: none; -} - -.x-splitbar-proxy { - position: absolute; - visibility: hidden; - z-index: 20001; - zoom: 1; - line-height: 1px; - font-size: 1px; - overflow: hidden; -} - -.x-splitbar-h, .x-splitbar-proxy-h { - cursor: e-resize; - cursor: col-resize; -} - -.x-splitbar-v, .x-splitbar-proxy-v { - cursor: s-resize; - cursor: row-resize; -} - -.x-color-palette { - width: 150px; - height: 92px; - cursor: pointer; -} - -.x-color-palette a { - border: 1px solid; - float: left; - padding: 2px; - text-decoration: none; - -moz-outline: 0 none; - outline: 0 none; - cursor: pointer; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border: 1px solid; -} - -.x-color-palette em { - display: block; - border: 1px solid; -} - -.x-color-palette em span { - cursor: pointer; - display: block; - height: 10px; - line-height: 10px; - width: 10px; -} - -.x-ie-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; - zoom:1; -} - -.x-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; -} - -.x-shadow * { - overflow: hidden; -} - -.x-shadow * { - padding: 0; - border: 0; - margin: 0; - clear: none; - zoom: 1; -} - -/* top bottom */ -.x-shadow .xstc, .x-shadow .xsbc { - height: 6px; - float: left; -} - -/* corners */ -.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { - width: 6px; - height: 6px; - float: left; -} - -/* sides */ -.x-shadow .xsc { - width: 100%; -} - -.x-shadow .xsml, .x-shadow .xsmr { - width: 6px; - float: left; - height: 100%; -} - -.x-shadow .xsmc { - float: left; - height: 100%; - background-color: transparent; -} - -.x-shadow .xst, .x-shadow .xsb { - height: 6px; - overflow: hidden; - width: 100%; -} - -.x-shadow .xsml { - background: transparent repeat-y 0 0; -} - -.x-shadow .xsmr { - background: transparent repeat-y -6px 0; -} - -.x-shadow .xstl { - background: transparent no-repeat 0 0; -} - -.x-shadow .xstc { - background: transparent repeat-x 0 -30px; -} - -.x-shadow .xstr { - background: transparent repeat-x 0 -18px; -} - -.x-shadow .xsbl { - background: transparent no-repeat 0 -12px; -} - -.x-shadow .xsbc { - background: transparent repeat-x 0 -36px; -} - -.x-shadow .xsbr { - background: transparent repeat-x 0 -6px; -} - -.loading-indicator { - background: no-repeat left; - padding-left: 20px; - line-height: 16px; - margin: 3px; -} - -.x-text-resize { - position: absolute; - left: -1000px; - top: -1000px; - visibility: hidden; - zoom: 1; -} - -.x-drag-overlay { - width: 100%; - height: 100%; - display: none; - position: absolute; - left: 0; - top: 0; - background-image:url(../images/default/s.gif); - z-index: 20000; -} - -.x-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - -.x-spotlight { - z-index: 8999; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - width:0; - height:0; - zoom: 1; -} - -#x-history-frame { - position:absolute; - top:-1px; - left:0; - width:1px; - height:1px; - visibility:hidden; -} - -#x-history-field { - position:absolute; - top:0; - left:-1px; - width:1px; - height:1px; - visibility:hidden; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/date-picker.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/date-picker.css deleted file mode 100644 index 8d5f4094421..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/date-picker.css +++ /dev/null @@ -1,271 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-date-picker { - border: 1px solid; - border-top:0 none; - position:relative; -} - -.x-date-picker a { - -moz-outline:0 none; - outline:0 none; -} - -.x-date-inner, .x-date-inner td, .x-date-inner th{ - border-collapse:separate; -} - -.x-date-middle,.x-date-left,.x-date-right { - background: repeat-x 0 -83px; - overflow:hidden; -} - -.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, -.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, -.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ - background:transparent !important; - vertical-align:middle; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background:transparent no-repeat right 0; -} - -.x-date-right, .x-date-left { - width:18px; -} - -.x-date-right{ - text-align:right; -} - -.x-date-middle { - padding-top:2px; - padding-bottom:2px; - width:130px; /* FF3 */ -} - -.x-date-right a, .x-date-left a{ - display:block; - width:16px; - height:16px; - background-position: center; - background-repeat: no-repeat; - cursor:pointer; - -moz-opacity: 0.6; - opacity:.6; - filter: alpha(opacity=60); -} - -.x-date-right a:hover, .x-date-left a:hover{ - -moz-opacity: 1; - opacity:1; - filter: alpha(opacity=100); -} - -.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{ - -moz-opacity: 0.6; - opacity:.6; - filter: alpha(opacity=60); -} - -.x-date-right a { - margin-right:2px; - text-decoration:none !important; -} - -.x-date-left a{ - margin-left:2px; - text-decoration:none !important; -} - -table.x-date-inner { - width: 100%; - table-layout:fixed; -} - -.ext-webkit table.x-date-inner{ - /* Fix for webkit browsers */ - width: 175px; -} - - -.x-date-inner th { - width:25px; -} - -.x-date-inner th { - background: repeat-x left top; - text-align:right !important; - border-bottom: 1px solid; - cursor:default; - padding:0; - border-collapse:separate; -} - -.x-date-inner th span { - display:block; - padding:2px; - padding-right:7px; -} - -.x-date-inner td { - border: 1px solid; - text-align:right; - padding:0; -} - -.x-date-inner a { - padding:2px 5px; - display:block; - text-decoration:none; - text-align:right; - zoom:1; -} - -.x-date-inner .x-date-active{ - cursor:pointer; - color:black; -} - -.x-date-inner .x-date-selected a{ - background: repeat-x left top; - border:1px solid; - padding:1px 4px; -} - -.x-date-inner .x-date-today a{ - border: 1px solid; - padding:1px 4px; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - text-decoration:none !important; -} - -.x-date-bottom { - padding:4px; - border-top: 1px solid; - background: repeat-x left top; -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - text-decoration:none !important; -} - -.x-item-disabled .x-date-inner a:hover{ - background: none; -} - -.x-date-inner .x-date-disabled a { - cursor:default; -} - -.x-date-menu .x-menu-item { - padding:1px 24px 1px 4px; - white-space: nowrap; -} - -.x-date-menu .x-menu-item .x-menu-item-icon { - width:10px; - height:10px; - margin-right:5px; - background-position:center -4px !important; -} - -.x-date-mp { - position:absolute; - left:0; - top:0; - display:none; -} - -.x-date-mp td { - padding:2px; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn { - border: 0 none; - text-align:center; - vertical-align: middle; - width:25%; -} - -.x-date-mp-ok { - margin-right:3px; -} - -.x-date-mp-btns button { - text-decoration:none; - text-align:center; - text-decoration:none !important; - border:1px solid; - padding:1px 3px 1px; - cursor:pointer; -} - -.x-date-mp-btns { - background: repeat-x left top; -} - -.x-date-mp-btns td { - border-top: 1px solid; - text-align:center; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - display:block; - padding:2px 4px; - text-decoration:none; - text-align:center; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - text-decoration:none; - cursor:pointer; -} - -td.x-date-mp-sel a { - padding:1px 3px; - background: repeat-x left top; - border:1px solid; -} - -.x-date-mp-ybtn a { - overflow:hidden; - width:15px; - height:15px; - cursor:pointer; - background:transparent no-repeat; - display:block; - margin:0 auto; -} - -.x-date-mp-ybtn a.x-date-mp-next { - background-position:0 -120px; -} - -.x-date-mp-ybtn a.x-date-mp-next:hover { - background-position:-15px -120px; -} - -.x-date-mp-ybtn a.x-date-mp-prev { - background-position:0 -105px; -} - -.x-date-mp-ybtn a.x-date-mp-prev:hover { - background-position:-15px -105px; -} - -.x-date-mp-ybtn { - text-align:center; -} - -td.x-date-mp-sep { - border-right:1px solid; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/dd.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/dd.css deleted file mode 100644 index 6a5a6c34b26..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/dd.css +++ /dev/null @@ -1,61 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-dd-drag-proxy{ - position:absolute; - left:0; - top:0; - visibility:hidden; - z-index:15000; -} - -.x-dd-drag-ghost{ - -moz-opacity: 0.85; - opacity:.85; - filter: alpha(opacity=85); - border: 1px solid; - padding:3px; - padding-left:20px; - white-space:nowrap; -} - -.x-dd-drag-repair .x-dd-drag-ghost{ - -moz-opacity: 0.4; - opacity:.4; - filter: alpha(opacity=40); - border:0 none; - padding:0; - background-color:transparent; -} - -.x-dd-drag-repair .x-dd-drop-icon{ - visibility:hidden; -} - -.x-dd-drop-icon{ - position:absolute; - top:3px; - left:3px; - display:block; - width:16px; - height:16px; - background-color:transparent; - background-position: center; - background-repeat: no-repeat; - z-index:1; -} - -.x-view-selector { - position:absolute; - left:0; - top:0; - width:0; - border:1px dotted; - opacity: .5; - -moz-opacity: .5; - filter:alpha(opacity=50); - zoom:1; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/debug.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/debug.css deleted file mode 100644 index 9c18de97ed5..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/debug.css +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -#x-debug-browser .x-tree .x-tree-node a span { - padding-top:2px; - line-height:18px; -} - -#x-debug-browser .x-tool-toggle { - background-position:0 -75px; -} - -#x-debug-browser .x-tool-toggle-over { - background-position:-15px -75px; -} - -#x-debug-browser.x-panel-collapsed .x-tool-toggle { - background-position:0 -60px; -} - -#x-debug-browser.x-panel-collapsed .x-tool-toggle-over { - background-position:-15px -60px; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/dialog.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/dialog.css deleted file mode 100644 index 09092019d50..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/dialog.css +++ /dev/null @@ -1,59 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-window-dlg .x-window-body { - border:0 none !important; - padding:5px 10px; - overflow:hidden !important; -} - -.x-window-dlg .x-window-mc { - border:0 none !important; -} - -.x-window-dlg .ext-mb-input { - margin-top:4px; - width:95%; -} - -.x-window-dlg .ext-mb-textarea { - margin-top:4px; -} - -.x-window-dlg .x-progress-wrap { - margin-top:4px; -} - -.ext-ie .x-window-dlg .x-progress-wrap { - margin-top:6px; -} - -.x-window-dlg .x-msg-box-wait { - background:transparent no-repeat left; - display:block; - width:300px; - padding-left:18px; - line-height:18px; -} - -.x-window-dlg .ext-mb-icon { - float:left; - width:47px; - height:32px; -} - -.x-window-dlg .x-dlg-icon .ext-mb-content{ - zoom: 1; - margin-left: 47px; -} - -.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error { - background:transparent no-repeat top left; -} - -.ext-gecko2 .ext-mb-fix-cursor { - overflow:auto; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/editor.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/editor.css deleted file mode 100644 index dd5840a8b05..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/editor.css +++ /dev/null @@ -1,92 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-html-editor-wrap { - border:1px solid; -} - -.x-html-editor-tb .x-btn-text { - background:transparent no-repeat; -} - -.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold { - background-position:0 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic { - background-position:-16px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline { - background-position:-32px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor { - background-position:-160px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor { - background-position:-176px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft { - background-position:-112px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter { - background-position:-128px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright { - background-position:-144px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist { - background-position:-80px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist { - background-position:-96px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize { - background-position:-48px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize { - background-position:-64px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit { - background-position:-192px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink { - background-position:-208px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { - padding:5px; - padding-bottom:1px; -} - -.x-html-editor-tb .x-toolbar { - position:static !important; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/form.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/form.css deleted file mode 100644 index 9e7684bfd4f..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/form.css +++ /dev/null @@ -1,597 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/* all fields */ -.x-form-field{ - margin: 0 0 0 0; -} - -.ext-webkit *:focus{ - outline: none !important; -} - -/* ---- text fields ---- */ -.x-form-text, textarea.x-form-field{ - padding:1px 3px; - background:repeat-x 0 0; - border:1px solid; -} - -textarea.x-form-field { - padding:2px 3px; -} - -.x-form-text, .ext-ie .x-form-file { - height:22px; - line-height:18px; - vertical-align:middle; -} - -.ext-ie6 .x-form-text, .ext-ie7 .x-form-text { - margin:-1px 0; /* ie bogus margin bug */ - height:22px; /* ie quirks */ - line-height:18px; -} - -.x-quirks .ext-ie9 .x-form-text { - height: 22px; - padding-top: 3px; - padding-bottom: 0px; -} - -/* Ugly hacks for the bogus 1px margin bug in IE9 quirks */ -.x-quirks .ext-ie9 .x-input-wrapper .x-form-text, -.x-quirks .ext-ie9 .x-form-field-trigger-wrap .x-form-text { - margin-top: -1px; - margin-bottom: -1px; -} -.x-quirks .ext-ie9 .x-input-wrapper .x-form-element { - margin-bottom: -1px; -} - -.ext-ie6 .x-form-field-wrap .x-form-file-btn, .ext-ie7 .x-form-field-wrap .x-form-file-btn { - top: -1px; /* because of all these margin hacks, these buttons are off by one pixel in IE6,7 */ -} - -.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field { - margin:-1px 0; /* ie bogus margin bug */ -} - -.ext-strict .x-form-text { - height:18px; -} - -.ext-safari.ext-mac textarea.x-form-field { - margin-bottom:-2px; /* another bogus margin bug, safari/mac only */ -} - -/* -.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field { - margin-bottom: 1px; -} -*/ - -.ext-gecko .x-form-text , .ext-ie8 .x-form-text { - padding-top:2px; /* FF won't center the text vertically */ - padding-bottom:0; -} - -.ext-ie6 .x-form-composite .x-form-text.x-box-item, .ext-ie7 .x-form-composite .x-form-text.x-box-item { - margin: 0 !important; /* clear ie bogus margin bug fix */ -} - -textarea { - resize: none; /* Disable browser resizable textarea */ -} - -/* select boxes */ -.x-form-select-one { - height:20px; - line-height:18px; - vertical-align:middle; - border: 1px solid; -} - -/* multi select boxes */ - -/* --- TODO --- */ - -/* 2.0.2 style */ -.x-form-check-wrap { - line-height:18px; - height: auto; -} - -.ext-ie .x-form-check-wrap input { - width:15px; - height:15px; -} - -.x-form-check-wrap input{ - vertical-align: bottom; -} - -.x-editor .x-form-check-wrap { - padding:3px; -} - -.x-editor .x-form-checkbox { - height:13px; -} - -.x-form-check-group-label { - border-bottom: 1px solid; - margin-bottom: 5px; - padding-left: 3px !important; - float: none !important; -} - -/* wrapped fields and triggers */ -.x-form-field-wrap .x-form-trigger{ - width:17px; - height:21px; - border:0; - background:transparent no-repeat 0 0; - cursor:pointer; - border-bottom: 1px solid; - position:absolute; - top:0; -} - -.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{ - cursor:pointer; -} - -.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ - position:static; - top:auto; - vertical-align:top; -} - -.x-form-field-wrap { - position:relative; - left:0;top:0; - text-align: left; - zoom:1; - white-space: nowrap; -} - -.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-trigger { - right: 0; /* IE8 Strict mode trigger bug */ -} - -.x-form-field-wrap .x-form-trigger-over{ - background-position:-17px 0; -} - -.x-form-field-wrap .x-form-trigger-click{ - background-position:-34px 0; -} - -.x-trigger-wrap-focus .x-form-trigger{ - background-position:-51px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-over{ - background-position:-68px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-click{ - background-position:-85px 0; -} - -.x-trigger-wrap-focus .x-form-trigger{ - border-bottom: 1px solid; -} - -.x-item-disabled .x-form-trigger-over{ - background-position:0 0 !important; - border-bottom: 1px solid; -} - -.x-item-disabled .x-form-trigger-click{ - background-position:0 0 !important; - border-bottom: 1px solid; -} - -.x-trigger-noedit{ - cursor:pointer; -} - -/* field focus style */ -.x-form-focus, textarea.x-form-focus{ - border: 1px solid; -} - -/* invalid fields */ -.x-form-invalid, textarea.x-form-invalid{ - background:repeat-x bottom; - border: 1px solid; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid{ - background:repeat-x bottom; -} - -/* editors */ -.x-editor { - visibility:hidden; - padding:0; - margin:0; -} - -.x-form-grow-sizer { - left: -10000px; - padding: 8px 3px; - position: absolute; - visibility:hidden; - top: -10000px; - white-space: pre-wrap; - white-space: -moz-pre-wrap; - white-space: -pre-wrap; - white-space: -o-pre-wrap; - word-wrap: break-word; - zoom:1; -} - -.x-form-grow-sizer p { - margin:0 !important; - border:0 none !important; - padding:0 !important; -} - -/* Form Items CSS */ - -.x-form-item { - display:block; - margin-bottom:4px; - zoom:1; -} - -.x-form-item label.x-form-item-label { - display:block; - float:left; - width:100px; - padding:3px; - padding-left:0; - clear:left; - z-index:2; - position:relative; -} - -.x-form-element { - padding-left:105px; - position:relative; -} - -.x-form-invalid-msg { - padding:2px; - padding-left:18px; - background: transparent no-repeat 0 2px; - line-height:16px; - width:200px; -} - -.x-form-label-left label.x-form-item-label { - text-align:left; -} - -.x-form-label-right label.x-form-item-label { - text-align:right; -} - -.x-form-label-top .x-form-item label.x-form-item-label { - width:auto; - float:none; - clear:none; - display:inline; - margin-bottom:4px; - position:static; -} - -.x-form-label-top .x-form-element { - padding-left:0; - padding-top:4px; -} - -.x-form-label-top .x-form-item { - padding-bottom:4px; -} - -/* Editor small font for grid, toolbar and tree */ -.x-small-editor .x-form-text { - height:20px; - line-height:16px; - vertical-align:middle; -} - -.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { - margin-top:-1px !important; /* ie bogus margin bug */ - margin-bottom:-1px !important; - height:20px !important; /* ie quirks */ - line-height:16px !important; -} - -.ext-strict .x-small-editor .x-form-text { - height:16px !important; -} - -.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { - height:20px; - line-height:16px; -} - -.ext-border-box .x-small-editor .x-form-text { - height:20px; -} - -.x-small-editor .x-form-select-one { - height:20px; - line-height:16px; - vertical-align:middle; -} - -.x-small-editor .x-form-num-field { - text-align:right; -} - -.x-small-editor .x-form-field-wrap .x-form-trigger{ - height:19px; -} - -.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;} - -.ext-strict .ext-webkit .x-small-editor .x-form-text{ - height:14px !important; -} - -.x-form-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} -.x-form-clear-left { - clear:left; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - -.ext-ie6 .x-form-check-wrap input, .ext-border-box .x-form-check-wrap input{ - margin-top: 3px; -} - -.x-form-cb-label { - position: relative; - margin-left:4px; - top: 2px; -} - -.ext-ie .x-form-cb-label{ - top: 1px; -} - -.ext-ie6 .x-form-cb-label, .ext-border-box .x-form-cb-label{ - top: 3px; -} - -.x-form-display-field{ - padding-top: 2px; -} - -.ext-gecko .x-form-display-field, .ext-strict .ext-ie7 .x-form-display-field{ - padding-top: 1px; -} - -.ext-ie .x-form-display-field{ - padding-top: 3px; -} - -.ext-strict .ext-ie8 .x-form-display-field{ - padding-top: 0; -} - -.x-form-column { - float:left; - padding:0; - margin:0; - width:48%; - overflow:hidden; - zoom:1; -} - -/* buttons */ -.x-form .x-form-btns-ct .x-btn{ - float:right; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns td { - border:0; - padding:0; -} - -.x-form .x-form-btns-ct .x-form-btns-right table{ - float:right; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns-left table{ - float:left; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns-center{ - text-align:center; /*ie*/ -} - -.x-form .x-form-btns-ct .x-form-btns-center table{ - margin:0 auto; /*everyone else*/ -} - -.x-form .x-form-btns-ct table td.x-form-btn-td{ - padding:3px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ - background-position:0 -147px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ - background-position:0 -168px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ - background-position:0 -189px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-center{ - background-position:0 -126px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-right{ - background-position:0 -84px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-left{ - background-position:0 -63px; -} - -.x-form-invalid-icon { - width:16px; - height:18px; - visibility:hidden; - position:absolute; - left:0; - top:0; - display:block; - background:transparent no-repeat 0 2px; -} - -/* fieldsets */ -.x-fieldset { - border:1px solid; - padding:10px; - margin-bottom:10px; - display:block; /* preserve margins in IE */ -} - -/* make top of checkbox/tools visible in webkit */ -.ext-webkit .x-fieldset-header { - padding-top: 1px; -} - -.ext-ie .x-fieldset legend { - margin-bottom:10px; -} - -.ext-strict .ext-ie9 .x-fieldset legend.x-fieldset-header { - padding-top: 1px; -} - -.ext-ie .x-fieldset { - padding-top: 0; - padding-bottom:10px; -} - -.x-fieldset legend .x-tool-toggle { - margin-right:3px; - margin-left:0; - float:left !important; -} - -.x-fieldset legend input { - margin-right:3px; - float:left !important; - height:13px; - width:13px; -} - -fieldset.x-panel-collapsed { - padding-bottom:0 !important; - border-width: 1px 1px 0 1px !important; - border-left-color: transparent; - border-right-color: transparent; -} - -.ext-ie6 fieldset.x-panel-collapsed{ - padding-bottom:0 !important; - border-width: 1px 0 0 0 !important; - margin-left: 1px; - margin-right: 1px; -} - -fieldset.x-panel-collapsed .x-fieldset-bwrap { - visibility:hidden; - position:absolute; - left:-1000px; - top:-1000px; -} - -.ext-ie .x-fieldset-bwrap { - zoom:1; -} - -.x-fieldset-noborder { - border:0px none transparent; -} - -.x-fieldset-noborder legend { - margin-left:-3px; -} - -/* IE legend positioning bug */ -.ext-ie .x-fieldset-noborder legend { - position: relative; - margin-bottom:23px; -} -.ext-ie .x-fieldset-noborder legend span { - position: absolute; - left:16px; -} - -.ext-gecko .x-window-body .x-form-item { - -moz-outline: none; - outline: none; - overflow: auto; -} - -.ext-mac.ext-gecko .x-window-body .x-form-item { - overflow:hidden; -} - -.ext-gecko .x-form-item { - -moz-outline: none; - outline: none; -} - -.x-hide-label label.x-form-item-label { - display:none; -} - -.x-hide-label .x-form-element { - padding-left: 0 !important; -} - -.x-form-label-top .x-hide-label label.x-form-item-label{ - display: none; -} - -.x-fieldset { - overflow:hidden; -} - -.x-fieldset-bwrap { - overflow:hidden; - zoom:1; -} - -.x-fieldset-body { - overflow:hidden; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/grid.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/grid.css deleted file mode 100644 index 4a3401e63a2..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/grid.css +++ /dev/null @@ -1,588 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/* Grid3 styles */ -.x-grid3 { - position:relative; - overflow:hidden; -} - -.x-grid-panel .x-panel-body { - overflow:hidden !important; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border:1px solid; -} - -.x-grid3 table { - table-layout:fixed; -} - -.x-grid3-viewport{ - overflow:hidden; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - -moz-outline: none; - outline: none; - -moz-user-focus: normal; -} - -.x-grid3-row td, .x-grid3-summary-row td { - line-height:13px; - vertical-align: top; - padding-left:1px; - padding-right:1px; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-cell{ - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-hd-row td { - line-height:15px; - vertical-align:middle; - border-left:1px solid; - border-right:1px solid; -} - -.x-grid3-hd-row .x-grid3-marker-hd { - padding:3px; -} - -.x-grid3-row .x-grid3-marker { - padding:3px; -} - -.x-grid3-cell-inner, .x-grid3-hd-inner{ - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - padding:3px 3px 3px 5px; - white-space: nowrap; -} - -/* ActionColumn, reduce padding to accommodate 16x16 icons in normal row height */ -.x-action-col-cell .x-grid3-cell-inner { - padding-top: 1px; - padding-bottom: 1px; -} - -.x-action-col-icon { - cursor: pointer; -} - -.x-grid3-hd-inner { - position:relative; - cursor:inherit; - padding:4px 3px 4px 5px; -} - -.x-grid3-row-body { - white-space:normal; -} - -.x-grid3-body-cell { - -moz-outline:0 none; - outline:0 none; -} - -/* IE Quirks to clip */ -.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ - width:100%; -} - -/* reverse above in strict mode */ -.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ - width:auto; -} - -.x-grid-row-loading { - background: no-repeat center center; -} - -.x-grid-page { - overflow:hidden; -} - -.x-grid3-row { - cursor: default; - border: 1px solid; - width:100%; -} - -.x-grid3-row-over { - border:1px solid; - background: repeat-x left top; -} - -.x-grid3-resize-proxy { - width:1px; - left:0; - cursor: e-resize; - cursor: col-resize; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} - -.x-grid3-resize-marker { - width:1px; - left:0; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} - -.x-grid3-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: text; - -khtml-user-select: text; - -webkit-user-select:ignore; -} - -/* header styles */ -.x-grid3-header{ - background: repeat-x 0 bottom; - cursor:default; - zoom:1; - padding:1px 0 0 0; -} - -.x-grid3-header-pop { - border-left:1px solid; - float:right; - clear:none; -} - -.x-grid3-header-pop-inner { - border-left:1px solid; - width:14px; - height:19px; - background: transparent no-repeat center center; -} - -.ext-ie .x-grid3-header-pop-inner { - width:15px; -} - -.ext-strict .x-grid3-header-pop-inner { - width:14px; -} - -.x-grid3-header-inner { - overflow:hidden; - zoom:1; - float:left; -} - -.x-grid3-header-offset { - padding-left:1px; - text-align: left; -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left:1px solid; - border-right:1px solid; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background: repeat-x left bottom; - -} - -.x-grid3-sort-icon{ - background-repeat: no-repeat; - display: none; - height: 4px; - width: 13px; - margin-left:3px; - vertical-align: middle; -} - -.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon { - display: inline; -} - -/* Header position fixes for IE strict mode */ -.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd { - position:relative; -} - -.ext-strict .ext-ie6 .x-grid3-hd-inner{ - position:static; -} - -/* Body Styles */ -.x-grid3-body { - zoom:1; -} - -.x-grid3-scroller { - overflow:auto; - zoom:1; - position:relative; -} - -.x-grid3-cell-text, .x-grid3-hd-text { - display: block; - padding: 3px 5px 3px 5px; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select:ignore; -} - -.x-grid3-split { - background-position: center; - background-repeat: no-repeat; - cursor: e-resize; - cursor: col-resize; - display: block; - font-size: 1px; - height: 16px; - overflow: hidden; - position: absolute; - top: 2px; - width: 6px; - z-index: 3; -} - -/* Column Reorder DD */ -.x-dd-drag-proxy .x-grid3-hd-inner{ - background: repeat-x left bottom; - width:120px; - padding:3px; - border:1px solid; - overflow:hidden; -} - -.col-move-top, .col-move-bottom{ - width:9px; - height:9px; - position:absolute; - top:0; - line-height:1px; - font-size:1px; - overflow:hidden; - visibility:hidden; - z-index:20000; - background:transparent no-repeat left top; -} - -/* Selection Styles */ -.x-grid3-row-selected { - border:1px dotted; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background: repeat-x 0 bottom !important; - vertical-align:middle !important; - padding:0; - border-top:1px solid; - border-bottom:none !important; - border-right:1px solid !important; - text-align:center; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - padding:0 4px; - text-align:center; -} - -/* dirty cells */ -.x-grid3-dirty-cell { - background: transparent no-repeat 0 0; -} - -/* Grid Toolbars */ -.x-grid3-topbar, .x-grid3-bottombar{ - overflow:hidden; - display:none; - zoom:1; - position:relative; -} - -.x-grid3-topbar .x-toolbar{ - border-right:0 none; -} - -.x-grid3-bottombar .x-toolbar{ - border-right:0 none; - border-bottom:0 none; - border-top:1px solid; -} - -/* Props Grid Styles */ -.x-props-grid .x-grid3-cell{ - padding:1px; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background:transparent repeat-y -16px !important; - padding-left:12px; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - padding:1px; - padding-right:0; - border:0 none; - border-right:1px solid; -} - -/* dd */ -.x-grid3-col-dd { - border:0 none; - padding:0; - background-color:transparent; -} - -.x-dd-drag-ghost .x-grid3-dd-wrap { - padding:1px 3px 3px 1px; -} - -.x-grid3-hd { - -moz-user-select:none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-hd-btn { - display:none; - position:absolute; - width:14px; - background:no-repeat left center; - right:0; - top:0; - z-index:2; - cursor:pointer; -} - -.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { - display:block; -} - -a.x-grid3-hd-btn:hover { - background-position:-14px center; -} - -/* Expanders */ -.x-grid3-body .x-grid3-td-expander { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-expander { - width:100%; - height:18px; - background-position:4px 2px; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-row-collapsed .x-grid3-row-expander { - background-position:4px 2px; -} - -.x-grid3-row-expanded .x-grid3-row-expander { - background-position:-21px 2px; -} - -.x-grid3-row-collapsed .x-grid3-row-body { - display:none !important; -} - -.x-grid3-row-expanded .x-grid3-row-body { - display:block !important; -} - -/* Checkers */ -.x-grid3-body .x-grid3-td-checker { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - width:100%; - height:18px; - background-position:2px 2px; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-row .x-grid3-row-checker { - background-position:2px 2px; -} - -.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker { - background-position:-23px 2px; -} - -.x-grid3-hd-checker { - background-position:2px 1px; -} - -.ext-border-box .x-grid3-hd-checker { - background-position:2px 3px; -} - -.x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 1px; -} - -.ext-border-box .x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 3px; -} - -/* Numberer */ -.x-grid3-body .x-grid3-td-numberer { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - padding:3px 5px 0 0 !important; - text-align:right; -} - -/* Row Icon */ - -.x-grid3-body .x-grid3-td-row-icon { - background:transparent repeat-y right; - vertical-align:top; - text-align:center; -} - -.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { - padding:0 !important; - background-position:center center; - background-repeat:no-repeat; - width:16px; - height:16px; - margin-left:2px; - margin-top:3px; -} - -/* All specials */ -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { - padding: 1px 0 0 0 !important; -} - -.x-grid3-check-col { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-check-col-on { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; -} - -/* Grouping classes */ -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom: 2px solid; - cursor:pointer; - padding-top:6px; -} - -.x-grid-group-hd div.x-grid-group-title { - background:transparent no-repeat 3px 3px; - padding:4px 4px 4px 17px; -} - -.x-grid-group-collapsed .x-grid-group-body { - display:none; -} - -.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text { - position:relative; - top:-1px; -} - -.ext-ie .x-props-grid .x-editor .x-form-text { - position:static; - top:0; -} - -.x-grid-empty { - padding:10px; -} - -/* fix floating toolbar issue */ -.ext-ie7 .x-grid-panel .x-panel-bbar { - position:relative; -} - - -/* Reset position to static when Grid Panel has been framed */ -/* to resolve 'snapping' from top to bottom behavior. */ -/* @forumThread 86656 */ -.ext-ie7 .x-grid-panel .x-panel-mc .x-panel-bbar { - position: static; -} - -.ext-ie6 .x-grid3-header { - position: relative; -} - -/* Fix WebKit bug in Grids */ -.ext-webkit .x-grid-panel .x-panel-bwrap{ - -webkit-user-select:none; -} -.ext-webkit .x-tbar-page-number{ - -webkit-user-select:ignore; -} -/* end*/ - -/* column lines */ -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - padding-right:0; - border-right:1px solid; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/layout.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/layout.css deleted file mode 100644 index 89c2601b615..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/layout.css +++ /dev/null @@ -1,296 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-border-layout-ct { - position: relative; -} - -.x-border-panel { - position:absolute; - left:0; - top:0; -} - -.x-tool-collapse-south { - background-position:0 -195px; -} - -.x-tool-collapse-south-over { - background-position:-15px -195px; -} - -.x-tool-collapse-north { - background-position:0 -210px; -} - -.x-tool-collapse-north-over { - background-position:-15px -210px; -} - -.x-tool-collapse-west { - background-position:0 -180px; -} - -.x-tool-collapse-west-over { - background-position:-15px -180px; -} - -.x-tool-collapse-east { - background-position:0 -165px; -} - -.x-tool-collapse-east-over { - background-position:-15px -165px; -} - -.x-tool-expand-south { - background-position:0 -210px; -} - -.x-tool-expand-south-over { - background-position:-15px -210px; -} - -.x-tool-expand-north { - background-position:0 -195px; -} -.x-tool-expand-north-over { - background-position:-15px -195px; -} - -.x-tool-expand-west { - background-position:0 -165px; -} - -.x-tool-expand-west-over { - background-position:-15px -165px; -} - -.x-tool-expand-east { - background-position:0 -180px; -} - -.x-tool-expand-east-over { - background-position:-15px -180px; -} - -.x-tool-expand-north, .x-tool-expand-south { - float:right; - margin:3px; -} - -.x-tool-expand-east, .x-tool-expand-west { - float:none; - margin:3px 2px; -} - -.x-accordion-hd .x-tool-toggle { - background-position:0 -255px; -} - -.x-accordion-hd .x-tool-toggle-over { - background-position:-15px -255px; -} - -.x-panel-collapsed .x-accordion-hd .x-tool-toggle { - background-position:0 -240px; -} - -.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over { - background-position:-15px -240px; -} - -.x-accordion-hd { - padding-top:4px; - padding-bottom:3px; - border-top:0 none; - background: transparent repeat-x 0 -9px; -} - -.x-layout-collapsed{ - position:absolute; - left:-10000px; - top:-10000px; - visibility:hidden; - width:20px; - height:20px; - overflow:hidden; - border:1px solid; - z-index:20; -} - -.ext-border-box .x-layout-collapsed{ - width:22px; - height:22px; -} - -.x-layout-collapsed-over{ - cursor:pointer; -} - -.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{ - position:absolute; - top:0; - left:0; - width:20px; - height:20px; -} - - -.x-layout-split{ - position:absolute; - height:5px; - width:5px; - line-height:1px; - font-size:1px; - z-index:3; - background-color:transparent; -} - -/* IE6 strict won't drag w/out a color */ -.ext-strict .ext-ie6 .x-layout-split{ - background-color: #fff !important; - filter: alpha(opacity=1); -} - -.x-layout-split-h{ - background-image:url(../images/default/s.gif); - background-position: left; -} - -.x-layout-split-v{ - background-image:url(../images/default/s.gif); - background-position: top; -} - -.x-column-layout-ct { - overflow:hidden; - zoom:1; -} - -.x-column { - float:left; - padding:0; - margin:0; - overflow:hidden; - zoom:1; -} - -.x-column-inner { - overflow:hidden; - zoom:1; -} - -/* mini mode */ -.x-layout-mini { - position:absolute; - top:0; - left:0; - display:block; - width:5px; - height:35px; - cursor:pointer; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); -} - -.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{ - opacity:1; - -moz-opacity:1; - filter:none; -} - -.x-layout-split-west .x-layout-mini { - top:48%; -} - -.x-layout-split-east .x-layout-mini { - top:48%; -} - -.x-layout-split-north .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-split-south .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-west .x-layout-mini { - top:48%; -} - -.x-layout-cmini-east .x-layout-mini { - top:48%; -} - -.x-layout-cmini-north .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-south .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-west, .x-layout-cmini-east { - border:0 none; - width:5px !important; - padding:0; - background-color:transparent; -} - -.x-layout-cmini-north, .x-layout-cmini-south { - border:0 none; - height:5px !important; - padding:0; - background-color:transparent; -} - -.x-viewport, .x-viewport body { - margin: 0; - padding: 0; - border: 0 none; - overflow: hidden; - height: 100%; -} - -.x-abs-layout-item { - position:absolute; - left:0; - top:0; -} - -.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { - margin:0; -} - -.x-box-layout-ct { - overflow:hidden; - zoom:1; -} - -.x-box-inner { - overflow:hidden; - zoom:1; - position:relative; - left:0; - top:0; -} - -.x-box-item { - position:absolute; - left:0; - top:0; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/list-view.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/list-view.css deleted file mode 100644 index 1b166d59138..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/list-view.css +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-list-header{ - background: repeat-x 0 bottom; - cursor:default; - zoom:1; - height:22px; -} - -.x-list-header-inner div { - display:block; - float:left; - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; -} - -.x-list-header-inner div em { - display:block; - border-left:1px solid; - padding:4px 4px; - overflow:hidden; - -moz-user-select: none; - -khtml-user-select: none; - line-height:14px; -} - -.x-list-body { - overflow:auto; - overflow-x:hidden; - overflow-y:auto; - zoom:1; - float: left; - width: 100%; -} - -.x-list-body dl { - zoom:1; -} - -.x-list-body dt { - display:block; - float:left; - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; - cursor:pointer; - zoom:1; -} - -.x-list-body dt em { - display:block; - padding:3px 4px; - overflow:hidden; - -moz-user-select: none; - -khtml-user-select: none; -} - -.x-list-resizer { - border-left:1px solid; - border-right:1px solid; - position:absolute; - left:0; - top:0; -} - -.x-list-header-inner em.sort-asc { - background: transparent no-repeat center 0; - border-style:solid; - border-width: 0 1px 1px; - padding-bottom:3px; -} - -.x-list-header-inner em.sort-desc { - background: transparent no-repeat center -23px; - border-style:solid; - border-width: 0 1px 1px; - padding-bottom:3px; -} - diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/menu.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/menu.css deleted file mode 100644 index a9565b27605..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/menu.css +++ /dev/null @@ -1,245 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-menu { - z-index: 15000; - zoom: 1; - background: repeat-y; -} - -.x-menu-floating{ - border: 1px solid; -} - -.x-menu a { - text-decoration: none !important; -} - -.ext-ie .x-menu { - zoom:1; - overflow:hidden; -} - -.x-menu-list{ - padding: 2px; - background-color:transparent; - border:0 none; - overflow:hidden; - overflow-y: hidden; -} - -.ext-strict .ext-ie .x-menu-list{ - position: relative; -} - -.x-menu li{ - line-height:100%; -} - -.x-menu li.x-menu-sep-li{ - font-size:1px; - line-height:1px; -} - -.x-menu-list-item{ - white-space: nowrap; - display:block; - padding:1px; -} - -.x-menu-item{ - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-menu-item-arrow{ - background:transparent no-repeat right; -} - -.x-menu-sep { - display:block; - font-size:1px; - line-height:1px; - margin: 2px 3px; - border-bottom:1px solid; - overflow:hidden; -} - -.x-menu-focus { - position:absolute; - left:-1px; - top:-1px; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; - overflow:hidden; - display:block; -} - -a.x-menu-item { - cursor: pointer; - display: block; - line-height: 16px; - outline-color: -moz-use-text-color; - outline-style: none; - outline-width: 0; - padding: 3px 21px 3px 27px; - position: relative; - text-decoration: none; - white-space: nowrap; -} - -.x-menu-item-active { - background-repeat: repeat-x; - background-position: left bottom; - border-style:solid; - border-width: 1px 0; - margin:0 1px; - padding: 0; -} - -.x-menu-item-active a.x-menu-item { - border-style:solid; - border-width:0 1px; - margin:0 -1px; -} - -.x-menu-item-icon { - border: 0 none; - height: 16px; - padding: 0; - vertical-align: top; - width: 16px; - position: absolute; - left: 3px; - top: 3px; - margin: 0; - background-position:center; -} - -.ext-ie .x-menu-item-icon { - left: -24px; -} -.ext-strict .x-menu-item-icon { - left: 3px; -} - -.ext-ie6 .x-menu-item-icon { - left: -24px; -} - -.ext-ie .x-menu-item-icon { - vertical-align: middle; -} - -.x-menu-check-item .x-menu-item-icon{ - background: transparent no-repeat center; -} - -.x-menu-group-item .x-menu-item-icon{ - background-color: transparent; -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background: transparent no-repeat center; -} - -.x-date-menu .x-menu-list{ - padding: 0; -} - -.x-menu-date-item{ - padding:0; -} - -.x-menu .x-color-palette, .x-menu .x-date-picker{ - margin-left: 26px; - margin-right:4px; -} - -.x-menu .x-date-picker{ - border:1px solid; - margin-top:2px; - margin-bottom:2px; -} - -.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ - margin: 0; - border: 0 none; -} - -.x-date-menu { - padding:0 !important; -} - -/* - * fixes separator visibility problem in IE 6 - */ -.ext-strict .ext-ie6 .x-menu-sep-li { - padding: 3px 4px; -} -.ext-strict .ext-ie6 .x-menu-sep { - margin: 0; - height: 1px; -} - -/* - * Fixes an issue with "fat" separators in webkit - */ -.ext-webkit .x-menu-sep{ - height: 1px; -} - -/* - * Ugly mess to remove the white border under the picker - */ -.ext-ie .x-date-menu{ - height: 199px; -} - -.ext-strict .ext-ie .x-date-menu, .ext-border-box .ext-ie8 .x-date-menu{ - height: 197px; -} - -.ext-strict .ext-ie7 .x-date-menu{ - height: 195px; -} - -.ext-strict .ext-ie8 .x-date-menu{ - height: auto; -} - -.x-cycle-menu .x-menu-item-checked { - border:1px dotted !important; - padding:0; -} - -.x-menu .x-menu-scroller { - width: 100%; - background-repeat:no-repeat; - background-position:center; - height:8px; - line-height: 8px; - cursor:pointer; - margin: 0; - padding: 0; -} - -.x-menu .x-menu-scroller-active{ - height: 6px; - line-height: 6px; -} - -.x-menu-list-item-indent{ - padding-left: 27px; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/panel-reset.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/panel-reset.css deleted file mode 100644 index 42fe6458276..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/panel-reset.css +++ /dev/null @@ -1,130 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/** - * W3C Suggested Default style sheet for HTML 4 - * http://www.w3.org/TR/CSS21/sample.html - * - * Resets for Ext.Panel @cfg normal: true - */ -.x-panel-reset .x-panel-body html, -.x-panel-reset .x-panel-body address, -.x-panel-reset .x-panel-body blockquote, -.x-panel-reset .x-panel-body body, -.x-panel-reset .x-panel-body dd, -.x-panel-reset .x-panel-body div, -.x-panel-reset .x-panel-body dl, -.x-panel-reset .x-panel-body dt, -.x-panel-reset .x-panel-body fieldset, -.x-panel-reset .x-panel-body form, -.x-panel-reset .x-panel-body frame, frameset, -.x-panel-reset .x-panel-body h1, -.x-panel-reset .x-panel-body h2, -.x-panel-reset .x-panel-body h3, -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body h5, -.x-panel-reset .x-panel-body h6, -.x-panel-reset .x-panel-body noframes, -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body p, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body center, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body hr, -.x-panel-reset .x-panel-body menu, -.x-panel-reset .x-panel-body pre { display: block } -.x-panel-reset .x-panel-body li { display: list-item } -.x-panel-reset .x-panel-body head { display: none } -.x-panel-reset .x-panel-body table { display: table } -.x-panel-reset .x-panel-body tr { display: table-row } -.x-panel-reset .x-panel-body thead { display: table-header-group } -.x-panel-reset .x-panel-body tbody { display: table-row-group } -.x-panel-reset .x-panel-body tfoot { display: table-footer-group } -.x-panel-reset .x-panel-body col { display: table-column } -.x-panel-reset .x-panel-body colgroup { display: table-column-group } -.x-panel-reset .x-panel-body td, -.x-panel-reset .x-panel-body th { display: table-cell } -.x-panel-reset .x-panel-body caption { display: table-caption } -.x-panel-reset .x-panel-body th { font-weight: bolder; text-align: center } -.x-panel-reset .x-panel-body caption { text-align: center } -.x-panel-reset .x-panel-body body { margin: 8px } -.x-panel-reset .x-panel-body h1 { font-size: 2em; margin: .67em 0 } -.x-panel-reset .x-panel-body h2 { font-size: 1.5em; margin: .75em 0 } -.x-panel-reset .x-panel-body h3 { font-size: 1.17em; margin: .83em 0 } -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body p, -.x-panel-reset .x-panel-body blockquote, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body fieldset, -.x-panel-reset .x-panel-body form, -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body dl, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body menu { margin: 1.12em 0 } -.x-panel-reset .x-panel-body h5 { font-size: .83em; margin: 1.5em 0 } -.x-panel-reset .x-panel-body h6 { font-size: .75em; margin: 1.67em 0 } -.x-panel-reset .x-panel-body h1, -.x-panel-reset .x-panel-body h2, -.x-panel-reset .x-panel-body h3, -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body h5, -.x-panel-reset .x-panel-body h6, -.x-panel-reset .x-panel-body b, -.x-panel-reset .x-panel-body strong { font-weight: bolder } -.x-panel-reset .x-panel-body blockquote { margin-left: 40px; margin-right: 40px } -.x-panel-reset .x-panel-body i, -.x-panel-reset .x-panel-body cite, -.x-panel-reset .x-panel-body em, -.x-panel-reset .x-panel-body var, -.x-panel-reset .x-panel-body address { font-style: italic } -.x-panel-reset .x-panel-body pre, -.x-panel-reset .x-panel-body tt, -.x-panel-reset .x-panel-body code, -.x-panel-reset .x-panel-body kbd, -.x-panel-reset .x-panel-body samp { font-family: monospace } -.x-panel-reset .x-panel-body pre { white-space: pre } -.x-panel-reset .x-panel-body button, -.x-panel-reset .x-panel-body textarea, -.x-panel-reset .x-panel-body input, -.x-panel-reset .x-panel-body select { display: inline-block } -.x-panel-reset .x-panel-body big { font-size: 1.17em } -.x-panel-reset .x-panel-body small, -.x-panel-reset .x-panel-body sub, -.x-panel-reset .x-panel-body sup { font-size: .83em } -.x-panel-reset .x-panel-body sub { vertical-align: sub } -.x-panel-reset .x-panel-body sup { vertical-align: super } -.x-panel-reset .x-panel-body table { border-spacing: 2px; } -.x-panel-reset .x-panel-body thead, -.x-panel-reset .x-panel-body tbody, -.x-panel-reset .x-panel-body tfoot { vertical-align: middle } -.x-panel-reset .x-panel-body td, -.x-panel-reset .x-panel-body th { vertical-align: inherit } -.x-panel-reset .x-panel-body s, -.x-panel-reset .x-panel-body strike, -.x-panel-reset .x-panel-body del { text-decoration: line-through } -.x-panel-reset .x-panel-body hr { border: 1px inset } -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body menu, -.x-panel-reset .x-panel-body dd { margin-left: 40px } -.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;} -.x-panel-reset .x-panel-body ol { list-style-type: decimal } -.x-panel-reset .x-panel-body ol ul, -.x-panel-reset .x-panel-body ul ol, -.x-panel-reset .x-panel-body ul ul, -.x-panel-reset .x-panel-body ol ol { margin-top: 0; margin-bottom: 0 } -.x-panel-reset .x-panel-body u, -.x-panel-reset .x-panel-body ins { text-decoration: underline } -.x-panel-reset .x-panel-body br:before { content: "\A" } -.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line } -.x-panel-reset .x-panel-body center { text-align: center } -.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline } -.x-panel-reset .x-panel-body :focus { outline: invert dotted thin } - -/* Begin bidirectionality settings (do not change) */ -.x-panel-reset .x-panel-body BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } -.x-panel-reset .x-panel-body BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/panel.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/panel.css deleted file mode 100644 index 204b78777ea..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/panel.css +++ /dev/null @@ -1,493 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-panel { - border-style: solid; - border-width:0; -} - -.x-panel-header { - overflow:hidden; - zoom:1; - padding:5px 3px 4px 5px; - border:1px solid; - line-height: 15px; - background: transparent repeat-x 0 -1px; -} - -.x-panel-body { - border:1px solid; - border-top:0 none; - overflow:hidden; - position: relative; /* added for item scroll positioning */ -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top:1px solid; - border-bottom: 0 none; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top:1px solid; -} - -.x-panel-header { - overflow:hidden; - zoom:1; -} - -.x-panel-tl .x-panel-header { - padding:5px 0 4px 0; - border:0 none; - background:transparent no-repeat; -} - -.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { - padding-left:20px !important; - background-repeat:no-repeat; - background-position:0 4px; - zoom:1; -} - -.x-panel-inline-icon { - width:16px; - height:16px; - background-repeat:no-repeat; - background-position:0 0; - vertical-align:middle; - margin-right:4px; - margin-top:-1px; - margin-bottom:-1px; -} - -.x-panel-tc { - background: transparent repeat-x 0 0; - overflow:hidden; -} - -/* fix ie7 strict mode bug */ -.ext-strict .ext-ie7 .x-panel-tc { - overflow: visible; -} - -.x-panel-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - zoom:1; - border-bottom:1px solid; -} - -.x-panel-tr { - background: transparent no-repeat right 0; - zoom:1; - padding-right:6px; -} - -.x-panel-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-panel-bc .x-panel-footer { - zoom:1; -} - -.x-panel-bl { - background: transparent no-repeat 0 bottom; - padding-left:6px; - zoom:1; -} - -.x-panel-br { - background: transparent no-repeat right bottom; - padding-right:6px; - zoom:1; -} - -.x-panel-mc { - border:0 none; - padding:0; - margin:0; - padding-top:6px; -} - -.x-panel-mc .x-panel-body { - background-color:transparent; - border: 0 none; -} - -.x-panel-ml { - background: repeat-y 0 0; - padding-left:6px; - zoom:1; -} - -.x-panel-mr { - background: transparent repeat-y right 0; - padding-right:6px; - zoom:1; -} - -.x-panel-bc .x-panel-footer { - padding-bottom:6px; -} - -.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc { - height:6px; - font-size:0; - line-height:0; -} - -.x-panel-bwrap { - overflow:hidden; - zoom:1; - left:0; - top:0; -} -.x-panel-body { - overflow:hidden; - zoom:1; -} - -.x-panel-collapsed .x-resizable-handle{ - display:none; -} - -.ext-gecko .x-panel-animated div { - overflow:hidden !important; -} - -/* Plain */ -.x-plain-body { - overflow:hidden; -} - -.x-plain-bbar .x-toolbar { - overflow:hidden; - padding:2px; -} - -.x-plain-tbar .x-toolbar { - overflow:hidden; - padding:2px; -} - -.x-plain-bwrap { - overflow:hidden; - zoom:1; -} - -.x-plain { - overflow:hidden; -} - -/* Tools */ -.x-tool { - overflow:hidden; - width:15px; - height:15px; - float:right; - cursor:pointer; - background:transparent no-repeat; - margin-left:2px; -} - -/* expand / collapse tools */ -.x-tool-toggle { - background-position:0 -60px; -} - -.x-tool-toggle-over { - background-position:-15px -60px; -} - -.x-panel-collapsed .x-tool-toggle { - background-position:0 -75px; -} - -.x-panel-collapsed .x-tool-toggle-over { - background-position:-15px -75px; -} - - -.x-tool-close { - background-position:0 -0; -} - -.x-tool-close-over { - background-position:-15px 0; -} - -.x-tool-minimize { - background-position:0 -15px; -} - -.x-tool-minimize-over { - background-position:-15px -15px; -} - -.x-tool-maximize { - background-position:0 -30px; -} - -.x-tool-maximize-over { - background-position:-15px -30px; -} - -.x-tool-restore { - background-position:0 -45px; -} - -.x-tool-restore-over { - background-position:-15px -45px; -} - -.x-tool-gear { - background-position:0 -90px; -} - -.x-tool-gear-over { - background-position:-15px -90px; -} - -.x-tool-prev { - background-position:0 -105px; -} - -.x-tool-prev-over { - background-position:-15px -105px; -} - -.x-tool-next { - background-position:0 -120px; -} - -.x-tool-next-over { - background-position:-15px -120px; -} - -.x-tool-pin { - background-position:0 -135px; -} - -.x-tool-pin-over { - background-position:-15px -135px; -} - -.x-tool-unpin { - background-position:0 -150px; -} - -.x-tool-unpin-over { - background-position:-15px -150px; -} - -.x-tool-right { - background-position:0 -165px; -} - -.x-tool-right-over { - background-position:-15px -165px; -} - -.x-tool-left { - background-position:0 -180px; -} - -.x-tool-left-over { - background-position:-15px -180px; -} - -.x-tool-down { - background-position:0 -195px; -} - -.x-tool-down-over { - background-position:-15px -195px; -} - -.x-tool-up { - background-position:0 -210px; -} - -.x-tool-up-over { - background-position:-15px -210px; -} - -.x-tool-refresh { - background-position:0 -225px; -} - -.x-tool-refresh-over { - background-position:-15px -225px; -} - -.x-tool-plus { - background-position:0 -240px; -} - -.x-tool-plus-over { - background-position:-15px -240px; -} - -.x-tool-minus { - background-position:0 -255px; -} - -.x-tool-minus-over { - background-position:-15px -255px; -} - -.x-tool-search { - background-position:0 -270px; -} - -.x-tool-search-over { - background-position:-15px -270px; -} - -.x-tool-save { - background-position:0 -285px; -} - -.x-tool-save-over { - background-position:-15px -285px; -} - -.x-tool-help { - background-position:0 -300px; -} - -.x-tool-help-over { - background-position:-15px -300px; -} - -.x-tool-print { - background-position:0 -315px; -} - -.x-tool-print-over { - background-position:-15px -315px; -} - -.x-tool-expand { - background-position:0 -330px; -} - -.x-tool-expand-over { - background-position:-15px -330px; -} - -.x-tool-collapse { - background-position:0 -345px; -} - -.x-tool-collapse-over { - background-position:-15px -345px; -} - -.x-tool-resize { - background-position:0 -360px; -} - -.x-tool-resize-over { - background-position:-15px -360px; -} - -.x-tool-move { - background-position:0 -375px; -} - -.x-tool-move-over { - background-position:-15px -375px; -} - -/* Ghosting */ -.x-panel-ghost { - z-index:12000; - overflow:hidden; - position:absolute; - left:0;top:0; - opacity:.65; - -moz-opacity:.65; - filter:alpha(opacity=65); -} - -.x-panel-ghost ul { - margin:0; - padding:0; - overflow:hidden; - font-size:0; - line-height:0; - border:1px solid; - border-top:0 none; - display:block; -} - -.x-panel-ghost * { - cursor:move !important; -} - -.x-panel-dd-spacer { - border:2px dashed; -} - -/* Buttons */ -.x-panel-btns { - padding:5px; - overflow:hidden; -} - -.x-panel-btns td.x-toolbar-cell{ - padding:3px; -} - -.x-panel-btns .x-btn-focus .x-btn-left{ - background-position:0 -147px; -} - -.x-panel-btns .x-btn-focus .x-btn-right{ - background-position:0 -168px; -} - -.x-panel-btns .x-btn-focus .x-btn-center{ - background-position:0 -189px; -} - -.x-panel-btns .x-btn-over .x-btn-left{ - background-position:0 -63px; -} - -.x-panel-btns .x-btn-over .x-btn-right{ - background-position:0 -84px; -} - -.x-panel-btns .x-btn-over .x-btn-center{ - background-position:0 -105px; -} - -.x-panel-btns .x-btn-click .x-btn-center{ - background-position:0 -126px; -} - -.x-panel-btns .x-btn-click .x-btn-right{ - background-position:0 -84px; -} - -.x-panel-btns .x-btn-click .x-btn-left{ - background-position:0 -63px; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - white-space: nowrap; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/pivotgrid.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/pivotgrid.css deleted file mode 100644 index d526d7205e2..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/pivotgrid.css +++ /dev/null @@ -1,65 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-pivotgrid .x-grid3-header-offset table { - width: 100%; - border-collapse: collapse; -} - -.x-pivotgrid .x-grid3-header-offset table td { - padding: 4px 3px 4px 5px; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-size: 11px; - line-height: 13px; - font-family: tahoma; -} - -.x-pivotgrid .x-grid3-row-headers { - display: block; - float: left; -} - -.x-pivotgrid .x-grid3-row-headers table { - height: 100%; - width: 100%; - border-collapse: collapse; -} - -.x-pivotgrid .x-grid3-row-headers table td { - height: 18px; - padding: 2px 7px 0 0; - text-align: right; - text-overflow: ellipsis; - font-size: 11px; - font-family: tahoma; -} - -.ext-gecko .x-pivotgrid .x-grid3-row-headers table td { - height: 21px; -} - -.x-grid3-header-title { - top: 0%; - left: 0%; - position: absolute; - text-align: center; - vertical-align: middle; - font-family: tahoma; - font-size: 11px; - padding: auto 1px; - display: table-cell; -} - -.x-grid3-header-title span { - position: absolute; - top: 50%; - left: 0%; - width: 100%; - margin-top: -6px; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/progress.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/progress.css deleted file mode 100644 index 906ddfcd6ce..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/progress.css +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-progress-wrap { - border:1px solid; - overflow:hidden; -} - -.x-progress-inner { - height:18px; - background:repeat-x; - position:relative; -} - -.x-progress-bar { - height:18px; - float:left; - width:0; - background: repeat-x left center; - border-top:1px solid; - border-bottom:1px solid; - border-right:1px solid; -} - -.x-progress-text { - padding:1px 5px; - overflow:hidden; - position:absolute; - left:0; - text-align:center; -} - -.x-progress-text-back { - line-height:16px; -} - -.ext-ie .x-progress-text-back { - line-height:15px; -} - -.ext-strict .ext-ie7 .x-progress-text-back{ - width: 100%; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/qtips.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/qtips.css deleted file mode 100644 index bcc7d3bf0de..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/qtips.css +++ /dev/null @@ -1,153 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tip{ - position: absolute; - top: 0; - left:0; - visibility: hidden; - z-index: 20002; - border:0 none; -} - -.x-tip .x-tip-close{ - height: 15px; - float:right; - width: 15px; - margin:0 0 2px 2px; - cursor:pointer; - display:none; -} - -.x-tip .x-tip-tc { - background: transparent no-repeat 0 -62px; - padding-top:3px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-tr { - background: transparent no-repeat right 0; - padding-right:6px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-bc { - background: transparent no-repeat 0 -121px; - height:3px; - overflow:hidden; -} - -.x-tip .x-tip-bl { - background: transparent no-repeat 0 -59px; - padding-left:6px; - zoom:1; -} - -.x-tip .x-tip-br { - background: transparent no-repeat right -59px; - padding-right:6px; - zoom:1; -} - -.x-tip .x-tip-mc { - border:0 none; -} - -.x-tip .x-tip-ml { - background: no-repeat 0 -124px; - padding-left:6px; - zoom:1; -} - -.x-tip .x-tip-mr { - background: transparent no-repeat right -124px; - padding-right:6px; - zoom:1; -} - -.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { - font-size:0; - line-height:0; -} - -.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{ - line-height: 1px; -} - -.x-tip .x-tip-header-text { - padding:0; - margin:0 0 2px 0; -} - -.x-tip .x-tip-body { - margin:0 !important; - line-height:14px; - padding:0; -} - -.x-tip .x-tip-body .loading-indicator { - margin:0; -} - -.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { - cursor:move; -} - -.x-form-invalid-tip .x-tip-tc { - background: repeat-x 0 -12px; - padding-top:6px; -} - -.x-form-invalid-tip .x-tip-bc { - background: repeat-x 0 -18px; - height:6px; -} - -.x-form-invalid-tip .x-tip-bl { - background: no-repeat 0 -6px; -} - -.x-form-invalid-tip .x-tip-br { - background: no-repeat right -6px; -} - -.x-form-invalid-tip .x-tip-body { - padding:2px; -} - -.x-form-invalid-tip .x-tip-body { - padding-left:24px; - background:transparent no-repeat 2px 2px; -} - -.x-tip-anchor { - position: absolute; - width: 9px; - height: 10px; - overflow:hidden; - background: transparent no-repeat 0 0; - zoom:1; -} -.x-tip-anchor-bottom { - background-position: -9px 0; -} -.x-tip-anchor-right { - background-position: -18px 0; - width: 10px; -} -.x-tip-anchor-left { - background-position: -28px 0; - width: 10px; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/reset.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/reset.css deleted file mode 100644 index 763a46a35ad..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/reset.css +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} - -.ext-forced-border-box, .ext-forced-border-box * { - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - -webkit-box-sizing: border-box; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/resizable.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/resizable.css deleted file mode 100644 index ed3b5e5d5d5..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/resizable.css +++ /dev/null @@ -1,149 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-resizable-handle { - position:absolute; - z-index:100; - /* ie needs these */ - font-size:1px; - line-height:6px; - overflow:hidden; - filter:alpha(opacity=0); - opacity:0; - zoom:1; -} - -.x-resizable-handle-east{ - width:6px; - cursor:e-resize; - right:0; - top:0; - height:100%; -} - -.ext-ie .x-resizable-handle-east { - margin-right:-1px; /*IE rounding error*/ -} - -.x-resizable-handle-south{ - width:100%; - cursor:s-resize; - left:0; - bottom:0; - height:6px; -} - -.ext-ie .x-resizable-handle-south { - margin-bottom:-1px; /*IE rounding error*/ -} - -.x-resizable-handle-west{ - width:6px; - cursor:w-resize; - left:0; - top:0; - height:100%; -} - -.x-resizable-handle-north{ - width:100%; - cursor:n-resize; - left:0; - top:0; - height:6px; -} - -.x-resizable-handle-southeast{ - width:6px; - cursor:se-resize; - right:0; - bottom:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-northwest{ - width:6px; - cursor:nw-resize; - left:0; - top:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-northeast{ - width:6px; - cursor:ne-resize; - right:0; - top:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-southwest{ - width:6px; - cursor:sw-resize; - left:0; - bottom:0; - height:6px; - z-index:101; -} - -.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ - filter:alpha(opacity=100); - opacity:1; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-position: left; -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-position: top; -} - -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-position: top left; -} - -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-position:bottom right; -} - -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-position: bottom left; -} - -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-position: top right; -} - -.x-resizable-proxy{ - border: 1px dashed; - position:absolute; - overflow:hidden; - display:none; - left:0; - top:0; - z-index:50000; -} - -.x-resizable-overlay{ - width:100%; - height:100%; - display:none; - position:absolute; - left:0; - top:0; - z-index:200000; - -moz-opacity: 0; - opacity:0; - filter: alpha(opacity=0); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/slider.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/slider.css deleted file mode 100644 index 51538af4424..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/slider.css +++ /dev/null @@ -1,103 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -/* Shared styles */ -.x-slider { - zoom:1; -} - -.x-slider-inner { - position:relative; - left:0; - top:0; - overflow:visible; - zoom:1; -} - -.x-slider-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; - display:block; - overflow:hidden; -} - -/* Horizontal styles */ -.x-slider-horz { - padding-left:7px; - background:transparent no-repeat 0 -22px; -} - -.x-slider-horz .x-slider-end { - padding-right:7px; - zoom:1; - background:transparent no-repeat right -44px; -} - -.x-slider-horz .x-slider-inner { - background:transparent repeat-x 0 0; - height:22px; -} - -.x-slider-horz .x-slider-thumb { - width:14px; - height:15px; - position:absolute; - left:0; - top:3px; - background:transparent no-repeat 0 0; -} - -.x-slider-horz .x-slider-thumb-over { - background-position: -14px -15px; -} - -.x-slider-horz .x-slider-thumb-drag { - background-position: -28px -30px; -} - -/* Vertical styles */ -.x-slider-vert { - padding-top:7px; - background:transparent no-repeat -44px 0; - width:22px; -} - -.x-slider-vert .x-slider-end { - padding-bottom:7px; - zoom:1; - background:transparent no-repeat -22px bottom; -} - -.x-slider-vert .x-slider-inner { - background:transparent repeat-y 0 0; -} - -.x-slider-vert .x-slider-thumb { - width:15px; - height:14px; - position:absolute; - left:3px; - bottom:0; - background:transparent no-repeat 0 0; -} - -.x-slider-vert .x-slider-thumb-over { - background-position: -15px -14px; -} - -.x-slider-vert .x-slider-thumb-drag { - background-position: -30px -28px; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/tabs.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/tabs.css deleted file mode 100644 index e0f542c077c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/tabs.css +++ /dev/null @@ -1,392 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tab-panel { - overflow:hidden; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border: 1px solid; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header { - border: 1px solid; - padding-bottom: 2px; -} - -.x-tab-panel-footer { - border: 1px solid; - padding-top: 2px; -} - -.x-tab-strip-wrap { - width:100%; - overflow:hidden; - position:relative; - zoom:1; -} - -ul.x-tab-strip { - display:block; - width:5000px; - zoom:1; -} - -ul.x-tab-strip-top{ - padding-top: 1px; - background: repeat-x bottom; - border-bottom: 1px solid; -} - -ul.x-tab-strip-bottom{ - padding-bottom: 1px; - background: repeat-x top; - border-top: 1px solid; - border-bottom: 0 none; -} - -.x-tab-panel-header-plain .x-tab-strip-top { - background:transparent !important; - padding-top:0 !important; -} - -.x-tab-panel-header-plain { - background:transparent !important; - border-width:0 !important; - padding-bottom:0 !important; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border:1px solid; - height:2px; - font-size:1px; - line-height:1px; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer { - border-top: 0 none; -} - -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-bottom: 0 none; -} - -.x-tab-panel-footer-plain .x-tab-strip-bottom { - background:transparent !important; - padding-bottom:0 !important; -} - -.x-tab-panel-footer-plain { - background:transparent !important; - border-width:0 !important; - padding-top:0 !important; -} - -.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, -.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { - height:3px; -} - -ul.x-tab-strip li { - float:left; - margin-left:2px; -} - -ul.x-tab-strip li.x-tab-edge { - float:left; - margin:0 !important; - padding:0 !important; - border:0 none !important; - font-size:1px !important; - line-height:1px !important; - overflow:hidden; - zoom:1; - background:transparent !important; - width:1px; -} - -.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { - display:block; -} - -.x-tab-strip a { - text-decoration:none !important; - -moz-outline: none; - outline: none; - cursor:pointer; -} - -.x-tab-strip-inner { - overflow:hidden; - text-overflow: ellipsis; -} - -.x-tab-strip span.x-tab-strip-text { - white-space: nowrap; - cursor:pointer; - padding:4px 0; -} - -.x-tab-strip-top .x-tab-with-icon .x-tab-right { - padding-left:6px; -} - -.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { - padding-left:20px; - background-position: 0 3px; - background-repeat: no-repeat; -} - -.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { - cursor:default; -} - -.x-tab-strip-active span.x-tab-strip-text { - cursor:default; -} - -.x-tab-strip-disabled .x-tabs-text { - cursor:default; -} - -.x-tab-panel-body { - overflow:hidden; -} - -.x-tab-panel-bwrap { - overflow:hidden; -} - -.ext-ie .x-tab-strip .x-tab-right { - position:relative; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-right { - margin-bottom:-1px; -} - -/* - * Horrible hack for IE8 in quirks mode - */ -.ext-ie8 .x-tab-strip li { - position: relative; -} -.ext-border-box .ext-ie8 .x-tab-strip-top .x-tab-right { - top: 1px; -} -.ext-ie8 .x-tab-strip-top { - padding-top: 1; -} -.ext-border-box .ext-ie8 .x-tab-strip-top { - padding-top: 0; -} -.ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - top:3px; -} -.ext-border-box .ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - top:4px; -} -.ext-ie8 .x-tab-strip-bottom .x-tab-right{ - top:0; -} - - -.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { - padding-bottom:5px; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - margin-top:-1px; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text { - padding-top:5px; -} - -.x-tab-strip-top .x-tab-right { - background: transparent no-repeat 0 -51px; - padding-left:10px; -} - -.x-tab-strip-top .x-tab-left { - background: transparent no-repeat right -351px; - padding-right:10px; -} - -.x-tab-strip-top .x-tab-strip-inner { - background: transparent repeat-x 0 -201px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-right { - background-position:0 -101px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-left { - background-position:right -401px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner { - background-position:0 -251px; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-right { - background-position: 0 0; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-left { - background-position: right -301px; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner { - background-position: 0 -151px; -} - -.x-tab-strip-bottom .x-tab-right { - background: no-repeat bottom right; -} - -.x-tab-strip-bottom .x-tab-left { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background: no-repeat bottom right; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-left { - margin-right: 3px; - padding:0 10px; -} - -.x-tab-strip-bottom .x-tab-right { - padding:0; -} - -.x-tab-strip .x-tab-strip-close { - display:none; -} - -.x-tab-strip-closable { - position:relative; -} - -.x-tab-strip-closable .x-tab-left { - padding-right:19px; -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - opacity:.6; - -moz-opacity:.6; - background-repeat:no-repeat; - display:block; - width:11px; - height:11px; - position:absolute; - top:3px; - right:3px; - cursor:pointer; - z-index:2; -} - -.x-tab-strip .x-tab-strip-active a.x-tab-strip-close { - opacity:.8; - -moz-opacity:.8; -} -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - opacity:1; - -moz-opacity:1; -} - -.x-tab-panel-body { - border: 1px solid; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background: transparent no-repeat -18px 0; - border-bottom: 1px solid; - width:18px; - position:absolute; - left:0; - top:0; - z-index:10; - cursor:pointer; -} -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background: transparent no-repeat 0 0; - border-bottom: 1px solid; - width:18px; - position:absolute; - right:0; - top:0; - z-index:10; - cursor:pointer; -} - -.x-tab-scroller-right-over { - background-position: -18px 0; -} - -.x-tab-scroller-right-disabled { - background-position: 0 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{ - margin-top: 1px; -} - -.x-tab-scrolling .x-tab-strip-wrap { - margin-left:18px; - margin-right:18px; -} - -.x-tab-scrolling { - position:relative; -} - -.x-tab-panel-bbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} - -.x-tab-panel-tbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/toolbar.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/toolbar.css deleted file mode 100644 index e2d962c2b6a..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/toolbar.css +++ /dev/null @@ -1,246 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-toolbar{ - border-style:solid; - border-width:0 0 1px 0; - display: block; - padding:2px; - background:repeat-x top left; - position:relative; - left:0; - top:0; - zoom:1; - overflow:hidden; -} - -.x-toolbar-left { - width: 100%; -} - -.x-toolbar .x-item-disabled .x-btn-icon { - opacity: .35; - -moz-opacity: .35; - filter: alpha(opacity=35); -} - -.x-toolbar td { - vertical-align:middle; -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - white-space: nowrap; -} - -.x-toolbar .x-item-disabled { - cursor:default; - opacity:.6; - -moz-opacity:.6; - filter:alpha(opacity=60); -} - -.x-toolbar .x-item-disabled * { - cursor:default; -} - -.x-toolbar .x-toolbar-cell { - vertical-align:middle; -} - -.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, -.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc -{ - background-position: 500px 500px; -} - -/* These rules are duplicated from button.css to give priority of x-toolbar rules above */ -.x-toolbar .x-btn-over .x-btn-tl{ - background-position: -6px 0; -} - -.x-toolbar .x-btn-over .x-btn-tr{ - background-position: -9px 0; -} - -.x-toolbar .x-btn-over .x-btn-tc{ - background-position: 0 -9px; -} - -.x-toolbar .x-btn-over .x-btn-ml{ - background-position: -6px -24px; -} - -.x-toolbar .x-btn-over .x-btn-mr{ - background-position: -9px -24px; -} - -.x-toolbar .x-btn-over .x-btn-mc{ - background-position: 0 -2168px; -} - -.x-toolbar .x-btn-over .x-btn-bl{ - background-position: -6px -3px; -} - -.x-toolbar .x-btn-over .x-btn-br{ - background-position: -9px -3px; -} - -.x-toolbar .x-btn-over .x-btn-bc{ - background-position: 0 -18px; -} - -.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ - background-position: -12px 0; -} - -.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ - background-position: -15px 0; -} - -.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ - background-position: 0 -12px; -} - -.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ - background-position: -12px -24px; -} - -.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ - background-position: -15px -24px; -} - -.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ - background-position: 0 -3240px; -} - -.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ - background-position: -12px -3px; -} - -.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ - background-position: -15px -3px; -} - -.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ - background-position: 0 -21px; -} - -.x-toolbar div.xtb-text{ - padding:2px 2px 0; - line-height:16px; - display:block; -} - -.x-toolbar .xtb-sep { - background-position: center; - background-repeat: no-repeat; - display: block; - font-size: 1px; - height: 16px; - width:4px; - overflow: hidden; - cursor:default; - margin: 0 2px 0; - border:0; -} - -.x-toolbar .xtb-spacer { - width:2px; -} - -/* Paging Toolbar */ -.x-tbar-page-number{ - width:30px; - height:14px; -} - -.ext-ie .x-tbar-page-number{ - margin-top: 2px; -} - -.x-paging-info { - position:absolute; - top:5px; - right: 8px; -} - -/* floating */ -.x-toolbar-ct { - width:100%; -} - -.x-toolbar-right td { - text-align: center; -} - -.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { - overflow:hidden; - zoom:1; -} - -.x-toolbar-more .x-btn-small .x-btn-text{ - height: 16px; - width: 12px; -} - -.x-toolbar-more em.x-btn-arrow { - display:inline; - background-color:transparent; - padding-right:0; -} - -.x-toolbar-more .x-btn-mc em.x-btn-arrow { - background-image: none; -} - -div.x-toolbar-no-items { - color:gray !important; - padding:5px 10px !important; -} - -/* fix ie toolbar form items */ -.ext-border-box .x-toolbar-cell .x-form-text { - margin-bottom:-1px !important; -} - -.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { - margin:0 !important; -} - -.ext-ie .x-toolbar-cell .x-form-field-wrap { - height:21px; -} - -.ext-ie .x-toolbar-cell .x-form-text { - position:relative; - top:-1px; -} - -.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text { - top: 0px; -} - -.x-toolbar-right td .x-form-field-trigger-wrap{ - text-align: left; -} - -.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{ - margin-top: 5px; -} - -.x-toolbar-cell .x-form-cb-label{ - vertical-align: bottom; - top: 1px; -} - -.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{ - margin-top: 4px; -} - -.ext-ie .x-toolbar-cell .x-form-cb-label{ - top: 0; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/tree.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/tree.css deleted file mode 100644 index 08d32b97d53..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/tree.css +++ /dev/null @@ -1,218 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.ext-strict .ext-ie .x-tree .x-panel-bwrap{ - position:relative; - overflow:hidden; -} - -.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-repeat: no-repeat; -} - -.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-position:center; - background-repeat: no-repeat; -} - -.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { - vertical-align: middle !important; -} - -.ext-strict .ext-ie8 .x-tree-node-indent img, .ext-strict .ext-ie8 .x-tree-node-icon, .ext-strict .ext-ie8 .x-tree-ec-icon { - vertical-align: top !important; -} - -/* checkboxes */ - -input.x-tree-node-cb { - margin-left:1px; - height: 19px; - vertical-align: bottom; -} - -.ext-ie input.x-tree-node-cb { - margin-left:0; - margin-top: 1px; - width: 16px; - height: 16px; - vertical-align: middle; -} - -.ext-strict .ext-ie8 input.x-tree-node-cb{ - margin: 1px 1px; - height: 14px; - vertical-align: bottom; -} - -.ext-strict .ext-ie8 input.x-tree-node-cb + a{ - vertical-align: bottom; -} - -.ext-opera input.x-tree-node-cb { - height: 14px; - vertical-align: middle; -} - -.x-tree-noicon .x-tree-node-icon{ - width:0; height:0; -} - -/* No line styles */ -.x-tree-no-lines .x-tree-elbow{ - background-color:transparent; -} - -.x-tree-no-lines .x-tree-elbow-end{ - background-color:transparent; -} - -.x-tree-no-lines .x-tree-elbow-line{ - background-color:transparent; -} - -/* Arrows */ -.x-tree-arrows .x-tree-elbow{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-elbow-plus{ - background:transparent no-repeat 0 0; -} - -.x-tree-arrows .x-tree-elbow-minus{ - background:transparent no-repeat -16px 0; -} - -.x-tree-arrows .x-tree-elbow-end{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background:transparent no-repeat 0 0; -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background:transparent no-repeat -16px 0; -} - -.x-tree-arrows .x-tree-elbow-line{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ - background-position:-32px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ - background-position:-48px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ - background-position:-32px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ - background-position:-48px 0; -} - -.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - cursor:pointer; -} - -.ext-ie ul.x-tree-node-ct{ - font-size:0; - line-height:0; - zoom:1; -} - -.x-tree-node{ - white-space: nowrap; -} - -.x-tree-node-el { - line-height:18px; - cursor:pointer; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - text-decoration:none; - -khtml-user-select:none; - -moz-user-select:none; - -webkit-user-select:ignore; - -kthml-user-focus:normal; - -moz-user-focus:normal; - -moz-outline: 0 none; - outline:0 none; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - text-decoration:none; - padding:1px 3px 1px 2px; -} - -.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ - -moz-opacity: 0.5; - opacity:.5; - filter: alpha(opacity=50); -} - -.x-tree-node .x-tree-node-inline-icon{ - background-color:transparent; -} - -.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ - text-decoration:none; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom:1px dotted; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top:1px dotted; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ - border-bottom:0 none; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ - border-top:0 none; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom:2px solid; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top:2px solid; -} - -.x-tree-node .x-tree-drag-append a span{ - border:1px dotted; -} - -.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ - display:none !important; -} - -/* Fix for ie rootVisible:false issue */ -.x-tree-root-ct { - zoom:1; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/structure/window.css b/web-client/src/main/resources/apps/js/ext/resources/css/structure/window.css deleted file mode 100644 index 3871e642c1f..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/structure/window.css +++ /dev/null @@ -1,222 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-window { - zoom:1; -} - -.x-window .x-window-handle { - opacity:0; - -moz-opacity:0; - filter:alpha(opacity=0); -} - -.x-window-proxy { - border:1px solid; - z-index:12000; - overflow:hidden; - position:absolute; - left:0;top:0; - display:none; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); -} - -.x-window-header { - overflow:hidden; - zoom:1; -} - -.x-window-bwrap { - z-index:1; - position:relative; - zoom:1; - left:0;top:0; -} - -.x-window-tl .x-window-header { - padding:5px 0 4px 0; -} - -.x-window-header-text { - cursor:pointer; -} - -.x-window-tc { - background: transparent repeat-x 0 0; - overflow:hidden; - zoom:1; -} - -.x-window-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - zoom:1; - z-index:1; - position:relative; -} - -.x-window-tr { - background: transparent no-repeat right 0; - padding-right:6px; -} - -.x-window-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-window-bc .x-window-footer { - padding-bottom:6px; - zoom:1; - font-size:0; - line-height:0; -} - -.x-window-bl { - background: transparent no-repeat 0 bottom; - padding-left:6px; - zoom:1; -} - -.x-window-br { - background: transparent no-repeat right bottom; - padding-right:6px; - zoom:1; -} - -.x-window-mc { - border:1px solid; - padding:0; - margin:0; -} - -.x-window-ml { - background: transparent repeat-y 0 0; - padding-left:6px; - zoom:1; -} - -.x-window-mr { - background: transparent repeat-y right 0; - padding-right:6px; - zoom:1; -} - -.x-window-body { - overflow:hidden; -} - -.x-window-bwrap { - overflow:hidden; -} - -.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br, - .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr, - .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr { - padding:0; -} - -.x-window-maximized .x-window-footer { - padding-bottom:0; -} - -.x-window-maximized .x-window-tc { - padding-left:3px; - padding-right:3px; -} - -.x-window-maximized .x-window-mc { - border-left:0 none; - border-right:0 none; -} - -.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar { - border-left:0 none; - border-right: 0 none; -} - -.x-window-bbar .x-toolbar { - border-top:1px solid; - border-bottom:0 none; -} - -.x-window-draggable, .x-window-draggable .x-window-header-text { - cursor:move; -} - -.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text { - cursor:default; -} - -.x-window-body { - background-color:transparent; -} - -.x-panel-ghost .x-window-tl { - border-bottom:1px solid; -} - -.x-panel-collapsed .x-window-tl { - border-bottom:1px solid; -} - -.x-window-maximized-ct { - overflow:hidden; -} - -.x-window-maximized .x-window-handle { - display:none; -} - -.x-window-sizing-ghost ul { - border:0 none !important; -} - -.x-dlg-focus{ - -moz-outline:0 none; - outline:0 none; - width:0; - height:0; - overflow:hidden; - position:absolute; - top:0; - left:0; -} - -.ext-webkit .x-dlg-focus{ - width: 1px; - height: 1px; -} - -.x-dlg-mask{ - z-index:10000; - display:none; - position:absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity:.50; - filter: alpha(opacity=50); -} - -body.ext-ie6.x-body-masked select { - visibility:hidden; -} - -body.ext-ie6.x-body-masked .x-window select { - visibility:visible; -} - -.x-window-plain .x-window-mc { - border: 1px solid; -} - -.x-window-plain .x-window-body { - border: 1px solid; - background:transparent !important; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/borders.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/borders.css deleted file mode 100644 index 01a4c1b007d..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/borders.css +++ /dev/null @@ -1,25 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#343d4e; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#343d4e; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#343d4e; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#343d4e; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#343d4e; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/box.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/box.css deleted file mode 100644 index 9e4d28df007..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/box.css +++ /dev/null @@ -1,74 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 15px; -} - -.x-box-mc h3 { - font-size: 18px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/button.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/button.css deleted file mode 100644 index be747381933..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/button.css +++ /dev/null @@ -1,136 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-btn { - font:normal 14px tahoma, verdana, helvetica; -} - -.x-btn button { - font:normal 14px arial,tahoma,verdana,helvetica; - color:#fffffa; - padding-left:6px !important; - padding-right:6px !important; -} - -.x-btn-over .x-btn button{ - color:#fff; -} - -.x-btn-noicon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-left .x-btn-text, -.x-btn-icon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-right .x-btn-text { - height:18px; -} - -.x-btn-icon .x-btn-small .x-btn-text { - width:18px; -} - -.x-btn-text-icon .x-btn-icon-small-left .x-btn-text { - padding-left:21px !important; -} - -.x-btn-text-icon .x-btn-icon-small-right .x-btn-text { - padding-right:21px !important; -} - -.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text { - padding-left:29px !important; -} - -.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text { - padding-right:29px !important; -} - -.x-btn-text-icon .x-btn-icon-large-left .x-btn-text { - padding-left:37px !important; -} - -.x-btn-text-icon .x-btn-icon-large-right .x-btn-text { - padding-right:37px !important; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/access/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#fff; -} - -.x-btn-disabled *{ - color:#eee !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/access/button/arrow.gif); - padding-right:13px; -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/access/button/s-arrow.gif); - padding-right:20px; -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/access/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/access/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #d2d2d2; -} - -.x-btn-group-tc { - background-image: url(../images/access/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/access/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/access/button/group-lr.gif); -} - -.x-btn-group-mr { - background-image: url(../images/access/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/access/button/group-tb.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/combo.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/combo.css deleted file mode 100644 index d619754b6d0..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/combo.css +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-combo-list { - border:2px solid #232732; - background-color:#555566; - font:normal 15px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#414551; -} - -.x-combo-list-hd { - font:bold 14px tahoma, arial, helvetica, sans-serif; - color:#fff; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#98c0f4; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#98c0f4; -} - -.x-combo-list-item { - border-color:#556; -} - -.x-combo-list .x-combo-selected { - border-color:#e5872c !important; - background-color:#e5872c; -} - -.x-combo-list .x-toolbar { - border-top-color:#98c0f4; -} - -.x-combo-list-small { - font:normal 14px tahoma, arial, helvetica, sans-serif; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/core.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/core.css deleted file mode 100644 index 377192af3bf..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/core.css +++ /dev/null @@ -1,81 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -body { - background-color:#16181a; - color:#fcfcfc; -} - -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#223; - background-color:#3f4757; - background-image:url(../images/access/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #232d38; - border-color:#556; - color:#fff; - font:normal 14px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#232d38; - background-image:url(../images/access/grid/loading.gif); -} - -.x-item-disabled { - color: #ddd; -} - -.x-item-disabled * { - color: #ddd !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 14px; - background-image: url(../images/access/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/date-picker.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/date-picker.css deleted file mode 100644 index 1509a612d75..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/date-picker.css +++ /dev/null @@ -1,145 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-date-picker { - border-color: #737b8c; - background-color:#21252e; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/access/shared/hd-sprite.gif); - color:#fff; - font:bold 14px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/access/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/access/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/access/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#363d4a; - background-image:url(../images/access/toolbar/bg.gif); - border-bottom-color:#535b5c; - font:normal 13px arial, helvetica,tahoma,sans-serif; - color:#fff; -} - -.x-date-inner td { - border-color:#112; -} - -.x-date-inner a { - font:normal 14px arial, helvetica,tahoma,sans-serif; - color:#fff; - padding:2px 7px 1px 3px; /* Structure to account for larger, bolder fonts in Access theme. */ -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-color:#e5872c; - background-image:none; - border-color:#864900; - padding:1px 6px 1px 2px; /* Structure to account for larger, bolder fonts in Access theme. */ -} - -.x-date-inner .x-date-today a{ - border-color:#99a; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#737b8c; - background-color:#464d5a; - background-image:url(../images/access/shared/glass-bg.gif); -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#fff; - background-color:#7e5530; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:13px; - color:#000; -} - -.x-date-mp { - background-color:#21252e; -} - -.x-date-mp td { - font:normal 14px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#083772; - color:#fff; - border-color: #3366cc #000055 #000055 #3366cc; - font:normal 14px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color: #dfecfb; - background-image: url(../images/access/shared/glass-bg.gif); -} - -.x-date-mp-btns td { - border-top-color: #c5d2df; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color:#fff; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#fff; - background-color: #7e5530; -} - -td.x-date-mp-sel a { - background-color: #e5872c; - background-image: none; - border-color:#864900; -} - -.x-date-mp-ybtn a { - background-image:url(../images/access/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#c5d2df; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/dd.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/dd.css deleted file mode 100644 index 51c05e45033..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/dd.css +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-dd-drag-ghost{ - color:#000; - font: normal 14px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/debug.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/debug.css deleted file mode 100644 index f23055d814c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/debug.css +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -#x-debug-browser .x-tree .x-tree-node a span { - color:#222297; - font-size:14px; - font-family:"monotype","courier new",sans-serif; -} - -#x-debug-browser .x-tree a i { - color:#ff4545; - font-style:normal; -} - -#x-debug-browser .x-tree a em { - color:#999; -} - -#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ - background-color:#c3daf9; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/dialog.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/dialog.css deleted file mode 100644 index fc95f911d4a..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/dialog.css +++ /dev/null @@ -1,34 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:15px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 15px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/access/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/access/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/access/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/access/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/access/window/icon-error.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/editor.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/editor.css deleted file mode 100644 index b9c88fbf506..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/editor.css +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-html-editor-wrap { - border-color:#737B8C; - background-color:#fff; -} -.x-html-editor-wrap iframe { - background-color: #fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/access/editor/tb-sprite.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/form.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/form.css deleted file mode 100644 index 2fa569f2349..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/form.css +++ /dev/null @@ -1,176 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-form-field { - font:normal 15px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field{ - color: #ffffff; - background-color:#33373d; - background-image:url(../images/access/form/text-bg.gif); - border-color:#737b8c; - border-width:2px; -} - -.ext-webkit .x-form-text, .ext-webkit textarea.x-form-field{ - border-width:2px; -} - -.x-form-text, .ext-ie .x-form-file { - height:26px; -} - -.ext-strict .x-form-text { - height:20px; -} - -.x-form-select-one { - background-color:#fff; - border-color:#b5b8c8; -} - -.x-form-check-group-label { - border-bottom: 1px solid #99bbe8; - color: #fff; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger{ - background-image:url(../images/access/form/trigger.gif); - border-bottom-color:#737b8c; - border-bottom-width:2px; - height:24px; - width:20px; -} - -.x-form-field-wrap .x-form-trigger.x-form-trigger-over{ - border-bottom-color:#d97e27; -} - -.x-form-field-wrap .x-form-trigger.x-form-trigger-click{ - border-bottom-color:#c86e19; -} - -.x-small-editor .x-form-field-wrap .x-form-trigger { - height:24px; -} - -.x-form-field-wrap .x-form-trigger-over { - background-position:-20px 0; -} - -.x-form-field-wrap .x-form-trigger-click { - background-position:-40px 0; -} - -.x-trigger-wrap-focus .x-form-trigger { - background-position:-60px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-over { - background-position:-80px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-click { - background-position:-100px 0; -} - -.x-form-field-wrap .x-form-date-trigger{ - background-image: url(../images/access/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger{ - background-image: url(../images/access/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger{ - background-image: url(../images/access/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger{ - border-bottom-color:#737b8c; -} - -.x-item-disabled .x-form-trigger-over{ - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click{ - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus{ - border-color:#ff9c33; -} - -.x-form-invalid, textarea.x-form-invalid, -.ext-webkit .x-form-invalid, .ext-webkit textarea.x-form-invalid{ - background-color:#15171a; - background-image:url(../images/access/grid/invalid_line.gif); - border-color:#c30; -} - -/* -.ext-safari .x-form-invalid{ - background-color:#fee; - border-color:#ff7870; -} -*/ - -.x-form-inner-invalid, textarea.x-form-inner-invalid{ - background-color:#fff; - background-image:url(../images/access/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 15px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 15px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 14px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:#dadadd; -} - -.x-small-editor .x-form-text { - height: 26px; -} - -.x-small-editor .x-form-field { - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.ext-safari .x-small-editor .x-form-field { - font:normal 15px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/access/form/exclamation.gif); - height:25px; - width:19px; - background-position:center right; -} - -.x-fieldset { - border-color:#737B8C; -} - -.x-fieldset legend { - font:bold 14px tahoma, arial, helvetica, sans-serif; - color:#fff; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/grid.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/grid.css deleted file mode 100644 index 5c13dc4ca8d..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/grid.css +++ /dev/null @@ -1,288 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-grid3 { - background-color:#1f2933; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#223; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - border-left-color:#556; - border-right-color:#223; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border:0 none; - border-bottom:1px solid #111; - border-right:1px solid #1a1a1c; -} - -.x-grid3-row-alt{ - background-color:#1b232b; -} - -.x-grid3-row-over { - background-color:#7e5530; -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#3b3f50; - background-image:url(../images/access/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#889; - border-right-color:#445; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#4e628a; - background-image:url(../images/access/grid/grid3-hrow-over.gif); -} - -.x-grid3-cell-inner, .x-grid3-hd-inner { - color:#fff; -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/access/grid/sort_asc.gif); - width:15px; - height:9px; - margin-left:5px; -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/access/grid/sort_desc.gif); - width:15px; - height:9px; - margin-left:5px; -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#fff; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#fff; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/access/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -.x-grid3-row-selected { - background-color: #e5872c !important; - background-image: none; - border-style: solid; -} - -.x-grid3-row-selected .x-grid3-cell { - color: #fff; -} - -.x-grid3-cell-selected { - background-color: #ffa340 !important; - color:#fff; -} - -.x-grid3-cell-selected span{ - color:#fff !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#fff; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#fff; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#fff !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/access/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/access/grid/grid3-special-col-bg.gif) !important; - color:#fff !important; -} -.x-props-grid .x-grid3-td-value { - color:#fff !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#263240 !important; - border-right-color:#223; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c2c9d0; - background-image:url(../images/access/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/access/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#fff; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/access/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#4e628a; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/access/grid/group-collapse.gif); - background-position:3px 6px; - color:#ffd; - font:bold 14px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/access/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 14px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row{ - border-top-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/layout.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/layout.css deleted file mode 100644 index 22e482ddfe1..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/layout.css +++ /dev/null @@ -1,56 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-border-layout-ct { - background-color:#3f4757; -} - -.x-accordion-hd { - color:#fff; - font-weight:normal; - background-image: url(../images/access/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#323845; - border-color:#1a1a1c; -} - -.x-layout-collapsed-over{ - background-color:#2d3440; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/list-view.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/list-view.css deleted file mode 100644 index a62ae7a9af5..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/list-view.css +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-list-header{ - background-color:#393d4e; - background-image:url(../images/access/toolbar/bg.gif); - background-position:0 top; -} - -.x-list-header-inner div em { - border-left-color:#667; - font:normal 14px arial, tahoma, helvetica, sans-serif; - line-height: 14px; -} - -.x-list-body-inner { - background-color:#1B232B; -} - -.x-list-body dt em { - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#7E5530; -} - -.x-list-selected { - background-color:#E5872C; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/access/grid/sort-hd.gif); - border-color: #3e4e6c; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/menu.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/menu.css deleted file mode 100644 index bebe24f2ec1..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/menu.css +++ /dev/null @@ -1,79 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-menu { - border-color:#222; - background-color:#414551; - background-image:url(../images/access/menu/menu.gif); -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 14px tahoma,arial, sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/access/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#223; - border-bottom-color:#666; -} - -a.x-menu-item { - color:#fffff6; -} - -.x-menu-item-active { - background-color: #f09134; - background-image: none; - border-color:#b36427; -} - -.x-menu-item-active a.x-menu-item { - border-color:#b36427; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/access/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/panel.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/panel.css deleted file mode 100644 index 9c78ad6dd8e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/panel.css +++ /dev/null @@ -1,94 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-panel { - border-color: #18181a; - font-size: 14px; -} - -.x-panel-header { - color:#fff; - font-weight:bold; - font-size: 14px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#18181a; - background-image: url(../images/access/panel/white-top-bottom.gif); -} - -.x-panel-body { - color: #fffff6; - border-color:#18181a; - background-color:#232d38; -} - -.x-tab-panel .x-panel-body { - color: #fffff6; - border-color:#18181a; - background-color:#1f2730; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#223; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#223; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#223; -} - -.x-panel-tl .x-panel-header { - color:#fff; - font:bold 14px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/access/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/access/panel/corners-sprite.gif); - border-bottom-color:#222224; -} - -.x-panel-bc { - background-image: url(../images/access/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 14px tahoma,arial,helvetica,sans-serif; - background-color:#3f4757; -} - -.x-panel-ml { - background-image:url(../images/access/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/access/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/access/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#3f4757; -} - -.x-panel-ghost ul { - border-color:#18181a; -} - -.x-panel-dd-spacer { - border-color:#18181a; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 14px arial,tahoma, helvetica, sans-serif; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/progress.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/progress.css deleted file mode 100644 index f62cfaec664..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/progress.css +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-progress-wrap { - border-color:#18181a; -} - -.x-progress-inner { - background-color:#232d38; - background-image:none; -} - -.x-progress-bar { - background-color:#f39a00; - background-image:url(../images/access/progress/progress-bg.gif); - border-top-color:#a66900; - border-bottom-color:#a66900; - border-right-color:#ffb941; - height: 20px !important; /* structural override for Accessibility Theme */ -} - -.x-progress-text { - font-size:14px; - font-weight:bold; - color:#fff; - padding: 0 5px !important; /* structural override for Accessibility Theme */ -} - -.x-progress-text-back { - color:#aaa; - line-height: 19px; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/qtips.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/qtips.css deleted file mode 100644 index a72bc2cca53..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/qtips.css +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tip .x-tip-close{ - background-image: url(../images/access/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/access/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 14px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 14px tahoma,arial,helvetica,sans-serif; - color:#ffd; -} - -.x-tip .x-tip-body { - font: normal 14px tahoma,arial,helvetica,sans-serif; - color:#000; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/access/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/access/qtip/tip-anchor-sprite.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/resizable.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/resizable.css deleted file mode 100644 index b77c01e17dd..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/resizable.css +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-resizable-handle { - background-color:#fff; - color: #000; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/access/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/access/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/access/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/access/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/access/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/access/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/access/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/slider.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/slider.css deleted file mode 100644 index b3632384e57..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/slider.css +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/access/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/access/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/access/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/access/slider/slider-v-thumb.png); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/tabs.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/tabs.css deleted file mode 100644 index 2c105a37903..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/tabs.css +++ /dev/null @@ -1,119 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tab-panel-header, .x-tab-panel-footer { - background-color:#e18325; - border-color:#8db2e3; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#222; -} - -ul.x-tab-strip-top{ - background-color:#343843; - background-image: url(../images/access/tabs/tab-strip-bg.gif); - border-bottom-color:#343d4e; -} - -ul.x-tab-strip-bottom{ - background-color:#343843; - background-image: url(../images/access/tabs/tab-strip-btm-bg.gif); - border-top-color:#343843; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#222; - background-color:#e18325; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 14px tahoma,arial,helvetica; - color:#fff; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#fff; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#fff; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/access/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/access/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/access/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/access/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/access/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/access/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/access/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#18181a; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/access/tabs/scroll-left.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/access/tabs/scroll-right.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#99bbe8; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/toolbar.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/toolbar.css deleted file mode 100644 index ce24301ed32..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/toolbar.css +++ /dev/null @@ -1,120 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-toolbar{ - border-color:#18181a; - background-color:#393d4e; - background-image:url(../images/access/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 14px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/access/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/access/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/access/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/access/grid/grid-blue-split.gif); -} - -.x-toolbar .x-btn { - padding-left:3px; - padding-right:3px; -} - -.x-toolbar .x-btn-mc em.x-btn-arrow { - padding-right:10px; -} - -.x-toolbar .x-btn-text-icon .x-btn-icon-small-left .x-btn-text { - padding-left:18px !important; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - padding-right:14px; -} - -.x-tbar-page-first{ - background-image: url(../images/access/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/access/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/access/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/access/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/access/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/access/grid/loading.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/access/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/access/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/access/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/access/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/access/toolbar/more.gif) !important; -} - -.x-statusbar .x-status-busy { - background-image: url(../images/access/grid/loading.gif); -} - -.x-statusbar .x-status-text-panel { - border-color: #99bbe8 #fff #fff #99bbe8; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/tree.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/tree.css deleted file mode 100644 index 61fc2e0e3cb..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/tree.css +++ /dev/null @@ -1,165 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/access/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/access/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.ext-ie .x-tree-node-el input { - width:14px; - height:14px; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/access/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/access/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/access/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/access/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/access/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/access/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/access/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#fff; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#fff; -} - -.x-tree-node .x-tree-selected a, .x-dd-drag-ghost a{ - color:#fff; -} - -.x-tree-node .x-tree-selected a span, .x-dd-drag-ghost a span{ - color:#fff; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #7e5530; -} - -.x-tree-node .x-tree-selected { - background-color: #e5872c; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/window.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/window.css deleted file mode 100644 index 066c6ac707a..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-access/window.css +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-window-proxy { - background-color:#1f2833; - border-color:#18181a; -} - -.x-window-tl .x-window-header { - color:#fff; - font:bold 14px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/access/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/access/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/access/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/access/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/access/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/access/window/right-corners.png); -} - -.x-window-mc { - border-color:#18181a; - font: normal 14px tahoma,arial,helvetica,sans-serif; - background-color:#1f2833; -} - -.x-window-ml { - background-image: url(../images/access/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/access/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#323945; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#323945; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#323945; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #464f61; - border-color: #636778; -} - -.x-window-plain .x-window-body { - color: #fffff6; - border-color: #464F61; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #464f61; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/borders.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/borders.css deleted file mode 100644 index 8da99742ba3..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/borders.css +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#d0d0d0; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#d0d0d0; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#d0d0d0; -} - -.x-border-layout-ct { - background-color:#f0f0f0; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/box.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/box.css deleted file mode 100644 index 50794180edc..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/box.css +++ /dev/null @@ -1,74 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 12px; -} - -.x-box-mc h3 { - font-size: 14px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/button.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/button.css deleted file mode 100644 index 6cd0c84bdf6..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/button.css +++ /dev/null @@ -1,94 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/gray/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/gray/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/gray/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #666; -} - -.x-btn-group-tc { - background-image: url(../images/gray/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/gray/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/gray/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/gray/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/gray/button/group-tb.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/combo.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/combo.css deleted file mode 100644 index 48137847e68..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/combo.css +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-combo-list { - border-color:#ccc; - background-color:#ddd; - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#fff; -} - -.x-combo-list-hd { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#333; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#BCBCBC; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#BEBEBE; -} - -.x-combo-list-item { - border-color:#fff; -} - -.x-combo-list .x-combo-selected{ - border-color:#777 !important; - background-color:#f0f0f0; -} - -.x-combo-list .x-toolbar { - border-top-color:#BCBCBC; -} - -.x-combo-list-small { - font:normal 11px tahoma, arial, helvetica, sans-serif; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/core.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/core.css deleted file mode 100644 index 76cb5e103f2..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/core.css +++ /dev/null @@ -1,83 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#999; - background-color:#ddd; - background-image:url(../images/gray/panel/white-top-bottom.gif); - background-position: 0 -1px; -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#d0d0d0; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#CFCFCF; - background-color: #eaeaea; -} - -/* -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #eaeaea; -} -*/ - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/date-picker.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/date-picker.css deleted file mode 100644 index a67d32b983f..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/date-picker.css +++ /dev/null @@ -1,143 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-date-picker { - border-color:#585858; - background-color:#fff; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/gray/shared/hd-sprite.gif); - color:#fff; - font:bold 11px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/gray/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/gray/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/gray/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#D8D8D8; - background-image: url(../images/gray/panel/white-top-bottom.gif); - border-bottom-color:#AFAFAF; - font:normal 10px arial, helvetica,tahoma,sans-serif; - color:#595959; -} - -.x-date-inner td { - border-color:#fff; -} - -.x-date-inner a { - font:normal 11px arial, helvetica,tahoma,sans-serif; - color:#000; -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-image: none; - background-color:#D8D8D8; - border-color:#DCDCDC; -} - -.x-date-inner .x-date-today a{ - border-color:darkred; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#AFAFAF; - background-color:#D8D8D8; - background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#000; - background-color:#D8D8D8; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:10px; - color:#000; -} - -.x-date-mp { - background-color:#fff; -} - -.x-date-mp td { - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#4E565F; - color:#fff; - border-color:#C0C0C0 #434343 #434343 #C0C0C0; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color:#D8D8D8; - background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; -} - -.x-date-mp-btns td { - border-top-color:#AFAFAF; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color: #333; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#333; - background-color:#FDFDFD; -} - -td.x-date-mp-sel a { - background-color:#D8D8D8; - background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; - border-color:#DCDCDC; -} - -.x-date-mp-ybtn a { - background-image:url(../images/gray/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#D7D7D7; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/dd.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/dd.css deleted file mode 100644 index a84897f0c8e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/dd.css +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#D6D6D6; - border-color:#888888; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/debug.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/debug.css deleted file mode 100644 index 6b48bad99c1..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/debug.css +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -#x-debug-browser .x-tree .x-tree-node a span { - color:#222297; - font-size:11px; - font-family:"monotype","courier new",sans-serif; -} - -#x-debug-browser .x-tree a i { - color:#ff4545; - font-style:normal; -} - -#x-debug-browser .x-tree a em { - color:#999; -} - -#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ - background-color:#D5D5D5; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/dialog.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/dialog.css deleted file mode 100644 index a9984d58bc8..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/dialog.css +++ /dev/null @@ -1,34 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/gray/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/gray/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/gray/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/gray/window/icon-error.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/editor.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/editor.css deleted file mode 100644 index fc9671067f2..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/editor.css +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-html-editor-wrap { - border-color:#BCBCBC; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/form.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/form.css deleted file mode 100644 index 4b950e661e2..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/form.css +++ /dev/null @@ -1,117 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-form-field{ - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field{ - background-color:#fff; - background-image:url(../images/default/form/text-bg.gif); - border-color:#C1C1C1; -} - -.x-form-select-one { - background-color:#fff; - border-color:#C1C1C1; -} - -.x-form-check-group-label { - border-bottom: 1px solid #d0d0d0; - color: #333; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger{ - background-image:url(../images/gray/form/trigger.gif); - border-bottom-color:#b5b8c8; -} - -.x-form-field-wrap .x-form-date-trigger{ - background-image: url(../images/gray/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger{ - background-image: url(../images/gray/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger{ - background-image: url(../images/gray/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger{ - border-bottom-color: #777777; -} - -.x-item-disabled .x-form-trigger-over{ - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click{ - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus{ - border-color:#777777; -} - -.x-form-invalid, textarea.x-form-invalid{ - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.ext-webkit .x-form-invalid{ - background-color:#fee; - border-color:#ff7870; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid{ - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 11px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:gray; -} - -.x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.ext-webkit .x-small-editor .x-form-field { - font:normal 12px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-fieldset { - border-color:#CCCCCC; -} - -.x-fieldset legend { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#777777; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/grid.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/grid.css deleted file mode 100644 index b0033182155..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/grid.css +++ /dev/null @@ -1,276 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#d0d0d0; -} - -.x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px/13px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - font:normal 11px/15px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow2.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#ACACAC; - border-right-color:#ACACAC; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow-over2.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/gray/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/gray/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#333; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow-over2.gif); - border-color:#ACACAC; -} - -.col-move-top{ - background-image:url(../images/gray/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/gray/grid/col-move-bottom.gif); -} - -.x-grid3-row-selected { - background-color:#CCCCCC !important; - background-image: none; - border-color:#ACACAC; -} - -.x-grid3-cell-selected{ - background-color: #CBCBCB !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#333 !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/gray/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/gray/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#d0d0d0; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/gray/grid/group-collapse.gif); - color:#5F5F5F; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/gray/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row{ - border-top-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#B9B9B9; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/layout.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/layout.css deleted file mode 100644 index 86a86f4a2e0..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/layout.css +++ /dev/null @@ -1,53 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-border-layout-ct { - background-color:#f0f0f0; -} - -.x-accordion-hd { - color:#222; - font-weight:normal; - background-image: url(../images/gray/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#dfdfdf; - border-color:#d0d0d0; -} - -.x-layout-collapsed-over{ - background-color:#e7e7e7; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/list-view.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/list-view.css deleted file mode 100644 index deb9afdcc40..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/list-view.css +++ /dev/null @@ -1,37 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow2.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#f0f0f0; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/gray/grid/sort-hd.gif); - border-color: #d0d0d0; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/menu.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/menu.css deleted file mode 100644 index cbd57733130..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/menu.css +++ /dev/null @@ -1,82 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#7D7D7D; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/gray/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/gray/menu/item-over.gif); - background-color: #f1f1f1; - border-color:#ACACAC; -} - -.x-menu-item-active a.x-menu-item { - border-color:#ACACAC; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/gray/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#fff !important; -} - -.x-menu .x-date-picker{ - border-color:#AFAFAF; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#B9B9B9 !important; - background-color:#F1F1F1; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/panel.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/panel.css deleted file mode 100644 index 1ea6c3d2ebc..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/panel.css +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-panel { - border-color: #d0d0d0; -} - -.x-panel-header { - color:#333; - font-weight:bold; - font-size: 11px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#d0d0d0; - background-image: url(../images/gray/panel/white-top-bottom.gif); -} - -.x-panel-body { - border-color:#d0d0d0; - background-color:#fff; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#d0d0d0; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#d0d0d0; -} - -.x-panel-tl .x-panel-header { - color:#333; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/gray/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/gray/panel/corners-sprite.gif); - border-bottom-color:#d0d0d0; -} - -.x-panel-bc { - background-image: url(../images/gray/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#f1f1f1; -} - -.x-panel-ml { - background-color: #fff; - background-image:url(../images/gray/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/gray/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/gray/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#f2f2f2; -} - -.x-panel-ghost ul { - border-color:#d0d0d0; -} - -.x-panel-dd-spacer { - border-color:#d0d0d0; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/pivotgrid.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/pivotgrid.css deleted file mode 100644 index a30305adf0b..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/pivotgrid.css +++ /dev/null @@ -1,28 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-pivotgrid .x-grid3-header-offset table td { - background: url(../images/gray/grid/grid3-hrow2.gif) repeat-x 50% 100%; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #D0D0D0; - border-right-color: #D0D0D0; -} - -.x-pivotgrid .x-grid3-row-headers { - background-color: #f9f9f9; -} - -.x-pivotgrid .x-grid3-row-headers table td { - background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; - border-bottom: 1px solid; - border-bottom-color: #D0D0D0; - height: 18px; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/progress.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/progress.css deleted file mode 100644 index 168debb9f54..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/progress.css +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-progress-wrap { - border-color:#8E8E8E; -} - -.x-progress-inner { - background-color:#E7E7E7; - background-image:url(../images/gray/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#BCBCBC; - background-image:url(../images/gray/progress/progress-bg.gif); - border-top-color:#E2E2E2; - border-bottom-color:#A4A4A4; - border-right-color:#A4A4A4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#5F5F5F; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/qtips.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/qtips.css deleted file mode 100644 index fdd266d6533..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/qtips.css +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tip .x-tip-close{ - background-image: url(../images/gray/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/gray/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/gray/qtip/tip-anchor-sprite.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/resizable.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/resizable.css deleted file mode 100644 index 8f0cbbc81c3..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/resizable.css +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/gray/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/gray/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/gray/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/gray/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/gray/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/gray/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/gray/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#565656; -} -.x-resizable-overlay{ - background-color:#fff; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/slider.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/slider.css deleted file mode 100644 index af069a0ac06..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/slider.css +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/gray/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/gray/slider/slider-v-thumb.png); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/tabs.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/tabs.css deleted file mode 100644 index e07d5077c70..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/tabs.css +++ /dev/null @@ -1,127 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tab-panel-header, .x-tab-panel-footer { - background-color: #eaeaea; - border-color:#d0d0d0; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#d0d0d0; -} - -ul.x-tab-strip-top{ - background-color:#dbdbdb; - background-image: url(../images/gray/tabs/tab-strip-bg.gif); - border-bottom-color:#d0d0d0; -} - -ul.x-tab-strip-bottom{ - background-color:#dbdbdb; - background-image: url(../images/gray/tabs/tab-strip-btm-bg.gif); - border-top-color:#d0d0d0; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#d0d0d0; - background-color: #eaeaea; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 11px tahoma,arial,helvetica; - color:#333; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#111; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#333; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/gray/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/gray/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/gray/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { - background-image: url(../images/gray/tabs/tab-btm-over-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { - background-image: url(../images/gray/tabs/tab-btm-over-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/gray/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/gray/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/gray/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/gray/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#d0d0d0; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/gray/tabs/scroll-left.gif); - border-bottom-color:#d0d0d0; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/gray/tabs/scroll-right.gif); - border-bottom-color:#d0d0d0; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#d0d0d0; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/toolbar.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/toolbar.css deleted file mode 100644 index 453d7d67471..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/toolbar.css +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-toolbar{ - border-color:#d0d0d0; - background-color:#f0f0f0; - background-image:url(../images/gray/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/gray/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/gray/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/gray/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/gray/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/gray/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/gray/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/gray/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/loading.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/default/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/default/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/default/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/gray/toolbar/more.gif) !important; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/tree.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/tree.css deleted file mode 100644 index 62134df8f80..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/tree.css +++ /dev/null @@ -1,157 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.ext-ie .x-tree-node-el input { - width:15px; - height:15px; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/gray/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/gray/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #ddd; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/window.css b/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/window.css deleted file mode 100644 index 4098cbe8cdd..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/theme-gray/window.css +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-window-proxy { - background-color:#fcfcfc; - border-color:#d0d0d0; -} - -.x-window-tl .x-window-header { - color:#555; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/gray/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/gray/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/gray/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/gray/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/gray/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/gray/window/right-corners.png); -} - -.x-window-mc { - border-color:#d0d0d0; - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#e8e8e8; -} - -.x-window-ml { - background-image: url(../images/gray/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/gray/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#d0d0d0; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#d0d0d0; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #E8E8E8; - border-color: #D0D0D0 #EEEEEE #EEEEEE #D0D0D0; -} - -.x-window-plain .x-window-body { - border-color: #EEEEEE #D0D0D0 #D0D0D0 #EEEEEE; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #E4E4E4; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/borders.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/borders.css deleted file mode 100644 index f42ca6ace86..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/borders.css +++ /dev/null @@ -1,25 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/box.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/box.css deleted file mode 100644 index 01f6988925e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/box.css +++ /dev/null @@ -1,74 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 12px; -} - -.x-box-mc h3 { - font-size: 14px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/button.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/button.css deleted file mode 100644 index 39a93ee73ae..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/button.css +++ /dev/null @@ -1,94 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/default/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #3e6aaa; -} - -.x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/default/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/default/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/combo.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/combo.css deleted file mode 100644 index 7672901a6e1..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/combo.css +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-combo-list { - border-color:#98c0f4; - background-color:#ddecfe; - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#fff; -} - -.x-combo-list-hd { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#98c0f4; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#98c0f4; -} - -.x-combo-list-item { - border-color:#fff; -} - -.x-combo-list .x-combo-selected{ - border-color:#a3bae9 !important; - background-color:#dfe8f6; -} - -.x-combo-list .x-toolbar { - border-top-color:#98c0f4; -} - -.x-combo-list-small { - font:normal 11px tahoma, arial, helvetica, sans-serif; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/core.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/core.css deleted file mode 100644 index 5c2aea52a4f..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/core.css +++ /dev/null @@ -1,82 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#6593cf; - background-color:#c3daf9; - background-image:url(../images/default/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#a3bad9; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -/* -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #deecfd; -} -*/ - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/date-picker.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/date-picker.css deleted file mode 100644 index 93b593a3e89..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/date-picker.css +++ /dev/null @@ -1,143 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-date-picker { - border-color: #1b376c; - background-color:#fff; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/default/shared/hd-sprite.gif); - color:#fff; - font:bold 11px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/default/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/default/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-bottom-color:#a3bad9; - font:normal 10px arial, helvetica,tahoma,sans-serif; - color:#233d6d; -} - -.x-date-inner td { - border-color:#fff; -} - -.x-date-inner a { - font:normal 11px arial, helvetica,tahoma,sans-serif; - color:#000; -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-inner .x-date-today a{ - border-color:darkred; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#a3bad9; - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#000; - background-color:#ddecfe; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:10px; - color:#000; -} - -.x-date-mp { - background-color:#fff; -} - -.x-date-mp td { - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#083772; - color:#fff; - border-color: #3366cc #000055 #000055 #3366cc; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); -} - -.x-date-mp-btns td { - border-top-color: #c5d2df; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color:#15428b; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#15428b; - background-color: #ddecfe; -} - -td.x-date-mp-sel a { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-mp-ybtn a { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#c5d2df; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/dd.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/dd.css deleted file mode 100644 index 3dca9de4356..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/dd.css +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/debug.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/debug.css deleted file mode 100644 index 111dd001d71..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/debug.css +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -#x-debug-browser .x-tree .x-tree-node a span { - color:#222297; - font-size:11px; - font-family:"monotype","courier new",sans-serif; -} - -#x-debug-browser .x-tree a i { - color:#ff4545; - font-style:normal; -} - -#x-debug-browser .x-tree a em { - color:#999; -} - -#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ - background-color:#c3daf9; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/dialog.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/dialog.css deleted file mode 100644 index 0cb26f8b4bd..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/dialog.css +++ /dev/null @@ -1,34 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/default/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/default/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/default/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/default/window/icon-error.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/editor.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/editor.css deleted file mode 100644 index 9cc571cdc4f..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/editor.css +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-html-editor-wrap { - border-color:#a9bfd3; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/form.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/form.css deleted file mode 100644 index df551889ca8..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/form.css +++ /dev/null @@ -1,123 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-form-field { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field { - background-color:#fff; - background-image:url(../images/default/form/text-bg.gif); - border-color:#b5b8c8; -} - -.x-form-select-one { - background-color:#fff; - border-color:#b5b8c8; -} - -.x-form-check-group-label { - border-bottom: 1px solid #99bbe8; - color: #15428b; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger { - background-image:url(../images/default/form/trigger.gif); - border-bottom-color:#b5b8c8; -} - -.x-form-field-wrap .x-form-date-trigger { - background-image: url(../images/default/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger { - background-image: url(../images/default/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger { - background-image: url(../images/default/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger { - border-bottom-color:#7eadd9; -} - -.x-item-disabled .x-form-trigger-over { - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click { - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus { - border-color:#7eadd9; -} - -.x-form-invalid, textarea.x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-invalid.x-form-composite { - border: none; - background-image: none; -} - -.x-form-invalid.x-form-composite .x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 11px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:gray; -} - -.x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.ext-webkit .x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-fieldset { - border-color:#b5b8c8; -} - -.x-fieldset legend { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/grid.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/grid.css deleted file mode 100644 index 871bcca856d..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/grid.css +++ /dev/null @@ -1,277 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#99bbe8; -} - -.x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px/13px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - font:normal 11px/15px arial, tahoma, helvetica, sans-serif; -} - - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#aaccf6; - border-right-color:#aaccf6; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#15428b; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -td.grid-hd-group-cell { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; -} - -.x-grid3-row-selected { - background-color: #dfe8f6 !important; - background-image: none; - border-color:#a3bae9; -} - -.x-grid3-cell-selected{ - background-color: #b8cfee !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#15428b !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c3daf9; - background-image:url(../images/default/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/default/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#99bbe8; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-collapse.gif); - color:#3764a0; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/layout.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/layout.css deleted file mode 100644 index eaa983eab4e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/layout.css +++ /dev/null @@ -1,53 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-border-layout-ct { - background-color:#dfe8f6; -} - -.x-accordion-hd { - color:#222; - font-weight:normal; - background-image: url(../images/default/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#d2e0f2; - border-color:#98c0f4; -} - -.x-layout-collapsed-over{ - background-color:#d9e8fb; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/list-view.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/list-view.css deleted file mode 100644 index 424650b256a..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/list-view.css +++ /dev/null @@ -1,37 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#dfe8f6; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/default/grid/sort-hd.gif); - border-color: #99bbe8; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/menu.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/menu.css deleted file mode 100644 index 49a816ada43..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/menu.css +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#718bb7; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/default/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/default/menu/item-over.gif); - background-color: #dbecf4; - border-color:#aaccf6; -} - -.x-menu-item-active a.x-menu-item { - border-color:#aaccf6; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/default/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#f0f0f0 !important; - background-image: none; -} - -.x-date-menu, .x-color-menu{ - background-color: #fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/panel.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/panel.css deleted file mode 100644 index d72ba21d443..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/panel.css +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-panel { - border-color: #99bbe8; -} - -.x-panel-header { - color:#15428b; - font-weight:bold; - font-size: 11px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#99bbe8; - background-image: url(../images/default/panel/white-top-bottom.gif); -} - -.x-panel-body { - border-color:#99bbe8; - background-color:#fff; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#99bbe8; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#99bbe8; -} - -.x-panel-tl .x-panel-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/default/panel/corners-sprite.gif); - border-bottom-color:#99bbe8; -} - -.x-panel-bc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-panel-ml { - background-color: #fff; - background-image:url(../images/default/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/default/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#cbddf3; -} - -.x-panel-ghost ul { - border-color:#99bbe8; -} - -.x-panel-dd-spacer { - border-color:#99bbe8; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/pivotgrid.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/pivotgrid.css deleted file mode 100644 index fb158a7002d..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/pivotgrid.css +++ /dev/null @@ -1,28 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-pivotgrid .x-grid3-header-offset table td { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x 50% 100%; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; -} - -.x-pivotgrid .x-grid3-row-headers { - background-color: #f9f9f9; -} - -.x-pivotgrid .x-grid3-row-headers table td { - background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; - border-bottom: 1px solid; - border-bottom-color: #D0D0D0; - height: 18px; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/progress.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/progress.css deleted file mode 100644 index 7d90190c0da..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/progress.css +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-progress-wrap { - border-color:#6593cf; -} - -.x-progress-inner { - background-color:#e0e8f3; - background-image:url(../images/default/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#9cbfee; - background-image:url(../images/default/progress/progress-bg.gif); - border-top-color:#d1e4fd; - border-bottom-color:#7fa9e4; - border-right-color:#7fa9e4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#396095; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/qtips.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/qtips.css deleted file mode 100644 index 8c9eda5f0a0..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/qtips.css +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tip .x-tip-close{ - background-image: url(../images/default/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/default/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/default/qtip/tip-anchor-sprite.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/resizable.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/resizable.css deleted file mode 100644 index 2ee809119f7..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/resizable.css +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/default/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/default/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/default/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/default/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/default/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/default/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/default/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/slider.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/slider.css deleted file mode 100644 index b82a4e07864..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/slider.css +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/default/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/default/slider/slider-v-thumb.png); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/tabs.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/tabs.css deleted file mode 100644 index c3615288fa2..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/tabs.css +++ /dev/null @@ -1,127 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tab-panel-header, .x-tab-panel-footer { - background-color: #deecfd; - border-color:#8db2e3; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#8db2e3; -} - -ul.x-tab-strip-top{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-bg.gif); - border-bottom-color:#8db2e3; -} - -ul.x-tab-strip-bottom{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); - border-top-color:#8db2e3; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#8db2e3; - background-color: #deecfd; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 11px tahoma,arial,helvetica; - color:#416aa3; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#15428b; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#15428b; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/default/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#8db2e3; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/default/tabs/scroll-left.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/default/tabs/scroll-right.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#99bbe8; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/toolbar.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/toolbar.css deleted file mode 100644 index bfd0e5fe6d1..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/toolbar.css +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-toolbar{ - border-color:#a9bfd3; - background-color:#d0def0; - background-image:url(../images/default/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-blue-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/default/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/default/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/default/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/default/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/refresh-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/default/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/default/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/default/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/default/toolbar/more.gif) !important; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/tree.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/tree.css deleted file mode 100644 index 06237935979..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/tree.css +++ /dev/null @@ -1,152 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #d9e8fb; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/visual/window.css b/web-client/src/main/resources/apps/js/ext/resources/css/visual/window.css deleted file mode 100644 index e556dcf81f0..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/visual/window.css +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.x-window-proxy { - background-color:#c7dffc; - border-color:#99bbe8; -} - -.x-window-tl .x-window-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-mc { - border-color:#99bbe8; - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-window-ml { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#99bbe8; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#84a0c4; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #ccd9e8; - border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; -} - -.x-window-plain .x-window-body { - border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #ccd9e8; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-access.css b/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-access.css deleted file mode 100644 index 44d0f95e5f5..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-access.css +++ /dev/null @@ -1,1820 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -body { - background-color:#16181a; - color:#fcfcfc; -} - -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#223; - background-color:#3f4757; - background-image:url(../images/access/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #232d38; - border-color:#556; - color:#fff; - font:normal 14px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#232d38; - background-image:url(../images/access/grid/loading.gif); -} - -.x-item-disabled { - color: #ddd; -} - -.x-item-disabled * { - color: #ddd !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 14px; - background-image: url(../images/access/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -}.x-tab-panel-header, .x-tab-panel-footer { - background-color:#e18325; - border-color:#8db2e3; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#222; -} - -ul.x-tab-strip-top{ - background-color:#343843; - background-image: url(../images/access/tabs/tab-strip-bg.gif); - border-bottom-color:#343d4e; -} - -ul.x-tab-strip-bottom{ - background-color:#343843; - background-image: url(../images/access/tabs/tab-strip-btm-bg.gif); - border-top-color:#343843; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#222; - background-color:#e18325; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 14px tahoma,arial,helvetica; - color:#fff; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#fff; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#fff; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/access/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/access/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/access/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/access/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/access/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/access/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/access/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#18181a; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/access/tabs/scroll-left.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/access/tabs/scroll-right.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#99bbe8; -} -.x-form-field { - font:normal 15px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field{ - color: #ffffff; - background-color:#33373d; - background-image:url(../images/access/form/text-bg.gif); - border-color:#737b8c; - border-width:2px; -} - -.ext-webkit .x-form-text, .ext-webkit textarea.x-form-field{ - border-width:2px; -} - -.x-form-text, .ext-ie .x-form-file { - height:26px; -} - -.ext-strict .x-form-text { - height:20px; -} - -.x-form-select-one { - background-color:#fff; - border-color:#b5b8c8; -} - -.x-form-check-group-label { - border-bottom: 1px solid #99bbe8; - color: #fff; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger{ - background-image:url(../images/access/form/trigger.gif); - border-bottom-color:#737b8c; - border-bottom-width:2px; - height:24px; - width:20px; -} - -.x-form-field-wrap .x-form-trigger.x-form-trigger-over{ - border-bottom-color:#d97e27; -} - -.x-form-field-wrap .x-form-trigger.x-form-trigger-click{ - border-bottom-color:#c86e19; -} - -.x-small-editor .x-form-field-wrap .x-form-trigger { - height:24px; -} - -.x-form-field-wrap .x-form-trigger-over { - background-position:-20px 0; -} - -.x-form-field-wrap .x-form-trigger-click { - background-position:-40px 0; -} - -.x-trigger-wrap-focus .x-form-trigger { - background-position:-60px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-over { - background-position:-80px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-click { - background-position:-100px 0; -} - -.x-form-field-wrap .x-form-date-trigger{ - background-image: url(../images/access/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger{ - background-image: url(../images/access/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger{ - background-image: url(../images/access/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger{ - border-bottom-color:#737b8c; -} - -.x-item-disabled .x-form-trigger-over{ - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click{ - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus{ - border-color:#ff9c33; -} - -.x-form-invalid, textarea.x-form-invalid, -.ext-webkit .x-form-invalid, .ext-webkit textarea.x-form-invalid{ - background-color:#15171a; - background-image:url(../images/access/grid/invalid_line.gif); - border-color:#c30; -} - -/* -.ext-safari .x-form-invalid{ - background-color:#fee; - border-color:#ff7870; -} -*/ - -.x-form-inner-invalid, textarea.x-form-inner-invalid{ - background-color:#fff; - background-image:url(../images/access/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 15px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 15px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 14px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:#dadadd; -} - -.x-small-editor .x-form-text { - height: 26px; -} - -.x-small-editor .x-form-field { - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.ext-safari .x-small-editor .x-form-field { - font:normal 15px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/access/form/exclamation.gif); - height:25px; - width:19px; - background-position:center right; -} - -.x-fieldset { - border-color:#737B8C; -} - -.x-fieldset legend { - font:bold 14px tahoma, arial, helvetica, sans-serif; - color:#fff; -} -.x-btn { - font:normal 14px tahoma, verdana, helvetica; -} - -.x-btn button { - font:normal 14px arial,tahoma,verdana,helvetica; - color:#fffffa; - padding-left:6px !important; - padding-right:6px !important; -} - -.x-btn-over .x-btn button{ - color:#fff; -} - -.x-btn-noicon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-left .x-btn-text, -.x-btn-icon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-right .x-btn-text { - height:18px; -} - -.x-btn-icon .x-btn-small .x-btn-text { - width:18px; -} - -.x-btn-text-icon .x-btn-icon-small-left .x-btn-text { - padding-left:21px !important; -} - -.x-btn-text-icon .x-btn-icon-small-right .x-btn-text { - padding-right:21px !important; -} - -.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text { - padding-left:29px !important; -} - -.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text { - padding-right:29px !important; -} - -.x-btn-text-icon .x-btn-icon-large-left .x-btn-text { - padding-left:37px !important; -} - -.x-btn-text-icon .x-btn-icon-large-right .x-btn-text { - padding-right:37px !important; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/access/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#fff; -} - -.x-btn-disabled *{ - color:#eee !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/access/button/arrow.gif); - padding-right:13px; -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/access/button/s-arrow.gif); - padding-right:20px; -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/access/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/access/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #d2d2d2; -} - -.x-btn-group-tc { - background-image: url(../images/access/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/access/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/access/button/group-lr.gif); -} - -.x-btn-group-mr { - background-image: url(../images/access/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/access/button/group-tb.gif); -} -.x-toolbar{ - border-color:#18181a; - background-color:#393d4e; - background-image:url(../images/access/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 14px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/access/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/access/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/access/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/access/grid/grid-blue-split.gif); -} - -.x-toolbar .x-btn { - padding-left:3px; - padding-right:3px; -} - -.x-toolbar .x-btn-mc em.x-btn-arrow { - padding-right:10px; -} - -.x-toolbar .x-btn-text-icon .x-btn-icon-small-left .x-btn-text { - padding-left:18px !important; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - padding-right:14px; -} - -.x-tbar-page-first{ - background-image: url(../images/access/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/access/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/access/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/access/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/access/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/access/grid/loading.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/access/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/access/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/access/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/access/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/access/toolbar/more.gif) !important; -} - -.x-statusbar .x-status-busy { - background-image: url(../images/access/grid/loading.gif); -} - -.x-statusbar .x-status-text-panel { - border-color: #99bbe8 #fff #fff #99bbe8; -} -.x-resizable-handle { - background-color:#fff; - color: #000; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/access/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/access/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/access/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/access/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/access/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/access/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/access/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#1f2933; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#223; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - border-left-color:#556; - border-right-color:#223; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border:0 none; - border-bottom:1px solid #111; - border-right:1px solid #1a1a1c; -} - -.x-grid3-row-alt{ - background-color:#1b232b; -} - -.x-grid3-row-over { - background-color:#7e5530; -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#3b3f50; - background-image:url(../images/access/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#889; - border-right-color:#445; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#4e628a; - background-image:url(../images/access/grid/grid3-hrow-over.gif); -} - -.x-grid3-cell-inner, .x-grid3-hd-inner { - color:#fff; -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/access/grid/sort_asc.gif); - width:15px; - height:9px; - margin-left:5px; -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/access/grid/sort_desc.gif); - width:15px; - height:9px; - margin-left:5px; -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#fff; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#fff; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/access/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -.x-grid3-row-selected { - background-color: #e5872c !important; - background-image: none; - border-style: solid; -} - -.x-grid3-row-selected .x-grid3-cell { - color: #fff; -} - -.x-grid3-cell-selected { - background-color: #ffa340 !important; - color:#fff; -} - -.x-grid3-cell-selected span{ - color:#fff !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#fff; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#fff; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#fff !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/access/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/access/grid/grid3-special-col-bg.gif) !important; - color:#fff !important; -} -.x-props-grid .x-grid3-td-value { - color:#fff !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#263240 !important; - border-right-color:#223; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c2c9d0; - background-image:url(../images/access/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/access/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#fff; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/access/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#4e628a; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/access/grid/group-collapse.gif); - background-position:3px 6px; - color:#ffd; - font:bold 14px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/access/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 14px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row{ - border-top-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -} -.x-dd-drag-ghost{ - color:#000; - font: normal 14px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -} -.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/access/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/access/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.ext-ie .x-tree-node-el input { - width:14px; - height:14px; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/access/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/access/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/access/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/access/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/access/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/access/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/access/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#fff; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#fff; -} - -.x-tree-node .x-tree-selected a, .x-dd-drag-ghost a{ - color:#fff; -} - -.x-tree-node .x-tree-selected a span, .x-dd-drag-ghost a span{ - color:#fff; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #7e5530; -} - -.x-tree-node .x-tree-selected { - background-color: #e5872c; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -} -.x-date-picker { - border-color: #737b8c; - background-color:#21252e; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/access/shared/hd-sprite.gif); - color:#fff; - font:bold 14px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/access/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/access/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/access/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#363d4a; - background-image:url(../images/access/toolbar/bg.gif); - border-bottom-color:#535b5c; - font:normal 13px arial, helvetica,tahoma,sans-serif; - color:#fff; -} - -.x-date-inner td { - border-color:#112; -} - -.x-date-inner a { - font:normal 14px arial, helvetica,tahoma,sans-serif; - color:#fff; - padding:2px 7px 1px 3px; /* Structure to account for larger, bolder fonts in Access theme. */ -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-color:#e5872c; - background-image:none; - border-color:#864900; - padding:1px 6px 1px 2px; /* Structure to account for larger, bolder fonts in Access theme. */ -} - -.x-date-inner .x-date-today a{ - border-color:#99a; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#737b8c; - background-color:#464d5a; - background-image:url(../images/access/shared/glass-bg.gif); -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#fff; - background-color:#7e5530; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:13px; - color:#000; -} - -.x-date-mp { - background-color:#21252e; -} - -.x-date-mp td { - font:normal 14px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#083772; - color:#fff; - border-color: #3366cc #000055 #000055 #3366cc; - font:normal 14px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color: #dfecfb; - background-image: url(../images/access/shared/glass-bg.gif); -} - -.x-date-mp-btns td { - border-top-color: #c5d2df; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color:#fff; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#fff; - background-color: #7e5530; -} - -td.x-date-mp-sel a { - background-color: #e5872c; - background-image: none; - border-color:#864900; -} - -.x-date-mp-ybtn a { - background-image:url(../images/access/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#c5d2df; -} -.x-tip .x-tip-close{ - background-image: url(../images/access/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/access/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 14px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 14px tahoma,arial,helvetica,sans-serif; - color:#ffd; -} - -.x-tip .x-tip-body { - font: normal 14px tahoma,arial,helvetica,sans-serif; - color:#000; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/access/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/access/qtip/tip-anchor-sprite.gif); -} -.x-menu { - border-color:#222; - background-color:#414551; - background-image:url(../images/access/menu/menu.gif); -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 14px tahoma,arial, sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/access/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#223; - border-bottom-color:#666; -} - -a.x-menu-item { - color:#fffff6; -} - -.x-menu-item-active { - background-color: #f09134; - background-image: none; - border-color:#b36427; -} - -.x-menu-item-active a.x-menu-item { - border-color:#b36427; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/access/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} -.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 15px; -} - -.x-box-mc h3 { - font-size: 18px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -} -.x-combo-list { - border:2px solid #232732; - background-color:#555566; - font:normal 15px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#414551; -} - -.x-combo-list-hd { - font:bold 14px tahoma, arial, helvetica, sans-serif; - color:#fff; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#98c0f4; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#98c0f4; -} - -.x-combo-list-item { - border-color:#556; -} - -.x-combo-list .x-combo-selected { - border-color:#e5872c !important; - background-color:#e5872c; -} - -.x-combo-list .x-toolbar { - border-top-color:#98c0f4; -} - -.x-combo-list-small { - font:normal 14px tahoma, arial, helvetica, sans-serif; -} -.x-panel { - border-color: #18181a; - font-size: 14px; -} - -.x-panel-header { - color:#fff; - font-weight:bold; - font-size: 14px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#18181a; - background-image: url(../images/access/panel/white-top-bottom.gif); -} - -.x-panel-body { - color: #fffff6; - border-color:#18181a; - background-color:#232d38; -} - -.x-tab-panel .x-panel-body { - color: #fffff6; - border-color:#18181a; - background-color:#1f2730; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#223; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#223; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#223; -} - -.x-panel-tl .x-panel-header { - color:#fff; - font:bold 14px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/access/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/access/panel/corners-sprite.gif); - border-bottom-color:#222224; -} - -.x-panel-bc { - background-image: url(../images/access/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 14px tahoma,arial,helvetica,sans-serif; - background-color:#3f4757; -} - -.x-panel-ml { - background-image:url(../images/access/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/access/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/access/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#3f4757; -} - -.x-panel-ghost ul { - border-color:#18181a; -} - -.x-panel-dd-spacer { - border-color:#18181a; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 14px arial,tahoma, helvetica, sans-serif; -} -.x-window-proxy { - background-color:#1f2833; - border-color:#18181a; -} - -.x-window-tl .x-window-header { - color:#fff; - font:bold 14px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/access/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/access/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/access/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/access/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/access/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/access/window/right-corners.png); -} - -.x-window-mc { - border-color:#18181a; - font: normal 14px tahoma,arial,helvetica,sans-serif; - background-color:#1f2833; -} - -.x-window-ml { - background-image: url(../images/access/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/access/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#323945; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#323945; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#323945; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #464f61; - border-color: #636778; -} - -.x-window-plain .x-window-body { - color: #fffff6; - border-color: #464F61; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #464f61; -} -.x-html-editor-wrap { - border-color:#737B8C; - background-color:#fff; -} -.x-html-editor-wrap iframe { - background-color: #fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/access/editor/tb-sprite.gif); -}.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#343d4e; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#343d4e; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#343d4e; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#343d4e; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#343d4e; -} -.x-border-layout-ct { - background-color:#3f4757; -} - -.x-accordion-hd { - color:#fff; - font-weight:normal; - background-image: url(../images/access/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#323845; - border-color:#1a1a1c; -} - -.x-layout-collapsed-over{ - background-color:#2d3440; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-progress-wrap { - border-color:#18181a; -} - -.x-progress-inner { - background-color:#232d38; - background-image:none; -} - -.x-progress-bar { - background-color:#f39a00; - background-image:url(../images/access/progress/progress-bg.gif); - border-top-color:#a66900; - border-bottom-color:#a66900; - border-right-color:#ffb941; - height: 20px !important; /* structural override for Accessibility Theme */ -} - -.x-progress-text { - font-size:14px; - font-weight:bold; - color:#fff; - padding: 0 5px !important; /* structural override for Accessibility Theme */ -} - -.x-progress-text-back { - color:#aaa; - line-height: 19px; -} -.x-list-header{ - background-color:#393d4e; - background-image:url(../images/access/toolbar/bg.gif); - background-position:0 top; -} - -.x-list-header-inner div em { - border-left-color:#667; - font:normal 14px arial, tahoma, helvetica, sans-serif; - line-height: 14px; -} - -.x-list-body-inner { - background-color:#1B232B; -} - -.x-list-body dt em { - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#7E5530; -} - -.x-list-selected { - background-color:#E5872C; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/access/grid/sort-hd.gif); - border-color: #3e4e6c; -} -.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/access/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/access/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/access/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/access/slider/slider-v-thumb.png); -} -.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:15px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 15px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/access/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/access/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/access/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/access/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/access/window/icon-error.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-blue.css b/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-blue.css deleted file mode 100644 index a6d1502e1d4..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-blue.css +++ /dev/null @@ -1,1674 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#6593cf; - background-color:#c3daf9; - background-image:url(../images/default/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#a3bad9; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -/* -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #deecfd; -} -*/ - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -} -.x-tab-panel-header, .x-tab-panel-footer { - background-color: #deecfd; - border-color:#8db2e3; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#8db2e3; -} - -ul.x-tab-strip-top{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-bg.gif); - border-bottom-color:#8db2e3; -} - -ul.x-tab-strip-bottom{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); - border-top-color:#8db2e3; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#8db2e3; - background-color: #deecfd; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 11px tahoma,arial,helvetica; - color:#416aa3; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#15428b; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#15428b; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/default/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#8db2e3; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/default/tabs/scroll-left.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/default/tabs/scroll-right.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#99bbe8; -}.x-form-field { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field { - background-color:#fff; - background-image:url(../images/default/form/text-bg.gif); - border-color:#b5b8c8; -} - -.x-form-select-one { - background-color:#fff; - border-color:#b5b8c8; -} - -.x-form-check-group-label { - border-bottom: 1px solid #99bbe8; - color: #15428b; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger { - background-image:url(../images/default/form/trigger.gif); - border-bottom-color:#b5b8c8; -} - -.x-form-field-wrap .x-form-date-trigger { - background-image: url(../images/default/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger { - background-image: url(../images/default/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger { - background-image: url(../images/default/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger { - border-bottom-color:#7eadd9; -} - -.x-item-disabled .x-form-trigger-over { - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click { - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus { - border-color:#7eadd9; -} - -.x-form-invalid, textarea.x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-invalid.x-form-composite { - border: none; - background-image: none; -} - -.x-form-invalid.x-form-composite .x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 11px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:gray; -} - -.x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.ext-webkit .x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-fieldset { - border-color:#b5b8c8; -} - -.x-fieldset legend { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; -} -.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/default/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #3e6aaa; -} - -.x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/default/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/default/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -}.x-toolbar{ - border-color:#a9bfd3; - background-color:#d0def0; - background-image:url(../images/default/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-blue-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/default/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/default/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/default/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/default/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/refresh-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/default/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/default/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/default/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/default/toolbar/more.gif) !important; -}.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/default/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/default/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/default/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/default/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/default/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/default/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/default/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#99bbe8; -} - -.x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px/13px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - font:normal 11px/15px arial, tahoma, helvetica, sans-serif; -} - - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#aaccf6; - border-right-color:#aaccf6; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#15428b; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -td.grid-hd-group-cell { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; -} - -.x-grid3-row-selected { - background-color: #dfe8f6 !important; - background-image: none; - border-color:#a3bae9; -} - -.x-grid3-cell-selected{ - background-color: #b8cfee !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#15428b !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c3daf9; - background-image:url(../images/default/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/default/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#99bbe8; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-collapse.gif); - color:#3764a0; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -}.x-pivotgrid .x-grid3-header-offset table td { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x 50% 100%; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; -} - -.x-pivotgrid .x-grid3-row-headers { - background-color: #f9f9f9; -} - -.x-pivotgrid .x-grid3-row-headers table td { - background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; - border-bottom: 1px solid; - border-bottom-color: #D0D0D0; - height: 18px; -} -.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -}.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #d9e8fb; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -}.x-date-picker { - border-color: #1b376c; - background-color:#fff; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/default/shared/hd-sprite.gif); - color:#fff; - font:bold 11px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/default/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/default/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-bottom-color:#a3bad9; - font:normal 10px arial, helvetica,tahoma,sans-serif; - color:#233d6d; -} - -.x-date-inner td { - border-color:#fff; -} - -.x-date-inner a { - font:normal 11px arial, helvetica,tahoma,sans-serif; - color:#000; -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-inner .x-date-today a{ - border-color:darkred; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#a3bad9; - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#000; - background-color:#ddecfe; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:10px; - color:#000; -} - -.x-date-mp { - background-color:#fff; -} - -.x-date-mp td { - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#083772; - color:#fff; - border-color: #3366cc #000055 #000055 #3366cc; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); -} - -.x-date-mp-btns td { - border-top-color: #c5d2df; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color:#15428b; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#15428b; - background-color: #ddecfe; -} - -td.x-date-mp-sel a { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-mp-ybtn a { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#c5d2df; -}.x-tip .x-tip-close{ - background-image: url(../images/default/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/default/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/default/qtip/tip-anchor-sprite.gif); -}.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#718bb7; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/default/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/default/menu/item-over.gif); - background-color: #dbecf4; - border-color:#aaccf6; -} - -.x-menu-item-active a.x-menu-item { - border-color:#aaccf6; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/default/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#f0f0f0 !important; - background-image: none; -} - -.x-date-menu, .x-color-menu{ - background-color: #fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} -.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 12px; -} - -.x-box-mc h3 { - font-size: 14px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -}.x-combo-list { - border-color:#98c0f4; - background-color:#ddecfe; - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#fff; -} - -.x-combo-list-hd { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#98c0f4; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#98c0f4; -} - -.x-combo-list-item { - border-color:#fff; -} - -.x-combo-list .x-combo-selected{ - border-color:#a3bae9 !important; - background-color:#dfe8f6; -} - -.x-combo-list .x-toolbar { - border-top-color:#98c0f4; -} - -.x-combo-list-small { - font:normal 11px tahoma, arial, helvetica, sans-serif; -}.x-panel { - border-color: #99bbe8; -} - -.x-panel-header { - color:#15428b; - font-weight:bold; - font-size: 11px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#99bbe8; - background-image: url(../images/default/panel/white-top-bottom.gif); -} - -.x-panel-body { - border-color:#99bbe8; - background-color:#fff; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#99bbe8; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#99bbe8; -} - -.x-panel-tl .x-panel-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/default/panel/corners-sprite.gif); - border-bottom-color:#99bbe8; -} - -.x-panel-bc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-panel-ml { - background-color: #fff; - background-image:url(../images/default/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/default/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#cbddf3; -} - -.x-panel-ghost ul { - border-color:#99bbe8; -} - -.x-panel-dd-spacer { - border-color:#99bbe8; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} -.x-window-proxy { - background-color:#c7dffc; - border-color:#99bbe8; -} - -.x-window-tl .x-window-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-mc { - border-color:#99bbe8; - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-window-ml { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#99bbe8; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#84a0c4; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #ccd9e8; - border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; -} - -.x-window-plain .x-window-body { - border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #ccd9e8; -}.x-html-editor-wrap { - border-color:#a9bfd3; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -}.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -}.x-border-layout-ct { - background-color:#dfe8f6; -} - -.x-accordion-hd { - color:#222; - font-weight:normal; - background-image: url(../images/default/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#d2e0f2; - border-color:#98c0f4; -} - -.x-layout-collapsed-over{ - background-color:#d9e8fb; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -}.x-progress-wrap { - border-color:#6593cf; -} - -.x-progress-inner { - background-color:#e0e8f3; - background-image:url(../images/default/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#9cbfee; - background-image:url(../images/default/progress/progress-bg.gif); - border-top-color:#d1e4fd; - border-bottom-color:#7fa9e4; - border-right-color:#7fa9e4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#396095; -}.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#dfe8f6; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/default/grid/sort-hd.gif); - border-color: #99bbe8; -}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/default/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/default/slider/slider-v-thumb.png); -}.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/default/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/default/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/default/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/default/window/icon-error.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-gray.css b/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-gray.css deleted file mode 100644 index 8dc9c2a5ff3..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/xtheme-gray.css +++ /dev/null @@ -1,1682 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#999; - background-color:#ddd; - background-image:url(../images/gray/panel/white-top-bottom.gif); - background-position: 0 -1px; -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#d0d0d0; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#CFCFCF; - background-color: #eaeaea; -} - -/* -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #eaeaea; -} -*/ - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -}.x-tab-panel-header, .x-tab-panel-footer { - background-color: #eaeaea; - border-color:#d0d0d0; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#d0d0d0; -} - -ul.x-tab-strip-top{ - background-color:#dbdbdb; - background-image: url(../images/gray/tabs/tab-strip-bg.gif); - border-bottom-color:#d0d0d0; -} - -ul.x-tab-strip-bottom{ - background-color:#dbdbdb; - background-image: url(../images/gray/tabs/tab-strip-btm-bg.gif); - border-top-color:#d0d0d0; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#d0d0d0; - background-color: #eaeaea; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 11px tahoma,arial,helvetica; - color:#333; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#111; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#333; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/gray/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/gray/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/gray/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { - background-image: url(../images/gray/tabs/tab-btm-over-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { - background-image: url(../images/gray/tabs/tab-btm-over-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/gray/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/gray/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/gray/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/gray/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#d0d0d0; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/gray/tabs/scroll-left.gif); - border-bottom-color:#d0d0d0; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/gray/tabs/scroll-right.gif); - border-bottom-color:#d0d0d0; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#d0d0d0; -} -.x-form-field{ - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field{ - background-color:#fff; - background-image:url(../images/default/form/text-bg.gif); - border-color:#C1C1C1; -} - -.x-form-select-one { - background-color:#fff; - border-color:#C1C1C1; -} - -.x-form-check-group-label { - border-bottom: 1px solid #d0d0d0; - color: #333; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger{ - background-image:url(../images/gray/form/trigger.gif); - border-bottom-color:#b5b8c8; -} - -.x-form-field-wrap .x-form-date-trigger{ - background-image: url(../images/gray/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger{ - background-image: url(../images/gray/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger{ - background-image: url(../images/gray/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger{ - border-bottom-color: #777777; -} - -.x-item-disabled .x-form-trigger-over{ - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click{ - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus{ - border-color:#777777; -} - -.x-form-invalid, textarea.x-form-invalid{ - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.ext-webkit .x-form-invalid{ - background-color:#fee; - border-color:#ff7870; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid{ - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 11px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:gray; -} - -.x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.ext-webkit .x-small-editor .x-form-field { - font:normal 12px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-fieldset { - border-color:#CCCCCC; -} - -.x-fieldset legend { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#777777; -}.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/gray/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/gray/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/gray/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #666; -} - -.x-btn-group-tc { - background-image: url(../images/gray/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/gray/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/gray/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/gray/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/gray/button/group-tb.gif); -} -.x-toolbar{ - border-color:#d0d0d0; - background-color:#f0f0f0; - background-image:url(../images/gray/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/gray/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/gray/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/gray/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/gray/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/gray/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/gray/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/gray/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/loading.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/default/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/default/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/default/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/gray/toolbar/more.gif) !important; -} -.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/gray/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/gray/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/gray/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/gray/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/gray/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/gray/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/gray/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#565656; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#d0d0d0; -} - -.x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px/13px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - font:normal 11px/15px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow2.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#ACACAC; - border-right-color:#ACACAC; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow-over2.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/gray/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/gray/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#333; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow-over2.gif); - border-color:#ACACAC; -} - -.col-move-top{ - background-image:url(../images/gray/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/gray/grid/col-move-bottom.gif); -} - -.x-grid3-row-selected { - background-color:#CCCCCC !important; - background-image: none; - border-color:#ACACAC; -} - -.x-grid3-cell-selected{ - background-color: #CBCBCB !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#333 !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/gray/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/gray/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#d0d0d0; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/gray/grid/group-collapse.gif); - color:#5F5F5F; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/gray/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row{ - border-top-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#B9B9B9; -} -.x-pivotgrid .x-grid3-header-offset table td { - background: url(../images/gray/grid/grid3-hrow2.gif) repeat-x 50% 100%; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #D0D0D0; - border-right-color: #D0D0D0; -} - -.x-pivotgrid .x-grid3-row-headers { - background-color: #f9f9f9; -} - -.x-pivotgrid .x-grid3-row-headers table td { - background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; - border-bottom: 1px solid; - border-bottom-color: #D0D0D0; - height: 18px; -} -.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#D6D6D6; - border-color:#888888; -}.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.ext-ie .x-tree-node-el input { - width:15px; - height:15px; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/gray/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/gray/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #ddd; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -} -.x-date-picker { - border-color:#585858; - background-color:#fff; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/gray/shared/hd-sprite.gif); - color:#fff; - font:bold 11px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/gray/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/gray/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/gray/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#D8D8D8; - background-image: url(../images/gray/panel/white-top-bottom.gif); - border-bottom-color:#AFAFAF; - font:normal 10px arial, helvetica,tahoma,sans-serif; - color:#595959; -} - -.x-date-inner td { - border-color:#fff; -} - -.x-date-inner a { - font:normal 11px arial, helvetica,tahoma,sans-serif; - color:#000; -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-image: none; - background-color:#D8D8D8; - border-color:#DCDCDC; -} - -.x-date-inner .x-date-today a{ - border-color:darkred; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#AFAFAF; - background-color:#D8D8D8; - background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#000; - background-color:#D8D8D8; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:10px; - color:#000; -} - -.x-date-mp { - background-color:#fff; -} - -.x-date-mp td { - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#4E565F; - color:#fff; - border-color:#C0C0C0 #434343 #434343 #C0C0C0; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color:#D8D8D8; - background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; -} - -.x-date-mp-btns td { - border-top-color:#AFAFAF; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color: #333; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#333; - background-color:#FDFDFD; -} - -td.x-date-mp-sel a { - background-color:#D8D8D8; - background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; - border-color:#DCDCDC; -} - -.x-date-mp-ybtn a { - background-image:url(../images/gray/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#D7D7D7; -}.x-tip .x-tip-close{ - background-image: url(../images/gray/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/gray/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/gray/qtip/tip-anchor-sprite.gif); -}.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#7D7D7D; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/gray/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/gray/menu/item-over.gif); - background-color: #f1f1f1; - border-color:#ACACAC; -} - -.x-menu-item-active a.x-menu-item { - border-color:#ACACAC; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/gray/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#fff !important; -} - -.x-menu .x-date-picker{ - border-color:#AFAFAF; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#B9B9B9 !important; - background-color:#F1F1F1; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -}.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 12px; -} - -.x-box-mc h3 { - font-size: 14px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -} -.x-combo-list { - border-color:#ccc; - background-color:#ddd; - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#fff; -} - -.x-combo-list-hd { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#333; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#BCBCBC; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#BEBEBE; -} - -.x-combo-list-item { - border-color:#fff; -} - -.x-combo-list .x-combo-selected{ - border-color:#777 !important; - background-color:#f0f0f0; -} - -.x-combo-list .x-toolbar { - border-top-color:#BCBCBC; -} - -.x-combo-list-small { - font:normal 11px tahoma, arial, helvetica, sans-serif; -}.x-panel { - border-color: #d0d0d0; -} - -.x-panel-header { - color:#333; - font-weight:bold; - font-size: 11px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#d0d0d0; - background-image: url(../images/gray/panel/white-top-bottom.gif); -} - -.x-panel-body { - border-color:#d0d0d0; - background-color:#fff; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#d0d0d0; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#d0d0d0; -} - -.x-panel-tl .x-panel-header { - color:#333; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/gray/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/gray/panel/corners-sprite.gif); - border-bottom-color:#d0d0d0; -} - -.x-panel-bc { - background-image: url(../images/gray/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#f1f1f1; -} - -.x-panel-ml { - background-color: #fff; - background-image:url(../images/gray/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/gray/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/gray/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#f2f2f2; -} - -.x-panel-ghost ul { - border-color:#d0d0d0; -} - -.x-panel-dd-spacer { - border-color:#d0d0d0; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} -.x-window-proxy { - background-color:#fcfcfc; - border-color:#d0d0d0; -} - -.x-window-tl .x-window-header { - color:#555; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/gray/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/gray/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/gray/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/gray/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/gray/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/gray/window/right-corners.png); -} - -.x-window-mc { - border-color:#d0d0d0; - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#e8e8e8; -} - -.x-window-ml { - background-image: url(../images/gray/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/gray/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#d0d0d0; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#d0d0d0; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #E8E8E8; - border-color: #D0D0D0 #EEEEEE #EEEEEE #D0D0D0; -} - -.x-window-plain .x-window-body { - border-color: #EEEEEE #D0D0D0 #D0D0D0 #EEEEEE; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #E4E4E4; -} -.x-html-editor-wrap { - border-color:#BCBCBC; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -} -.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#d0d0d0; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#d0d0d0; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#d0d0d0; -} - -.x-border-layout-ct { - background-color:#f0f0f0; -} -.x-border-layout-ct { - background-color:#f0f0f0; -} - -.x-accordion-hd { - color:#222; - font-weight:normal; - background-image: url(../images/gray/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#dfdfdf; - border-color:#d0d0d0; -} - -.x-layout-collapsed-over{ - background-color:#e7e7e7; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-progress-wrap { - border-color:#8E8E8E; -} - -.x-progress-inner { - background-color:#E7E7E7; - background-image:url(../images/gray/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#BCBCBC; - background-image:url(../images/gray/progress/progress-bg.gif); - border-top-color:#E2E2E2; - border-bottom-color:#A4A4A4; - border-right-color:#A4A4A4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#5F5F5F; -} -.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow2.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#f0f0f0; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/gray/grid/sort-hd.gif); - border-color: #d0d0d0; -} -.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/gray/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/gray/slider/slider-v-thumb.png); -} -.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/gray/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/gray/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/gray/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/gray/window/icon-error.gif); -} diff --git a/web-client/src/main/resources/apps/js/ext/resources/css/yourtheme.css b/web-client/src/main/resources/apps/js/ext/resources/css/yourtheme.css deleted file mode 100644 index ae791943aea..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/css/yourtheme.css +++ /dev/null @@ -1,1652 +0,0 @@ -/*! - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#6593cf; - background-color:#c3daf9; - background-image:url(../images/default/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#a3bad9; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -/* -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #deecfd; -} -*/ - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -} -.x-tab-panel-header, .x-tab-panel-footer { - background-color: #deecfd; - border-color:#8db2e3; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#8db2e3; -} - -ul.x-tab-strip-top{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-bg.gif); - border-bottom-color:#8db2e3; -} - -ul.x-tab-strip-bottom{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); - border-top-color:#8db2e3; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#8db2e3; - background-color: #deecfd; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 11px tahoma,arial,helvetica; - color:#416aa3; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#15428b; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#15428b; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/default/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#8db2e3; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/default/tabs/scroll-left.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/default/tabs/scroll-right.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#99bbe8; -}.x-form-field { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field { - background-color:#fff; - background-image:url(../images/default/form/text-bg.gif); - border-color:#b5b8c8; -} - -.x-form-select-one { - background-color:#fff; - border-color:#b5b8c8; -} - -.x-form-check-group-label { - border-bottom: 1px solid #99bbe8; - color: #15428b; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger { - background-image:url(../images/default/form/trigger.gif); - border-bottom-color:#b5b8c8; -} - -.x-form-field-wrap .x-form-date-trigger { - background-image: url(../images/default/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger { - background-image: url(../images/default/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger { - background-image: url(../images/default/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger { - border-bottom-color:#7eadd9; -} - -.x-item-disabled .x-form-trigger-over { - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click { - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus { - border-color:#7eadd9; -} - -.x-form-invalid, textarea.x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-invalid.x-form-composite { - border: none; - background-image: none; -} - -.x-form-invalid.x-form-composite .x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 11px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:gray; -} - -.x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.ext-webkit .x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-fieldset { - border-color:#b5b8c8; -} - -.x-fieldset legend { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; -} -.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/default/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #3e6aaa; -} - -.x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/default/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/default/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -}.x-toolbar{ - border-color:#a9bfd3; - background-color:#d0def0; - background-image:url(../images/default/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-blue-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/default/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/default/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/default/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/default/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/refresh-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/default/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/default/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/default/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/default/toolbar/more.gif) !important; -}.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/default/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/default/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/default/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/default/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/default/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/default/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/default/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#99bbe8; -} - -.x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px/13px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - font:normal 11px/15px arial, tahoma, helvetica, sans-serif; -} - - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#aaccf6; - border-right-color:#aaccf6; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#15428b; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -td.grid-hd-group-cell { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; -} - -.x-grid3-row-selected { - background-color: #dfe8f6 !important; - background-image: none; - border-color:#a3bae9; -} - -.x-grid3-cell-selected{ - background-color: #b8cfee !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#15428b !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c3daf9; - background-image:url(../images/default/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/default/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#99bbe8; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-collapse.gif); - color:#3764a0; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -}.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -}.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #d9e8fb; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -}.x-date-picker { - border-color: #1b376c; - background-color:#fff; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/default/shared/hd-sprite.gif); - color:#fff; - font:bold 11px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/default/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/default/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-bottom-color:#a3bad9; - font:normal 10px arial, helvetica,tahoma,sans-serif; - color:#233d6d; -} - -.x-date-inner td { - border-color:#fff; -} - -.x-date-inner a { - font:normal 11px arial, helvetica,tahoma,sans-serif; - color:#000; -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-inner .x-date-today a{ - border-color:darkred; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#a3bad9; - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#000; - background-color:#ddecfe; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:10px; - color:#000; -} - -.x-date-mp { - background-color:#fff; -} - -.x-date-mp td { - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#083772; - color:#fff; - border-color: #3366cc #000055 #000055 #3366cc; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); -} - -.x-date-mp-btns td { - border-top-color: #c5d2df; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color:#15428b; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#15428b; - background-color: #ddecfe; -} - -td.x-date-mp-sel a { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-mp-ybtn a { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#c5d2df; -}.x-tip .x-tip-close{ - background-image: url(../images/default/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/default/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/default/qtip/tip-anchor-sprite.gif); -}.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#718bb7; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/default/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/default/menu/item-over.gif); - background-color: #dbecf4; - border-color:#aaccf6; -} - -.x-menu-item-active a.x-menu-item { - border-color:#aaccf6; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/default/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#f0f0f0 !important; - background-image: none; -} - -.x-date-menu, .x-color-menu{ - background-color: #fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} -.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 12px; -} - -.x-box-mc h3 { - font-size: 14px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -}.x-combo-list { - border-color:#98c0f4; - background-color:#ddecfe; - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#fff; -} - -.x-combo-list-hd { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#98c0f4; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#98c0f4; -} - -.x-combo-list-item { - border-color:#fff; -} - -.x-combo-list .x-combo-selected{ - border-color:#a3bae9 !important; - background-color:#dfe8f6; -} - -.x-combo-list .x-toolbar { - border-top-color:#98c0f4; -} - -.x-combo-list-small { - font:normal 11px tahoma, arial, helvetica, sans-serif; -}.x-panel { - border-color: #99bbe8; -} - -.x-panel-header { - color:#15428b; - font-weight:bold; - font-size: 11px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#99bbe8; - background-image: url(../images/default/panel/white-top-bottom.gif); -} - -.x-panel-body { - border-color:#99bbe8; - background-color:#fff; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#99bbe8; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#99bbe8; -} - -.x-panel-tl .x-panel-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/default/panel/corners-sprite.gif); - border-bottom-color:#99bbe8; -} - -.x-panel-bc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-panel-ml { - background-color: #fff; - background-image:url(../images/default/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/default/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#cbddf3; -} - -.x-panel-ghost ul { - border-color:#99bbe8; -} - -.x-panel-dd-spacer { - border-color:#99bbe8; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} -.x-window-proxy { - background-color:#c7dffc; - border-color:#99bbe8; -} - -.x-window-tl .x-window-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-mc { - border-color:#99bbe8; - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-window-ml { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#99bbe8; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#84a0c4; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #ccd9e8; - border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; -} - -.x-window-plain .x-window-body { - border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #ccd9e8; -}.x-html-editor-wrap { - border-color:#a9bfd3; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -}.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -}.x-border-layout-ct { - background-color:#dfe8f6; -} - -.x-accordion-hd { - color:#222; - font-weight:normal; - background-image: url(../images/default/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#d2e0f2; - border-color:#98c0f4; -} - -.x-layout-collapsed-over{ - background-color:#d9e8fb; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -}.x-progress-wrap { - border-color:#6593cf; -} - -.x-progress-inner { - background-color:#e0e8f3; - background-image:url(../images/default/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#9cbfee; - background-image:url(../images/default/progress/progress-bg.gif); - border-top-color:#d1e4fd; - border-bottom-color:#7fa9e4; - border-right-color:#7fa9e4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#396095; -}.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#dfe8f6; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/default/grid/sort-hd.gif); - border-color: #99bbe8; -}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/default/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/default/slider/slider-v-thumb.png); -}.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/default/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/default/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/default/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/default/window/icon-error.gif); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/expressinstall.swf b/web-client/src/main/resources/apps/js/ext/resources/expressinstall.swf deleted file mode 100644 index 613d69b7212..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/expressinstall.swf and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/corners-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/box/corners-blue.gif deleted file mode 100644 index fa419b50abe..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/corners-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/corners.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/box/corners.gif deleted file mode 100644 index 8aa8cae5c83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/corners.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/l-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/box/l-blue.gif deleted file mode 100644 index 5ed7f0043b6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/l-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/l.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/box/l.gif deleted file mode 100644 index 0160f97fe75..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/l.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/r-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/box/r-blue.gif deleted file mode 100644 index 3ea5cae3b7b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/r-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/r.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/box/r.gif deleted file mode 100644 index 34237f6292a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/r.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/tb-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/box/tb-blue.gif deleted file mode 100644 index 4b1382c3499..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/tb-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/tb.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/box/tb.gif deleted file mode 100644 index 435889bffe0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/box/tb.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/arrow.gif deleted file mode 100644 index 087b450da86..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/btn.gif deleted file mode 100644 index 3e705baf565..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-cs.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-cs.gif deleted file mode 100644 index aaf0d4616b3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-cs.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-lr.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-lr.gif deleted file mode 100644 index 374ea754320..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-lr.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-tb.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-tb.gif deleted file mode 100644 index 50a997290d7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/group-tb.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-b-noline.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-b-noline.gif deleted file mode 100644 index 644e9f3c4cb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-b-noline.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-b.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-b.gif deleted file mode 100644 index ba55d0a1275..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-b.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-bo.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-bo.gif deleted file mode 100644 index c672b602be9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-bo.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-noline.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-noline.gif deleted file mode 100644 index f3cd351ebeb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-noline.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-o.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-o.gif deleted file mode 100644 index 4bdafd046de..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow-o.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow.gif deleted file mode 100644 index a77be7fd660..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/button/s-arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/editor/tb-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/editor/tb-sprite.gif deleted file mode 100644 index bd4011d548c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/editor/tb-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/checkbox.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/checkbox.gif deleted file mode 100644 index 835b346cc9e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/checkbox.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/clear-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/clear-trigger.gif deleted file mode 100644 index 9bfd1843ba5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/clear-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/clear-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/clear-trigger.psd deleted file mode 100644 index fcd794477c9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/clear-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/date-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/date-trigger.gif deleted file mode 100644 index 048506d7139..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/date-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/date-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/date-trigger.psd deleted file mode 100644 index d9f9be1d3ad..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/date-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/error-tip-corners.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/error-tip-corners.gif deleted file mode 100644 index 6ea4c383876..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/error-tip-corners.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/exclamation.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/exclamation.gif deleted file mode 100644 index daa88b8b054..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/exclamation.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/radio.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/radio.gif deleted file mode 100644 index 36bb91d0c5b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/radio.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/search-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/search-trigger.gif deleted file mode 100644 index ab8b3b497d3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/search-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/search-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/search-trigger.psd deleted file mode 100644 index 4f92b7256a9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/search-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/text-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/text-bg.gif deleted file mode 100644 index 4ce90bb6176..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/text-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger-tpl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger-tpl.gif deleted file mode 100644 index 2574eadcccc..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger-tpl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger.gif deleted file mode 100644 index bd255727c7b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger.psd deleted file mode 100644 index c078133e4c9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/form/trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/arrow-left-white.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/arrow-left-white.gif deleted file mode 100644 index 63088f56e1c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/arrow-left-white.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/arrow-right-white.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/arrow-right-white.gif deleted file mode 100644 index e9e06789044..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/arrow-right-white.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/col-move-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/col-move-bottom.gif deleted file mode 100644 index cc1e473ecc1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/col-move-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/col-move-top.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/col-move-top.gif deleted file mode 100644 index 58ff32cc8fa..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/col-move-top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/columns.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/columns.gif deleted file mode 100644 index 2d3a82393e3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/columns.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/dirty.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/dirty.gif deleted file mode 100644 index d524ee540f5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/dirty.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/done.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/done.gif deleted file mode 100644 index a937cb22c84..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/done.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/drop-no.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/drop-no.gif deleted file mode 100644 index 31a332bf786..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/drop-no.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/drop-yes.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/drop-yes.gif deleted file mode 100644 index 926010e172a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/drop-yes.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/footer-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/footer-bg.gif deleted file mode 100644 index 126120f71ee..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/footer-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-blue-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-blue-hd.gif deleted file mode 100644 index 862094e6803..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-blue-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-blue-split.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-blue-split.gif deleted file mode 100644 index 1b0bae3a87e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-blue-split.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-hrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-hrow.gif deleted file mode 100644 index 63741042073..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-hrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-loading.gif deleted file mode 100644 index d112c54013e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-split.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-split.gif deleted file mode 100644 index c76a16e9599..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-split.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-vista-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-vista-hd.gif deleted file mode 100644 index d0972638e83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid-vista-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hd-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hd-btn.gif deleted file mode 100644 index 9ecd65061c7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hd-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hrow-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hrow-over.gif deleted file mode 100644 index 0405f6c3f02..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hrow-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hrow.gif deleted file mode 100644 index 509737aa017..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-hrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-special-col-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-special-col-bg.gif deleted file mode 100644 index 8ec57f578d5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-special-col-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-special-col-sel-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-special-col-sel-bg.gif deleted file mode 100644 index 93a9ca6ab68..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/grid3-special-col-sel-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-by.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-by.gif deleted file mode 100644 index d6075bba2fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-by.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-collapse.gif deleted file mode 100644 index 9bd255e72f6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-expand-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-expand-sprite.gif deleted file mode 100644 index f230489a41b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-expand-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-expand.gif deleted file mode 100644 index fd22e6bcbdd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/group-expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hd-pop.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hd-pop.gif deleted file mode 100644 index eb8ba79679e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hd-pop.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-asc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-asc.gif deleted file mode 100644 index 8917e0eee0c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-asc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-desc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-desc.gif deleted file mode 100644 index f26b7c2fc58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-desc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-lock.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-lock.gif deleted file mode 100644 index 1596126108f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-lock.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-lock.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-lock.png deleted file mode 100644 index 8b81e7ff284..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-lock.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-unlock.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-unlock.gif deleted file mode 100644 index af59cf92a42..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-unlock.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-unlock.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-unlock.png deleted file mode 100644 index 9dd5df34b70..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/hmenu-unlock.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/invalid_line.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/invalid_line.gif deleted file mode 100644 index 025cffc7f88..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/invalid_line.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/loading.gif deleted file mode 100644 index e846e1d6c58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/mso-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/mso-hd.gif deleted file mode 100644 index 669f3cf089a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/mso-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/nowait.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/nowait.gif deleted file mode 100644 index 4c5862cd554..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/nowait.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-first-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-first-disabled.gif deleted file mode 100644 index e4df7a7e66c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-first-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-first.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-first.gif deleted file mode 100644 index aa0a822a9d0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-first.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-last-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-last-disabled.gif deleted file mode 100644 index 67fee759aca..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-last-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-last.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-last.gif deleted file mode 100644 index e0cf1117b6e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-last.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-next-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-next-disabled.gif deleted file mode 100644 index e3e8e8736fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-next-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-next.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-next.gif deleted file mode 100644 index 69899c00327..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-next.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-prev-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-prev-disabled.gif deleted file mode 100644 index 0f94bf7be80..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-prev-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-prev.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-prev.gif deleted file mode 100644 index 289b1261231..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/page-prev.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/pick-button.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/pick-button.gif deleted file mode 100644 index 6957924a8bf..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/pick-button.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/refresh.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/refresh.gif deleted file mode 100644 index 8435d1e47ec..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/refresh.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-check-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-check-sprite.gif deleted file mode 100644 index 610116465e7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-check-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-expand-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-expand-sprite.gif deleted file mode 100644 index 6f4d874f57b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-expand-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-over.gif deleted file mode 100644 index b288e38739a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-sel.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-sel.gif deleted file mode 100644 index 98209e6e7f1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/row-sel.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort-hd.gif deleted file mode 100644 index 681628f35cb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort_asc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort_asc.gif deleted file mode 100644 index 371f5e4ceac..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort_asc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort_desc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort_desc.gif deleted file mode 100644 index 000e363a78b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/sort_desc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/wait.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/wait.gif deleted file mode 100644 index 471c1a4f93f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/grid/wait.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/checked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/checked.gif deleted file mode 100644 index fad5893727e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/checked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/group-checked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/group-checked.gif deleted file mode 100644 index d8b08f536c5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/group-checked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/item-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/item-over.gif deleted file mode 100644 index 01678393246..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/item-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/menu-parent.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/menu-parent.gif deleted file mode 100644 index 49286cdf848..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/menu-parent.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/menu.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/menu.gif deleted file mode 100644 index 9bb3960fccd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/menu.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/unchecked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/unchecked.gif deleted file mode 100644 index 43823e52db8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/menu/unchecked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/corners-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/corners-sprite.gif deleted file mode 100644 index 43e2862672c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/corners-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/left-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/left-right.gif deleted file mode 100644 index 51850b795fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/left-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/light-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/light-hd.gif deleted file mode 100644 index 660bedb8479..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/light-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tool-sprite-tpl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tool-sprite-tpl.gif deleted file mode 100644 index e6478670e37..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tool-sprite-tpl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tool-sprites.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tool-sprites.gif deleted file mode 100644 index a3ffe58b479..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tool-sprites.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tools-sprites-trans.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tools-sprites-trans.gif deleted file mode 100644 index ead931ef617..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/tools-sprites-trans.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/top-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/top-bottom.gif deleted file mode 100644 index 6b2649dda02..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/top-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-corners-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-corners-sprite.gif deleted file mode 100644 index 22d4bbab4c5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-corners-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-left-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-left-right.gif deleted file mode 100644 index 51850b795fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-left-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-top-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-top-bottom.gif deleted file mode 100644 index 08f8fae1505..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/panel/white-top-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/progress/progress-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/progress/progress-bg.gif deleted file mode 100644 index 55629b17c20..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/progress/progress-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/close.gif deleted file mode 100644 index 69ab915e4dd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/tip-anchor-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/tip-anchor-sprite.gif deleted file mode 100644 index f46d31d0b68..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/tip-anchor-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/tip-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/tip-sprite.gif deleted file mode 100644 index 9f6a629dc47..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/qtip/tip-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/glass-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/glass-bg.gif deleted file mode 100644 index ed3c88633c0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/glass-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/hd-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/hd-sprite.gif deleted file mode 100644 index 446be9257c2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/hd-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/left-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/left-btn.gif deleted file mode 100644 index 0622439459b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/left-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/right-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/right-btn.gif deleted file mode 100644 index 5e3215d5677..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/shared/right-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/e-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/e-handle-dark.gif deleted file mode 100644 index 70aad3fe71d..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/e-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/e-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/e-handle.gif deleted file mode 100644 index 52c045e22f6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/e-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/ne-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/ne-handle-dark.gif deleted file mode 100644 index 3a30ca224d1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/ne-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/ne-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/ne-handle.gif deleted file mode 100644 index e48f9f9ccb3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/ne-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/nw-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/nw-handle-dark.gif deleted file mode 100644 index 5ea8b518301..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/nw-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/nw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/nw-handle.gif deleted file mode 100644 index 65d5cc201cf..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/nw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/s-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/s-handle-dark.gif deleted file mode 100644 index 421b534807c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/s-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/s-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/s-handle.gif deleted file mode 100644 index 2b635de0d12..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/s-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/se-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/se-handle-dark.gif deleted file mode 100644 index 881a5c42d66..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/se-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/se-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/se-handle.gif deleted file mode 100644 index 5f1e3b800e1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/se-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/square.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/square.gif deleted file mode 100644 index 4dc5a2dae25..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/square.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/sw-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/sw-handle-dark.gif deleted file mode 100644 index 030d8f8d8bd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/sw-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/sw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/sw-handle.gif deleted file mode 100644 index 79bcb848712..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/sizer/sw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-bg.png deleted file mode 100644 index d213754748b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-thumb.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-thumb.png deleted file mode 100644 index 4991a745da0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-thumb.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-v-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-v-bg.png deleted file mode 100644 index f1221c457f6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-v-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-v-thumb.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-v-thumb.png deleted file mode 100644 index e0c0e274552..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/slider/slider-v-thumb.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/scroll-left.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/scroll-left.gif deleted file mode 100644 index 71a2e88c602..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/scroll-left.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/scroll-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/scroll-right.gif deleted file mode 100644 index 8f3d6598ad4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/scroll-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-inactive-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-inactive-left-bg.gif deleted file mode 100644 index 687af2b29c4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-inactive-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-inactive-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-inactive-right-bg.gif deleted file mode 100644 index 3c1b3ebf55a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-inactive-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-left-bg.gif deleted file mode 100644 index e5f827a3608..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-right-bg.gif deleted file mode 100644 index 2551f4c397b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-btm-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-close.gif deleted file mode 100644 index ef9a7c262aa..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-strip-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-strip-bg.gif deleted file mode 100644 index fc1fdcdad6b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-strip-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-strip-btm-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-strip-btm-bg.gif deleted file mode 100644 index a151553e964..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tab-strip-btm-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tabs-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tabs-sprite.gif deleted file mode 100644 index 8194001e374..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tabs/tabs-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/bg.gif deleted file mode 100644 index b67a54e2b2b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-arrow-light.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-arrow-light.gif deleted file mode 100644 index b0e24b55e7e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-arrow-light.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-arrow.gif deleted file mode 100644 index 8acb4608d8f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-over-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-over-bg.gif deleted file mode 100644 index ee2dd9860c7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/btn-over-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/gray-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/gray-bg.gif deleted file mode 100644 index bd49438f339..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/gray-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/more.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/more.gif deleted file mode 100644 index 4f010201be6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/more.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/s-arrow-bo.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/s-arrow-bo.gif deleted file mode 100644 index 1505eddada2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/s-arrow-bo.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-btn-sprite.gif deleted file mode 100644 index 19bbef3c687..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-xl-btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-xl-btn-sprite.gif deleted file mode 100644 index 1bc0420f0f0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-xl-btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-xl-sep.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-xl-sep.gif deleted file mode 100644 index 30555eecf77..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/toolbar/tb-xl-sep.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/arrows.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/arrows.gif deleted file mode 100644 index 2e635eba8c2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/arrows.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-add.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-add.gif deleted file mode 100644 index b22cd1448ef..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-add.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-between.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-between.gif deleted file mode 100644 index 5c6c09d987c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-between.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-no.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-no.gif deleted file mode 100644 index 9d9c6a9ce13..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-no.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-over.gif deleted file mode 100644 index 30d1ca71078..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-under.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-under.gif deleted file mode 100644 index 85f66b1e584..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-under.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-yes.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-yes.gif deleted file mode 100644 index 8aacb307e89..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/drop-yes.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-minus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-minus-nl.gif deleted file mode 100644 index b4ae5959c70..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-minus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-minus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-minus.gif deleted file mode 100644 index 514cf3e0b0b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-minus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-plus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-plus-nl.gif deleted file mode 100644 index 6af2e291499..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-plus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-plus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-plus.gif deleted file mode 100644 index 96df6795dba..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end-plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end.gif deleted file mode 100644 index f24ddee799c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-end.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-line.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-line.gif deleted file mode 100644 index 75e6da4f8ea..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-line.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-minus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-minus-nl.gif deleted file mode 100644 index b4ae5959c70..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-minus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-minus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-minus.gif deleted file mode 100644 index 68ba298f4b1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-minus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-plus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-plus-nl.gif deleted file mode 100644 index 6af2e291499..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-plus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-plus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-plus.gif deleted file mode 100644 index 58ba9e47024..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow-plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow.gif deleted file mode 100644 index b8f42083895..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/elbow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/folder-open.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/folder-open.gif deleted file mode 100644 index 7c52965a666..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/folder-open.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/folder.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/folder.gif deleted file mode 100644 index 501e75c0193..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/folder.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/leaf.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/leaf.gif deleted file mode 100644 index 445769d3f86..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/leaf.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/loading.gif deleted file mode 100644 index e846e1d6c58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/s.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/s.gif deleted file mode 100644 index 1d11fa9ada9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/tree/s.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-error.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-error.gif deleted file mode 100644 index 05c713c76e7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-error.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-info.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-info.gif deleted file mode 100644 index adc06132a13..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-info.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-question.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-question.gif deleted file mode 100644 index 9b31a948e20..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-question.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-warning.gif b/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-warning.gif deleted file mode 100644 index 0d89077c93d..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/icon-warning.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/left-corners.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/window/left-corners.png deleted file mode 100644 index ee27176901c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/left-corners.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/left-right.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/window/left-right.png deleted file mode 100644 index e4123001e72..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/left-right.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/right-corners.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/window/right-corners.png deleted file mode 100644 index 87a30d08bf1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/right-corners.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/top-bottom.png b/web-client/src/main/resources/apps/js/ext/resources/images/access/window/top-bottom.png deleted file mode 100644 index 72b4050fbdb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/access/window/top-bottom.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/corners-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/box/corners-blue.gif deleted file mode 100644 index fa419b50abe..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/corners-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/corners.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/box/corners.gif deleted file mode 100644 index 8aa8cae5c83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/corners.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/l-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/box/l-blue.gif deleted file mode 100644 index 5ed7f0043b6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/l-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/l.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/box/l.gif deleted file mode 100644 index 0160f97fe75..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/l.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/r-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/box/r-blue.gif deleted file mode 100644 index 3ea5cae3b7b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/r-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/r.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/box/r.gif deleted file mode 100644 index 34237f6292a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/r.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/tb-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/box/tb-blue.gif deleted file mode 100644 index 562fecca871..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/tb-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/tb.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/box/tb.gif deleted file mode 100644 index 435889bffe0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/box/tb.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/arrow.gif deleted file mode 100644 index 3ab4f71ac11..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/btn.gif deleted file mode 100644 index 06b404dd7a1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-cs.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-cs.gif deleted file mode 100644 index 3d1dca8f05c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-cs.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-lr.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-lr.gif deleted file mode 100644 index 7c549f96d60..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-lr.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-tb.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-tb.gif deleted file mode 100644 index adeb0a4cf54..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/group-tb.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-b-noline.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-b-noline.gif deleted file mode 100644 index a4220ee9066..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-b-noline.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-b.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-b.gif deleted file mode 100644 index 84b64703006..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-b.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-bo.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-bo.gif deleted file mode 100644 index 548700bf45a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-bo.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-noline.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-noline.gif deleted file mode 100644 index 0953eab5c87..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-noline.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-o.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-o.gif deleted file mode 100644 index 89c70f36fa6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow-o.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow.gif deleted file mode 100644 index 8940774785c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/button/s-arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-add.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-add.gif deleted file mode 100644 index b22cd1448ef..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-add.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-no.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-no.gif deleted file mode 100644 index 08d083355ff..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-no.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-yes.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-yes.gif deleted file mode 100644 index 8aacb307e89..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/dd/drop-yes.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/editor/tb-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/editor/tb-sprite.gif deleted file mode 100644 index fb70577617c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/editor/tb-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/checkbox.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/checkbox.gif deleted file mode 100644 index 835b346cc9e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/checkbox.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/clear-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/clear-trigger.gif deleted file mode 100644 index da78d45b321..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/clear-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/clear-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/clear-trigger.psd deleted file mode 100644 index f637fa5d1e1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/clear-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/date-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/date-trigger.gif deleted file mode 100644 index 25ef7b3ae73..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/date-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/date-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/date-trigger.psd deleted file mode 100644 index 74883b21c54..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/date-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/error-tip-corners.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/error-tip-corners.gif deleted file mode 100644 index 6ea4c383876..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/error-tip-corners.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/exclamation.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/exclamation.gif deleted file mode 100644 index ea31a3060a3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/exclamation.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/radio.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/radio.gif deleted file mode 100644 index 36bb91d0c5b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/radio.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/search-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/search-trigger.gif deleted file mode 100644 index db8802beb37..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/search-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/search-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/search-trigger.psd deleted file mode 100644 index b11f273000c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/search-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/text-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/text-bg.gif deleted file mode 100644 index 4179607cc1e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/text-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-square.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-square.gif deleted file mode 100644 index 3004ec58902..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-square.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-square.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-square.psd deleted file mode 100644 index e922ee65de3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-square.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-tpl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-tpl.gif deleted file mode 100644 index e3701a38310..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger-tpl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger.gif deleted file mode 100644 index f6cba375ae3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger.psd deleted file mode 100644 index 344c7682409..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/form/trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/gradient-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/gradient-bg.gif deleted file mode 100644 index 8134e4994f2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/gradient-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/arrow-left-white.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/arrow-left-white.gif deleted file mode 100644 index 63088f56e1c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/arrow-left-white.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/arrow-right-white.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/arrow-right-white.gif deleted file mode 100644 index e9e06789044..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/arrow-right-white.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/col-move-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/col-move-bottom.gif deleted file mode 100644 index cc1e473ecc1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/col-move-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/col-move-top.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/col-move-top.gif deleted file mode 100644 index 58ff32cc8fa..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/col-move-top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/columns.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/columns.gif deleted file mode 100644 index 2d3a82393e3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/columns.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/dirty.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/dirty.gif deleted file mode 100644 index 4f217a47959..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/dirty.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/done.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/done.gif deleted file mode 100644 index a937cb22c84..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/done.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/drop-no.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/drop-no.gif deleted file mode 100644 index 31a332bf786..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/drop-no.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/drop-yes.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/drop-yes.gif deleted file mode 100644 index 926010e172a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/drop-yes.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/footer-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/footer-bg.gif deleted file mode 100644 index 126120f71ee..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/footer-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-blue-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-blue-hd.gif deleted file mode 100644 index 862094e6803..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-blue-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-blue-split.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-blue-split.gif deleted file mode 100644 index 5286f58f6f7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-blue-split.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-hrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-hrow.gif deleted file mode 100644 index 63741042073..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-hrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-loading.gif deleted file mode 100644 index d112c54013e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-split.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-split.gif deleted file mode 100644 index c76a16e9599..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-split.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-vista-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-vista-hd.gif deleted file mode 100644 index d0972638e83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid-vista-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hd-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hd-btn.gif deleted file mode 100644 index 21126075e73..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hd-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hrow-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hrow-over.gif deleted file mode 100644 index f9c07af1347..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hrow-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hrow.gif deleted file mode 100644 index 8d459a304e0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-hrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-rowheader.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-rowheader.gif deleted file mode 100644 index 2799b45c659..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-rowheader.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-special-col-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-special-col-bg.gif deleted file mode 100644 index 0b4d6ca3bf2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-special-col-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-special-col-sel-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-special-col-sel-bg.gif deleted file mode 100644 index 1dfe9a69eae..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/grid3-special-col-sel-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-by.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-by.gif deleted file mode 100644 index d6075bba2fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-by.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-collapse.gif deleted file mode 100644 index 495bb051dce..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-expand-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-expand-sprite.gif deleted file mode 100644 index 9c1653b48db..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-expand-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-expand.gif deleted file mode 100644 index a33ac30bd2b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/group-expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hd-pop.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hd-pop.gif deleted file mode 100644 index eb8ba79679e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hd-pop.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-asc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-asc.gif deleted file mode 100644 index 8917e0eee0c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-asc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-desc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-desc.gif deleted file mode 100644 index f26b7c2fc58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-desc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-lock.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-lock.gif deleted file mode 100644 index 1596126108f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-lock.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-lock.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-lock.png deleted file mode 100644 index 8b81e7ff284..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-lock.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-unlock.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-unlock.gif deleted file mode 100644 index af59cf92a42..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-unlock.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-unlock.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-unlock.png deleted file mode 100644 index 9dd5df34b70..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/hmenu-unlock.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/invalid_line.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/invalid_line.gif deleted file mode 100644 index fb7e0f34d62..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/invalid_line.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/loading.gif deleted file mode 100644 index e846e1d6c58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/mso-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/mso-hd.gif deleted file mode 100644 index 669f3cf089a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/mso-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/nowait.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/nowait.gif deleted file mode 100644 index 4c5862cd554..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/nowait.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-first-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-first-disabled.gif deleted file mode 100644 index 1e02c419f5e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-first-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-first.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-first.gif deleted file mode 100644 index d84f41a91fc..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-first.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-last-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-last-disabled.gif deleted file mode 100644 index 869706777ce..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-last-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-last.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-last.gif deleted file mode 100644 index 3df5c2ba50b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-last.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-next-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-next-disabled.gif deleted file mode 100644 index 90a7756f6fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-next-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-next.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-next.gif deleted file mode 100644 index 96016353013..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-next.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-prev-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-prev-disabled.gif deleted file mode 100644 index 37154d62406..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-prev-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-prev.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-prev.gif deleted file mode 100644 index eb70cf8f6a3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/page-prev.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/pick-button.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/pick-button.gif deleted file mode 100644 index 6957924a8bf..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/pick-button.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/refresh-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/refresh-disabled.gif deleted file mode 100644 index 607800b85e4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/refresh-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/refresh.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/refresh.gif deleted file mode 100644 index 110f6844b63..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/refresh.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-check-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-check-sprite.gif deleted file mode 100644 index 610116465e7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-check-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-expand-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-expand-sprite.gif deleted file mode 100644 index 6f4d874f57b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-expand-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-over.gif deleted file mode 100644 index b288e38739a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-sel.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-sel.gif deleted file mode 100644 index 98209e6e7f1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/row-sel.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort-hd.gif deleted file mode 100644 index 45e545f7442..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort_asc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort_asc.gif deleted file mode 100644 index 67a2a4c669f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort_asc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort_desc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort_desc.gif deleted file mode 100644 index 34db47c3b1e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/sort_desc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/wait.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/wait.gif deleted file mode 100644 index 471c1a4f93f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/grid/wait.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/collapse.gif deleted file mode 100644 index d87b0a9ddd1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/expand.gif deleted file mode 100644 index 7b6e1c1ef82..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/gradient-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/gradient-bg.gif deleted file mode 100644 index 8134e4994f2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/gradient-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-bottom.gif deleted file mode 100644 index c18f9e34ac1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-left.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-left.gif deleted file mode 100644 index 99f7993f260..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-left.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-right.gif deleted file mode 100644 index 5b13c5a8b91..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-top.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-top.gif deleted file mode 100644 index a4ca2bb20aa..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/mini-top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/ns-collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/ns-collapse.gif deleted file mode 100644 index df2a77e9cc5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/ns-collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/ns-expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/ns-expand.gif deleted file mode 100644 index 77ab9dad294..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/ns-expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-close.gif deleted file mode 100644 index 2bdd6239987..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-title-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-title-bg.gif deleted file mode 100644 index d1daef54c57..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-title-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-title-light-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-title-light-bg.gif deleted file mode 100644 index 8c2c83d8253..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/panel-title-light-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/stick.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/stick.gif deleted file mode 100644 index 5a1e8ba19fb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/stick.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/stuck.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/stuck.gif deleted file mode 100644 index 0a8de4db9d6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/stuck.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/tab-close-on.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/tab-close-on.gif deleted file mode 100644 index eacea39b623..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/tab-close-on.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/tab-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/tab-close.gif deleted file mode 100644 index 45db61e6000..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/layout/tab-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/checked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/checked.gif deleted file mode 100644 index fad5893727e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/checked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/group-checked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/group-checked.gif deleted file mode 100644 index d30b3e5a8f1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/group-checked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/item-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/item-over.gif deleted file mode 100644 index 01678393246..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/item-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/menu-parent.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/menu-parent.gif deleted file mode 100644 index 1e375622ff9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/menu-parent.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/menu.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/menu.gif deleted file mode 100644 index 30a2c4b6c04..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/menu.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/unchecked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/unchecked.gif deleted file mode 100644 index 43823e52db8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/menu/unchecked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/corners-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/corners-sprite.gif deleted file mode 100644 index aa0d0ed8fb4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/corners-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/left-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/left-right.gif deleted file mode 100644 index 9fae2d594d2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/left-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/light-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/light-hd.gif deleted file mode 100644 index 58d6747b583..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/light-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tool-sprite-tpl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tool-sprite-tpl.gif deleted file mode 100644 index e6478670e37..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tool-sprite-tpl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tool-sprites.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tool-sprites.gif deleted file mode 100644 index 2b6b8098610..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tool-sprites.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tools-sprites-trans.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tools-sprites-trans.gif deleted file mode 100644 index ead931ef617..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/tools-sprites-trans.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/top-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/top-bottom.gif deleted file mode 100644 index be6c50e1cef..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/top-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/top-bottom.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/top-bottom.png deleted file mode 100644 index 578ffb6092a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/top-bottom.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-corners-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-corners-sprite.gif deleted file mode 100644 index 22d4bbab4c5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-corners-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-left-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-left-right.gif deleted file mode 100644 index d82c33784d1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-left-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-top-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-top-bottom.gif deleted file mode 100644 index fe7dd1c1ebe..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/panel/white-top-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/progress/progress-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/progress/progress-bg.gif deleted file mode 100644 index 1c1abeb4bda..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/progress/progress-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/bg.gif deleted file mode 100644 index 43488afdbd4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/close.gif deleted file mode 100644 index 69ab915e4dd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/tip-anchor-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/tip-anchor-sprite.gif deleted file mode 100644 index 9cf48506080..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/tip-anchor-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/tip-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/tip-sprite.gif deleted file mode 100644 index 9810acac5b3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/qtip/tip-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/s.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/s.gif deleted file mode 100644 index 1d11fa9ada9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/s.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow-c.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow-c.png deleted file mode 100644 index d435f80aeaf..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow-c.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow-lr.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow-lr.png deleted file mode 100644 index bb88b6f2be8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow-lr.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow.png deleted file mode 100644 index 75c0eba3e10..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shadow.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/blue-loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/blue-loading.gif deleted file mode 100644 index 3bbf639efae..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/blue-loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/calendar.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/calendar.gif deleted file mode 100644 index 133cf232b24..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/calendar.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/glass-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/glass-bg.gif deleted file mode 100644 index 26fbbae3bc6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/glass-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/hd-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/hd-sprite.gif deleted file mode 100644 index 42da1ea1aa4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/hd-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/large-loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/large-loading.gif deleted file mode 100644 index b36b555b4ff..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/large-loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/left-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/left-btn.gif deleted file mode 100644 index a0ddd9ee820..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/left-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/loading-balls.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/loading-balls.gif deleted file mode 100644 index 9ce214beb5c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/loading-balls.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/right-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/right-btn.gif deleted file mode 100644 index dee63e2113f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/right-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/warning.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/warning.gif deleted file mode 100644 index 806d4bc0938..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/shared/warning.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/e-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/e-handle-dark.gif deleted file mode 100644 index b5486c1a95b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/e-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/e-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/e-handle.gif deleted file mode 100644 index 00ba8350085..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/e-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/ne-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/ne-handle-dark.gif deleted file mode 100644 index 04e5ecf7d38..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/ne-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/ne-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/ne-handle.gif deleted file mode 100644 index 09405c7ac7b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/ne-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/nw-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/nw-handle-dark.gif deleted file mode 100644 index 6e49d6967c0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/nw-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/nw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/nw-handle.gif deleted file mode 100644 index 2fcea8a9285..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/nw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/s-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/s-handle-dark.gif deleted file mode 100644 index 4eb5f0fccb6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/s-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/s-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/s-handle.gif deleted file mode 100644 index bf069c243a3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/s-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/se-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/se-handle-dark.gif deleted file mode 100644 index c4c1087868a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/se-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/se-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/se-handle.gif deleted file mode 100644 index 972055e7b29..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/se-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/square.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/square.gif deleted file mode 100644 index 14ce6f72510..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/square.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/sw-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/sw-handle-dark.gif deleted file mode 100644 index 77224b0c06f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/sw-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/sw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/sw-handle.gif deleted file mode 100644 index 3ca0ed96df2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/sizer/sw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-bg.png deleted file mode 100644 index 999919424c8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-thumb.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-thumb.png deleted file mode 100644 index cd654a4c168..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-thumb.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-v-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-v-bg.png deleted file mode 100644 index 121450c282e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-v-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-v-thumb.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-v-thumb.png deleted file mode 100644 index 7b3d7258ada..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/slider/slider-v-thumb.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroll-left.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroll-left.gif deleted file mode 100644 index 9f2f6d1c9e4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroll-left.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroll-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroll-right.gif deleted file mode 100644 index 4c5e7e3958d..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroll-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroller-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroller-bg.gif deleted file mode 100644 index 099b90d8aca..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/scroller-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-inactive-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-inactive-left-bg.gif deleted file mode 100644 index 188bf940c64..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-inactive-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-inactive-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-inactive-right-bg.gif deleted file mode 100644 index e1f5e3c5182..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-inactive-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-left-bg.gif deleted file mode 100644 index dde79687013..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-over-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-over-left-bg.gif deleted file mode 100644 index da49c100d47..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-over-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-over-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-over-right-bg.gif deleted file mode 100644 index 45346ab145a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-over-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-right-bg.gif deleted file mode 100644 index e695186d5eb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-btm-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-close.gif deleted file mode 100644 index e6998784841..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-bg.gif deleted file mode 100644 index 34f13334511..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-bg.png deleted file mode 100644 index fa8ab3f462f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-btm-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-btm-bg.gif deleted file mode 100644 index 5eaba1eaa33..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tab-strip-btm-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tabs-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tabs-sprite.gif deleted file mode 100644 index e969fb0b733..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tabs/tabs-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/bg.gif deleted file mode 100644 index 0b085bf24e1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-arrow-light.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-arrow-light.gif deleted file mode 100644 index b0e24b55e7e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-arrow-light.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-arrow.gif deleted file mode 100644 index 8acb4608d8f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-over-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-over-bg.gif deleted file mode 100644 index ee2dd9860c7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/btn-over-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/gray-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/gray-bg.gif deleted file mode 100644 index bd49438f339..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/gray-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/more.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/more.gif deleted file mode 100644 index 02c2509fee0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/more.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-bg.gif deleted file mode 100644 index 4969e4efeb3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-btn-sprite.gif deleted file mode 100644 index 19bbef3c687..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-xl-btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-xl-btn-sprite.gif deleted file mode 100644 index 1bc0420f0f0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-xl-btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-xl-sep.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-xl-sep.gif deleted file mode 100644 index 30555eecf77..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/toolbar/tb-xl-sep.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/arrows.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/arrows.gif deleted file mode 100644 index 26834639123..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/arrows.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-add.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-add.gif deleted file mode 100644 index b22cd1448ef..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-add.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-between.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-between.gif deleted file mode 100644 index 5c6c09d987c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-between.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-no.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-no.gif deleted file mode 100644 index 9d9c6a9ce13..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-no.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-over.gif deleted file mode 100644 index 30d1ca71078..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-under.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-under.gif deleted file mode 100644 index 85f66b1e584..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-under.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-yes.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-yes.gif deleted file mode 100644 index 8aacb307e89..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/drop-yes.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-minus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-minus-nl.gif deleted file mode 100644 index 928779e9236..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-minus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-minus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-minus.gif deleted file mode 100644 index 9a8d727d70f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-minus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-plus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-plus-nl.gif deleted file mode 100644 index 9f7f69880f4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-plus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-plus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-plus.gif deleted file mode 100644 index 5943a01bcd3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end-plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end.gif deleted file mode 100644 index f24ddee799c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-end.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-line.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-line.gif deleted file mode 100644 index 75e6da4f8ea..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-line.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-minus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-minus-nl.gif deleted file mode 100644 index 928779e9236..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-minus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-minus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-minus.gif deleted file mode 100644 index 97dcc7110f1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-minus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-plus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-plus-nl.gif deleted file mode 100644 index 9f7f69880f4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-plus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-plus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-plus.gif deleted file mode 100644 index 698de4793c5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow-plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow.gif deleted file mode 100644 index b8f42083895..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/elbow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/folder-open.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/folder-open.gif deleted file mode 100644 index 56ba737bcc7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/folder-open.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/folder.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/folder.gif deleted file mode 100644 index 20412f7c1ba..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/folder.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/leaf.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/leaf.gif deleted file mode 100644 index 445769d3f86..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/leaf.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/loading.gif deleted file mode 100644 index e846e1d6c58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/s.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/s.gif deleted file mode 100644 index 1d11fa9ada9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/tree/s.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-error.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-error.gif deleted file mode 100644 index 397b655ab83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-error.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-info.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-info.gif deleted file mode 100644 index 58281c3067b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-info.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-question.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-question.gif deleted file mode 100644 index 08abd82ae86..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-question.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-warning.gif b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-warning.gif deleted file mode 100644 index 27ff98b4f78..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/icon-warning.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-corners.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-corners.png deleted file mode 100644 index 1a518335d34..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-corners.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-corners.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-corners.psd deleted file mode 100644 index 3d7f0623e03..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-corners.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-right.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-right.png deleted file mode 100644 index 7586ff3339a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-right.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-right.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-right.psd deleted file mode 100644 index 59a3960a235..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/left-right.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/right-corners.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/right-corners.png deleted file mode 100644 index e69a3ffc962..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/right-corners.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/right-corners.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/right-corners.psd deleted file mode 100644 index 86d50953861..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/right-corners.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/top-bottom.png b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/top-bottom.png deleted file mode 100644 index 33779e76b8d..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/top-bottom.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/top-bottom.psd b/web-client/src/main/resources/apps/js/ext/resources/images/default/window/top-bottom.psd deleted file mode 100644 index 48c5395e4a2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/default/window/top-bottom.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn-arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn-arrow.gif deleted file mode 100644 index f90d5df4455..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn-arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn-sprite.gif deleted file mode 100644 index 834ff97891d..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn.gif deleted file mode 100644 index 96ea61abb4e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-cs.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-cs.gif deleted file mode 100644 index 7059e2b0ce4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-cs.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-lr.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-lr.gif deleted file mode 100644 index 3f41fbd841a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-lr.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-tb.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-tb.gif deleted file mode 100644 index c5ea8cab3ab..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/group-tb.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/s-arrow-bo.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/s-arrow-bo.gif deleted file mode 100644 index fa5b2f4e957..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/s-arrow-bo.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/s-arrow-o.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/s-arrow-o.gif deleted file mode 100644 index 52a514132fe..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/button/s-arrow-o.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/clear-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/clear-trigger.gif deleted file mode 100644 index be3ff587cdb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/clear-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/date-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/date-trigger.gif deleted file mode 100644 index e0537cbc565..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/date-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/search-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/search-trigger.gif deleted file mode 100644 index 0cc4f596b4a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/search-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/trigger-square.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/trigger-square.gif deleted file mode 100644 index 7a0f585c0bc..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/trigger-square.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/trigger.gif deleted file mode 100644 index b563474bb18..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/form/trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/gradient-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/gradient-bg.gif deleted file mode 100644 index 8134e4994f2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/gradient-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/col-move-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/col-move-bottom.gif deleted file mode 100644 index c525f7ebd73..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/col-move-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/col-move-top.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/col-move-top.gif deleted file mode 100644 index ccc92b6bc2f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/col-move-top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hd-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hd-btn.gif deleted file mode 100644 index daf1ef2b5d9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hd-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow-over.gif deleted file mode 100644 index d37252f7ee8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow-over2.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow-over2.gif deleted file mode 100644 index 353d90626ea..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow-over2.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow.gif deleted file mode 100644 index 8d459a304e0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow2.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow2.gif deleted file mode 100644 index 423b507bbca..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-hrow2.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-bg.gif deleted file mode 100644 index 12d64d7cd45..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-bg2.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-bg2.gif deleted file mode 100644 index f10e6ad1e0b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-bg2.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-sel-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-sel-bg.gif deleted file mode 100644 index 4fa6e10714e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/grid3-special-col-sel-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-collapse.gif deleted file mode 100644 index c9ad30dd91e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-expand-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-expand-sprite.gif deleted file mode 100644 index d24891de607..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-expand-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-expand.gif deleted file mode 100644 index 663b5c8413e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/group-expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-first.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-first.gif deleted file mode 100644 index 60be4bcd3b8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-first.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-last.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-last.gif deleted file mode 100644 index beb4a8302a5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-last.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-next.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-next.gif deleted file mode 100644 index 97db1c22073..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-next.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-prev.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-prev.gif deleted file mode 100644 index d07e61c36a8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/page-prev.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/refresh.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/refresh.gif deleted file mode 100644 index 868b2dc594e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/refresh.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/row-expand-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/row-expand-sprite.gif deleted file mode 100644 index 09c00a66bae..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/row-expand-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort-hd.gif deleted file mode 100644 index 4cf483d25c5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort_asc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort_asc.gif deleted file mode 100644 index 7e562e202db..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort_asc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort_desc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort_desc.gif deleted file mode 100644 index 9b7a871b780..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/grid/sort_desc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/group-checked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/group-checked.gif deleted file mode 100644 index c8824887c0a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/group-checked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/item-over-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/item-over-disabled.gif deleted file mode 100644 index 97d5ffacb76..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/item-over-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/item-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/item-over.gif deleted file mode 100644 index e0dc5f7c06c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/item-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/menu-parent.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/menu-parent.gif deleted file mode 100644 index 5461a8bfc3f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/menu/menu-parent.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/corners-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/corners-sprite.gif deleted file mode 100644 index fad0e6d241b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/corners-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/left-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/left-right.gif deleted file mode 100644 index c5f3dca5a8d..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/left-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/light-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/light-hd.gif deleted file mode 100644 index 6eb28ba0046..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/light-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tool-sprite-tpl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tool-sprite-tpl.gif deleted file mode 100644 index 18277a3d487..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tool-sprite-tpl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tool-sprites.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tool-sprites.gif deleted file mode 100644 index 36b6b6755e3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tool-sprites.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tools-sprites-trans.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tools-sprites-trans.gif deleted file mode 100644 index b6d7ba369a7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/tools-sprites-trans.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/top-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/top-bottom.gif deleted file mode 100644 index 24ceb30bd68..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/top-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/top-bottom.png b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/top-bottom.png deleted file mode 100644 index 578ffb6092a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/top-bottom.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-corners-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-corners-sprite.gif deleted file mode 100644 index d5b8adfd18f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-corners-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-left-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-left-right.gif deleted file mode 100644 index 2c9e142be83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-left-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-top-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-top-bottom.gif deleted file mode 100644 index 025fbd51ab0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/panel/white-top-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/progress/progress-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/progress/progress-bg.gif deleted file mode 100644 index 5585d802fb5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/progress/progress-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/bg.gif deleted file mode 100644 index a9055a5ebad..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/close.gif deleted file mode 100644 index 69ab915e4dd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/tip-anchor-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/tip-anchor-sprite.gif deleted file mode 100644 index 0671586f3b1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/tip-anchor-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/tip-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/tip-sprite.gif deleted file mode 100644 index 4ade664ef27..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/qtip/tip-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/s.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/s.gif deleted file mode 100644 index 1d11fa9ada9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/s.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/hd-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/hd-sprite.gif deleted file mode 100644 index d943833e1dc..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/hd-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/left-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/left-btn.gif deleted file mode 100644 index 3301054ffa2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/left-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/right-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/right-btn.gif deleted file mode 100644 index c529110fab1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/shared/right-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/e-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/e-handle.gif deleted file mode 100644 index a8ed0edee93..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/e-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/ne-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/ne-handle.gif deleted file mode 100644 index 6f7b0c2958b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/ne-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/nw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/nw-handle.gif deleted file mode 100644 index 92ad82cf364..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/nw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/s-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/s-handle.gif deleted file mode 100644 index d7eeae278cf..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/s-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/se-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/se-handle.gif deleted file mode 100644 index f011a3bb2e9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/se-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/square.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/square.gif deleted file mode 100644 index 7751d5e15a7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/square.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/sw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/sw-handle.gif deleted file mode 100644 index aa903dd0b54..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/sizer/sw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/slider/slider-thumb.png b/web-client/src/main/resources/apps/js/ext/resources/images/gray/slider/slider-thumb.png deleted file mode 100644 index 4bf01be8952..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/slider/slider-thumb.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/slider/slider-v-thumb.png b/web-client/src/main/resources/apps/js/ext/resources/images/gray/slider/slider-v-thumb.png deleted file mode 100644 index 6b3eeb703f9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/slider/slider-v-thumb.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroll-left.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroll-left.gif deleted file mode 100644 index bbb3e3d9d35..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroll-left.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroll-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroll-right.gif deleted file mode 100644 index feb6a76f0ae..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroll-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroller-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroller-bg.gif deleted file mode 100644 index f089c0ad65c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/scroller-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif deleted file mode 100644 index d718173fcd3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif deleted file mode 100644 index bf354936858..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-left-bg.gif deleted file mode 100644 index 96d2e5eb8a5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-over-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-over-left-bg.gif deleted file mode 100644 index 164d1016945..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-over-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-over-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-over-right-bg.gif deleted file mode 100644 index f6f04953f68..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-over-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-right-bg.gif deleted file mode 100644 index c41cada7893..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-btm-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-close.gif deleted file mode 100644 index 98d5da95284..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-bg.gif deleted file mode 100644 index 040b677a52f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-bg.png deleted file mode 100644 index fa8ab3f462f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-btm-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-btm-bg.gif deleted file mode 100644 index f35087f2bc1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tab-strip-btm-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tabs-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tabs-sprite.gif deleted file mode 100644 index 1901b231b00..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tabs/tabs-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/bg.gif deleted file mode 100644 index 9ab78a2ec78..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-arrow-light.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-arrow-light.gif deleted file mode 100644 index b0e24b55e7e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-arrow-light.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-arrow.gif deleted file mode 100644 index 8acb4608d8f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-over-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-over-bg.gif deleted file mode 100644 index ee2dd9860c7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/btn-over-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/gray-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/gray-bg.gif deleted file mode 100644 index 5464e21ee83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/gray-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/more.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/more.gif deleted file mode 100644 index 77f4f237c3b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/more.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/tb-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/tb-bg.gif deleted file mode 100644 index 4969e4efeb3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/tb-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif deleted file mode 100644 index 894fef2eef6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/arrows.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/arrows.gif deleted file mode 100644 index a51a8e477fb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/arrows.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-minus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-minus-nl.gif deleted file mode 100644 index 8c5bc5d4d58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-minus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-minus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-minus.gif deleted file mode 100644 index 585051376cf..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-minus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-plus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-plus-nl.gif deleted file mode 100644 index 752b42a3c74..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-plus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-plus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-plus.gif deleted file mode 100644 index ff126359d39..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/tree/elbow-end-plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-error.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-error.gif deleted file mode 100644 index 397b655ab83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-error.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-info.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-info.gif deleted file mode 100644 index 58281c3067b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-info.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-question.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-question.gif deleted file mode 100644 index 08abd82ae86..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-question.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-warning.gif b/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-warning.gif deleted file mode 100644 index 27ff98b4f78..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/icon-warning.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/left-corners.png b/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/left-corners.png deleted file mode 100644 index b2da00dbad5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/left-corners.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/left-right.png b/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/left-right.png deleted file mode 100644 index 4c81137bbed..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/left-right.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/right-corners.png b/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/right-corners.png deleted file mode 100644 index 807eb474476..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/right-corners.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/top-bottom.png b/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/top-bottom.png deleted file mode 100644 index f479fcf3cc6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/gray/window/top-bottom.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-center.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-center.gif deleted file mode 100644 index 7bf4a4b41d5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-center.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-left.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-left.gif deleted file mode 100644 index 94b1dafc7d7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-left.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-right.gif deleted file mode 100644 index 6dadaf683e0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/bg-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/close.gif deleted file mode 100644 index 4278db9835c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/collapse.gif deleted file mode 100644 index b07e297e5c6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/dlg-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/dlg-bg.gif deleted file mode 100644 index 1a466633d70..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/dlg-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/e-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/e-handle.gif deleted file mode 100644 index 48877e748d8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/e-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/expand.gif deleted file mode 100644 index 5b4b0d1e950..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/hd-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/hd-sprite.gif deleted file mode 100644 index 3c2dd632dd6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/hd-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/s-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/s-handle.gif deleted file mode 100644 index c13c9cdc056..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/s-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/se-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/se-handle.gif deleted file mode 100644 index c4e38a2f4b4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/se-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/w-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/w-handle.gif deleted file mode 100644 index d59eafc2076..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/basic-dialog/w-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/gradient-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/gradient-bg.gif deleted file mode 100644 index 8134e4994f2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/gradient-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/grid/grid-split.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/grid/grid-split.gif deleted file mode 100644 index c76a16e9599..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/grid/grid-split.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/grid/grid-vista-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/grid/grid-vista-hd.gif deleted file mode 100644 index d0972638e83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/grid/grid-vista-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/collapse.gif deleted file mode 100644 index cbd6e081cf7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/expand.gif deleted file mode 100644 index 8103c0dd7be..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/gradient-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/gradient-bg.gif deleted file mode 100644 index d311e7de678..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/gradient-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/ns-collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/ns-collapse.gif deleted file mode 100644 index f2ad235dad3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/ns-collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/ns-expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/ns-expand.gif deleted file mode 100644 index 0817ec66fd4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/ns-expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-close.gif deleted file mode 100644 index 4e96481a1fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-title-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-title-bg.gif deleted file mode 100644 index 681f517a3c2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-title-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-title-light-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-title-light-bg.gif deleted file mode 100644 index 23d8288b0d3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/panel-title-light-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/stick.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/stick.gif deleted file mode 100644 index 7db68eec95f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/stick.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/tab-close-on.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/tab-close-on.gif deleted file mode 100644 index 556e905b11c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/tab-close-on.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/tab-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/tab-close.gif deleted file mode 100644 index 0a6f0198775..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/layout/tab-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/qtip/bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/qtip/bg.gif deleted file mode 100644 index 5c0e8c92a81..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/qtip/bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/qtip/tip-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/qtip/tip-sprite.gif deleted file mode 100644 index a1862865d59..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/qtip/tip-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/s.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/s.gif deleted file mode 100644 index 1d11fa9ada9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/s.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/e-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/e-handle-dark.gif deleted file mode 100644 index eac9662eade..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/e-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/e-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/e-handle.gif deleted file mode 100644 index f2c9f538243..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/e-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/ne-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/ne-handle-dark.gif deleted file mode 100644 index c9c041c45f6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/ne-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/ne-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/ne-handle.gif deleted file mode 100644 index 942ae825357..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/ne-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/nw-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/nw-handle-dark.gif deleted file mode 100644 index 23fced98bfa..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/nw-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/nw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/nw-handle.gif deleted file mode 100644 index d39b0c38d89..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/nw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/s-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/s-handle-dark.gif deleted file mode 100644 index ddc2e18ce48..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/s-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/s-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/s-handle.gif deleted file mode 100644 index 827c3330a98..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/s-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/se-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/se-handle-dark.gif deleted file mode 100644 index 1a678e67fd6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/se-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/se-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/se-handle.gif deleted file mode 100644 index 69b5a9ed5b1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/se-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/sw-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/sw-handle-dark.gif deleted file mode 100644 index 937102c6b23..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/sw-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/sw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/sw-handle.gif deleted file mode 100644 index b9e2f563a03..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/sizer/sw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif deleted file mode 100644 index 667beeb3268..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif deleted file mode 100644 index 6c4e0a45f9e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-left-bg.gif deleted file mode 100644 index 1d81e54e104..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-right-bg.gif deleted file mode 100644 index 47d00500298..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-btm-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-sprite.gif deleted file mode 100644 index a16eedb822c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/tabs/tab-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/toolbar/gray-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/toolbar/gray-bg.gif deleted file mode 100644 index 9af15c26256..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/toolbar/gray-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/vista/toolbar/tb-btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/vista/toolbar/tb-btn-sprite.gif deleted file mode 100644 index f21b0d612a2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/vista/toolbar/tb-btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/README.txt b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/README.txt deleted file mode 100644 index acc5087329c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -2010-03-16 jwr: -The image directory, "yourtheme", is an exact copy of the "default" image directory. Remember to update your file paths in "css/yourtheme.css" if you make changes or add your own custom images for your custom theme. \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/corners-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/corners-blue.gif deleted file mode 100644 index fa419b50abe..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/corners-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/corners.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/corners.gif deleted file mode 100644 index 8aa8cae5c83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/corners.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/l-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/l-blue.gif deleted file mode 100644 index 5ed7f0043b6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/l-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/l.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/l.gif deleted file mode 100644 index 0160f97fe75..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/l.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/r-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/r-blue.gif deleted file mode 100644 index 3ea5cae3b7b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/r-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/r.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/r.gif deleted file mode 100644 index 34237f6292a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/r.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/tb-blue.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/tb-blue.gif deleted file mode 100644 index 562fecca871..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/tb-blue.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/tb.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/tb.gif deleted file mode 100644 index 435889bffe0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/box/tb.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/arrow.gif deleted file mode 100644 index 3ab4f71ac11..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/btn.gif deleted file mode 100644 index 06b404dd7a1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-cs.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-cs.gif deleted file mode 100644 index 3d1dca8f05c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-cs.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-lr.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-lr.gif deleted file mode 100644 index 7c549f96d60..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-lr.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-tb.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-tb.gif deleted file mode 100644 index adeb0a4cf54..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/group-tb.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-b-noline.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-b-noline.gif deleted file mode 100644 index a4220ee9066..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-b-noline.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-b.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-b.gif deleted file mode 100644 index 84b64703006..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-b.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-bo.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-bo.gif deleted file mode 100644 index 548700bf45a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-bo.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-noline.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-noline.gif deleted file mode 100644 index 0953eab5c87..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-noline.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-o.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-o.gif deleted file mode 100644 index 89c70f36fa6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow-o.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow.gif deleted file mode 100644 index 8940774785c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/button/s-arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-add.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-add.gif deleted file mode 100644 index b22cd1448ef..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-add.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-no.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-no.gif deleted file mode 100644 index 08d083355ff..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-no.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-yes.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-yes.gif deleted file mode 100644 index 8aacb307e89..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/dd/drop-yes.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/editor/tb-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/editor/tb-sprite.gif deleted file mode 100644 index fb70577617c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/editor/tb-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/checkbox.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/checkbox.gif deleted file mode 100644 index 835b346cc9e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/checkbox.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/clear-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/clear-trigger.gif deleted file mode 100644 index da78d45b321..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/clear-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/clear-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/clear-trigger.psd deleted file mode 100644 index f637fa5d1e1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/clear-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/date-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/date-trigger.gif deleted file mode 100644 index 25ef7b3ae73..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/date-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/date-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/date-trigger.psd deleted file mode 100644 index 74883b21c54..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/date-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/error-tip-corners.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/error-tip-corners.gif deleted file mode 100644 index 6ea4c383876..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/error-tip-corners.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/exclamation.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/exclamation.gif deleted file mode 100644 index ea31a3060a3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/exclamation.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/radio.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/radio.gif deleted file mode 100644 index 36bb91d0c5b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/radio.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/search-trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/search-trigger.gif deleted file mode 100644 index db8802beb37..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/search-trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/search-trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/search-trigger.psd deleted file mode 100644 index b11f273000c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/search-trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/text-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/text-bg.gif deleted file mode 100644 index 4179607cc1e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/text-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-square.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-square.gif deleted file mode 100644 index 3004ec58902..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-square.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-square.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-square.psd deleted file mode 100644 index e922ee65de3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-square.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-tpl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-tpl.gif deleted file mode 100644 index e3701a38310..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger-tpl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger.gif deleted file mode 100644 index f6cba375ae3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger.psd deleted file mode 100644 index 344c7682409..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/form/trigger.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/gradient-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/gradient-bg.gif deleted file mode 100644 index 8134e4994f2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/gradient-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/arrow-left-white.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/arrow-left-white.gif deleted file mode 100644 index 63088f56e1c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/arrow-left-white.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/arrow-right-white.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/arrow-right-white.gif deleted file mode 100644 index e9e06789044..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/arrow-right-white.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/col-move-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/col-move-bottom.gif deleted file mode 100644 index cc1e473ecc1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/col-move-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/col-move-top.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/col-move-top.gif deleted file mode 100644 index 58ff32cc8fa..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/col-move-top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/columns.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/columns.gif deleted file mode 100644 index 2d3a82393e3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/columns.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/dirty.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/dirty.gif deleted file mode 100644 index 4f217a47959..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/dirty.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/done.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/done.gif deleted file mode 100644 index a937cb22c84..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/done.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/drop-no.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/drop-no.gif deleted file mode 100644 index 31a332bf786..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/drop-no.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/drop-yes.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/drop-yes.gif deleted file mode 100644 index 926010e172a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/drop-yes.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/footer-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/footer-bg.gif deleted file mode 100644 index 126120f71ee..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/footer-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-blue-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-blue-hd.gif deleted file mode 100644 index 862094e6803..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-blue-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-blue-split.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-blue-split.gif deleted file mode 100644 index 5286f58f6f7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-blue-split.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-hrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-hrow.gif deleted file mode 100644 index 63741042073..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-hrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-loading.gif deleted file mode 100644 index d112c54013e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-split.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-split.gif deleted file mode 100644 index c76a16e9599..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-split.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-vista-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-vista-hd.gif deleted file mode 100644 index d0972638e83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid-vista-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hd-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hd-btn.gif deleted file mode 100644 index 21126075e73..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hd-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hrow-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hrow-over.gif deleted file mode 100644 index f9c07af1347..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hrow-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hrow.gif deleted file mode 100644 index 8d459a304e0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-hrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-special-col-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-special-col-bg.gif deleted file mode 100644 index 0b4d6ca3bf2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-special-col-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-special-col-sel-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-special-col-sel-bg.gif deleted file mode 100644 index 1dfe9a69eae..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/grid3-special-col-sel-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-by.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-by.gif deleted file mode 100644 index d6075bba2fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-by.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-collapse.gif deleted file mode 100644 index 495bb051dce..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-expand-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-expand-sprite.gif deleted file mode 100644 index 9c1653b48db..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-expand-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-expand.gif deleted file mode 100644 index a33ac30bd2b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/group-expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hd-pop.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hd-pop.gif deleted file mode 100644 index eb8ba79679e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hd-pop.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-asc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-asc.gif deleted file mode 100644 index 8917e0eee0c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-asc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-desc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-desc.gif deleted file mode 100644 index f26b7c2fc58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-desc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-lock.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-lock.gif deleted file mode 100644 index 1596126108f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-lock.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-lock.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-lock.png deleted file mode 100644 index 8b81e7ff284..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-lock.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-unlock.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-unlock.gif deleted file mode 100644 index af59cf92a42..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-unlock.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-unlock.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-unlock.png deleted file mode 100644 index 9dd5df34b70..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/hmenu-unlock.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/invalid_line.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/invalid_line.gif deleted file mode 100644 index fb7e0f34d62..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/invalid_line.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/loading.gif deleted file mode 100644 index e846e1d6c58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/mso-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/mso-hd.gif deleted file mode 100644 index 669f3cf089a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/mso-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/nowait.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/nowait.gif deleted file mode 100644 index 4c5862cd554..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/nowait.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-first-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-first-disabled.gif deleted file mode 100644 index 1e02c419f5e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-first-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-first.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-first.gif deleted file mode 100644 index d84f41a91fc..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-first.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-last-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-last-disabled.gif deleted file mode 100644 index 869706777ce..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-last-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-last.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-last.gif deleted file mode 100644 index 3df5c2ba50b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-last.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-next-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-next-disabled.gif deleted file mode 100644 index 90a7756f6fd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-next-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-next.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-next.gif deleted file mode 100644 index 96016353013..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-next.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-prev-disabled.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-prev-disabled.gif deleted file mode 100644 index 37154d62406..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-prev-disabled.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-prev.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-prev.gif deleted file mode 100644 index eb70cf8f6a3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/page-prev.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/pick-button.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/pick-button.gif deleted file mode 100644 index 6957924a8bf..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/pick-button.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/refresh.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/refresh.gif deleted file mode 100644 index 110f6844b63..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/refresh.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-check-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-check-sprite.gif deleted file mode 100644 index 610116465e7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-check-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-expand-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-expand-sprite.gif deleted file mode 100644 index 6f4d874f57b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-expand-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-over.gif deleted file mode 100644 index b288e38739a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-sel.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-sel.gif deleted file mode 100644 index 98209e6e7f1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/row-sel.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort-hd.gif deleted file mode 100644 index 45e545f7442..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort_asc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort_asc.gif deleted file mode 100644 index 67a2a4c669f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort_asc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort_desc.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort_desc.gif deleted file mode 100644 index 34db47c3b1e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/sort_desc.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/wait.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/wait.gif deleted file mode 100644 index 471c1a4f93f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/grid/wait.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/collapse.gif deleted file mode 100644 index d87b0a9ddd1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/expand.gif deleted file mode 100644 index 7b6e1c1ef82..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/gradient-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/gradient-bg.gif deleted file mode 100644 index 8134e4994f2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/gradient-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-bottom.gif deleted file mode 100644 index c18f9e34ac1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-left.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-left.gif deleted file mode 100644 index 99f7993f260..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-left.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-right.gif deleted file mode 100644 index 5b13c5a8b91..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-top.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-top.gif deleted file mode 100644 index a4ca2bb20aa..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/mini-top.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/ns-collapse.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/ns-collapse.gif deleted file mode 100644 index df2a77e9cc5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/ns-collapse.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/ns-expand.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/ns-expand.gif deleted file mode 100644 index 77ab9dad294..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/ns-expand.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-close.gif deleted file mode 100644 index 2bdd6239987..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-title-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-title-bg.gif deleted file mode 100644 index d1daef54c57..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-title-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-title-light-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-title-light-bg.gif deleted file mode 100644 index 8c2c83d8253..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/panel-title-light-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/stick.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/stick.gif deleted file mode 100644 index 5a1e8ba19fb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/stick.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/stuck.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/stuck.gif deleted file mode 100644 index 0a8de4db9d6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/stuck.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/tab-close-on.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/tab-close-on.gif deleted file mode 100644 index eacea39b623..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/tab-close-on.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/tab-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/tab-close.gif deleted file mode 100644 index 45db61e6000..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/layout/tab-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/checked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/checked.gif deleted file mode 100644 index fad5893727e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/checked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/group-checked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/group-checked.gif deleted file mode 100644 index d30b3e5a8f1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/group-checked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/item-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/item-over.gif deleted file mode 100644 index 01678393246..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/item-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/menu-parent.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/menu-parent.gif deleted file mode 100644 index 1e375622ff9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/menu-parent.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/menu.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/menu.gif deleted file mode 100644 index 30a2c4b6c04..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/menu.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/unchecked.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/unchecked.gif deleted file mode 100644 index 43823e52db8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/menu/unchecked.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/corners-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/corners-sprite.gif deleted file mode 100644 index aa0d0ed8fb4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/corners-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/left-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/left-right.gif deleted file mode 100644 index 9fae2d594d2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/left-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/light-hd.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/light-hd.gif deleted file mode 100644 index 58d6747b583..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/light-hd.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tool-sprite-tpl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tool-sprite-tpl.gif deleted file mode 100644 index e6478670e37..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tool-sprite-tpl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tool-sprites.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tool-sprites.gif deleted file mode 100644 index 9a3c5b9ac58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tool-sprites.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tools-sprites-trans.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tools-sprites-trans.gif deleted file mode 100644 index ead931ef617..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/tools-sprites-trans.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/top-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/top-bottom.gif deleted file mode 100644 index be6c50e1cef..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/top-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/top-bottom.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/top-bottom.png deleted file mode 100644 index 578ffb6092a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/top-bottom.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-corners-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-corners-sprite.gif deleted file mode 100644 index 22d4bbab4c5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-corners-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-left-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-left-right.gif deleted file mode 100644 index d82c33784d1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-left-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-top-bottom.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-top-bottom.gif deleted file mode 100644 index fe7dd1c1ebe..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/panel/white-top-bottom.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/progress/progress-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/progress/progress-bg.gif deleted file mode 100644 index 1c1abeb4bda..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/progress/progress-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/bg.gif deleted file mode 100644 index 43488afdbd4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/close.gif deleted file mode 100644 index 69ab915e4dd..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/tip-anchor-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/tip-anchor-sprite.gif deleted file mode 100644 index 9cf48506080..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/tip-anchor-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/tip-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/tip-sprite.gif deleted file mode 100644 index 9810acac5b3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/qtip/tip-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/s.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/s.gif deleted file mode 100644 index 1d11fa9ada9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/s.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow-c.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow-c.png deleted file mode 100644 index d435f80aeaf..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow-c.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow-lr.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow-lr.png deleted file mode 100644 index bb88b6f2be8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow-lr.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow.png deleted file mode 100644 index 75c0eba3e10..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shadow.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/blue-loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/blue-loading.gif deleted file mode 100644 index 3bbf639efae..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/blue-loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/calendar.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/calendar.gif deleted file mode 100644 index 133cf232b24..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/calendar.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/glass-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/glass-bg.gif deleted file mode 100644 index 26fbbae3bc6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/glass-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/hd-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/hd-sprite.gif deleted file mode 100644 index 42da1ea1aa4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/hd-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/large-loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/large-loading.gif deleted file mode 100644 index b36b555b4ff..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/large-loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/left-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/left-btn.gif deleted file mode 100644 index a0ddd9ee820..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/left-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/loading-balls.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/loading-balls.gif deleted file mode 100644 index 9ce214beb5c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/loading-balls.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/right-btn.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/right-btn.gif deleted file mode 100644 index dee63e2113f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/right-btn.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/warning.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/warning.gif deleted file mode 100644 index 806d4bc0938..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/shared/warning.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/e-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/e-handle-dark.gif deleted file mode 100644 index b5486c1a95b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/e-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/e-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/e-handle.gif deleted file mode 100644 index 00ba8350085..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/e-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/ne-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/ne-handle-dark.gif deleted file mode 100644 index 04e5ecf7d38..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/ne-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/ne-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/ne-handle.gif deleted file mode 100644 index 09405c7ac7b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/ne-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/nw-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/nw-handle-dark.gif deleted file mode 100644 index 6e49d6967c0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/nw-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/nw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/nw-handle.gif deleted file mode 100644 index 2fcea8a9285..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/nw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/s-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/s-handle-dark.gif deleted file mode 100644 index 4eb5f0fccb6..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/s-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/s-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/s-handle.gif deleted file mode 100644 index bf069c243a3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/s-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/se-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/se-handle-dark.gif deleted file mode 100644 index c4c1087868a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/se-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/se-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/se-handle.gif deleted file mode 100644 index 972055e7b29..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/se-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/square.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/square.gif deleted file mode 100644 index 14ce6f72510..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/square.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/sw-handle-dark.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/sw-handle-dark.gif deleted file mode 100644 index 77224b0c06f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/sw-handle-dark.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/sw-handle.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/sw-handle.gif deleted file mode 100644 index 3ca0ed96df2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/sizer/sw-handle.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-bg.png deleted file mode 100644 index 999919424c8..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-thumb.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-thumb.png deleted file mode 100644 index cd654a4c168..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-thumb.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-v-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-v-bg.png deleted file mode 100644 index 121450c282e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-v-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-v-thumb.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-v-thumb.png deleted file mode 100644 index 7b3d7258ada..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/slider/slider-v-thumb.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroll-left.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroll-left.gif deleted file mode 100644 index 9f2f6d1c9e4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroll-left.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroll-right.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroll-right.gif deleted file mode 100644 index 4c5e7e3958d..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroll-right.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroller-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroller-bg.gif deleted file mode 100644 index 099b90d8aca..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/scroller-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-inactive-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-inactive-left-bg.gif deleted file mode 100644 index 188bf940c64..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-inactive-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-inactive-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-inactive-right-bg.gif deleted file mode 100644 index e1f5e3c5182..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-inactive-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-left-bg.gif deleted file mode 100644 index dde79687013..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-over-left-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-over-left-bg.gif deleted file mode 100644 index da49c100d47..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-over-left-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-over-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-over-right-bg.gif deleted file mode 100644 index 45346ab145a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-over-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-right-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-right-bg.gif deleted file mode 100644 index e695186d5eb..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-btm-right-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-close.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-close.gif deleted file mode 100644 index e6998784841..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-close.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-bg.gif deleted file mode 100644 index 34f13334511..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-bg.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-bg.png deleted file mode 100644 index fa8ab3f462f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-btm-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-btm-bg.gif deleted file mode 100644 index 5eaba1eaa33..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tab-strip-btm-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tabs-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tabs-sprite.gif deleted file mode 100644 index e969fb0b733..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tabs/tabs-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/bg.gif deleted file mode 100644 index 0b085bf24e1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-arrow-light.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-arrow-light.gif deleted file mode 100644 index b0e24b55e7e..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-arrow-light.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-arrow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-arrow.gif deleted file mode 100644 index 8acb4608d8f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-arrow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-over-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-over-bg.gif deleted file mode 100644 index ee2dd9860c7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/btn-over-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/gray-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/gray-bg.gif deleted file mode 100644 index bd49438f339..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/gray-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/more.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/more.gif deleted file mode 100644 index 02c2509fee0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/more.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-bg.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-bg.gif deleted file mode 100644 index 4969e4efeb3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-bg.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-btn-sprite.gif deleted file mode 100644 index 19bbef3c687..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-xl-btn-sprite.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-xl-btn-sprite.gif deleted file mode 100644 index 1bc0420f0f0..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-xl-btn-sprite.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-xl-sep.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-xl-sep.gif deleted file mode 100644 index 30555eecf77..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/toolbar/tb-xl-sep.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/arrows.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/arrows.gif deleted file mode 100644 index 26834639123..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/arrows.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-add.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-add.gif deleted file mode 100644 index b22cd1448ef..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-add.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-between.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-between.gif deleted file mode 100644 index 5c6c09d987c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-between.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-no.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-no.gif deleted file mode 100644 index 9d9c6a9ce13..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-no.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-over.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-over.gif deleted file mode 100644 index 30d1ca71078..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-over.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-under.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-under.gif deleted file mode 100644 index 85f66b1e584..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-under.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-yes.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-yes.gif deleted file mode 100644 index 8aacb307e89..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/drop-yes.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-minus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-minus-nl.gif deleted file mode 100644 index 928779e9236..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-minus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-minus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-minus.gif deleted file mode 100644 index 9a8d727d70f..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-minus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-plus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-plus-nl.gif deleted file mode 100644 index 9f7f69880f4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-plus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-plus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-plus.gif deleted file mode 100644 index 5943a01bcd3..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end-plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end.gif deleted file mode 100644 index f24ddee799c..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-end.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-line.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-line.gif deleted file mode 100644 index 75e6da4f8ea..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-line.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-minus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-minus-nl.gif deleted file mode 100644 index 928779e9236..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-minus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-minus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-minus.gif deleted file mode 100644 index 97dcc7110f1..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-minus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-plus-nl.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-plus-nl.gif deleted file mode 100644 index 9f7f69880f4..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-plus-nl.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-plus.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-plus.gif deleted file mode 100644 index 698de4793c5..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow-plus.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow.gif deleted file mode 100644 index b8f42083895..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/elbow.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/folder-open.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/folder-open.gif deleted file mode 100644 index 56ba737bcc7..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/folder-open.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/folder.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/folder.gif deleted file mode 100644 index 20412f7c1ba..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/folder.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/leaf.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/leaf.gif deleted file mode 100644 index 445769d3f86..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/leaf.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/loading.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/loading.gif deleted file mode 100644 index e846e1d6c58..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/loading.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/s.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/s.gif deleted file mode 100644 index 1d11fa9ada9..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/tree/s.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-error.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-error.gif deleted file mode 100644 index 397b655ab83..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-error.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-info.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-info.gif deleted file mode 100644 index 58281c3067b..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-info.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-question.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-question.gif deleted file mode 100644 index 08abd82ae86..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-question.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-warning.gif b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-warning.gif deleted file mode 100644 index 27ff98b4f78..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/icon-warning.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-corners.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-corners.png deleted file mode 100644 index 1a518335d34..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-corners.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-corners.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-corners.psd deleted file mode 100644 index 3d7f0623e03..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-corners.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-right.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-right.png deleted file mode 100644 index 7586ff3339a..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-right.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-right.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-right.psd deleted file mode 100644 index 59a3960a235..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/left-right.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/right-corners.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/right-corners.png deleted file mode 100644 index e69a3ffc962..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/right-corners.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/right-corners.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/right-corners.psd deleted file mode 100644 index 86d50953861..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/right-corners.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/top-bottom.png b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/top-bottom.png deleted file mode 100644 index 33779e76b8d..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/top-bottom.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/top-bottom.psd b/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/top-bottom.psd deleted file mode 100644 index 48c5395e4a2..00000000000 Binary files a/web-client/src/main/resources/apps/js/ext/resources/images/yourtheme/window/top-bottom.psd and /dev/null differ diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-af.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-af.js deleted file mode 100644 index fd0bfa87c33..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-af.js +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * List compiled by mystix on the extjs.com forums. - * Thank you Mystix! - * - * Afrikaans Translations - * by Thys Meintjes (20 July 2007) - */ - -/* Ext Core translations */ -Ext.UpdateManager.defaults.indicatorText = '
      Besig om te laai...
      '; - -/* Ext single string translations */ -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} geselekteerde ry(e)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Maak die oortjie toe"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Die waarde in hierdie veld is foutief"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Besig om te laai..."; -} - -/* Javascript month and days translations */ -Date.monthNames = [ - "Januarie", - "Februarie", - "Maart", - "April", - "Mei", - "Junie", - "Julie", - "Augustus", - "September", - "Oktober", - "November", - "Desember" -]; - -Date.dayNames = [ - "Sondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrydag", - "Saterdag" -]; - -/* Ext components translations */ -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Kanselleer", - yes : "Ja", - no : "Nee" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d-m-y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Vandag", - minText : "Hierdie datum is vroër as die minimum datum", - maxText : "Hierdie dataum is later as die maximum datum", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Volgende Maand (Beheer+Regs)', - prevText : 'Vorige Maand (Beheer+Links)', - monthYearText : "Kies 'n maand (Beheer+Op/Af volgende/vorige jaar)", - todayTip : "{0} (Spasie)", - format : "d-m-y", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Bladsy", - afterPageText : "van {0}", - firstText : "Eerste Bladsy", - prevText : "Vorige Bladsy", - nextText : "Volgende Bladsy", - lastText : "Laatste Bladsy", - refreshText : "Verfris", - displayMsg : "Wys {0} - {1} van {2}", - emptyMsg : 'Geen data om te wys nie' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Die minimum lengte van die veld is {0}", - maxLengthText : "Die maximum lengte van die veld is {0}", - blankText : "Die veld is verpligtend", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Die minimum waarde vir die veld is {0}", - maxText : "Die maximum waarde vir die veld is {0}", - nanText : "{0} is nie 'n geldige waarde nie" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Afgeskakel", - disabledDatesText : "Afgeskakel", - minText : "Die datum in hierdie veld moet na {0} wees", - maxText : "Die datum in hierdie veld moet voor {0} wees", - invalidText : "{0} is nie 'n geldige datum nie - datumformaat is {1}", - format : "d/m/y", - altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Besig om te laai...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : "Hierdie veld moet 'n e-pos adres wees met die formaat 'gebruiker@domein.za'", - urlText : "Hierdie veld moet 'n URL wees me die formaat 'http:/'+'/www.domein.za'", - alphaText : 'Die veld mag alleenlik letters en _ bevat', - alphanumText : 'Die veld mag alleenlik letters, syfers en _ bevat' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sorteer Oplopend", - sortDescText : "Sorteer Aflopend", - lockText : "Vries Kolom", - unlockText : "Ontvries Kolom", - columnsText : "Kolomme" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Naam", - valueText : "Waarde", - dateFormat : "Y-m-j" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Trek om grootte aan te pas.", - collapsibleSplitTip : "Trek om grootte aan te pas. Dubbel-klik om weg te steek." - }); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-bg.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-bg.js deleted file mode 100644 index 670a7778ff8..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-bg.js +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Bulgarian Translation - * - * By Георги Костадинов, Калгари, Канада - * 10 October 2007 - * By Nedko Penev - * 26 October 2007 - * - * (utf-8 encoding) - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Зареждане...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} избрани колони"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Затвори таб"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Невалидна стойност на полето"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Зареждане..."; -} - -Date.monthNames = [ - "Януари", - "Февруари", - "Март", - "Април", - "Май", - "Юни", - "Юли", - "Август", - "Септември", - "Октомври", - "Ноември", - "Декември" -]; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.dayNames = [ - "Неделя", - "Понеделник", - "Вторник", - "Сряда", - "Четвъртък", - "Петък", - "Събота" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Отмени", - yes : "Да", - no : "Не" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Днес", - minText : "Тази дата е преди минималната", - maxText : "Тази дата е след максималната", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Следващ месец (Control+Right)', - prevText : 'Предишен месец (Control+Left)', - monthYearText : 'Избери месец (Control+Up/Down за преместване по години)', - todayTip : "{0} (Spacebar)", - format : "d.m.y", - okText : " OK ", - cancelText : "Отмени", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Страница", - afterPageText : "от {0}", - firstText : "Първа страница", - prevText : "Предишна страница", - nextText : "Следваща страница", - lastText : "Последна страница", - refreshText : "Презареди", - displayMsg : "Показвайки {0} - {1} от {2}", - emptyMsg : 'Няма данни за показване' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Минималната дължина на това поле е {0}", - maxLengthText : "Максималната дължина на това поле е {0}", - blankText : "Това поле е задължително", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Минималната стойност за това поле е {0}", - maxText : "Максималната стойност за това поле е {0}", - nanText : "{0} не е валидно число" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Недостъпен", - disabledDatesText : "Недостъпен", - minText : "Датата в това поле трябва да е след {0}", - maxText : "Датата в това поле трябва да е преди {0}", - invalidText : "{0} не е валидна дата - трябва да бъде във формат {1}", - format : "d.m.y", - altFormats : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Зареждане...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Това поле трябва да бъде емейл във формат "user@domain.com"', - urlText : 'Това поле трябва да бъде URL във формат "http:/'+'/www.domain.com"', - alphaText : 'Това поле трябва да съдържа само букви и _', - alphanumText : 'Това поле трябва да съдържа само букви, цифри и _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Моля, въведете URL за връзката:', - buttonTips : { - bold : { - title: 'Bold (Ctrl+B)', - text: 'Удебелява избрания текст.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italic (Ctrl+I)', - text: 'Прави избрания текст курсив.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Underline (Ctrl+U)', - text: 'Подчертава избрания текст.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Уголеми текста', - text: 'Уголемява размера на шрифта.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Намали текста', - text: 'Намалява размера на шрифта.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Цвят на маркирания текст', - text: 'Променя фоновия цвят на избрания текст.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Цвят на шрифта', - text: 'Променя цвета на избрания текст.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Ляво подравняване', - text: 'Подравнява текста на ляво.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Центриране', - text: 'Центрира текста.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Дясно подравняване', - text: 'Подравнява текста на дясно.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Неномериран списък', - text: 'Започва неномериран списък.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Номериран списък', - text: 'Започва номериран списък.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Хипервръзка', - text: 'Превръща избрания текст в хипервръзка.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Редактиране на кода', - text: 'Преминаване в режим на редактиране на кода.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Подреди в нарастващ ред", - sortDescText : "Подреди в намаляващ ред", - lockText : "Заключи колона", - unlockText : "Отключи колона", - columnsText : "Колони" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Име", - valueText : "Стойност", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Влачете с мишката за да промените размера.", - collapsibleSplitTip : "Влачете с мишката за да промените размера. Чукнете два пъти за да скриете." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ca.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ca.js deleted file mode 100644 index 8bcd6fd8578..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ca.js +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Catalonian Translation by halkon_polako 6-12-2007 - * December correction halkon_polako 11-12-2007 - * - * Synchronized with 2.2 version of ext-lang-en.js (provided by Condor 8 aug 2008) - * by halkon_polako 14-aug-2008 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Carregant...
      '; - -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} fila(es) seleccionada(es)"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Carregant..."; -} - -Date.monthNames = [ - "Gener", - "Febrer", - "Març", - "Abril", - "Maig", - "Juny", - "Juliol", - "Agost", - "Setembre", - "Octubre", - "Novembre", - "Desembre" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Gen : 0, - Feb : 1, - Mar : 2, - Abr : 3, - Mai : 4, - Jun : 5, - Jul : 6, - Ago : 7, - Set : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Diumenge", - "Dilluns", - "Dimarts", - "Dimecres", - "Dijous", - "Divendres", - "Dissabte" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -Date.parseCodes.S.s = "(?:st|nd|rd|th)"; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "Acceptar", - cancel : "Cancel·lar", - yes : "Sí", - no : "No" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Avui", - minText : "Aquesta data és anterior a la data mínima", - maxText : "Aquesta data és posterior a la data màxima", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Mes Següent (Control+Fletxa Dreta)', - prevText : 'Mes Anterior (Control+Fletxa Esquerra)', - monthYearText : 'Seleccioni un mes (Control+Fletxa a Dalt o Abaix per canviar els anys)', - todayTip : "{0} (Barra d'espai)", - format : "d/m/Y", - okText : " Acceptar ", - cancelText : "Cancel·lar", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Pàgina", - afterPageText : "de {0}", - firstText : "Primera Pàgina", - prevText : "Pàgina Anterior", - nextText : "Pàgina Següent", - lastText : "Darrera Pàgina", - refreshText : "Refrescar", - displayMsg : "Mostrant {0} - {1} de {2}", - emptyMsg : 'Sense dades per mostrar' - }); -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "El valor d'aquest camp és invàlid"; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "El tamany mínim per aquest camp és {0}", - maxLengthText : "El tamany màxim per aquest camp és {0}", - blankText : "Aquest camp és obligatori", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ",", - decimalPrecision : 2, - minText : "El valor mínim per aquest camp és {0}", - maxText : "El valor màxim per aquest camp és {0}", - nanText : "{0} no és un nombre vàlid" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Deshabilitat", - disabledDatesText : "Deshabilitat", - minText : "La data en aquest camp ha de ser posterior a {0}", - maxText : "La data en aquest camp ha de ser inferior a {0}", - invalidText : "{0} no és una data vàlida - ha de tenir el format {1}", - format : "d/m/Y", - altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Carregant...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Aquest camp ha de ser una adreça de e-mail amb el format "user@domain.com"', - urlText : 'Aquest camp ha de ser una URL amb el format "http:/'+'/www.domain.com"', - alphaText : 'Aquest camp només pot contenir lletres i _', - alphanumText : 'Aquest camp només por contenir lletres, nombres i _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Si us plau, tecleixi la URL per l\'enllaç:', - buttonTips : { - bold : { - title: 'Negreta (Ctrl+B)', - text: 'Posa el text seleccionat en negreta.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Itàlica (Ctrl+I)', - text: 'Posa el text seleccionat en itàlica.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Subratllat (Ctrl+U)', - text: 'Subratlla el text seleccionat.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Augmentar Text', - text: 'Augmenta el tamany de la font de text.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Disminuir Text', - text: 'Disminueix el tamany de la font de text.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Color de fons', - text: 'Canvia el color de fons del text seleccionat.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Color de la font de text', - text: 'Canvia el color del text seleccionat.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Alinear a la esquerra', - text: 'Alinea el text a la esquerra.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centrar el text', - text: 'Centra el text a l\'editor', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Alinear a la dreta', - text: 'Alinea el text a la dreta.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Llista amb vinyetes', - text: 'Comença una llista amb vinyetes.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Llista numerada', - text: 'Comença una llista numerada.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Enllaç', - text: 'Transforma el text seleccionat en un enllaç.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Editar Codi', - text: 'Canvia al mode d\'edició de codi.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Ordenació Ascendent", - sortDescText : "Ordenació Descendent", - columnsText : "Columnes" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Buit)', - groupByText : 'Agrupar Per Aquest Camp', - showGroupsText : 'Mostrar en Grups' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nom", - valueText : "Valor", - dateFormat : "d/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Cliqueu i arrossegueu per canviar el tamany del panell.", - collapsibleSplitTip : "Cliqueu i arrossegueu per canviar el tamany del panell. Doble clic per ocultar-ho." - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "L\'hora en aquest camp ha de ser igual o posterior a {0}", - maxText : "L\'hora en aquest camp ha de ser igual o anterior {0}", - invalidText : "{0} no és un hora vàlida", - format : "g:i A", - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : "Ha de seleccionar almenys un étem d\'aquest group" - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : "Ha de seleccionar un étem d\'aquest grup" - }); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-cs.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-cs.js deleted file mode 100644 index d9ba8683732..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-cs.js +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Czech Translations - * Translated by Tomáš Korčák (72) - * 2008/02/08 18:02, Ext-2.0.1 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Prosím čekejte...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} vybraných řádků"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Zavřít záložku"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Hodnota v tomto poli je neplatná"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Prosím čekejte..."; -} - -Date.monthNames = [ - "Leden", - "Únor", - "Březen", - "Duben", - "Květen", - "Červen", - "Červenec", - "Srpen", - "Září", - "Říjen", - "Listopad", - "Prosinec" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Neděle", - "Pondělí", - "Úterý", - "Středa", - "Čtvrtek", - "Pátek", - "Sobota" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Storno", - yes : "Ano", - no : "Ne" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Dnes", - minText : "Datum nesmí být starší než je minimální", - maxText : "Datum nesmí být dřívější než je maximální", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Následující měsíc (Control+Right)', - prevText : 'Předcházející měsíc (Control+Left)', - monthYearText : 'Zvolte měsíc (ke změně let použijte Control+Up/Down)', - todayTip : "{0} (Spacebar)", - format : "d.m.Y", - okText : " OK ", - cancelText : "Storno", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Strana", - afterPageText : "z {0}", - firstText : "První strana", - prevText : "Přecházející strana", - nextText : "Následující strana", - lastText : "Poslední strana", - refreshText : "Aktualizovat", - displayMsg : "Zobrazeno {0} - {1} z celkových {2}", - emptyMsg : 'Žádné záznamy nebyly nalezeny' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Pole nesmí mít méně {0} znaků", - maxLengthText : "Pole nesmí být delší než {0} znaků", - blankText : "This field is required", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Hodnota v tomto poli nesmí být menší než {0}", - maxText : "Hodnota v tomto poli nesmí být větší než {0}", - nanText : "{0} není platné číslo" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Neaktivní", - disabledDatesText : "Neaktivní", - minText : "Datum v tomto poli nesmí být starší než {0}", - maxText : "Datum v tomto poli nesmí být novější než {0}", - invalidText : "{0} není platným datem - zkontrolujte zda-li je ve formátu {1}", - format : "d.m.Y", - altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Prosím čekejte...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'V tomto poli může být vyplněna pouze emailová adresa ve formátu "uživatel@doména.cz"', - urlText : 'V tomto poli může být vyplněna pouze URL (adresa internetové stránky) ve formátu "http:/'+'/www.doména.cz"', - alphaText : 'Toto pole může obsahovat pouze písmena abecedy a znak _', - alphanumText : 'Toto pole může obsahovat pouze písmena abecedy, čísla a znak _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Zadejte URL adresu odkazu:', - buttonTips : { - bold : { - title: 'Tučné (Ctrl+B)', - text: 'Označí vybraný text tučně.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Kurzíva (Ctrl+I)', - text: 'Označí vybraný text kurzívou.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Podtržení (Ctrl+U)', - text: 'Podtrhne vybraný text.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Zvětšit písmo', - text: 'Zvětší velikost písma.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Zúžit písmo', - text: 'Zmenší velikost písma.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Barva zvýraznění textu', - text: 'Označí vybraný text tak, aby vypadal jako označený zvýrazňovačem.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Barva písma', - text: 'Změní barvu textu.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Zarovnat text vlevo', - text: 'Zarovná text doleva.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Zarovnat na střed', - text: 'Zarovná text na střed.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Zarovnat text vpravo', - text: 'Zarovná text doprava.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Odrážky', - text: 'Začne seznam s odrážkami.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Číslování', - text: 'Začne číslovaný seznam.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Internetový odkaz', - text: 'Z vybraného textu vytvoří internetový odkaz.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Zdrojový kód', - text: 'Přepne do módu úpravy zdrojového kódu.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Řadit vzestupně", - sortDescText : "Řadit sestupně", - lockText : "Ukotvit sloupec", - unlockText : "Uvolnit sloupec", - columnsText : "Sloupce" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Žádná data)', - groupByText : 'Seskupit dle tohoto pole', - showGroupsText : 'Zobrazit ve skupině' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Název", - valueText : "Hodnota", - dateFormat : "j.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Tahem změnit velikost.", - collapsibleSplitTip : "Tahem změnit velikost. Dvojklikem skrýt." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-da.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-da.js deleted file mode 100644 index 254c3a163d5..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-da.js +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Danish translation - * By JohnF - * 04-09-2007, 05:28 AM - * - * Extended and modified by Karl Krukow, - * December, 2007. - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Henter...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} markerede rækker"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Luk denne fane"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Værdien i dette felt er ugyldig"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Henter..."; -} - -Date.monthNames = [ - "januar", - "februar", - "marts", - "april", - "maj", - "juni", - "juli", - "august", - "september", - "oktober", - "november", - "december" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "søndag", - "mandag", - "tirsdag", - "onsdag", - "torsdag", - "fredag", - "lørdag" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Fortryd", - yes : "Ja", - no : "Nej" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "I dag", - minText : "Denne dato er før den tidligst tilladte", - maxText : "Denne dato er senere end den senest tilladte", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Næste måned (Ctrl + højre piltast)', - prevText : 'Forrige måned (Ctrl + venstre piltast)', - monthYearText : 'Vælg en måned (Ctrl + op/ned pil for at ændre årstal)', - todayTip : "{0} (mellemrum)", - format : "d/m/y", - okText : " OK ", - cancelText : "Cancel", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Side", - afterPageText : "af {0}", - firstText : "Første side", - prevText : "Forrige side", - nextText : "Næste side", - lastText : "Sidste side", - refreshText : "Opfrisk", - displayMsg : "Viser {0} - {1} af {2}", - emptyMsg : 'Der er ingen data at vise' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minimum længden for dette felt er {0}", - maxLengthText : "Maksimum længden for dette felt er {0}", - blankText : "Dette felt skal udfyldes", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Mindste-værdien for dette felt er {0}", - maxText : "Maksimum-værdien for dette felt er {0}", - nanText : "{0} er ikke et tilladt nummer" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Inaktiveret", - disabledDatesText : "Inaktiveret", - minText : "Datoen i dette felt skal være efter {0}", - maxText : "Datoen i dette felt skal være før {0}", - invalidText : "{0} er ikke en tilladt dato - datoer skal angives i formatet {1}", - format : "d/m/y", - altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Henter...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Dette felt skal være en email adresse i formatet "xxx@yyy.zzz"', - urlText : 'Dette felt skal være en URL i formatet "http:/'+'/xxx.yyy"', - alphaText : 'Dette felt kan kun indeholde bogstaver og "_" (understregning)', - alphanumText : 'Dette felt kan kun indeholde bogstaver, tal og "_" (understregning)' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Indtast URL:', - buttonTips : { - bold : { - title: 'Fed (Ctrl+B)', //Can I change this to Ctrl+F? - text: 'Formater det markerede tekst med fed.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Kursiv (Ctrl+I)',//Ctrl+K - text: 'Formater det markerede tekst med kursiv.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Understreg (Ctrl+U)', - text: 'Understreg det markerede tekst.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Forstør tekst', - text: 'Forøg fontstørrelsen.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Formindsk tekst', - text: 'Formindsk fontstørrelsen.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Farve for tekstfremhævelse', - text: 'Skift baggrundsfarve for det markerede tekst.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Skriftfarve', - text: 'Skift skriftfarve for det markerede tekst.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Juster venstre', - text: 'Venstrestil tekst.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centreret', - text: 'Centrer tekst.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Juster højre', - text: 'Højrestil tekst.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Punktopstilling', - text: 'Påbegynd punktopstilling.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Nummereret opstilling', - text: 'Påbegynd nummereret opstilling.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperlink', - text: 'Lav det markerede test til et hyperlink.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Kildetekstredigering', - text: 'Skift til redigering af kildetekst.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sortér stigende", - sortDescText : "Sortér faldende", - lockText : "Lås kolonne", - unlockText : "Fjern lås fra kolonne", - columnsText : "Kolonner" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Ingen)', - groupByText : 'Gruppér efter dette felt', - showGroupsText : 'Vis i grupper' //should this be sort in groups? - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Navn", - valueText : "Værdi", - dateFormat : "j/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Træk for at ændre størrelsen.", - collapsibleSplitTip : "Træk for at ændre størrelsen. Dobbelt-klik for at skjule." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-de.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-de.js deleted file mode 100644 index 89ecea320de..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-de.js +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * German translation - * By schmidetzki and humpdi - * 04-07-2007 - * Updated by wm003 10-31-2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Übertrage Daten ...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} Zeile(n) ausgewählt"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Diesen Tab schließen"; -} - -if(Ext.form.BasicForm){ - Ext.form.BasicForm.prototype.waitTitle = "Bitte warten..."; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Der Wert des Feldes ist nicht korrekt"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Übertrage Daten..."; -} - -Date.monthNames = [ - "Januar", - "Februar", - "März", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - "M\u00e4r" : 2, - Apr : 3, - Mai : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Okt : 9, - Nov : 10, - Dez : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Sonntag", - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Abbrechen", - yes : "Ja", - no : "Nein" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Heute", - minText : "Dieses Datum liegt von dem erstmöglichen Datum", - maxText : "Dieses Datum liegt nach dem letztmöglichen Datum", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : "Nächster Monat (Strg/Control + Rechts)", - prevText : "Vorheriger Monat (Strg/Control + Links)", - monthYearText : "Monat auswählen (Strg/Control + Hoch/Runter, um ein Jahr auszuwählen)", - todayTip : "Heute ({0}) (Leertaste)", - format : "d.m.Y", - okText : " OK ", - cancelText : "Abbrechen", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Seite", - afterPageText : "von {0}", - firstText : "Erste Seite", - prevText : "vorherige Seite", - nextText : "nächste Seite", - lastText : "letzte Seite", - refreshText : "Aktualisieren", - displayMsg : "Anzeige Eintrag {0} - {1} von {2}", - emptyMsg : "Keine Daten vorhanden" - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Bitte geben Sie mindestens {0} Zeichen ein", - maxLengthText : "Bitte geben Sie maximal {0} Zeichen ein", - blankText : "Dieses Feld darf nicht leer sein", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Der Mindestwert für dieses Feld ist {0}", - maxText : "Der Maximalwert für dieses Feld ist {0}", - nanText : "{0} ist keine Zahl" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "nicht erlaubt", - disabledDatesText : "nicht erlaubt", - minText : "Das Datum in diesem Feld muß nach dem {0} liegen", - maxText : "Das Datum in diesem Feld muß vor dem {0} liegen", - invalidText : "{0} ist kein valides Datum - es muß im Format {1} eingegeben werden", - format : "d.m.Y", - altFormats : "d.m.Y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Lade Daten ...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Dieses Feld sollte eine E-Mail-Adresse enthalten. Format: "user@domain.com"', - urlText : 'Dieses Feld sollte eine URL enthalten. Format: "http:/'+'/www.domain.com"', - alphaText : 'Dieses Feld darf nur Buchstaben enthalten und _', - alphanumText : 'Dieses Feld darf nur Buchstaben und Zahlen enthalten und _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Bitte geben Sie die URL für den Link ein:', - buttonTips : { - bold : { - title: 'Fett (Ctrl+B)', - text: 'Erstellt den ausgewählten Text in Fettschrift.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Kursiv (Ctrl+I)', - text: 'Erstellt den ausgewählten Text in Schrägschrift.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Unterstrichen (Ctrl+U)', - text: 'Unterstreicht den ausgewählten Text.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Text vergößern', - text: 'Erhöht die Schriftgröße.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Text verkleinern', - text: 'Verringert die Schriftgröße.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Text farblich hervorheben', - text: 'Hintergrundfarbe des ausgewählten Textes ändern.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Schriftfarbe', - text: 'Farbe des ausgewählten Textes ändern.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Linksbündig', - text: 'Setzt den Text linksbündig.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Zentrieren', - text: 'Zentriert den Text in Editor.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Rechtsbündig', - text: 'Setzt den Text rechtsbündig.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Aufzählungsliste', - text: 'Beginnt eine Aufzählungsliste mit Spiegelstrichen.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numerierte Liste', - text: 'Beginnt eine numerierte Liste.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperlink', - text: 'Erstellt einen Hyperlink aus dem ausgewählten text.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Source bearbeiten', - text: 'Zur Bearbeitung des Quelltextes wechseln.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Aufsteigend sortieren", - sortDescText : "Absteigend sortieren", - lockText : "Spalte sperren", - unlockText : "Spalte freigeben (entsperren)", - columnsText : "Spalten" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Keine)', - groupByText : 'Dieses Feld gruppieren', - showGroupsText : 'In Gruppen anzeigen' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Name", - valueText : "Wert", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Ziehen, um Größe zu ändern.", - collapsibleSplitTip : "Ziehen, um Größe zu ändern. Doppelklick um Panel auszublenden." - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "Die Zeit muss gleich oder nach {0} liegen", - maxText : "Die Zeit muss gleich oder vor {0} liegen", - invalidText : "{0} ist keine gültige Zeit", - format : "H:i" - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-el_GR.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-el_GR.js deleted file mode 100644 index 0d386610e9e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-el_GR.js +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Greek translation - * By thesilentman (utf8 encoding) - * 27 Apr 2008 - * - * Changes since previous (second) Version: - * + added Date.shortMonthNames - * + added Date.getShortMonthName - * + added Date.monthNumbers - * + added Ext.grid.GroupingView - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Μεταφόρτωση δεδομένων...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} Επιλεγμένες σειρές"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Κλείστε το tab"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Το περιεχόμενο του πεδίου δεν είναι αποδεκτό"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Μεταφόρτωση δεδομένων..."; -} - -Date.monthNames = [ - "Ιανουάριος", - "Φεβρουάριος", - "Μάρτιος", - "Απρίλιος", - "Μάιος", - "Ιούνιος", - "Ιούλιος", - "Αύγουστος", - "Σεπτέμβριος", - "Οκτώβριος", - "Νοέμβριος", - "Δεκέμβριος" -]; - -Date.shortMonthNames = [ - "Ιαν", - "Φεβ", - "Μάρ", - "Απρ", - "Μάι", - "Ιού", - "Ιού", - "Αύγ", - "Σεπ", - "Οκτ", - "Νοέ", - "Δεκ" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - - -Date.dayNames = [ - "Κυριακή", - "Δευτέρα", - "Τρίτη", - "Τετάρτη", - "Πέμπτη", - "Παρασκευή", - "Σάββατο" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Άκυρο", - yes : "Ναι", - no : "Όχι" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Σήμερα", - minText : "Η Ημερομηνία είναι προγενέστερη από την παλαιότερη αποδεκτή", - maxText : "Η Ημερομηνία είναι μεταγενέστερη από την νεότερη αποδεκτή", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Επόμενος Μήνας (Control+Δεξί Βέλος)', - prevText : 'Προηγούμενος Μήνας (Control + Αριστερό Βέλος)', - monthYearText : 'Επιλογή Μηνός (Control + Επάνω/Κάτω Βέλος για μεταβολή ετών)', - todayTip : "{0} (ΠΛήκτρο Διαστήματος)", - format : "d/m/y" - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Σελίδα", - afterPageText : "από {0}", - firstText : "Πρώτη Σελίδα", - prevText : "Προηγούμενη Σελίδα", - nextText : "Επόμενη Σελίδα", - lastText : "Τελευταία Σελίδα", - refreshText : "Ανανέωση", - displayMsg : "Εμφάνιση {0} - {1} από {2}", - emptyMsg : 'Δεν υπάρχουν δεδομένα' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Το μικρότερο αποδεκτό μήκος για το πεδίο είναι {0}", - maxLengthText : "Το μεγαλύτερο αποδεκτό μήκος για το πεδίο είναι {0}", - blankText : "Το πεδίο είναι υποχρεωτικό", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Η μικρότερη τιμή του πεδίου είναι {0}", - maxText : "Η μεγαλύτερη τιμή του πεδίου είναι {0}", - nanText : "{0} δεν είναι αποδεκτός αριθμός" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Ανενεργό", - disabledDatesText : "Ανενεργό", - minText : "Η ημερομηνία αυτού του πεδίου πρέπει να είναι μετά την {0}", - maxText : "Η ημερομηνία αυτού του πεδίου πρέπει να είναι πριν την {0}", - invalidText : "{0} δεν είναι έγκυρη ημερομηνία - πρέπει να είναι στη μορφή {1}", - format : "d/m/y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Μεταφόρτωση δεδομένων...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Το πεδίο δέχεται μόνο διευθύνσεις Email σε μορφή "user@domain.com"', - urlText : 'Το πεδίο δέχεται μόνο URL σε μορφή "http:/'+'/www.domain.com"', - alphaText : 'Το πεδίο δέχεται μόνο χαρακτήρες και _', - alphanumText : 'Το πεδίο δέχεται μόνο χαρακτήρες, αριθμούς και _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Δώστε τη διεύθυνση (URL) για το σύνδεσμο (link):', - buttonTips : { - bold : { - title: 'Έντονα (Ctrl+B)', - text: 'Κάνετε το προεπιλεγμένο κείμενο έντονο.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Πλάγια (Ctrl+I)', - text: 'Κάνετε το προεπιλεγμένο κείμενο πλάγιο.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Υπογράμμιση (Ctrl+U)', - text: 'Υπογραμμίζετε το προεπιλεγμένο κείμενο.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Μεγέθυνση κειμένου', - text: 'Μεγαλώνετε τη γραμματοσειρά.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Σμίκρυνση κειμένου', - text: 'Μικραίνετε τη γραμματοσειρά.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Χρώμα Φόντου Κειμένου', - text: 'Αλλάζετε το χρώμα στο φόντο του προεπιλεγμένου κειμένου.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Χρώμα Γραμματοσειράς', - text: 'Αλλάζετε το χρώμα στη γραμματοσειρά του προεπιλεγμένου κειμένου.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Αριστερή Στοίχιση Κειμένου', - text: 'Στοιχίζετε το κείμενο στα αριστερά.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Κεντράρισμα Κειμένου', - text: 'Στοιχίζετε το κείμενο στο κέντρο.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Δεξιά Στοίχιση Κειμένου', - text: 'Στοιχίζετε το κείμενο στα δεξιά.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Εισαγωγή Λίστας Κουκίδων', - text: 'Ξεκινήστε μια λίστα με κουκίδες.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Εισαγωγή Λίστας Αρίθμησης', - text: 'Ξεκινήστε μια λίστα με αρίθμηση.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperlink', - text: 'Μετατρέπετε το προεπιλεγμένο κείμενο σε Link.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Επεξεργασία Κώδικα', - text: 'Μεταβαίνετε στη λειτουργία επεξεργασίας κώδικα.', - cls: 'x-html-editor-tip' - } - } - }); -} - - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Αύξουσα ταξινόμηση", - sortDescText : "Φθίνουσα ταξινόμηση", - lockText : "Κλείδωμα στήλης", - unlockText : "Ξεκλείδωμα στήλης", - columnsText : "Στήλες" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Καμμία)', - groupByText : 'Ομαδοποίηση βάσει αυτού του πεδίου', - showGroupsText : 'Να εμφανίζεται στις ομάδες' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Όνομα", - valueText : "Περιεχόμενο", - dateFormat : "m/d/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Σύρετε για αλλαγή μεγέθους.", - collapsibleSplitTip : "Σύρετε για αλλαγή μεγέθους. Διπλό κλικ για απόκρυψη." - }); -} - diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-en.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-en.js deleted file mode 100644 index 2bb0d478d93..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-en.js +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * List compiled by mystix on the extjs.com forums. - * Thank you Mystix! - * - * English Translations - * updated to 2.2 by Condor (8 Aug 2008) - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Loading...
      '; - -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} selected row{1}"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Loading..."; -} - -Date.monthNames = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -Date.parseCodes.S.s = "(?:st|nd|rd|th)"; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Cancel", - yes : "Yes", - no : "No" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "m/d/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Today", - minText : "This date is before the minimum date", - maxText : "This date is after the maximum date", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Next Month (Control+Right)', - prevText : 'Previous Month (Control+Left)', - monthYearText : 'Choose a month (Control+Up/Down to move years)', - todayTip : "{0} (Spacebar)", - format : "m/d/y", - okText : " OK ", - cancelText : "Cancel", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Page", - afterPageText : "of {0}", - firstText : "First Page", - prevText : "Previous Page", - nextText : "Next Page", - lastText : "Last Page", - refreshText : "Refresh", - displayMsg : "Displaying {0} - {1} of {2}", - emptyMsg : 'No data to display' - }); -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "The value in this field is invalid"; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "The minimum length for this field is {0}", - maxLengthText : "The maximum length for this field is {0}", - blankText : "This field is required", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ".", - decimalPrecision : 2, - minText : "The minimum value for this field is {0}", - maxText : "The maximum value for this field is {0}", - nanText : "{0} is not a valid number" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Disabled", - disabledDatesText : "Disabled", - minText : "The date in this field must be after {0}", - maxText : "The date in this field must be before {0}", - invalidText : "{0} is not a valid date - it must be in the format {1}", - format : "m/d/y", - altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Loading...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'This field should be an e-mail address in the format "user@domain.com"', - urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', - alphaText : 'This field should only contain letters and _', - alphanumText : 'This field should only contain letters, numbers and _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Please enter the URL for the link:', - buttonTips : { - bold : { - title: 'Bold (Ctrl+B)', - text: 'Make the selected text bold.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italic (Ctrl+I)', - text: 'Make the selected text italic.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Underline (Ctrl+U)', - text: 'Underline the selected text.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Grow Text', - text: 'Increase the font size.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Shrink Text', - text: 'Decrease the font size.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Text Highlight Color', - text: 'Change the background color of the selected text.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Font Color', - text: 'Change the color of the selected text.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Align Text Left', - text: 'Align text to the left.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Center Text', - text: 'Center text in the editor.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Align Text Right', - text: 'Align text to the right.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Bullet List', - text: 'Start a bulleted list.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numbered List', - text: 'Start a numbered list.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperlink', - text: 'Make the selected text a hyperlink.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Source Edit', - text: 'Switch to source editing mode.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sort Ascending", - sortDescText : "Sort Descending", - columnsText : "Columns" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(None)', - groupByText : 'Group By This Field', - showGroupsText : 'Show in Groups' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Name", - valueText : "Value", - dateFormat : "m/j/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Drag to resize.", - collapsibleSplitTip : "Drag to resize. Double click to hide." - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "The time in this field must be equal to or after {0}", - maxText : "The time in this field must be equal to or before {0}", - invalidText : "{0} is not a valid time", - format : "g:i A", - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : "You must select at least one item in this group" - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : "You must select one item in this group" - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-en_GB.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-en_GB.js deleted file mode 100644 index 0183ff2992e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-en_GB.js +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * List compiled by mystix on the extjs.com forums. - * Thank you Mystix! - * - * English (UK) Translations - * updated to 2.2 by Condor (8 Aug 2008) - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Loading...
      '; - -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} selected row{1}"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Loading..."; -} - -Date.monthNames = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -Date.parseCodes.S.s = "(?:st|nd|rd|th)"; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Cancel", - yes : "Yes", - no : "No" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Today", - minText : "This date is before the minimum date", - maxText : "This date is after the maximum date", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Next Month (Control+Right)', - prevText : 'Previous Month (Control+Left)', - monthYearText : 'Choose a month (Control+Up/Down to move years)', - todayTip : "{0} (Spacebar)", - format : "d/m/Y", - okText : " OK ", - cancelText : "Cancel", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Page", - afterPageText : "of {0}", - firstText : "First Page", - prevText : "Previous Page", - nextText : "Next Page", - lastText : "Last Page", - refreshText : "Refresh", - displayMsg : "Displaying {0} - {1} of {2}", - emptyMsg : 'No data to display' - }); -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "The value in this field is invalid"; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "The minimum length for this field is {0}", - maxLengthText : "The maximum length for this field is {0}", - blankText : "This field is required", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ".", - decimalPrecision : 2, - minText : "The minimum value for this field is {0}", - maxText : "The maximum value for this field is {0}", - nanText : "{0} is not a valid number" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Disabled", - disabledDatesText : "Disabled", - minText : "The date in this field must be after {0}", - maxText : "The date in this field must be before {0}", - invalidText : "{0} is not a valid date - it must be in the format {1}", - format : "d/m/y", - altFormats : "d/m/Y|d/m/y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Loading...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'This field should be an e-mail address in the format "user@domain.com"', - urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', - alphaText : 'This field should only contain letters and _', - alphanumText : 'This field should only contain letters, numbers and _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Please enter the URL for the link:', - buttonTips : { - bold : { - title: 'Bold (Ctrl+B)', - text: 'Make the selected text bold.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italic (Ctrl+I)', - text: 'Make the selected text italic.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Underline (Ctrl+U)', - text: 'Underline the selected text.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Grow Text', - text: 'Increase the font size.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Shrink Text', - text: 'Decrease the font size.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Text Highlight Color', - text: 'Change the background color of the selected text.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Font Color', - text: 'Change the color of the selected text.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Align Text Left', - text: 'Align text to the left.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Center Text', - text: 'Center text in the editor.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Align Text Right', - text: 'Align text to the right.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Bullet List', - text: 'Start a bulleted list.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numbered List', - text: 'Start a numbered list.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperlink', - text: 'Make the selected text a hyperlink.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Source Edit', - text: 'Switch to source editing mode.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sort Ascending", - sortDescText : "Sort Descending", - columnsText : "Columns" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(None)', - groupByText : 'Group By This Field', - showGroupsText : 'Show in Groups' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Name", - valueText : "Value", - dateFormat : "j/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Drag to resize.", - collapsibleSplitTip : "Drag to resize. Double click to hide." - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "The time in this field must be equal to or after {0}", - maxText : "The time in this field must be equal to or before {0}", - invalidText : "{0} is not a valid time", - format : "g:i A", - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : "You must select at least one item in this group" - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : "You must select one item in this group" - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-es.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-es.js deleted file mode 100644 index 667008911c6..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-es.js +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Spanish/Latin American Translation by genius551v 04-08-2007 - * Revised by efege, 2007-04-15. - * Revised by Rafaga2k 10-01-2007 (mm/dd/yyyy) - * Revised by FeDe 12-13-2007 (mm/dd/yyyy) - * Synchronized with 2.2 version of ext-lang-en.js (provided by Condor 8 aug 2008) - * by halkon_polako 14-aug-2008 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Cargando...
      '; - -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} fila(s) seleccionada(s)"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Cargando..."; -} - -Date.monthNames = [ - "Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Ene : 0, - Feb : 1, - Mar : 2, - Abr : 3, - May : 4, - Jun : 5, - Jul : 6, - Ago : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dic : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Domingo", - "Lunes", - "Martes", - "Miércoles", - "Jueves", - "Viernes", - "Sábado" -]; - -Date.getShortDayName = function(day) { - if (day==3) return "Mié"; - if (day==6) return "Sáb"; - return Date.dayNames[day].substring(0, 3); -}; - -Date.parseCodes.S.s = "(?:st|nd|rd|th)"; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "Aceptar", - cancel : "Cancelar", - yes : "Sí", - no : "No" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Hoy", - minText : "Esta fecha es anterior a la fecha mínima", - maxText : "Esta fecha es posterior a la fecha máxima", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Mes Siguiente (Control+Right)', - prevText : 'Mes Anterior (Control+Left)', - monthYearText : 'Seleccione un mes (Control+Up/Down para desplazar el año)', - todayTip : "{0} (Barra espaciadora)", - format : "d/m/Y", - okText : " Ok ", - cancelText : "Cancelar", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Página", - afterPageText : "de {0}", - firstText : "Primera página", - prevText : "Página anterior", - nextText : "Página siguiente", - lastText : "Última página", - refreshText : "Actualizar", - displayMsg : "Mostrando {0} - {1} de {2}", - emptyMsg : 'Sin datos para mostrar' - }); -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "El valor en este campo es inválido"; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "El tamaño mínimo para este campo es de {0}", - maxLengthText : "El tamaño máximo para este campo es de {0}", - blankText : "Este campo es obligatorio", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ".", - decimalPrecision : 2, - minText : "El valor mínimo para este campo es de {0}", - maxText : "El valor máximo para este campo es de {0}", - nanText : "{0} no es un número válido" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Deshabilitado", - disabledDatesText : "Deshabilitado", - minText : "La fecha para este campo debe ser posterior a {0}", - maxText : "La fecha para este campo debe ser anterior a {0}", - invalidText : "{0} no es una fecha válida - debe tener el formato {1}", - format : "d/m/Y", - altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Cargando...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Este campo debe ser una dirección de correo electrónico con el formato "usuario@dominio.com"', - urlText : 'Este campo debe ser una URL con el formato "http:/'+'/www.dominio.com"', - alphaText : 'Este campo sólo debe contener letras y _', - alphanumText : 'Este campo sólo debe contener letras, números y _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : "Por favor proporcione la URL para el enlace:", - buttonTips : { - bold : { - title: 'Negritas (Ctrl+B)', - text: 'Transforma el texto seleccionado en Negritas.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Itálica (Ctrl+I)', - text: 'Transforma el texto seleccionado en Itálicas.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Subrayado (Ctrl+U)', - text: 'Subraya el texto seleccionado.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Aumentar la fuente', - text: 'Aumenta el tamaño de la fuente', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Reducir la fuente', - text: 'Reduce el tamaño de la fuente.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Color de fondo', - text: 'Modifica el color de fondo del texto seleccionado.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Color de la fuente', - text: 'Modifica el color del texto seleccionado.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Alinear a la izquierda', - text: 'Alinea el texto a la izquierda.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centrar', - text: 'Centrar el texto.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Alinear a la derecha', - text: 'Alinea el texto a la derecha.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Lista de viñetas', - text: 'Inicia una lista con viñetas.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Lista numerada', - text: 'Inicia una lista numerada.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Enlace', - text: 'Inserta un enlace de hipertexto.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Código Fuente', - text: 'Pasar al modo de edición de código fuente.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Ordenar en forma ascendente", - sortDescText : "Ordenar en forma descendente", - columnsText : "Columnas" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Ninguno)', - groupByText : 'Agrupar por este campo', - showGroupsText : 'Mostrar en grupos' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nombre", - valueText : "Valor", - dateFormat : "j/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Arrastre para redimensionar.", - collapsibleSplitTip : "Arrastre para redimensionar. Doble clic para ocultar." - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "La hora en este campo debe ser igual o posterior a {0}", - maxText : "La hora en este campo debe ser igual o anterior a {0}", - invalidText : "{0} no es una hora válida", - format : "g:i A", - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : "Debe seleccionar al menos un étem de este grupo" - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : "Debe seleccionar un étem de este grupo" - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fa.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fa.js deleted file mode 100644 index d115233605a..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fa.js +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Farsi (Persian) translation - * By Mohaqa - * 03-10-2007, 06:23 PM - */ - -Ext.UpdateManager.defaults.indicatorText = '
      در حال بارگذاری ...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} رکورد انتخاب شده"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "بستن"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "مقدار فیلد صحیح نیست"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "در حال بارگذاری ..."; -} - -Date.monthNames = [ - "ژانویه", - "فوریه", - "مارس", - "آپریل", - "می", - "ژوئن", - "جولای", - "آگوست", - "سپتامبر", - "اکتبر", - "نوامبر", - "دسامبر" -]; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.dayNames = [ - "یکشنبه", - "دوشنبه", - "سه شنبه", - "چهارشنبه", - "پنجشنبه", - "جمعه", - "شنبه" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "تایید", - cancel : "بازگشت", - yes : "بله", - no : "خیر" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "Y/m/d"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "امروز", - minText : "این تاریخ قبل از محدوده مجاز است", - maxText : "این تاریخ پس از محدوده مجاز است", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'ماه بعد (Control + Right)', - prevText : 'ماه قبل (Control+Left)', - monthYearText : 'یک ماه را انتخاب کنید (Control+Up/Down برای انتقال در سال)', - todayTip : "{0} (Spacebar)", - format : "y/m/d", - okText : " OK ", - cancelText : "Cancel", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "صفحه", - afterPageText : "از {0}", - firstText : "صفحه اول", - prevText : "صفحه قبل", - nextText : "صفحه بعد", - lastText : "صفحه آخر", - refreshText : "بازخوانی", - displayMsg : "نمایش {0} - {1} of {2}", - emptyMsg : 'داده ای برای نمایش وجود ندارد' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "حداقل طول این فیلد برابر است با {0}", - maxLengthText : "حداکثر طول این فیلد برابر است با {0}", - blankText : "این فیلد باید مقداری داشته باشد", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "حداقل مقدار این فیلد برابر است با {0}", - maxText : "حداکثر مقدار این فیلد برابر است با {0}", - nanText : "{0} یک عدد نیست" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "غیرفعال", - disabledDatesText : "غیرفعال", - minText : "تاریخ باید پس از {0} باشد", - maxText : "تاریخ باید پس از {0} باشد", - invalidText : "{0} تاریخ صحیحی نیست - فرمت صحیح {1}", - format : "y/m/d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "در حال بارگذاری ...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'مقدار این فیلد باید یک ایمیل با این فرمت باشد "user@domain.com"', - urlText : 'مقدار این آدرس باید یک آدرس سایت با این فرمت باشد "http:/'+'/www.domain.com"', - alphaText : 'مقدار این فیلد باید فقط از حروف الفبا و _ تشکیل شده باشد ', - alphanumText : 'مقدار این فیلد باید فقط از حروف الفبا، اعداد و _ تشکیل شده باشد' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'لطفا آدرس لینک را وارد کنید:', - buttonTips : { - bold : { - title: 'تیره (Ctrl+B)', - text: 'متن انتخاب شده را تیره می کند.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'ایتالیک (Ctrl+I)', - text: 'متن انتخاب شده را ایتالیک می کند.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'زیرخط (Ctrl+U)', - text: 'زیر هر نوشته یک خط نمایش می دهد.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'افزایش اندازه', - text: 'اندازه فونت را افزایش می دهد.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'کاهش اندازه', - text: 'اندازه متن را کاهش می دهد.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'رنگ زمینه متن', - text: 'برای تغییر رنگ زمینه متن استفاده می شود.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'رنگ قلم', - text: 'رنگ قلم متن را تغییر می دهد.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'چیدن متن از سمت چپ', - text: 'متن از سمت چپ چیده شده می شود.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'متن در وسط ', - text: 'نمایش متن در قسمت وسط صفحه و رعابت سمت چپ و راست.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'چیدن متن از سمت راست', - text: 'متن از سمت راست پیده خواهد شد.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'لیست همراه با علامت', - text: 'یک لیست جدید ایجاد می کند.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'لیست عددی', - text: 'یک لیست عددی ایجاد می کند. ', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'لینک', - text: 'متن انتخاب شده را به لینک تبدیل کنید.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'ویرایش سورس', - text: 'رفتن به حالت ویرایش سورس.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "مرتب سازی افزایشی", - sortDescText : "مرتب سازی کاهشی", - lockText : "قفل ستون ها", - unlockText : "بازکردن ستون ها", - columnsText : "ستون ها" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "نام", - valueText : "مقدار", - dateFormat : "Y/m/d" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "درگ برای تغییر اندازه.", - collapsibleSplitTip : "برای تغییر اندازه درگ کنید." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fi.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fi.js deleted file mode 100644 index cedba29cc18..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fi.js +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Finnish Translations - * - * 'ä' should read as lowercase 'a' with two dots on top (ä) - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Ladataan...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} rivi(ä) valittu"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Sulje tämä välilehti"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Ladataan..."; -} - -Date.monthNames = [ - "tammikuu", - "helmikuu", - "maaliskuu", - "huhtikuu", - "toukokuu", - "kesäkuu", - "heinäkuu", - "elokuu", - "syyskuu", - "lokakuu", - "marraskuu", - "joulukuu" -]; - -Date.getShortMonthName = function(month) { - //return Date.monthNames[month].substring(0, 3); - return (month+1) + "."; -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - if(name.match(/^(1?\d)\./)) { - return -1+RegExp.$1; - } else { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; - } -}; - -Date.dayNames = [ - "sunnuntai", - "maanantai", - "tiistai", - "keskiviikko", - "torstai", - "perjantai", - "lauantai" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 2); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Peruuta", - yes : "Kyllä", - no : "Ei" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "j.n.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Tänään", - minText : "Tämä päivämäärä on aikaisempi kuin ensimmäinen sallittu", - maxText : "Tämä päivämäärä on myöhäisempi kuin viimeinen sallittu", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Seuraava kuukausi (Control+oikealle)', - prevText : 'Edellinen kuukausi (Control+vasemmalle)', - monthYearText : 'Valitse kuukausi (vaihda vuotta painamalla Control+ylös/alas)', - todayTip : "{0} (välilyönti)", - format : "j.n.Y", - okText : " OK ", - cancelText : "Peruuta", - startDay : 1 // viikko alkaa maanantaista - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Sivu", - afterPageText : "/ {0}", - firstText : "Ensimmäinen sivu", - prevText : "Edellinen sivu", - nextText : "Seuraava sivu", - lastText : "Viimeinen sivu", - refreshText : "Päivitä", - displayMsg : "Näytetään {0} - {1} / {2}", - emptyMsg : 'Ei tietoja' - }); -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Tämän kentän arvo ei kelpaa"; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Tämän kentän minimipituus on {0}", - maxLengthText : "Tämän kentän maksimipituus on {0}", - blankText : "Tämä kenttä on pakollinen", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Tämän kentän pienin sallittu arvo on {0}", - maxText : "Tämän kentän suurin sallittu arvo on {0}", - nanText : "{0} ei ole numero" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Ei käytössä", - disabledDatesText : "Ei käytössä", - minText : "Tämän kentän päivämäärän tulee olla {0} jälkeen", - maxText : "Tämän kentän päivämäärän tulee olla ennen {0}", - invalidText : "Päivämäärä {0} ei ole oikeassa muodossa - kirjoita päivämäärä muodossa {1}", - format : "j.n.Y", - altFormats : "j.n.|d.m.|mdy|mdY|d|Y-m-d|Y/m/d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Ladataan...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Syötä tähän kenttään sähköpostiosoite, esim. "etunimi.sukunimi@osoite.fi"', - urlText : 'Syötä tähän kenttään URL-osoite, esim. "http:/'+'/www.osoite.fi"', - alphaText : 'Syötä tähän kenttään vain kirjaimia (a-z, A-Z) ja alaviivoja (_)', - alphanumText : 'Syötä tähän kenttään vain kirjaimia (a-z, A-Z), numeroita (0-9) ja alaviivoja (_)' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Anna linkin URL-osoite:', - buttonTips : { - bold : { - title: 'Lihavoi (Ctrl+B)', - text: 'Lihavoi valittu teksti.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Kursivoi (Ctrl+I)', - text: 'Kursivoi valittu teksti.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Alleviivaa (Ctrl+U)', - text: 'Alleviivaa valittu teksti.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Suurenna tekstiä', - text: 'Kasvata tekstin kirjasinkokoa.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Pienennä tekstiä', - text: 'Pienennä tekstin kirjasinkokoa.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Tekstin korostusväri', - text: 'Vaihda valitun tekstin taustaväriä.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Tekstin väri', - text: 'Vaihda valitun tekstin väriä.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Tasaa vasemmalle', - text: 'Tasaa teksti vasempaan reunaan.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Keskitä', - text: 'Keskitä teksti.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Tasaa oikealle', - text: 'Tasaa teksti oikeaan reunaan.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Luettelo', - text: 'Luo luettelo.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numeroitu luettelo', - text: 'Luo numeroitu luettelo.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Linkki', - text: 'Tee valitusta tekstistä hyperlinkki.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Lähdekoodin muokkaus', - text: 'Vaihda lähdekoodin muokkausnäkymään.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.form.BasicForm){ - Ext.form.BasicForm.prototype.waitTitle = "Odota..."; -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Järjestä A-Ö", - sortDescText : "Järjestä Ö-A", - lockText : "Lukitse sarake", - unlockText : "Vapauta sarakkeen lukitus", - columnsText : "Sarakkeet" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(ei mitään)', - groupByText : 'Ryhmittele tämän kentän mukaan', - showGroupsText : 'Näytä ryhmissä' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nimi", - valueText : "Arvo", - dateFormat : "j.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Muuta kokoa vetämällä.", - collapsibleSplitTip : "Muuta kokoa vetämällä. Piilota kaksoisklikkauksella." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fr.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fr.js deleted file mode 100644 index bf308bddf05..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fr.js +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * France (France) translation - * By Thylia - * 09-11-2007, 02:22 PM - * updated to 2.2 by disizben (22 Sep 2008) - */ - -Ext.UpdateManager.defaults.indicatorText = '
      En cours de chargement...
      '; - -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} ligne{1} sélectionnée{1}"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "En cours de chargement..."; -} - -Date.shortMonthNames = [ - "Janv", - "Févr", - "Mars", - "Avr", - "Mai", - "Juin", - "Juil", - "Août", - "Sept", - "Oct", - "Nov", - "Déc" -]; - -Date.getShortMonthName = function(month) { - return Date.shortMonthNames[month]; -}; - -Date.monthNames = [ - "Janvier", - "Février", - "Mars", - "Avril", - "Mai", - "Juin", - "Juillet", - "Août", - "Septembre", - "Octobre", - "Novembre", - "Décembre" -]; - -Date.monthNumbers = { - "Janvier" : 0, - "Février" : 1, - "Mars" : 2, - "Avril" : 3, - "Mai" : 4, - "Juin" : 5, - "Juillet" : 6, - "Août" : 7, - "Septembre" : 8, - "Octobre" : 9, - "Novembre" : 10, - "Décembre" : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[Ext.util.Format.capitalize(name)]; -}; - -Date.dayNames = [ - "Dimanche", - "Lundi", - "Mardi", - "Mercredi", - "Jeudi", - "Vendredi", - "Samedi" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -Date.parseCodes.S.s = "(?:er)"; - -Ext.override(Date, { - getSuffix : function() { - return (this.getDate() == 1) ? "er" : ""; - } -}); - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Annuler", - yes : "Oui", - no : "Non" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Aujourd'hui", - minText : "Cette date est antérieure à la date minimum", - maxText : "Cette date est postérieure à la date maximum", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Mois suivant (CTRL+Flèche droite)', - prevText : "Mois précédent (CTRL+Flèche gauche)", - monthYearText : "Choisissez un mois (CTRL+Flèche haut ou bas pour changer d'année.)", - todayTip : "{0} (Barre d'espace)", - okText : " OK ", - cancelText : "Annuler", - format : "d/m/y", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Page", - afterPageText : "sur {0}", - firstText : "Première page", - prevText : "Page précédente", - nextText : "Page suivante", - lastText : "Dernière page", - refreshText : "Actualiser la page", - displayMsg : "Page courante {0} - {1} sur {2}", - emptyMsg : 'Aucune donnée à afficher' - }); -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide"; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "La longueur minimum de ce champ est de {0} caractères", - maxLengthText : "La longueur maximum de ce champ est de {0} caractères", - blankText : "Ce champ est obligatoire", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ",", - decimalPrecision : 2, - minText : "La valeur minimum de ce champ doit être de {0}", - maxText : "La valeur maximum de ce champ doit être de {0}", - nanText : "{0} n'est pas un nombre valide" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Désactivé", - disabledDatesText : "Désactivé", - minText : "La date de ce champ ne peut être antérieure au {0}", - maxText : "La date de ce champ ne peut être postérieure au {0}", - invalidText : "{0} n'est pas une date valide - elle doit être au format suivant: {1}", - format : "d/m/y", - altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "En cours de chargement...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Ce champ doit contenir une adresse email au format: "usager@domaine.com"', - urlText : 'Ce champ doit contenir une URL au format suivant: "http:/'+'/www.domaine.com"', - alphaText : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)', - alphanumText : 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : "Veuillez entrer l'URL pour ce lien:", - buttonTips : { - bold : { - title: 'Gras (Ctrl+B)', - text: 'Met le texte sélectionné en gras.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italique (Ctrl+I)', - text: 'Met le texte sélectionné en italique.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Souligné (Ctrl+U)', - text: 'Souligne le texte sélectionné.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Agrandir la police', - text: 'Augmente la taille de la police.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Réduire la police', - text: 'Réduit la taille de la police.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Couleur de surbrillance', - text: 'Modifie la couleur de fond du texte sélectionné.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Couleur de police', - text: 'Modifie la couleur du texte sélectionné.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Aligner à gauche', - text: 'Aligne le texte à gauche.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centrer', - text: 'Centre le texte.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Aligner à droite', - text: 'Aligner le texte à droite.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Liste à puce', - text: 'Démarre une liste à puce.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Liste numérotée', - text: 'Démarre une liste numérotée.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Lien hypertexte', - text: 'Transforme en lien hypertexte.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Code source', - text: 'Basculer en mode édition du code source.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Tri croissant", - sortDescText : "Tri décroissant", - columnsText : "Colonnes" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Aucun)', - groupByText : 'Grouper par ce champ', - showGroupsText : 'Afficher par groupes' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Propriété", - valueText : "Valeur", - dateFormat : "d/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Cliquer et glisser pour redimensionner le panneau.", - collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour le cacher." - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "L'heure de ce champ ne peut être antérieure à {0}", - maxText : "L'heure de ce champ ne peut être postérieure à {0}", - invalidText : "{0} n'est pas une heure valide", - format : "H:i", - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|h a|g a|g A|gi|hi|Hi|gia|hia|g|H" - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : "Vous devez sélectionner au moins un élément dans ce groupe" - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : "Vous devez sélectionner au moins un élément dans ce groupe" - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fr_CA.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fr_CA.js deleted file mode 100644 index c3e861e6365..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-fr_CA.js +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * France (Canadian) translation - * By BernardChhun - * 04-08-2007, 03:07 AM - */ - -Ext.UpdateManager.defaults.indicatorText = '
      En cours de chargement...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} ligne(s) sélectionné(s)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Fermer cette onglet"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "En cours de chargement..."; -} - -Date.shortMonthNames = [ - "Janv", - "Févr", - "Mars", - "Avr", - "Mai", - "Juin", - "Juil", - "Août", - "Sept", - "Oct", - "Nov", - "Déc" -]; - -Date.getShortMonthName = function(month) { - return Date.shortMonthNames[month]; -}; - -Date.monthNames = [ - "Janvier", - "Février", - "Mars", - "Avril", - "Mai", - "Juin", - "Juillet", - "Août", - "Septembre", - "Octobre", - "Novembre", - "Décembre" -]; - -Date.monthNumbers = { - "Janvier" : 0, - "Février" : 1, - "Mars" : 2, - "Avril" : 3, - "Mai" : 4, - "Juin" : 5, - "Juillet" : 6, - "Août" : 7, - "Septembre" : 8, - "Octobre" : 9, - "Novembre" : 10, - "Décembre" : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[Ext.util.Format.capitalize(name)]; -}; - -Date.dayNames = [ - "Dimanche", - "Lundi", - "Mardi", - "Mercredi", - "Jeudi", - "Vendredi", - "Samedi" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Annuler", - yes : "Oui", - no : "Non" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Aujourd'hui", - minText : "Cette date est plus petite que la date minimum", - maxText : "Cette date est plus grande que la date maximum", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Prochain mois (CTRL+Fléche droite)', - prevText : 'Mois précédent (CTRL+Fléche gauche)', - monthYearText : 'Choissisez un mois (CTRL+Fléche haut ou bas pour changer d\'année.)', - todayTip : "{0} (Barre d'espace)", - format : "d/m/y" - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Page", - afterPageText : "de {0}", - firstText : "Première page", - prevText : "Page précédente", - nextText : "Prochaine page", - lastText : "Dernière page", - refreshText : "Recharger la page", - displayMsg : "Page courante {0} - {1} de {2}", - emptyMsg : 'Aucune donnée à afficher' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "La longueur minimum de ce champ est de {0} caractères", - maxLengthText : "La longueur maximum de ce champ est de {0} caractères", - blankText : "Ce champ est obligatoire", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "La valeur minimum de ce champ doit être de {0}", - maxText : "La valeur maximum de ce champ doit être de {0}", - nanText : "{0} n'est pas un nombre valide" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Désactivé", - disabledDatesText : "Désactivé", - minText : "La date de ce champ doit être avant le {0}", - maxText : "La date de ce champ doit être après le {0}", - invalidText : "{0} n'est pas une date valide - il doit être au format suivant: {1}", - format : "d/m/y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "En cours de chargement...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Ce champ doit contenir un courriel et doit être sous ce format: "usager@domaine.com"', - urlText : 'Ce champ doit contenir une URL sous le format suivant: "http:/'+'/www.domaine.com"', - alphaText : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)', - alphanumText : 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Tri ascendant", - sortDescText : "Tri descendant", - lockText : "Verrouillé la colonne", - unlockText : "Déverrouillé la colonne", - columnsText : "Colonnes" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Propriété", - valueText : "Valeur", - dateFormat : "d/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Cliquer et glisser pour redimensionner le panneau.", - collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour cacher le panneau." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-gr.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-gr.js deleted file mode 100644 index 8e0e1486ef6..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-gr.js +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Greek (Old Version) Translations by Vagelis - * 03-June-2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Öüñôùóç...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} åðéëåãìÝíç(åò) ãñáììÞ(Ýò)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Êëåßóôå áõôÞ ôçí êáñôÝëá"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Ç ôéìÞ óôï ðåäßï äåí åßíáé Ýãêõñç"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Öüñôùóç..."; -} - -Date.monthNames = [ - "ÉáíïõÜñéïò", - "ÖåâñïõÜñéïò", - "ÌÜñôéïò", - "Áðñßëéïò", - "ÌÜéïò", - "Éïýíéïò", - "Éïýëéïò", - "Áýãïõóôïò", - "ÓåðôÝìâñéïò", - "Ïêôþâñéïò", - "ÍïÝìâñéïò", - "ÄåêÝìâñéïò" -]; - -Date.dayNames = [ - "ÊõñéáêÞ", - "ÄåõôÝñá", - "Ôñßôç", - "ÔåôÜñôç", - "ÐÝìðôç", - "ÐáñáóêåõÞ", - "ÓÜââáôï" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "ÅíôÜîåé", - cancel : "Áêýñùóç", - yes : "Íáé", - no : "¼÷é" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "ì/ç/Å"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "ÓÞìåñá", - minText : "Ç çìåñïìçíßá áõôÞ åßíáé ðñéí ôçí ìéêñüôåñç çìåñïìçíßá", - maxText : "Ç çìåñïìçíßá áõôÞ åßíáé ìåôÜ ôçí ìåãáëýôåñç çìåñïìçíßá", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Åðüìåíïò ÌÞíáò (Control+Right)', - prevText : 'Ðñïçãïýìåíïò ÌÞíáò (Control+Left)', - monthYearText : 'ÅðéëÝîôå ÌÞíá (Control+Up/Down ãéá ìåôáêßíçóç óôá Ýôç)', - todayTip : "{0} (Spacebar)", - format : "ì/ç/Å" - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Óåëßäá", - afterPageText : "áðü {0}", - firstText : "Ðñþôç óåëßäá", - prevText : "Ðñïçãïýìåíç óåëßäá", - nextText : "Åðüìåíç óåëßäá", - lastText : "Ôåëåõôáßá óåëßäá", - refreshText : "ÁíáíÝùóç", - displayMsg : "ÅìöÜíéóç {0} - {1} áðü {2}", - emptyMsg : 'Äåí âñÝèçêáí åããñáöÝò ãéá åìöÜíéóç' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Ôï åëÜ÷éóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}", - maxLengthText : "Ôï ìÝãéóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}", - blankText : "Ôï ðåäßï áõôü åßíáé õðï÷ñåùôïêü", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Ç åëÜ÷éóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}", - maxText : "Ç ìÝãéóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}", - nanText : "{0} äåí åßíáé Ýãêõñïò áñéèìüò" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "ÁðåíåñãïðïéçìÝíï", - disabledDatesText : "ÁðåíåñãïðïéçìÝíï", - minText : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìåôÜ áðü {0}", - maxText : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ðñéí áðü {0}", - invalidText : "{0} äåí åßíáé Ýãêõñç çìåñïìçíßá - ðñÝðåé íá åßíáé ôçò ìïñöÞò {1}", - format : "ì/ç/Å" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Öüñôùóç...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé e-mail address ôçò ìïñöÞò "user@domain.com"', - urlText : 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìéá äéåýèõíóç URL ôçò ìïñöÞò "http:/'+'/www.domain.com"', - alphaText : 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá êáé _', - alphanumText : 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá, áñéèìïýò êáé _' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Áýîïõóá Ôáîéíüìçóç", - sortDescText : "Öèßíïõóá Ôáîéíüìçóç", - lockText : "Êëåßäùìá óôÞëçò", - unlockText : "Îåêëåßäùìá óôÞëçò", - columnsText : "ÓôÞëåò" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "¼íïìá", - valueText : "ÔéìÞ", - dateFormat : "ì/ç/Å" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Óýñåôå ãéá áëëáãÞ ìåãÝèïõò.", - collapsibleSplitTip : "Óýñåôå ãéá áëëáãÞ ìåãÝèïõò. Double click ãéá áðüêñõøç." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-he.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-he.js deleted file mode 100644 index 7e85b37edee..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-he.js +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Hebrew Translations - * By spartacus (from forums) 06-12-2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      ...����
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "����� ������ {0}"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "���� ������"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "���� ���� �� ����"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "...����"; -} - -Date.monthNames = [ - "�����", - "������", - "���", - "�����", - "���", - "����", - "����", - "������", - "������", - "�������", - "������", - "�����" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "�", - "�", - "�", - "�", - "�", - "�", - "�" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "�����", - cancel : "�����", - yes : "��", - no : "��" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "����", - minText : ".����� �� �� ���� ������ ������� �����", - maxText : ".����� �� �� ���� ������ ����� �����", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : '(Control+Right) ����� ���', - prevText : '(Control+Left) ����� �����', - monthYearText : '(������ ��� Control+Up/Down) ��� ����', - todayTip : "��� ����) {0})", - format : "d/m/Y", - okText : " ����� ", - cancelText : "�����", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "����", - afterPageText : "{0} ����", - firstText : "���� �����", - prevText : "���� ����", - nextText : "���� ���", - lastText : "���� �����", - refreshText : "����", - displayMsg : "���� {0} - {1} ���� {2}", - emptyMsg : '��� ���� �����' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "{0} ����� ��������� ���� �� ���", - maxLengthText : "{0} ����� ������ ���� �� ���", - blankText : "��� �� �����", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "{0} ���� ��������� ���� �� ���", - maxText : "{0} ���� ������ ���� �� ���", - nanText : "��� �� ���� {0}" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "������", - disabledDatesText : "������", - minText : "{0} ������ ���� �� ���� ����� ����", - maxText : "{0} ������ ���� �� ���� ����� ����", - invalidText : "{1} ��� �� ����� ���� - ���� ����� ������ {0}", - format : "m/d/y", - altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "...����", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : '"user@domain.com" ��� �� ���� ����� ����� ���� �������� ������', - urlText : '"http:/'+'/www.domain.com" ��� �� ���� ����� ����� ������� ������', - alphaText : '_��� �� ���� ����� �� ������ �', - alphanumText : '_��� �� ���� ����� �� ������, ������ �' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : ':��� ���� �� ����� �������� ���� ������', - buttonTips : { - bold : { - title: '(Ctrl+B) �����', - text: '.���� �� ����� �����', - cls: 'x-html-editor-tip' - }, - italic : { - title: '(Ctrl+I) ����', - text: '.��� �� ����� �����', - cls: 'x-html-editor-tip' - }, - underline : { - title: '(Ctrl+U) �� ����', - text: '.���� �� ���� ���� ����� �����', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: '���� ����', - text: '.���� ���� ���� ����� �����', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: '���� ����', - text: '.���� ���� ���� ����� �����', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: '��� ��� �����', - text: '.��� �� ��� ���� ���� ����� �����', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: '��� ����', - text: '.��� �� ��� ����� ���� ����� �����', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: '���� �����', - text: '.��� ����� �� ����� �����', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: '���� �����', - text: '.��� ����� �� ����� �����', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: '���� �����', - text: '.��� ����� �� ����� �����', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: '����� ������', - text: '.���� ����� ������', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: '����� �������', - text: '.���� ����� �������', - cls: 'x-html-editor-tip' - }, - createlink : { - title: '�����', - text: '.���� �� ����� ����� ������', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: '����� ��� ����', - text: '.��� ��� ����', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "���� ���� ����", - sortDescText : "���� ���� ����", - lockText : "��� �����", - unlockText : "���� �����", - columnsText : "������" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(���)', - groupByText : '��� ������� ��� ��� ��', - showGroupsText : '��� �������' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "��", - valueText : "���", - dateFormat : "m/j/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : ".���� ������ ����", - collapsibleSplitTip : ".���� ������ ����. ����� ����� ������" - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-hr.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-hr.js deleted file mode 100644 index bb726978ae4..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-hr.js +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Croatian translation - * By Ylodi (utf8 encoding) - * 8 May 2007 - * - * By Stjepan at gmail dot com (utf8 encoding) - * 17 May 2008 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Učitavanje...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} odabranih redova"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Zatvori ovaj tab"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Unesena vrijednost u ovom polju je neispravna"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Učitavanje..."; -} - -Date.monthNames = [ - "Siječanj", - "Veljača", - "Ožujak", - "Travanj", - "Svibanj", - "Lipanj", - "Srpanj", - "Kolovoz", - "Rujan", - "Listopad", - "Studeni", - "Prosinac" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Nedjelja", - "Ponedjeljak", - "Utorak", - "Srijeda", - "Četvrtak", - "Petak", - "Subota" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "U redu", - cancel : "Odustani", - yes : "Da", - no : "Ne" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Danas", - minText : "Taj datum je prije najmanjeg datuma", - maxText : "Taj datum je poslije najvećeg datuma", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Slijedeći mjesec (Control+Desno)', - prevText : 'Prethodni mjesec (Control+Lijevo)', - monthYearText : 'Odaberite mjesec (Control+Gore/Dolje za promjenu godine)', - todayTip : "{0} (Razmaknica)", - format : "d.m.y", - okText : " U redu ", - cancelText : "Odustani", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Stranica", - afterPageText : "od {0}", - firstText : "Prva stranica", - prevText : "Prethodna stranica", - nextText : "Slijedeća stranica", - lastText : "Posljednja stranica", - refreshText : "Obnovi", - displayMsg : "Prikazujem {0} - {1} od {2}", - emptyMsg : 'Nema podataka za prikaz' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minimalna dužina za ovo polje je {0}", - maxLengthText : "Maksimalna dužina za ovo polje je {0}", - blankText : "Ovo polje je obavezno", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Minimalna vrijednost za ovo polje je {0}", - maxText : "Maksimalna vrijednost za ovo polje je {0}", - nanText : "{0} nije ispravan broj" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Neaktivno", - disabledDatesText : "Neaktivno", - minText : "Datum u ovom polje mora biti poslije {0}", - maxText : "Datum u ovom polju mora biti prije {0}", - invalidText : "{0} nije ispravan datum - mora biti u obliku {1}", - format : "d.m.y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Učitavanje...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Ovdje možete unijeti samo e-mail adresu u obliku "korisnik@domena.com"', - urlText : 'Ovdje možete unijeti samo URL u obliku "http:/'+'/www.domena.com"', - alphaText : 'Ovo polje može sadržavati samo slova i znak _', - alphanumText : 'Ovo polje može sadržavati samo slova, brojeve i znak _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Unesite URL za link:', - buttonTips : { - bold : { - title: 'Podebljano (Ctrl+B)', - text: 'Podebljavanje označenog teksta.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Kurziv (Ctrl+I)', - text: 'Pretvaranje označenog tekst u kurziv', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Podcrtano (Ctrl+U)', - text: 'Potcrtavanje označenog teksta', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Povećanje teksta', - text: 'Povećavanje veličine fonta.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Smanjivanje teksta', - text: 'Smanjivanje veličine fonta.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Boja označenog teksta', - text: 'Promjena boje pozadine označenog teksta.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Boja fonta', - text: 'Promjena boje označenog teksta.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Lijevo poravnanje teksta', - text: 'Poravnanje teksta na lijevu stranu.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centriranje teksta', - text: 'Centriranje teksta u uređivaču teksta.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Desno poravnanje teksta', - text: 'Poravnanje teksta na desnu stranu.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Označena lista', - text: 'Započinjanje označene liste.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numerirana lista', - text: 'Započinjanje numerirane liste.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hiperveza', - text: 'Stvaranje hiperveze od označenog teksta.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Uređivanje izvornog koda', - text: 'Prebacivanje u način rada za uređivanje izvornog koda.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sortiraj rastućim redoslijedom", - sortDescText : "Sortiraj padajućim redoslijedom", - lockText : "Zaključaj stupac", - unlockText : "Otključaj stupac", - columnsText : "Stupci" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Ništa)', - groupByText : 'Grupiranje po ovom polju', - showGroupsText : 'Prikaz u grupama' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Naziv", - valueText : "Vrijednost", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Povuci za promjenu veličine.", - collapsibleSplitTip : "Povuci za promjenu veličine. Dvostruki klik za skrivanje." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-hu.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-hu.js deleted file mode 100644 index 77d96ddeb4c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-hu.js +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * List compiled by mystix on the extjs.com forums. - * Thank you Mystix! - * - * Hungarian Translations (utf-8 encoded) - * by Amon (27 Apr 2008) - * encoding fixed by Vili (17 Feb 2009) - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Betöltés...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} kiválasztott sor"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Fül bezárása"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Hibás érték!"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Betöltés..."; -} - -Date.monthNames = [ - "Január", - "Február", - "Március", - "Április", - "Május", - "Június", - "Július", - "Augusztus", - "Szeptember", - "Október", - "November", - "December" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - 'Jan' : 0, - 'Feb' : 1, - 'Már' : 2, - 'Ápr' : 3, - 'Máj' : 4, - 'Jún' : 5, - 'Júl' : 6, - 'Aug' : 7, - 'Sze' : 8, - 'Okt' : 9, - 'Nov' : 10, - 'Dec' : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Vasárnap", - "Hétfő", - "Kedd", - "Szerda", - "Csütörtök", - "Péntek", - "Szombat" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Mégsem", - yes : "Igen", - no : "Nem" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "Y m d"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Mai nap", - minText : "A dátum korábbi a megengedettnél", - maxText : "A dátum későbbi a megengedettnél", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Köv. hónap (CTRL+Jobbra)', - prevText : 'Előző hónap (CTRL+Balra)', - monthYearText : 'Válassz hónapot (Évválasztás: CTRL+Fel/Le)', - todayTip : "{0} (Szóköz)", - format : "y-m-d", - okText : " OK ", - cancelText : "Mégsem", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Oldal", - afterPageText : "a {0}-ból/ből", - firstText : "Első oldal", - prevText : "Előző oldal", - nextText : "Következő oldal", - lastText : "Utolsó oldal", - refreshText : "Frissítés", - displayMsg : "{0} - {1} sorok láthatók a {2}-ból/ből", - emptyMsg : 'Nincs megjeleníthető adat' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "A mező tartalma legalább {0} hosszú kell legyen", - maxLengthText : "A mező tartalma legfeljebb {0} hosszú lehet", - blankText : "Kötelezően kitöltendő mező", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "A mező tartalma nem lehet kissebb, mint {0}", - maxText : "A mező tartalma nem lehet nagyobb, mint {0}", - nanText : "{0} nem szám" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Nem választható", - disabledDatesText : "Nem választható", - minText : "A dátum nem lehet korábbi, mint {0}", - maxText : "A dátum nem lehet későbbi, mint {0}", - invalidText : "{0} nem megfelelő dátum - a helyes formátum: {1}", - format : "Y m d", - altFormats : "Y-m-d|y-m-d|y/m/d|m/d|m-d|md|ymd|Ymd|d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Betöltés...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'A mező email címet tartalmazhat, melynek formátuma "felhasználó@szolgáltató.hu"', - urlText : 'A mező webcímet tartalmazhat, melynek formátuma "http:/'+'/www.weboldal.hu"', - alphaText : 'A mező csak betűket és aláhúzást (_) tartalmazhat', - alphanumText : 'A mező csak betűket, számokat és aláhúzást (_) tartalmazhat' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Add meg a webcímet:', - buttonTips : { - bold : { - title: 'Félkövér (Ctrl+B)', - text: 'Félkövérré teszi a kijelölt szöveget.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Dőlt (Ctrl+I)', - text: 'Dőlté teszi a kijelölt szöveget.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Aláhúzás (Ctrl+U)', - text: 'Aláhúzza a kijelölt szöveget.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Szöveg nagyítás', - text: 'Növeli a szövegméretet.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Szöveg kicsinyítés', - text: 'Csökkenti a szövegméretet.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Háttérszín', - text: 'A kijelölt szöveg háttérszínét módosítja.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Szövegszín', - text: 'A kijelölt szöveg színét módosítja.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Balra zárt', - text: 'Balra zárja a szöveget.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Középre zárt', - text: 'Középre zárja a szöveget.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Jobbra zárt', - text: 'Jobbra zárja a szöveget.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Felsorolás', - text: 'Felsorolást kezd.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Számozás', - text: 'Számozott listát kezd.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hiperlink', - text: 'A kijelölt szöveget linkké teszi.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Forrás nézet', - text: 'Forrás nézetbe kapcsol.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Növekvő rendezés", - sortDescText : "Csökkenő rendezés", - lockText : "Oszlop zárolás", - unlockText : "Oszlop feloldás", - columnsText : "Oszlopok" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Nincs)', - groupByText : 'Oszlop szerint csoportosítás', - showGroupsText : 'Csoportos nézet' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Név", - valueText : "Érték", - dateFormat : "Y m j" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Átméretezés húzásra.", - collapsibleSplitTip : "Átméretezés húzásra. Eltüntetés duplaklikk." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-id.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-id.js deleted file mode 100644 index 6b89ed47c62..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-id.js +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Pedoman translasi: - * http://id.wikisource.org/wiki/Panduan_Pembakuan_Istilah,_Pelaksanaan_Instruksi_Presiden_Nomor_2_Tahun_2001_Tentang_Penggunaan_Komputer_Dengan_Aplikasi_Komputer_Berbahasa_Indonesia - * Original source: http://vlsm.org/etc/baku-0.txt - * by Farid GS - * farid [at] pulen.net - * 10:13 04 Desember 2007 - * Indonesian Translations - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Pemuatan...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} selected row(s)"; - Ext.grid.GridPanel.prototype.ddText = "{0} baris terpilih"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Close this tab"; - Ext.TabPanelItem.prototype.closeText = "Tutup tab ini"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "The value in this field is invalid"; - Ext.form.Field.prototype.invalidText = "Isian belum benar"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Loading..."; - Ext.LoadMask.prototype.msg = "Pemuatan..."; -} - -Date.monthNames = [ - "Januari", - "Februari", - "Maret", - "April", - "Mei", - "Juni", - "Juli", - "Agustus", - "September", - "Oktober", - "November", - "Desember" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - Mei : 4, - Jun : 5, - Jul : 6, - Agu : 7, - Sep : 8, - Okt : 9, - Nov : 10, - Des : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Minggu", - "Senin", - "Selasa", - "Rabu", - "Kamis", - "Jumat", - "Sabtu" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Batal", - yes : "Ya", - no : "Tidak" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Hari ini", - minText : "Tanggal ini sebelum batas tanggal minimal", - maxText : "Tanggal ini setelah batas tanggal maksimal", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Bulan Berikut (Kontrol+Kanan)', - prevText : 'Bulan Sebelum (Kontrol+Kiri)', - monthYearText : 'Pilih bulan (Kontrol+Atas/Bawah untuk pindah tahun)', - todayTip : "{0} (Spacebar)", - format : "d/m/y", - okText : " OK ", - cancelText : "Batal", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Hal", - afterPageText : "dari {0}", - firstText : "Hal. Pertama", - prevText : "Hal. Sebelum", - nextText : "Hal. Berikut", - lastText : "Hal. Akhir", - refreshText : "Segarkan", - displayMsg : "Menampilkan {0} - {1} dari {2}", - emptyMsg : 'Data tidak ditemukan' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Panjang minimal untuk field ini adalah {0}", - maxLengthText : "Panjang maksimal untuk field ini adalah {0}", - blankText : "Field ini wajib diisi", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Nilai minimal untuk field ini adalah {0}", - maxText : "Nilai maksimal untuk field ini adalah {0}", - nanText : "{0} bukan angka" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Disfungsi", - disabledDatesText : "Disfungsi", - minText : "Tanggal dalam field ini harus setelah {0}", - maxText : "Tanggal dalam field ini harus sebelum {0}", - invalidText : "{0} tanggal salah - Harus dalam format {1}", - format : "d/m/y", - //altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" - altFormats : "d/m/Y|d-m-y|d-m-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Pemuatan...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Field ini harus dalam format email seperti "user@domain.com"', - urlText : 'Field ini harus dalam format URL seperti "http:/'+'/www.domain.com"', - alphaText : 'Field ini harus terdiri dari huruf dan _', - alphanumText : 'Field ini haris terdiri dari huruf, angka dan _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Silakan masukkan URL untuk tautan:', - buttonTips : { - bold : { - title: 'Tebal (Ctrl+B)', - text: 'Buat tebal teks terpilih', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Miring (CTRL+I)', - text: 'Buat miring teks terpilih', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Garisbawah (CTRl+U)', - text: 'Garisbawahi teks terpilih', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Perbesar teks', - text: 'Perbesar ukuran fonta', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Perkecil teks', - text: 'Perkecil ukuran fonta', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Sorot Warna Teks', - text: 'Ubah warna latar teks terpilih', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Warna Fonta', - text: 'Ubah warna teks terpilih', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Rata Kiri', - text: 'Ratakan teks ke kiri', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Rata Tengah', - text: 'Ratakan teks ke tengah editor', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Rata Kanan', - text: 'Ratakan teks ke kanan', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Daftar Bulet', - text: 'Membuat daftar berbasis bulet', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Daftar Angka', - text: 'Membuat daftar berbasis angka', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hipertaut', - text: 'Buat teks terpilih sebagai Hipertaut', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Edit Kode Sumber', - text: 'Pindah dalam mode kode sumber', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Urut Naik", - sortDescText : "Urut Turun", - lockText : "Kancing Kolom", - unlockText : "Lepas Kunci Kolom", - columnsText : "Kolom" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Kosong)', - groupByText : 'Kelompokkan Berdasar Field Ini', - showGroupsText : 'Tampil Dalam Kelompok' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nama", - valueText : "Nilai", - dateFormat : "d/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Seret untuk ubah ukuran.", - collapsibleSplitTip : "Seret untuk ubah ukuran, Dobel klik untuk sembunyikan." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-it.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-it.js deleted file mode 100644 index 199d5f42d7c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-it.js +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Italian translation - * By eric_void - * 04-10-2007, 11:25 AM - * Updated by Federico Grilli 21/12/2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Caricamento in corso...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} righe selezionate"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Chiudi pannello"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Valore non valido"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Caricamento in corso..."; -} - -Date.monthNames = [ - "Gennaio", - "Febbraio", - "Marzo", - "Aprile", - "Maggio", - "Giugno", - "Luglio", - "Agosto", - "Settembre", - "Ottobre", - "Novembre", - "Dicembre" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Gen : 0, - Feb : 1, - Mar : 2, - Apr : 3, - Mag : 4, - Giu : 5, - Lug : 6, - Ago : 7, - Set : 8, - Ott : 9, - Nov : 10, - Dic : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Domenica", - "Luned\u00EC", - "Marted\u00EC", - "Mercoled\u00EC", - "Gioved\u00EC", - "Venerd\u00EC", - "Sabato" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Annulla", - yes : "S\u00EC", - no : "No" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Oggi", - minText : "Data precedente alla data minima", - maxText : "Data successiva alla data massima", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Mese successivo (Ctrl+Destra)', - prevText : 'Mese precedente (Ctrl+Sinistra)', - monthYearText : 'Scegli un mese (Ctrl+Su/Giu per cambiare anno)', - todayTip : "{0} (Barra spaziatrice)", - format : "d/m/y", - cancelText : "Annulla", - okText : " OK ", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Pagina", - afterPageText : "di {0}", - firstText : "Prima pagina", - prevText : "Pagina precedente", - nextText : "Pagina successiva", - lastText : "Ultima pagina", - refreshText : "Aggiorna", - displayMsg : "Record {0} - {1} di {2}", - emptyMsg : 'Nessun dato da mostrare' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "La lunghezza minima \u00E8 {0}", - maxLengthText : "La lunghezza massima \u00E8 {0}", - blankText : "Campo obbligatorio", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Il valore minimo \u00E8 {0}", - maxText : "Il valore massimo \u00E8 {0}", - nanText : "{0} non \u00E8 un valore numerico corretto" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Disabilitato", - disabledDatesText : "Disabilitato", - minText : "La data deve essere successiva al {0}", - maxText : "La data deve essere precedente al {0}", - invalidText : "{0} non \u00E8 una data valida. Deve essere nel formato {1}", - format : "d/m/y", - altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Caricamento in corso...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Il campo deve essere un indirizzo e-mail nel formato "user@domain.com"', - urlText : 'Il campo deve essere un indirizzo web nel formato "http:/'+'/www.domain.com"', - alphaText : 'Il campo deve contenere solo lettere e _', - alphanumText : 'Il campo deve contenere solo lettere, numeri e _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Inserire un URL per il link:', - buttonTips : { - bold : { - title: 'Grassetto (Ctrl+B)', - text: 'Rende il testo selezionato in grassetto.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Corsivo (Ctrl+I)', - text: 'Rende il testo selezionato in corsivo.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Sottolinea (Ctrl+U)', - text: 'Sottolinea il testo selezionato.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Ingrandisci testo', - text: 'Aumenta la dimensione del carattere.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Rimpicciolisci testo', - text: 'Diminuisce la dimensione del carattere.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Colore evidenziatore testo', - text: 'Modifica il colore di sfondo del testo selezionato.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Colore carattere', - text: 'Modifica il colore del testo selezionato.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Allinea a sinistra', - text: 'Allinea il testo a sinistra.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centra', - text: 'Centra il testo.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Allinea a destra', - text: 'Allinea il testo a destra.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Elenco puntato', - text: 'Elenco puntato.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Elenco numerato', - text: 'Elenco numerato.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Collegamento', - text: 'Trasforma il testo selezionato in un collegamanto.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Sorgente', - text: 'Passa alla modalit\u00E0 editing del sorgente.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Ordinamento crescente", - sortDescText : "Ordinamento decrescente", - lockText : "Blocca colonna", - unlockText : "Sblocca colonna", - columnsText : "Colonne" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Nessun dato)', - groupByText : 'Raggruppa per questo campo', - showGroupsText : 'Mostra nei gruppi' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nome", - valueText : "Valore", - dateFormat : "j/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Trascina per cambiare dimensioni.", - collapsibleSplitTip : "Trascina per cambiare dimensioni. Doppio click per nascondere." - }); -} - diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ja.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ja.js deleted file mode 100644 index d8e42854345..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ja.js +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Japanese translation - * By tyama - * 04-08-2007, 05:49 AM - * - * update based on English Translations by Condor (8 Aug 2008) - * By sakuro (30 Aug 2008) - */ - -Ext.UpdateManager.defaults.indicatorText = '
      読み込み中...
      '; - -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} 行選択"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "読み込み中..."; -} - -Date.monthNames = [ - '1月', - '2月', - '3月', - '4月', - '5月', - '6月', - '7月', - '8月', - '9月', - '10月', - '11月', - '12月' -]; - -Date.getShortMonthName = function(month) { - return "" + (month + 1); -}; - -Date.monthNumbers = { - "1" : 0, - "2" : 1, - "3" : 2, - "4" : 3, - "5" : 4, - "6" : 5, - "7" : 6, - "8" : 7, - "9" : 8, - "10" : 9, - "11" : 10, - "12" : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, name.length - 1)]; - // or simply parseInt(name.substring(0, name.length - 1)) - 1 -}; - -Date.dayNames = [ - "日曜日", - "月曜日", - "火曜日", - "水曜日", - "木曜日", - "金曜日", - "土曜日" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 1); // just remove "曜日" suffix -}; - -Date.formatCodes.a = "(this.getHours() < 12 ? '午前' : '午後')"; -Date.formatCodes.A = "(this.getHours() < 12 ? '午前' : '午後')"; // no case difference - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "キャンセル", - yes : "はい", - no : "いいえ" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "Y/m/d"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "今日", - minText : "選択した日付は最小値以下です。", - maxText : "選択した日付は最大値以上です。", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : '次月へ (コントロール+右)', - prevText : '前月へ (コントロール+左)', - monthYearText : '月選択 (コントロール+上/下で年移動)', - todayTip : "{0} (スペースキー)", - format : "Y/m/d", - okText : "OK", - cancelText : "キャンセル", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "ページ", - afterPageText : "/ {0}", - firstText : "最初のページ", - prevText : "前のページ", - nextText : "次のページ", - lastText : "最後のページ", - refreshText : "更新", - displayMsg : "{2} 件中 {0} - {1} を表示", - emptyMsg : '表示するデータがありません。' - }); -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "フィールドの値が不正です。"; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "このフィールドの最小値は {0} です。", - maxLengthText : "このフィールドの最大値は {0} です。", - blankText : "必須項目です。", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ".", - decimalPrecision : 2, - minText : "このフィールドの最小値は {0} です。", - maxText : "このフィールドの最大値は {0} です。", - nanText : "{0} は数値ではありません。" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "無効", - disabledDatesText : "無効", - minText : "このフィールドの日付は、 {0} 以降の日付に設定してください。", - maxText : "このフィールドの日付は、 {0} 以前の日付に設定してください。", - invalidText : "{0} は間違った日付入力です。 - 入力形式は「{1}」です。", - format : "Y/m/d", - altFormats : "y/m/d|m/d/y|m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "読み込み中...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'メールアドレスを"user@domain.com"の形式で入力してください。', - urlText : 'URLを"http:/'+'/www.domain.com"の形式で入力してください。', - alphaText : '半角英字と"_"のみです。', - alphanumText : '半角英数と"_"のみです。' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'リンクのURLを入力してください:', - buttonTips : { - bold : { - title: '太字 (コントロール+B)', - text: '選択テキストを太字にします。', - cls: 'x-html-editor-tip' - }, - italic : { - title: '斜体 (コントロール+I)', - text: '選択テキストを斜体にします。', - cls: 'x-html-editor-tip' - }, - underline : { - title: '下線 (コントロール+U)', - text: '選択テキストに下線を引きます。', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: '文字を大きく', - text: 'フォントサイズを大きくします。', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: '文字を小さく', - text: 'フォントサイズを小さくします。', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: '文字のハイライト', - text: '選択テキストの背景色を変更します。', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: '文字の色', - text: '選択テキストの色を変更します。', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: '左揃え', - text: 'テキストを左揃えにします。', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: '中央揃え', - text: 'テキストを中央揃えにします。', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: '右揃え', - text: 'テキストを右揃えにします。', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: '番号なし箇条書き', - text: '番号なし箇条書きを開始します。', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: '番号付き箇条書き', - text: '番号付き箇条書きを開始します。', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'ハイパーリンク', - text: '選択テキストをハイパーリンクにします。', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'ソース編集', - text: 'ソース編集モードに切り替えます。', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "昇順", - sortDescText : "降順", - columnsText : "カラム" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(なし)', - groupByText : 'このカラムでグルーピング', - showGroupsText : 'グルーピング' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "名称", - valueText : "値", - dateFormat : "Y/m/d" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "ドラッグするとリサイズできます。", - collapsibleSplitTip : "ドラッグでリサイズ。 ダブルクリックで隠す。" - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "このフィールドの時刻は、 {0} 以降の時刻に設定してください。", - maxText : "このフィールドの時刻は、 {0} 以前の時刻に設定してください。", - invalidText : "{0} は間違った時刻入力です。", - format : "g:i A", - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : "このグループから最低1つのアイテムを選択しなければなりません。" - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : "このグループから1つのアイテムを選択しなければなりません。" - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ko.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ko.js deleted file mode 100644 index f47cbb289e4..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ko.js +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Korean Translations By nicetip - * 05 September 2007 - * Modify by techbug / 25 February 2008 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      로딩중...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} 개가 선택되었습니다."; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "닫기"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "올바른 값이 아닙니다."; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "로딩중..."; -} - -Date.monthNames = [ - "1월", - "2월", - "3월", - "4월", - "5월", - "6월", - "7월", - "8월", - "9월", - "10월", - "11월", - "12월" -]; - -Date.dayNames = [ - "일", - "월", - "화", - "수", - "목", - "금", - "토" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "확인", - cancel : "취소", - yes : "예", - no : "아니오" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "m/d/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "오늘", - minText : "최소 날짜범위를 넘었습니다.", - maxText : "최대 날짜범위를 넘었습니다.", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : '다음달(컨트롤키+오른쪽 화살표)', - prevText : '이전달 (컨트롤키+왼족 화살표)', - monthYearText : '월을 선택해주세요. (컨트롤키+위/아래 화살표)', - todayTip : "{0} (스페이스바)", - format : "m/d/y", - okText : "확인", - cancelText : "취소", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "페이지", - afterPageText : "/ {0}", - firstText : "첫 페이지", - prevText : "이전 페이지", - nextText : "다음 페이지", - lastText : "마지막 페이지", - refreshText : "새로고침", - displayMsg : "전체 {2} 중 {0} - {1}", - emptyMsg : '표시할 데이터가 없습니다.' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "최소길이는 {0}입니다.", - maxLengthText : "최대길이는 {0}입니다.", - blankText : "값을 입력해주세요.", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "최소값은 {0}입니다.", - maxText : "최대값은 {0}입니다.", - nanText : "{0}는 올바른 숫자가 아닙니다." - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "비활성", - disabledDatesText : "비활성", - minText : "{0}일 이후여야 합니다.", - maxText : "{0}일 이전이어야 합니다.", - invalidText : "{0}는 올바른 날짜형식이 아닙니다. - 다음과 같은 형식이어야 합니다. {1}", - format : "m/d/y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "로딩중...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : '이메일 주소 형식에 맞게 입력해야합니다. (예: "user@domain.com")', - urlText : 'URL 형식에 맞게 입력해야합니다. (예: "http:/'+'/www.domain.com")', - alphaText : '영문, 밑줄(_)만 입력할 수 있습니다.', - alphanumText : '영문, 숫자, 밑줄(_)만 입력할 수 있습니다.' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'URL을 입력해주세요:', - buttonTips : { - bold : { - title: '굵게 (Ctrl+B)', - text: '선택한 텍스트를 굵게 표시합니다.', - cls: 'x-html-editor-tip' - }, - italic : { - title: '기울임꼴 (Ctrl+I)', - text: '선택한 텍스트를 기울임꼴로 표시합니다.', - cls: 'x-html-editor-tip' - }, - underline : { - title: '밑줄 (Ctrl+U)', - text: '선택한 텍스트에 밑줄을 표시합니다.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: '글꼴크기 늘림', - text: '글꼴 크기를 크게 합니다.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: '글꼴크기 줄임', - text: '글꼴 크기를 작게 합니다.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: '텍스트 강조 색', - text: '선택한 텍스트의 배경색을 변경합니다.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: '글꼴색', - text: '선택한 텍스트의 색을 변경합니다.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: '텍스트 왼쪽 맞춤', - text: '왼쪽에 텍스트를 맞춥니다.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: '가운데 맞춤', - text: '가운데에 텍스트를 맞춥니다.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: '텍스트 오른쪽 맞춤', - text: '오른쪽에 텍스트를 맞춥니다.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: '글머리 기호', - text: '글머리 기호 목록을 시작합니다.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: '번호 매기기', - text: '번호 매기기 목록을 시작합니다.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: '하이퍼링크', - text: '선택한 텍스트에 하이퍼링크를 만듭니다.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: '소스편집', - text: '소스편집 모드로 변환합니다.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "오름차순 정렬", - sortDescText : "내림차순 정렬", - lockText : "칼럼 잠금", - unlockText : "칼럼 잠금해제", - columnsText : "칼럼 목록" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(None)', - groupByText : '현재 필드로 그룹핑합니다.', - showGroupsText : '그룹으로 보여주기' - - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "항목", - valueText : "값", - dateFormat : "m/j/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "크기변경을 위해 드래그하세요.", - collapsibleSplitTip : "크기변경을 위해 드래그, 숨기기 위해 더블클릭 하세요." - }); -} - diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-lt.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-lt.js deleted file mode 100644 index 463c0b5317c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-lt.js +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Lithuanian Translations (UTF-8) - * By Vladas Saulis, October 18, 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Kraunasi...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} pažymėta"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Uždaryti šią užsklandą"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Šio lauko reikšmė neteisinga"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Kraunasi..."; -} - -Date.monthNames = [ - "Saulis", - "Vasaris", - "Kovas", - "Balandis", - "Gegužė", - "Birželis", - "Liepa", - "Rugpjūtis", - "Rugsėjis", - "Spalis", - "Lapkritis", - "Gruodis" -]; - -Date.getShortMonthName = function(month) { - return [ - "Sau", - "Vas", - "Kov", - "Bal", - "Geg", - "Bir", - "Lie", - "Rgp", - "Rgs", - "Spa", - "Lap", - "Grd" - ]; -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Pirmadienis", - "Antradienis", - "Trečiadienis", - "Ketvirtadienis", - "Penktadienis", - "Šeštadienis", - "Sekmadienis" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "Gerai", - cancel : "Atsisakyti", - yes : "Taip", - no : "Ne" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "Y-m-d"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Šiandien", - minText : "Ši data yra mažesnė už leistiną", - maxText : "Ši data yra didesnė už leistiną", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Next Month (Control+Right)', - prevText : 'Previous Month (Control+Left)', - monthYearText : 'Choose a month (Control+Up/Down perėjimui tarp metų)', - todayTip : "{0} (Spacebar)", - format : "y-m-d", - okText : " Gerai ", - cancelText : "Atsisaktyi", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Puslapis", - afterPageText : "iš {0}", - firstText : "Pirmas puslapis", - prevText : "Ankstesnis pusl.", - nextText : "Kitas puslapis", - lastText : "Pakutinis pusl.", - refreshText : "Atnaujinti", - displayMsg : "Rodomi įrašai {0} - {1} iš {2}", - emptyMsg : 'Nėra duomenų' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minimalus šio lauko ilgis yra {0}", - maxLengthText : "Maksimalus šio lauko ilgis yra {0}", - blankText : "Šis laukas yra reikalingas", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Minimalus šio lauko ilgis yra {0}", - maxText : "Maksimalus šio lauko ilgis yra {0}", - nanText : "{0} yra neleistina reikšmė" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Neprieinama", - disabledDatesText : "Neprieinama", - minText : "Šiame lauke data turi būti didesnė už {0}", - maxText : "Šiame lauke data turi būti mažesnėė už {0}", - invalidText : "{0} yra neteisinga data - ji turi būti įvesta formatu {1}", - format : "y-m-d", - altFormats : "y-m-d|y/m/d|Y-m-d|m/d|m-d|md|ymd|Ymd|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Kraunasi...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Šiame lauke turi būti el.pašto adresas formatu "user@domain.com"', - urlText : 'Šiame lauke turi būti nuoroda (URL) formatu "http:/'+'/www.domain.com"', - alphaText : 'Šiame lauke gali būti tik raidės ir ženklas "_"', - alphanumText : 'Šiame lauke gali būti tik raidės, skaičiai ir ženklas "_"' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Įveskite URL šiai nuorodai:', - buttonTips : { - bold : { - title: 'Bold (Ctrl+B)', - text: 'Teksto paryškinimas.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italic (Ctrl+I)', - text: 'Kursyvinis tekstas.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Underline (Ctrl+U)', - text: 'Teksto pabraukimas.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Padidinti šriftą', - text: 'Padidinti šrifto dydį.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Sumažinti šriftą', - text: 'Sumažinti šrifto dydį.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Nuspalvinti teksto foną', - text: 'Pakeisti teksto fono spalvą.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Teksto spalva', - text: 'Pakeisti pažymėto teksto spalvą.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Išlyginti kairen', - text: 'Išlyginti tekstą į kairę.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centruoti tekstą', - text: 'Centruoti tektą redaktoriaus lange.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Išlyginti dešinėn', - text: 'Išlyginti tekstą į dešinę.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Paprastas sąrašas', - text: 'Pradėti neorganizuotą sąrašą.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numeruotas sąrašas', - text: 'Pradėti numeruotą sąrašą.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Nuoroda', - text: 'Padaryti pažymėta tekstą nuoroda.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Išeities tekstas', - text: 'Persijungti į išeities teksto koregavimo režimą.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Rūšiuoti didėjančia tvarka", - sortDescText : "Rūšiuoti mažėjančia tvarka", - lockText : "Užfiksuoti stulpelį", - unlockText : "Atlaisvinti stulpelį", - columnsText : "Stulpeliai" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Nėra)', - groupByText : 'Grupuoti pagal šį lauką', - showGroupsText : 'Rodyti grupėse' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Pavadinimas", - valueText : "Reikšmė", - dateFormat : "Y-m-d" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Patraukite juostelę.", - collapsibleSplitTip : "Patraukite juostelę arba Paspauskite dvigubai kad paslėpti." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-lv.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-lv.js deleted file mode 100644 index 85d6cc6dcc4..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-lv.js +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Latvian Translations - * By salix 17 April 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Notiek ielāde...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} iezīmētu rindu"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Aizver šo zīmni"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Vērtība šajā laukā nav pareiza"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Ielādē..."; -} - -Date.monthNames = [ - "Janvāris", - "Februāris", - "Marts", - "Aprīlis", - "Maijs", - "Jūnijs", - "Jūlijs", - "Augusts", - "Septembris", - "Oktobris", - "Novembris", - "Decembris" -]; - -Date.dayNames = [ - "Svētdiena", - "Pirmdiena", - "Otrdiena", - "Trešdiena", - "Ceturtdiena", - "Piektdiena", - "Sestdiena" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "Labi", - cancel : "Atcelt", - yes : "Jā", - no : "Nē" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Šodiena", - minText : "Norādītais datums ir mazāks par minimālo datumu", - maxText : "Norādītais datums ir lielāks par maksimālo datumu", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Nākamais mēnesis (Control+pa labi)', - prevText : 'Iepriekšējais mēnesis (Control+pa kreisi)', - monthYearText : 'Mēneša izvēle (Control+uz augšu/uz leju lai pārslēgtu gadus)', - todayTip : "{0} (Tukšumzīme)", - format : "d.m.Y", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Lapa", - afterPageText : "no {0}", - firstText : "Pirmā lapa", - prevText : "iepriekšējā lapa", - nextText : "Nākamā lapa", - lastText : "Pēdējā lapa", - refreshText : "Atsvaidzināt", - displayMsg : "Rāda no {0} līdz {1} ierakstiem, kopā {2}", - emptyMsg : 'Nav datu, ko parādīt' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minimālais garums šim laukam ir {0}", - maxLengthText : "Maksimālais garums šim laukam ir {0}", - blankText : "Šis ir obligāts lauks", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Minimālais garums šim laukam ir {0}", - maxText : "Maksimālais garums šim laukam ir {0}", - nanText : "{0} nav pareizs skaitlis" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Atspējots", - disabledDatesText : "Atspējots", - minText : "Datumam šajā laukā jābūt lielākam kā {0}", - maxText : "Datumam šajā laukā jābūt mazākam kā {0}", - invalidText : "{0} nav pareizs datums - tam jābūt šādā formātā: {1}", - format : "d.m.Y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Ielādē...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Šajā laukā jāieraksta e-pasta adrese formātā "lietotās@domēns.lv"', - urlText : 'Šajā laukā jāieraksta URL formātā "http:/'+'/www.domēns.lv"', - alphaText : 'Šis lauks drīkst saturēt tikai burtus un _ zīmi', - alphanumText : 'Šis lauks drīkst saturēt tikai burtus, ciparus un _ zīmi' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Kārtot pieaugošā secībā", - sortDescText : "Kārtot dilstošā secībā", - lockText : "Noslēgt kolonnu", - unlockText : "Atslēgt kolonnu", - columnsText : "Kolonnas" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nosaukums", - valueText : "Vērtība", - dateFormat : "j.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Velc, lai mainītu izmēru.", - collapsibleSplitTip : "Velc, lai mainītu izmēru. Dubultklikšķis noslēpj apgabalu." - }); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-mk.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-mk.js deleted file mode 100644 index 41f6e527821..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-mk.js +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Macedonia translation - * By PetarD petar.dimitrijevic@vorteksed.com.mk (utf8 encoding) - * 23 April 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Вчитувам...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} избрани редици"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Затвори tab"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Вредноста во ова поле е невалидна"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Вчитувам..."; -} - -Date.monthNames = [ - "Јануари", - "Февруари", - "Март", - "Април", - "Мај", - "Јуни", - "Јули", - "Август", - "Септември", - "Октомври", - "Ноември", - "Декември" -]; - -Date.dayNames = [ - "Недела", - "Понеделник", - "Вторник", - "Среда", - "Четврток", - "Петок", - "Сабота" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "Потврди", - cancel : "Поништи", - yes : "Да", - no : "Не" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Денеска", - minText : "Овој датум е пред најмалиот датум", - maxText : "Овој датум е пред најголемиот датум", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Следен месец (Control+Стрелка десно)', - prevText : 'Претходен месец (Control+Стрелка лево)', - monthYearText : 'Изберете месец (Control+Стрелка горе/Стрелка десно за менување година)', - todayTip : "{0} (Spacebar)", - format : "d.m.y" - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Страница", - afterPageText : "од {0}", - firstText : "Прва Страница", - prevText : "Претходна Страница", - nextText : "Следна Страница", - lastText : "Последна Страница", - refreshText : "Освежи", - displayMsg : "Прикажувам {0} - {1} од {2}", - emptyMsg : 'Нема податоци за приказ' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Минималната должина за ова поле е {0}", - maxLengthText : "Максималната должина за ова поле е {0}", - blankText : "Податоците во ова поле се потребни", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Минималната вредност за ова поле е {0}", - maxText : "Максималната вредност за ова поле е {0}", - nanText : "{0} не е валиден број" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Неактивно", - disabledDatesText : "Неактивно", - minText : "Датумот во ова поле мора да биде пред {0}", - maxText : "Датумот во ова поле мора да биде по {0}", - invalidText : "{0} не е валиден датум - мора да биде во формат {1}", - format : "d.m.y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Вчитувам...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Ова поле треба да биде e-mail адреса во формат "user@domain.com"', - urlText : 'Ова поле треба да биде URL во формат "http:/'+'/www.domain.com"', - alphaText : 'Ова поле треба да содржи само букви и _', - alphanumText : 'Ова поле треба да содржи само букви, бројки и _' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Сортирај Растечки", - sortDescText : "Сортирај Опаѓачки", - lockText : "Заклучи Колона", - unlockText : "Отклучи колона", - columnsText : "Колони" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Име", - valueText : "Вредност", - dateFormat : "m.d.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Повлечете за менување на големината.", - collapsibleSplitTip : "Повлечете за менување на големината. Дупли клик за криење." - }); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-nl.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-nl.js deleted file mode 100644 index 3d73048a8cc..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-nl.js +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * List compiled by mystix on the extjs.com forums. - * Thank you Mystix! - * - * Dutch Translations - * by Ido Sebastiaan Bas van Oostveen (12 Oct 2007) - * updated to 2.2 by Condor (8 Aug 2008) - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Bezig met laden...
      '; - -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ''; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = '{0} geselecteerde rij(en)'; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = 'Bezig met laden...'; -} - -Date.monthNames = [ - 'januari', - 'februari', - 'maart', - 'april', - 'mei', - 'juni', - 'juli', - 'augustus', - 'september', - 'oktober', - 'november', - 'december' -]; - -Date.getShortMonthName = function(month) { - if (month == 2) { - return 'mrt'; - } - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - jan: 0, - feb: 1, - mrt: 2, - apr: 3, - mei: 4, - jun: 5, - jul: 6, - aug: 7, - sep: 8, - okt: 9, - nov: 10, - dec: 11 -}; - -Date.getMonthNumber = function(name) { - var sname = name.substring(0, 3).toLowerCase(); - if (sname == 'maa') { - return 2; - } - return Date.monthNumbers[sname]; -}; - -Date.dayNames = [ - 'zondag', - 'maandag', - 'dinsdag', - 'woensdag', - 'donderdag', - 'vrijdag', - 'zaterdag' -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -Date.parseCodes.S.s = "(?:ste|e)"; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok: 'OK', - cancel: 'Annuleren', - yes: 'Ja', - no: 'Nee' - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if (!v) return ''; - if (!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || 'j-m-y'); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText: 'Vandaag', - minText: 'Deze datum is eerder dan de minimale datum', - maxText: 'Deze datum is later dan de maximale datum', - disabledDaysText: '', - disabledDatesText: '', - monthNames: Date.monthNames, - dayNames: Date.dayNames, - nextText: 'Volgende maand (Ctrl+rechts)', - prevText: 'Vorige maand (Ctrl+links)', - monthYearText: 'Kies een maand (Ctrl+omhoog/omlaag volgend/vorig jaar)', - todayTip: '{0} (spatie)', - format: 'j-m-y', - okText: ' OK ', - cancelText: 'Annuleren', - startDay: 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText: 'Pagina', - afterPageText: 'van {0}', - firstText: 'Eerste pagina', - prevText: 'Vorige pagina', - nextText: 'Volgende pagina', - lastText: 'Laatste pagina', - refreshText: 'Ververs', - displayMsg: 'Getoond {0} - {1} van {2}', - emptyMsg: 'Geen gegevens om weer te geven' - }); -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = 'De waarde van dit veld is ongeldig'; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText: 'De minimale lengte van dit veld is {0}', - maxLengthText: 'De maximale lengte van dit veld is {0}', - blankText: 'Dit veld is verplicht', - regexText: '', - emptyText: null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ",", - decimalPrecision : 2, - minText: 'De minimale waarde van dit veld is {0}', - maxText: 'De maximale waarde van dit veld is {0}', - nanText: '{0} is geen geldig getal' - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText: 'Uitgeschakeld', - disabledDatesText: 'Uitgeschakeld', - minText: 'De datum in dit veld moet na {0} liggen', - maxText: 'De datum in dit veld moet voor {0} liggen', - invalidText: '{0} is geen geldige datum - formaat voor datum is {1}', - format: 'j-m-y', - altFormats: 'd/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d' - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText: 'Bezig met laden...', - valueNotFoundText: undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText: 'Dit veld moet een e-mail adres bevatten in het formaat "gebruiker@domein.nl"', - urlText: 'Dit veld moet een URL bevatten in het formaat "http:/'+'/www.domein.nl"', - alphaText: 'Dit veld mag alleen letters en _ bevatten', - alphanumText: 'Dit veld mag alleen letters, cijfers en _ bevatten' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText: 'Vul hier de URL voor de hyperlink in:', - buttonTips: { - bold: { - title: 'Vet (Ctrl+B)', - text: 'Maak de geselecteerde tekst vet.', - cls: 'x-html-editor-tip' - }, - italic: { - title: 'Cursief (Ctrl+I)', - text: 'Maak de geselecteerde tekst cursief.', - cls: 'x-html-editor-tip' - }, - underline: { - title: 'Onderstrepen (Ctrl+U)', - text: 'Onderstreep de geselecteerde tekst.', - cls: 'x-html-editor-tip' - }, - increasefontsize: { - title: 'Tekst vergroten', - text: 'Vergroot het lettertype.', - cls: 'x-html-editor-tip' - }, - decreasefontsize: { - title: 'Tekst verkleinen', - text: 'Verklein het lettertype.', - cls: 'x-html-editor-tip' - }, - backcolor: { - title: 'Tekst achtergrondkleur', - text: 'Verander de achtergrondkleur van de geselecteerde tekst.', - cls: 'x-html-editor-tip' - }, - forecolor: { - title: 'Tekst kleur', - text: 'Verander de kleur van de geselecteerde tekst.', - cls: 'x-html-editor-tip' - }, - justifyleft: { - title: 'Tekst links uitlijnen', - text: 'Lijn de tekst links uit.', - cls: 'x-html-editor-tip' - }, - justifycenter: { - title: 'Tekst centreren', - text: 'Centreer de tekst.', - cls: 'x-html-editor-tip' - }, - justifyright: { - title: 'Tekst rechts uitlijnen', - text: 'Lijn de tekst rechts uit.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist: { - title: 'Opsommingstekens', - text: 'Begin een ongenummerde lijst.', - cls: 'x-html-editor-tip' - }, - insertorderedlist: { - title: 'Genummerde lijst', - text: 'Begin een genummerde lijst.', - cls: 'x-html-editor-tip' - }, - createlink: { - title: 'Hyperlink', - text: 'Maak van de geselecteerde tekst een hyperlink.', - cls: 'x-html-editor-tip' - }, - sourceedit: { - title: 'Bron aanpassen', - text: 'Schakel modus over naar bron aanpassen.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText: 'Sorteer oplopend', - sortDescText: 'Sorteer aflopend', - columnsText: 'Kolommen' - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText: '(Geen)', - groupByText: 'Dit veld groeperen', - showGroupsText: 'Toon in groepen' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText: 'Naam', - valueText: 'Waarde', - dateFormat: 'j-m-Y' - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip: 'Sleep om grootte aan te passen.', - collapsibleSplitTip: 'Sleep om grootte aan te passen. Dubbel klikken om te verbergen.' - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText: 'De tijd in dit veld moet op of na {0} liggen', - maxText: 'De tijd in dit veld moet op of voor {0} liggen', - invalidText: '{0} is geen geldig tijdstip', - format: 'G:i', - altFormats: 'g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H' - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : 'Selecteer minimaal een element in deze groep' - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : 'Selecteer een element in deze groep' - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-no_NB.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-no_NB.js deleted file mode 100644 index 4ce0e1911ea..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-no_NB.js +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * - * Norwegian translation (Bokmål: no-NB) - * By Tore Kjørsvik 21-January-2008 - * - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Laster...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} markert(e) rad(er)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Lukk denne fanen"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Verdien i dette feltet er ugyldig"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Laster..."; -} - -Date.monthNames = [ - "Januar", - "Februar", - "Mars", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Desember" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - Mai : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Okt : 9, - Nov : 10, - Des : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Søndag", - "Mandag", - "Tirsdag", - "Onsdag", - "Torsdag", - "Fredag", - "Lørdag" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Avbryt", - yes : "Ja", - no : "Nei" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "I dag", - minText : "Denne datoen er før tidligste tillatte dato", - maxText : "Denne datoen er etter seneste tillatte dato", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Neste måned (Control+Pil Høyre)', - prevText : 'Forrige måned (Control+Pil Venstre)', - monthYearText : 'Velg en måned (Control+Pil Opp/Ned for å skifte år)', - todayTip : "{0} (Mellomrom)", - format : "d.m.y", - okText : " OK ", - cancelText : "Avbryt", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Side", - afterPageText : "av {0}", - firstText : "Første side", - prevText : "Forrige side", - nextText : "Neste side", - lastText : "Siste side", - refreshText : "Oppdater", - displayMsg : "Viser {0} - {1} av {2}", - emptyMsg : 'Ingen data å vise' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Den minste lengden for dette feltet er {0}", - maxLengthText : "Den største lengden for dette feltet er {0}", - blankText : "Dette feltet er påkrevd", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Den minste verdien for dette feltet er {0}", - maxText : "Den største verdien for dette feltet er {0}", - nanText : "{0} er ikke et gyldig nummer" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Deaktivert", - disabledDatesText : "Deaktivert", - minText : "Datoen i dette feltet må være etter {0}", - maxText : "Datoen i dette feltet må være før {0}", - invalidText : "{0} er ikke en gyldig dato - den må være på formatet {1}", - format : "d.m.y", - altFormats : "d.m.Y|d/m/y|d/m/Y|d-m-y|d-m-Y|d.m|d/m|d-m|dm|dmy|dmY|Y-m-d|d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Laster...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Dette feltet skal være en epost adresse på formatet "bruker@domene.no"', - urlText : 'Dette feltet skal være en link (URL) på formatet "http:/'+'/www.domene.no"', - alphaText : 'Dette feltet skal kun inneholde bokstaver og _', - alphanumText : 'Dette feltet skal kun inneholde bokstaver, tall og _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Vennligst skriv inn URL for lenken:', - buttonTips : { - bold : { - title: 'Fet (Ctrl+B)', - text: 'Gjør den valgte teksten fet.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Kursiv (Ctrl+I)', - text: 'Gjør den valgte teksten kursiv.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Understrek (Ctrl+U)', - text: 'Understrek den valgte teksten.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Forstørr tekst', - text: 'Gjør fontstørrelse større.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Forminsk tekst', - text: 'Gjør fontstørrelse mindre.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Tekst markeringsfarge', - text: 'Endre bakgrunnsfarge til den valgte teksten.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Font farge', - text: 'Endre farge på den valgte teksten.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Venstrejuster tekst', - text: 'Venstrejuster teksten.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Sentrer tekst', - text: 'Sentrer teksten.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Høyrejuster tekst', - text: 'Høyrejuster teksten.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Punktliste', - text: 'Start en punktliste.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Nummerert liste', - text: 'Start en nummerert liste.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Lenke', - text: 'Gjør den valgte teksten til en lenke.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Rediger kilde', - text: 'Bytt til kilderedigeringsvisning.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sorter stigende", - sortDescText : "Sorter synkende", - lockText : "Lås kolonne", - unlockText : "Lås opp kolonne", - columnsText : "Kolonner" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Ingen)', - groupByText : 'Grupper etter dette feltet', - showGroupsText : 'Vis i grupper' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Navn", - valueText : "Verdi", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Dra for å endre størrelse.", - collapsibleSplitTip : "Dra for å endre størrelse. Dobbelklikk for å skjule." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-no_NN.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-no_NN.js deleted file mode 100644 index a7cc93848be..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-no_NN.js +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * - * Norwegian translation (Nynorsk: no-NN) - * By Tore Kjørsvik 21-January-2008 - * - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Lastar...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} markert(e) rad(er)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Lukk denne fana"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Verdien i dette feltet er ugyldig"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Lastar..."; -} - -Date.monthNames = [ - "Januar", - "Februar", - "Mars", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Desember" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - Mai : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Okt : 9, - Nov : 10, - Des : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Søndag", - "Måndag", - "Tysdag", - "Onsdag", - "Torsdag", - "Fredag", - "Laurdag" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Avbryt", - yes : "Ja", - no : "Nei" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "I dag", - minText : "Denne datoen er før tidlegaste tillatne dato", - maxText : "Denne datoen er etter seinaste tillatne dato", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Neste månad (Control+Pil Høgre)', - prevText : 'Førre månad (Control+Pil Venstre)', - monthYearText : 'Velj ein månad (Control+Pil Opp/Ned for å skifte år)', - todayTip : "{0} (Mellomrom)", - format : "d.m.y", - okText : " OK ", - cancelText : "Avbryt", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Side", - afterPageText : "av {0}", - firstText : "Første sida", - prevText : "Førre sida", - nextText : "Neste sida", - lastText : "Siste sida", - refreshText : "Oppdater", - displayMsg : "Viser {0} - {1} av {2}", - emptyMsg : 'Ingen data å vise' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Den minste lengda for dette feltet er {0}", - maxLengthText : "Den største lengda for dette feltet er {0}", - blankText : "Dette feltet er påkravd", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Den minste verdien for dette feltet er {0}", - maxText : "Den største verdien for dette feltet er {0}", - nanText : "{0} er ikkje eit gyldig nummer" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Deaktivert", - disabledDatesText : "Deaktivert", - minText : "Datoen i dette feltet må vere etter {0}", - maxText : "Datoen i dette feltet må vere før {0}", - invalidText : "{0} er ikkje ein gyldig dato - han må vere på formatet {1}", - format : "d.m.y", - altFormats : "d.m.Y|d/m/y|d/m/Y|d-m-y|d-m-Y|d.m|d/m|d-m|dm|dmy|dmY|Y-m-d|d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Lastar...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Dette feltet skal vere ei epost adresse på formatet "bruker@domene.no"', - urlText : 'Dette feltet skal vere ein link (URL) på formatet "http:/'+'/www.domene.no"', - alphaText : 'Dette feltet skal berre innehalde bokstavar og _', - alphanumText : 'Dette feltet skal berre innehalde bokstavar, tal og _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Ver venleg og skriv inn URL for lenken:', - buttonTips : { - bold : { - title: 'Feit (Ctrl+B)', - text: 'Gjer den valde teksten feit.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Kursiv (Ctrl+I)', - text: 'Gjer den valde teksten kursiv.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Understrek (Ctrl+U)', - text: 'Understrek den valde teksten.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Forstørr tekst', - text: 'Gjer fontstorleik større.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Forminsk tekst', - text: 'Gjer fontstorleik mindre.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Tekst markeringsfarge', - text: 'Endre bakgrunnsfarge til den valde teksten.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Font farge', - text: 'Endre farge på den valde teksten.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Venstrejuster tekst', - text: 'Venstrejuster teksten.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Sentrer tekst', - text: 'Sentrer teksten.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Høgrejuster tekst', - text: 'Høgrejuster teksten.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Punktliste', - text: 'Start ei punktliste.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Nummerert liste', - text: 'Start ei nummerert liste.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Lenke', - text: 'Gjer den valde teksten til ei lenke.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Rediger kjelde', - text: 'Bytt til kjelderedigeringsvising.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sorter stigande", - sortDescText : "Sorter fallande", - lockText : "Lås kolonne", - unlockText : "Lås opp kolonne", - columnsText : "Kolonner" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Ingen)', - groupByText : 'Grupper etter dette feltet', - showGroupsText : 'Vis i grupper' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Namn", - valueText : "Verdi", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Dra for å endre storleik.", - collapsibleSplitTip : "Dra for å endre storleik. Dobbelklikk for å skjule." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pl.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pl.js deleted file mode 100644 index 1d3d915bfe9..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pl.js +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Polish Translations - * By vbert 17-April-2007 - * Updated by mmar 16-November-2007 - * Encoding: utf-8 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Wczytywanie danych...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} wybrano wiersze(y)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Zamknij zakładkę"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Wartość tego pola jest niewłaściwa"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Wczytywanie danych..."; -} - -Date.monthNames = [ - "Styczeń", - "Luty", - "Marzec", - "Kwiecień", - "Maj", - "Czerwiec", - "Lipiec", - "Sierpień", - "Wrzesień", - "Październik", - "Listopad", - "Grudzień" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Sty : 0, - Lut : 1, - Mar : 2, - Kwi : 3, - Maj : 4, - Cze : 5, - Lip : 6, - Sie : 7, - Wrz : 8, - Paz : 9, - Lis : 10, - Gru : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Niedziela", - "Poniedziałek", - "Wtorek", - "Środa", - "Czwartek", - "Piątek", - "Sobota" -]; - -Date.getShortDayName = function(day) { - switch(day) { - case 0: return 'ndz'; - case 1: return 'pon'; - case 2: return 'wt'; - case 3: return 'śr'; - case 4: return 'czw'; - case 5: return 'pt'; - case 6: return 'sob'; - default: return ''; - } -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Anuluj", - yes : "Tak", - no : "Nie" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "Y-m-d"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - startDay : 1, - todayText : "Dzisiaj", - minText : "Data jest wcześniejsza od daty minimalnej", - maxText : "Data jest późniejsza od daty maksymalnej", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : "Następny miesiąc (Control+StrzałkaWPrawo)", - prevText : "Poprzedni miesiąc (Control+StrzałkaWLewo)", - monthYearText : "Wybierz miesiąc (Control+Up/Down aby zmienić rok)", - todayTip : "{0} (Spacja)", - format : "Y-m-d", - okText : " OK ", - cancelText : "Anuluj", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Strona", - afterPageText : "z {0}", - firstText : "Pierwsza strona", - prevText : "Poprzednia strona", - nextText : "Następna strona", - lastText : "Ostatnia strona", - refreshText : "Odśwież", - displayMsg : "Wyświetlono {0} - {1} z {2}", - emptyMsg : "Brak danych do wyświetlenia" - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minimalna ilość znaków dla tego pola to {0}", - maxLengthText : "Maksymalna ilość znaków dla tego pola to {0}", - blankText : "To pole jest wymagane", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Minimalna wartość dla tego pola to {0}", - maxText : "Maksymalna wartość dla tego pola to {0}", - nanText : "{0} to nie jest właściwa wartość" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Wyłączony", - disabledDatesText : "Wyłączony", - minText : "Data w tym polu musi być późniejsza od {0}", - maxText : "Data w tym polu musi być wcześniejsza od {0}", - invalidText : "{0} to nie jest prawidłowa data - prawidłowy format daty {1}", - format : "Y-m-d", - altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Wczytuję...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'To pole wymaga podania adresu e-mail w formacie: "nazwa@domena.pl"', - urlText : 'To pole wymaga podania adresu strony www w formacie: "http:/'+'/www.domena.pl"', - alphaText : 'To pole wymaga podania tylko liter i _', - alphanumText : 'To pole wymaga podania tylko liter, cyfr i _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Wprowadź adres URL strony:', - buttonTips : { - bold : { - title: 'Pogrubienie (Ctrl+B)', - text: 'Ustaw styl zaznaczonego tekstu na pogrubiony.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Kursywa (Ctrl+I)', - text: 'Ustaw styl zaznaczonego tekstu na kursywę.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Podkreślenie (Ctrl+U)', - text: 'Podkreśl zaznaczony tekst.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Zwiększ czcionkę', - text: 'Zwiększ rozmiar czcionki.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Zmniejsz czcionkę', - text: 'Zmniejsz rozmiar czcionki.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Wyróżnienie', - text: 'Zmień kolor wyróżnienia zaznaczonego tekstu.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Kolor czcionki', - text: 'Zmień kolor zaznaczonego tekstu.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Do lewej', - text: 'Wyrównaj tekst do lewej.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Wyśrodkuj', - text: 'Wyrównaj tekst do środka.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Do prawej', - text: 'Wyrównaj tekst do prawej.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Lista wypunktowana', - text: 'Rozpocznij listę wypunktowaną.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Lista numerowana', - text: 'Rozpocznij listę numerowaną.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hiperłącze', - text: 'Przekształć zaznaczony tekst w hiperłącze.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Edycja źródła', - text: 'Przełącz w tryb edycji źródła.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sortuj rosnąco", - sortDescText : "Sortuj malejąco", - lockText : "Zablokuj kolumnę", - unlockText : "Odblokuj kolumnę", - columnsText : "Kolumny" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(None)', - groupByText : 'Grupuj po tym polu', - showGroupsText : 'Pokaż w grupach' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nazwa", - valueText : "Wartość", - dateFormat : "Y-m-d" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Przeciągnij aby zmienić rozmiar.", - collapsibleSplitTip : "Przeciągnij aby zmienić rozmiar. Kliknij dwukrotnie aby ukryć." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pt.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pt.js deleted file mode 100644 index ee24063e032..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pt.js +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Portuguese/Brazil Translation by Weber Souza - * 08 April 2007 - * Updated by Allan Brazute Alves (EthraZa) - * 06 September 2007 - * Adapted to European Portuguese by Helder Batista (hbatista) - * 31 January 2008 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Carregando...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} linha(s) seleccionada(s)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Fechar"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "O valor para este campo é inválido"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Carregando..."; -} - -Date.monthNames = [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" -]; - -Date.dayNames = [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Cancelar", - yes : "Sim", - no : "Não" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Hoje", - minText : "Esta data é anterior à menor data", - maxText : "Esta data é posterior à maior data", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Próximo Mês (Control+Direita)', - prevText : 'Mês Anterior (Control+Esquerda)', - monthYearText : 'Escolha um Mês (Control+Cima/Baixo para mover entre os anos)', - todayTip : "{0} (Espaço)", - format : "d/m/Y", - okText : " OK ", - cancelText : "Cancelar", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Página", - afterPageText : "de {0}", - firstText : "Primeira Página", - prevText : "Página Anterior", - nextText : "Próxima Página", - lastText : "Última Página", - refreshText : "Atualizar", - displayMsg : "{0} à {1} de {2} registo(s)", - emptyMsg : 'Sem registos para exibir' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "O tamanho mínimo para este campo é {0}", - maxLengthText : "O tamanho máximo para este campo é {0}", - blankText : "Este campo é obrigatório.", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "O valor mínimo para este campo é {0}", - maxText : "O valor máximo para este campo é {0}", - nanText : "{0} não é um número válido" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Desabilitado", - disabledDatesText : "Desabilitado", - minText : "A data deste campo deve ser posterior a {0}", - maxText : "A data deste campo deve ser anterior a {0}", - invalidText : "{0} não é uma data válida - deve ser usado o formato {1}", - format : "d/m/Y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Carregando...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Este campo deve ser um endereço de e-mail válido, no formato "utilizador@dominio.com"', - urlText : 'Este campo deve ser um URL no formato "http:/'+'/www.dominio.com"', - alphaText : 'Este campo deve conter apenas letras e _', - alphanumText : 'Este campo deve conter apenas letras, números e _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Por favor, entre com o URL do link:', - buttonTips : { - bold : { - title: 'Negrito (Ctrl+B)', - text: 'Deixa o texto seleccionado em negrito.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italico (Ctrl+I)', - text: 'Deixa o texto seleccionado em italico.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Sublinhado (Ctrl+U)', - text: 'Sublinha o texto seleccionado.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Aumentar Texto', - text: 'Aumenta o tamanho da fonte.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Diminuir Texto', - text: 'Diminui o tamanho da fonte.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Cor de Fundo', - text: 'Muda a cor do fundo do texto seleccionado.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Cor da Fonte', - text: 'Muda a cor do texto seleccionado.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Alinhar à Esquerda', - text: 'Alinha o texto à esquerda.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centrar Texto', - text: 'Centra o texto no editor.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Alinhar à Direita', - text: 'Alinha o texto à direita.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Lista com Marcadores', - text: 'Inicia uma lista com marcadores.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Lista Numerada', - text: 'Inicia uma lista numerada.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperligação', - text: 'Transforma o texto selecionado num hyperlink.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Editar Fonte', - text: 'Troca para o modo de edição de código fonte.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Ordem Ascendente", - sortDescText : "Ordem Descendente", - lockText : "Bloquear Coluna", - unlockText : "Desbloquear Coluna", - columnsText : "Colunas" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nome", - valueText : "Valor", - dateFormat : "d/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Arraste para redimensionar.", - collapsibleSplitTip : "Arraste para redimensionar. Duplo clique para esconder." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pt_BR.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pt_BR.js deleted file mode 100644 index bea47c09b69..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-pt_BR.js +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Portuguese/Brazil Translation by Weber Souza - * 08 April 2007 - * Updated by Allan Brazute Alves (EthraZa) - * 06 September 2007 - * Updated by Leonardo Lima - * 05 March 2008 - * Updated by Juliano Tarini (jtarini) - * 22 April 2008 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Carregando...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} linha(s) selecionada(s)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Fechar"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "O valor para este campo é inválido"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Carregando..."; -} - -Date.monthNames = [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Fev : 1, - Mar : 2, - Abr : 3, - Mai : 4, - Jun : 5, - Jul : 6, - Ago : 7, - Set : 8, - Out : 9, - Nov : 10, - Dez : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Cancelar", - yes : "Sim", - no : "Não" - }; -} - -if (Ext.util.Format) { - Ext.util.Format.date = function(v, format){ - if (!v) return ""; - if (!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; - Ext.util.Format.brMoney = function(v){ - v = (Math.round((v - 0) * 100)) / 100; - v = (v == Math.floor(v)) ? v + ".00" : ((v * 10 == Math.floor(v * 10)) ? v + "0" : v); - v = String(v); - var ps = v.split('.'); - var whole = ps[0]; - var sub = ps[1] ? '.' + ps[1] : '.00'; - var r = /(\d+)(\d{3})/; - while (r.test(whole)) { - whole = whole.replace(r, '$1' + '.' + '$2'); - } - v = whole + sub; - if (v.charAt(0) == '-') { - return '- R$ ' + v.substr(1); - } - return "R$ " + v; - } -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Hoje", - minText : "Esta data é anterior a menor data", - maxText : "Esta data é posterior a maior data", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Próximo Mês (Control+Direita)', - prevText : 'Mês Anterior (Control+Esquerda)', - monthYearText : 'Escolha um Mês (Control+Cima/Baixo para mover entre os anos)', - todayTip : "{0} (Espaço)", - format : "d/m/Y", - okText : " OK ", - cancelText : "Cancelar", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Página", - afterPageText : "de {0}", - firstText : "Primeira Página", - prevText : "Página Anterior", - nextText : "Próxima Página", - lastText : "Última Página", - refreshText : "Atualizar", - displayMsg : "{0} à {1} de {2} registro(s)", - emptyMsg : 'Sem registros para exibir' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "O tamanho mínimo para este campo é {0}", - maxLengthText : "O tamanho máximo para este campo é {0}", - blankText : "Este campo é obrigatório.", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "O valor mínimo para este campo é {0}", - maxText : "O valor máximo para este campo é {0}", - nanText : "{0} não é um número válido" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Desabilitado", - disabledDatesText : "Desabilitado", - minText : "A data deste campo deve ser posterior a {0}", - maxText : "A data deste campo deve ser anterior a {0}", - invalidText : "{0} não é uma data válida - deve ser informado no formato {1}", - format : "d/m/Y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Carregando...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Este campo deve ser um endereço de e-mail válido, no formado "usuario@dominio.com.br"', - urlText : 'Este campo deve ser uma URL no formato "http:/'+'/www.dominio.com.br"', - alphaText : 'Este campo deve conter apenas letras e _', - alphanumText : 'Este campo deve conter apenas letras, números e _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Porfavor, entre com a URL do link:', - buttonTips : { - bold : { - title: 'Negrito (Ctrl+B)', - text: 'Deixa o texto selecionado em negrito.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italico (Ctrl+I)', - text: 'Deixa o texto selecionado em italico.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Sublinhado (Ctrl+U)', - text: 'Sublinha o texto selecionado.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Aumentar Texto', - text: 'Aumenta o tamanho da fonte.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Diminuir Texto', - text: 'Diminui o tamanho da fonte.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Cor de Fundo', - text: 'Muda a cor do fundo do texto selecionado.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Cor da Fonte', - text: 'Muda a cor do texto selecionado.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Alinhar à Esquerda', - text: 'Alinha o texto à esquerda.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centralizar Texto', - text: 'Centraliza o texto no editor.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Alinhar à Direita', - text: 'Alinha o texto à direita.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Lista com Marcadores', - text: 'Inicia uma lista com marcadores.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Lista Numerada', - text: 'Inicia uma lista numerada.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperligação', - text: 'Transforma o texto selecionado em um hyperlink.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Editar Fonte', - text: 'Troca para o modo de edição de código fonte.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Ordem Ascendente", - sortDescText : "Ordem Descendente", - lockText : "Bloquear Coluna", - unlockText : "Desbloquear Coluna", - columnsText : "Colunas" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nome", - valueText : "Valor", - dateFormat : "d/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Arraste para redimensionar.", - collapsibleSplitTip : "Arraste para redimensionar. Duplo clique para esconder." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ro.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ro.js deleted file mode 100644 index 7b76c5500b3..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ro.js +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Romanian translations for ExtJS 2.1 - * First released by Lucian Lature on 2007-04-24 - * Changed locale for Romania (date formats) as suggested by keypoint - * on ExtJS forums: http://www.extjs.com/forum/showthread.php?p=129524#post129524 - * Removed some useless parts - * Changed by: Emil Cazamir, 2008-04-24 - * Fixed some errors left behind - * Changed by: Emil Cazamir, 2008-09-01 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Încărcare...
      '; - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} rând(uri) selectate"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Închide acest tab"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Valoarea acestui câmp este invalidă"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Încărcare..."; -} - -Date.monthNames = [ - "Ianuarie", - "Februarie", - "Martie", - "Aprilie", - "Mai", - "Iunie", - "Iulie", - "August", - "Septembrie", - "Octombrie", - "Noiembrie", - "Decembrie" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Ian : 0, - Feb : 1, - Mar : 2, - Apr : 3, - Mai : 4, - Iun : 5, - Iul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Noi : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Duminică", - "Luni", - "Marţi", - "Miercuri", - "Joi", - "Vineri", - "Sâmbătă" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Renunţă", - yes : "Da", - no : "Nu" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Astăzi", - minText : "Această dată este anterioară datei minime", - maxText : "Această dată este ulterioară datei maxime", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Luna următoare (Control+Dreapta)', - prevText : 'Luna precedentă (Control+Stânga)', - monthYearText : 'Alege o lună (Control+Sus/Jos pentru a parcurge anii)', - todayTip : "{0} (Bara spațiu)", - format : "d.m.Y", - okText : " OK ", - cancelText : "Renunță", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Pagina", - afterPageText : "din {0}", - firstText : "Prima pagină", - prevText : "Pagina anterioară", - nextText : "Pagina următoare", - lastText : "Ultima pagină", - refreshText : "Împrospătează", - displayMsg : "Afișare înregistrările {0} - {1} din {2}", - emptyMsg : 'Nu sunt date de afișat' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Lungimea minimă pentru acest câmp este de {0}", - maxLengthText : "Lungimea maximă pentru acest câmp este {0}", - blankText : "Acest câmp este obligatoriu", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Valoarea minimă permisă a acestui câmp este {0}", - maxText : "Valaorea maximă permisă a acestui câmp este {0}", - nanText : "{0} nu este un număr valid" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Indisponibil", - disabledDatesText : "Indisponibil", - minText : "Data din această casetă trebuie să fie după {0}", - maxText : "Data din această casetă trebuie să fie inainte de {0}", - invalidText : "{0} nu este o dată validă, trebuie să fie în formatul {1}", - format : "d.m.Y", - altFormats : "d-m-Y|d.m.y|d-m-y|d.m|d-m|dm|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Încărcare...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Acest câmp trebuie să conţină o adresă de e-mail în formatul "user@domeniu.com"', - urlText : 'Acest câmp trebuie să conţină o adresă URL în formatul "http:/'+'/www.domeniu.com"', - alphaText : 'Acest câmp trebuie să conţină doar litere şi _', - alphanumText : 'Acest câmp trebuie să conţină doar litere, cifre şi _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Vă rugăm introduceti un URL pentru această legătură web:', - buttonTips : { - bold : { - title: 'Îngroşat (Ctrl+B)', - text: 'Îngroşati caracterele textului selectat.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Înclinat (Ctrl+I)', - text: 'Înclinaţi caracterele textului selectat.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Subliniat (Ctrl+U)', - text: 'Subliniaţi caracterele textului selectat.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Mărit', - text: 'Măreşte dimensiunea fontului.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Micşorat', - text: 'Micşorează dimensiunea textului.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Culoarea fundalului', - text: 'Schimbă culoarea fundalului pentru textul selectat.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Culoarea textului', - text: 'Schimbă culoarea textului selectat.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Aliniat la stânga', - text: 'Aliniază textul la stânga.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Centrat', - text: 'Centrează textul în editor.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Aliniat la dreapta', - text: 'Aliniază textul la dreapta.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Listă cu puncte', - text: 'Inserează listă cu puncte.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Listă numerotată', - text: 'Inserează o listă numerotată.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Legătură web', - text: 'Transformă textul selectat în legătură web.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Editare sursă', - text: 'Schimbă pe modul de editare al codului HTML.', - cls: 'x-html-editor-tip' - } - } - }); -} - - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sortare ascendentă", - sortDescText : "Sortare descendentă", - lockText : "Blochează coloana", - unlockText : "Deblochează coloana", - columnsText : "Coloane" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Fără)', - groupByText : 'Grupează după această coloană', - showGroupsText : 'Afișează grupat' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Nume", - valueText : "Valoare", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Trage pentru redimensionare.", - collapsibleSplitTip : "Trage pentru redimensionare. Dublu-click pentru ascundere." - }); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ru.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ru.js deleted file mode 100644 index 6ae4427977c..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ru.js +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Russian translation - * By ZooKeeper (utf-8 encoding) - * 6 November 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Идет загрузка...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} выбранных строк"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Закрыть эту вкладку"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Значение в этом поле неверное"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Загрузка..."; -} - -Date.monthNames = [ - "Январь", - "Февраль", - "Март", - "Апрель", - "Май", - "Июнь", - "Июль", - "Август", - "Сентябрь", - "Октябрь", - "Ноябрь", - "Декабрь" -]; - -Date.shortMonthNames = [ - "Янв", - "Февр", - "Март", - "Апр", - "Май", - "Июнь", - "Июль", - "Авг", - "Сент", - "Окт", - "Нояб", - "Дек" -]; - -Date.getShortMonthName = function(month) { - return Date.shortMonthNames[month]; -}; - -Date.monthNumbers = { - 'Янв': 0, - 'Фев': 1, - 'Мар': 2, - 'Апр': 3, - 'Май': 4, - 'Июн': 5, - 'Июл': 6, - 'Авг': 7, - 'Сен': 8, - 'Окт': 9, - 'Ноя': 10, - 'Дек': 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Воскресенье", - "Понедельник", - "Вторник", - "Среда", - "Четверг", - "Пятница", - "Суббота" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Отмена", - yes : "Да", - no : "Нет" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Сегодня", - minText : "Эта дата раньше минимальной даты", - maxText : "Эта дата позже максимальной даты", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Следующий месяц (Control+Вправо)', - prevText : 'Предыдущий месяц (Control+Влево)', - monthYearText : 'Выбор месяца (Control+Вверх/Вниз для выбора года)', - todayTip : "{0} (Пробел)", - format : "d.m.y", - okText : " OK ", - cancelText : "Отмена", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Страница", - afterPageText : "из {0}", - firstText : "Первая страница", - prevText : "Предыдущая страница", - nextText : "Следующая страница", - lastText : "Последняя страница", - refreshText : "Обновить", - displayMsg : "Отображаются записи с {0} по {1}, всего {2}", - emptyMsg : 'Нет данных для отображения' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Минимальная длина этого поля {0}", - maxLengthText : "Максимальная длина этого поля {0}", - blankText : "Это поле обязательно для заполнения", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Значение этого поля не может быть меньше {0}", - maxText : "Значение этого поля не может быть больше {0}", - nanText : "{0} не является числом" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Не доступно", - disabledDatesText : "Не доступно", - minText : "Дата в этом поле должна быть позде {0}", - maxText : "Дата в этом поле должна быть раньше {0}", - invalidText : "{0} не является правильной датой - дата должна быть указана в формате {1}", - format : "d.m.y", - altFormats : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Загрузка...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Это поле должно содержать адрес электронной почты в формате "user@domain.com"', - urlText : 'Это поле должно содержать URL в формате "http:/'+'/www.domain.com"', - alphaText : 'Это поле должно содержать только латинские буквы и символ подчеркивания "_"', - alphanumText : 'Это поле должно содержать только латинские буквы, цифры и символ подчеркивания "_"' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Пожалуйста введите адрес:', - buttonTips : { - bold : { - title: 'Полужирный (Ctrl+B)', - text: 'Применение полужирного начертания к выделенному тексту.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Курсив (Ctrl+I)', - text: 'Применение курсивного начертания к выделенному тексту.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Подчёркнутый (Ctrl+U)', - text: 'Подчёркивание выделенного текста.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Увеличить размер', - text: 'Увеличение размера шрифта.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Уменьшить размер', - text: 'Уменьшение размера шрифта.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Заливка', - text: 'Изменение цвета фона для выделенного текста или абзаца.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Цвет текста', - text: 'Измение цвета текста.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Выровнять текст по левому краю', - text: 'Выровнивание текста по левому краю.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'По центру', - text: 'Выровнивание текста по центру.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Выровнять текст по правому краю', - text: 'Выровнивание текста по правому краю.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Маркеры', - text: 'Начать маркированный список.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Нумерация', - text: 'Начать нумернованный список.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Вставить гиперссылку', - text: 'Создание ссылки из выделенного текста.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Исходный код', - text: 'Переключиться на исходный код.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.form.BasicForm){ - Ext.form.BasicForm.prototype.waitTitle = "Пожалуйста подождите..."; -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Сортировать по возрастанию", - sortDescText : "Сортировать по убыванию", - lockText : "Закрепить столбец", - unlockText : "Снять закрепление столбца", - columnsText : "Столбцы" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Пусто)', - groupByText : 'Группировать по этому полю', - showGroupsText : 'Отображать по группам' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Название", - valueText : "Значение", - dateFormat : "d.m.Y" - }); -} - -if(Ext.SplitLayoutRegion){ - Ext.apply(Ext.SplitLayoutRegion.prototype, { - splitTip : "Тяните для изменения размера.", - collapsibleSplitTip : "Тяните для изменения размера. Двойной щелчок спрячет панель." - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Тяните для изменения размера.", - collapsibleSplitTip : "Тяните для изменения размера. Двойной щелчок спрячет панель." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sk.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sk.js deleted file mode 100644 index 5fdfc6e1d93..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sk.js +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * List compiled by mystix on the extjs.com forums. - * Thank you Mystix! - */ - - /* Slovak Translation by Michal Thomka - * 14 April 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Nahrávam...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} označených riadkov"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Zavrieť túto záložku"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Hodnota v tomto poli je nesprávna"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Nahrávam..."; -} - -Date.monthNames = [ - "Január", - "Február", - "Marec", - "Apríl", - "Máj", - "Jún", - "Júl", - "August", - "September", - "Október", - "November", - "December" -]; - -Date.dayNames = [ - "Nedeľa", - "Pondelok", - "Utorok", - "Streda", - "Štvrtok", - "Piatok", - "Sobota" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Zrušiť", - yes : "Áno", - no : "Nie" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Dnes", - minText : "Tento dátum je menší ako minimálny možný dátum", - maxText : "Tento dátum je väčší ako maximálny možný dátum", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Ďalší Mesiac (Control+Doprava)', - prevText : 'Predch. Mesiac (Control+Doľava)', - monthYearText : 'Vyberte Mesiac (Control+Hore/Dole pre posun rokov)', - todayTip : "{0} (Medzerník)", - format : "d.m.Y" - }); -} - - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Strana", - afterPageText : "z {0}", - firstText : "Prvá Strana", - prevText : "Predch. Strana", - nextText : "Ďalšia Strana", - lastText : "Posledná strana", - refreshText : "Obnoviť", - displayMsg : "Zobrazujem {0} - {1} z {2}", - emptyMsg : 'Žiadne dáta' - }); -} - - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minimálna dĺžka pre toto pole je {0}", - maxLengthText : "Maximálna dĺžka pre toto pole je {0}", - blankText : "Toto pole je povinné", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Minimálna hodnota pre toto pole je {0}", - maxText : "Maximálna hodnota pre toto pole je {0}", - nanText : "{0} je nesprávne číslo" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Zablokované", - disabledDatesText : "Zablokované", - minText : "Dátum v tomto poli musí byť až po {0}", - maxText : "Dátum v tomto poli musí byť pred {0}", - invalidText : "{0} nie je správny dátum - musí byť vo formáte {1}", - format : "d.m.Y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Nahrávam...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Toto pole musí byť e-mailová adresa vo formáte "user@domain.com"', - urlText : 'Toto pole musí byť URL vo formáte "http:/'+'/www.domain.com"', - alphaText : 'Toto pole može obsahovať iba písmená a znak _', - alphanumText : 'Toto pole može obsahovať iba písmená, čísla a znak _' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Zoradiť vzostupne", - sortDescText : "Zoradiť zostupne", - lockText : "Zamknúť stľpec", - unlockText : "Odomknúť stľpec", - columnsText : "Stľpce" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Názov", - valueText : "Hodnota", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Potiahnite pre zmenu rozmeru", - collapsibleSplitTip : "Potiahnite pre zmenu rozmeru. Dvojklikom schováte." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sl.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sl.js deleted file mode 100644 index df14f8f2045..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sl.js +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Slovenian translation by Matjaž (UTF-8 encoding) - * 25 April 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Nalagam...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} izbranih vrstic"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Zapri zavihek"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Neveljavna vrednost"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Nalagam..."; -} - -Date.monthNames = [ - "Januar", - "Februar", - "Marec", - "April", - "Maj", - "Junij", - "Julij", - "Avgust", - "September", - "Oktober", - "November", - "December" -]; - -Date.dayNames = [ - "Nedelja", - "Ponedeljek", - "Torek", - "Sreda", - "Četrtek", - "Petek", - "Sobota" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "V redu", - cancel : "Prekliči", - yes : "Da", - no : "Ne" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Danes", - minText : "Navedeni datum je pred spodnjim datumom", - maxText : "Navedeni datum je za zgornjim datumom", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Naslednji mesec (Control+Desno)', - prevText : 'Prejšnji mesec (Control+Levo)', - monthYearText : 'Izberite mesec (Control+Gor/Dol za premik let)', - todayTip : "{0} (Preslednica)", - format : "d.m.y", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Stran", - afterPageText : "od {0}", - firstText : "Prva stran", - prevText : "Prejšnja stran", - nextText : "Naslednja stran", - lastText : "Zadnja stran", - refreshText : "Osveži", - displayMsg : "Prikazujem {0} - {1} od {2}", - emptyMsg : 'Ni podatkov za prikaz' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minimalna dolžina tega polja je {0}", - maxLengthText : "Maksimalna dolžina tega polja je {0}", - blankText : "To polje je obvezno", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Minimalna vrednost tega polja je {0}", - maxText : "Maksimalna vrednost tega polja je {0}", - nanText : "{0} ni veljavna številka" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Onemogočen", - disabledDatesText : "Onemogočen", - minText : "Datum mora biti po {0}", - maxText : "Datum mora biti pred {0}", - invalidText : "{0} ni veljaven datum - mora biti v tem formatu {1}", - format : "d.m.y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Nalagam...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'To polje je e-mail naslov formata "ime@domena.si"', - urlText : 'To polje je URL naslov formata "http:/'+'/www.domena.si"', - alphaText : 'To polje lahko vsebuje samo črke in _', - alphanumText : 'To polje lahko vsebuje samo črke, številke in _' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sortiraj naraščajoče", - sortDescText : "Sortiraj padajoče", - lockText : "Zakleni stolpec", - unlockText : "Odkleni stolpec", - columnsText : "Stolpci" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Ime", - valueText : "Vrednost", - dateFormat : "j.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Potegni za razširitev.", - collapsibleSplitTip : "Potegni za razširitev. Dvojni klik, če želite skriti." - }); -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sr.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sr.js deleted file mode 100644 index 1852d89184e..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sr.js +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Serbian Latin Translation - * by Atila Hajnal (latin, utf8 encoding) - * sr - * 14 Sep 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Učitavam...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = "Ne postoji ni jedan slog"; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} izabranih redova"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Zatvori оvu »karticu«"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Unešena vrednost nije pravilna"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Učitavam..."; -} - -Date.monthNames = [ - "Januar", - "Februar", - "Mart", - "April", - "Мај", - "Jun", - "Јul", - "Avgust", - "Septembar", - "Oktobar", - "Novembar", - "Decembar" -]; - -Date.dayNames = [ - "Nedelja", - "Ponedeljak", - "Utorak", - "Sreda", - "Četvrtak", - "Petak", - "Subota" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "U redu", - cancel : "Odustani", - yes : "Da", - no : "Ne" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Danas", - minText : "Datum је ispred najmanjeg dozvoljenog datuma", - maxText : "Datum је nakon najvećeg dozvoljenog datuma", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Sledeći mesec (Control+Desno)', - prevText : 'Prethodni mesec (Control+Levo)', - monthYearText : 'Izaberite mesec (Control+Gore/Dole za izbor godine)', - todayTip : "{0} (Razmaknica)", - format : "d.m.y", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Strana", - afterPageText : "od {0}", - firstText : "Prva strana", - prevText : "Prethodna strana", - nextText : "Sledeća strana", - lastText : "Poslednja strana", - refreshText : "Osveži", - displayMsg : "Prikazana {0} - {1} od {2}", - emptyMsg : 'Nemam šta prikazati' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minimalna dužina ovog polja је {0}", - maxLengthText : "Maksimalna dužina ovog polja је {0}", - blankText : "Polje је obavezno", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Minimalna vrednost u polju је {0}", - maxText : "Maksimalna vrednost u polju је {0}", - nanText : "{0} nije pravilan broj" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Pasivno", - disabledDatesText : "Pasivno", - minText : "Datum u ovom polju mora biti nakon {0}", - maxText : "Datum u ovom polju mora biti pre {0}", - invalidText : "{0} nije pravilan datum - zahtevani oblik je {1}", - format : "d.m.y", - altFormats : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Učitavam...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Ovo polje prihavata e-mail adresu isključivo u obliku "korisnik@domen.com"', - urlText : 'Ovo polje prihavata URL adresu isključivo u obliku "http:/'+'/www.domen.com"', - alphaText : 'Ovo polje može sadržati isključivo slova i znak _', - alphanumText : 'Ovo polje može sadržati само slova, brojeve i znak _' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Rastući redosled", - sortDescText : "Opadajući redosled", - lockText : "Zaključaj kolonu", - unlockText : "Otključaj kolonu", - columnsText : "Kolone" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Naziv", - valueText : "Vrednost", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Povući za izmenu veličine.", - collapsibleSplitTip : "Povući za izmenu veličine. Dvostruku klik za sakrivanje." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sr_RS.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sr_RS.js deleted file mode 100644 index 23f0ece63c8..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sr_RS.js +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Serbian Cyrillic Translation - * by Čolovic Vladan (cyrillic, utf8 encoding) - * sr_RS (ex: sr_CS, sr_YU) - * 12 May 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Учитавам...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} изабраних редова"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Затвори ову »картицу«"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Унешена вредност није правилна"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Учитавам..."; -} - -Date.monthNames = [ - "Јануар", - "Фебруар", - "Март", - "Април", - "Мај", - "Јун", - "Јул", - "Август", - "Септембар", - "Октобар", - "Новембар", - "Децембар" -]; - -Date.dayNames = [ - "Недеља", - "Понедељак", - "Уторак", - "Среда", - "Четвртак", - "Петак", - "Субота" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "У реду", - cancel : "Одустани", - yes : "Да", - no : "Не" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Данас", - minText : "Датум је испред најмањег дозвољеног датума", - maxText : "Датум је након највећег дозвољеног датума", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Следећи месец (Control+Десно)', - prevText : 'Претходни месец (Control+Лево)', - monthYearText : 'Изаберите месец (Control+Горе/Доле за избор године)', - todayTip : "{0} (Размакница)", - format : "d.m.y", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Страна", - afterPageText : "од {0}", - firstText : "Прва страна", - prevText : "Претходна страна", - nextText : "Следећа страна", - lastText : "Последња страна", - refreshText : "Освежи", - displayMsg : "Приказана {0} - {1} од {2}", - emptyMsg : 'Немам шта приказати' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Минимална дужина овог поља је {0}", - maxLengthText : "Максимална дужина овог поља је {0}", - blankText : "Поље је обавезно", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Минимална вредност у пољу је {0}", - maxText : "Максимална вредност у пољу је {0}", - nanText : "{0} није правилан број" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Пасивно", - disabledDatesText : "Пасивно", - minText : "Датум у овом пољу мора бити након {0}", - maxText : "Датум у овом пољу мора бити пре {0}", - invalidText : "{0} није правилан датум - захтевани облик је {1}", - format : "d.m.y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Учитавам...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Ово поље прихвата e-mail адресу искључиво у облику "korisnik@domen.com"', - urlText : 'Ово поље прихвата URL адресу искључиво у облику "http:/'+'/www.domen.com"', - alphaText : 'Ово поље може садржати искључиво слова и знак _', - alphanumText : 'Ово поље може садржати само слова, бројеве и знак _' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Растући редослед", - sortDescText : "Опадајући редослед", - lockText : "Закључај колону", - unlockText : "Откључај колону", - columnsText : "Колоне" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Назив", - valueText : "Вредност", - dateFormat : "d.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Повући за измену величине.", - collapsibleSplitTip : "Повући за измену величине. Двоструки клик за сакривање." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sv_SE.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sv_SE.js deleted file mode 100644 index 507f9dff899..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-sv_SE.js +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * Swedish translation (utf8-encoding) - * By Erik Andersson, Monator Technologies - * 24 April 2007 - * Changed by Cariad, 29 July 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Laddar...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} markerade rad(er)"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Stäng denna flik"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Värdet i detta fält är inte tillåtet"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Laddar..."; -} - -Date.monthNames = [ - "januari", - "februari", - "mars", - "april", - "maj", - "juni", - "juli", - "augusti", - "september", - "oktober", - "november", - "december" -]; - -Date.dayNames = [ - "söndag", - "måndag", - "tisdag", - "onsdag", - "torsdag", - "fredag", - "lördag" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Avbryt", - yes : "Ja", - no : "Nej" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "Y-m-d"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Idag", - minText : "Detta datum inträffar före det tidigast tillåtna", - maxText : "Detta datum inträffar efter det senast tillåtna", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Nästa månad (Ctrl + högerpil)', - prevText : 'Föregående månad (Ctrl + vänsterpil)', - monthYearText : 'Välj en månad (Ctrl + uppåtpil/neråtpil för att ändra årtal)', - todayTip : "{0} (mellanslag)", - format : "Y-m-d", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Sida", - afterPageText : "av {0}", - firstText : "Första sidan", - prevText : "Föregående sida", - nextText : "Nästa sida", - lastText : "Sista sidan", - refreshText : "Uppdatera", - displayMsg : "Visar {0} - {1} av {2}", - emptyMsg : 'Det finns ingen data att visa' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Minsta tillåtna längd för detta fält är {0}", - maxLengthText : "Största tillåtna längd för detta fält är {0}", - blankText : "Detta fält är obligatoriskt", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Minsta tillåtna värde för detta fält är {0}", - maxText : "Största tillåtna värde för detta fält är {0}", - nanText : "{0} är inte ett tillåtet nummer" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Inaktiverad", - disabledDatesText : "Inaktiverad", - minText : "Datumet i detta fält måste inträffa efter {0}", - maxText : "Datumet i detta fält måste inträffa före {0}", - invalidText : "{0} är inte ett tillåtet datum - datum ska anges i formatet {1}", - format : "Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Laddar...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Detta fält ska innehålla en e-post adress i formatet "användare@domän.se"', - urlText : 'Detta fält ska innehålla en länk (URL) i formatet "http:/'+'/www.domän.se"', - alphaText : 'Detta fält får bara innehålla bokstäver och "_"', - alphanumText : 'Detta fält får bara innehålla bokstäver, nummer och "_"' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sortera stigande", - sortDescText : "Sortera fallande", - lockText : "Lås kolumn", - unlockText : "Lås upp kolumn", - columnsText : "Kolumner" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Namn", - valueText : "Värde", - dateFormat : "Y-m-d" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Dra för att ändra storleken.", - collapsibleSplitTip : "Dra för att ändra storleken. Dubbelklicka för att gömma." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-th.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-th.js deleted file mode 100644 index 9e9824f53c1..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-th.js +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * List compiled by KillerNay on the extjs.com forums. - * Thank you KillerNay! - * - * Thailand Translations - */ - -Ext.UpdateManager.defaults.indicatorText = '
      ¡ÓÅѧâËÅŽ...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} àÅ×Í¡áÅéÇ·Ñé§ËÁŽá¶Ç"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "»ÔŽá·çº¹Õé"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "€èҢͧªèͧ¹ÕéäÁè¶Ù¡µéͧ"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "¡ÓÅѧâËÅŽ..."; -} - -Date.monthNames = [ - "Á¡ÃÒ€Á", - "¡ØÁŸÒӟѹžì", - "ÁÕ¹Ò€Á", - "àÁÉÒ¹", - "ŸÄÉÀÒ€Á", - "ÁԶعÒ¹", - "¡Ä¡¯Ò€Á", - "ÊÔ§ËÒ€Á", - "¡Ñ¹ÂÒ¹", - "µØÅÒ€Á", - "ŸÄÈšÔ¡Ò¹", - "žÑ¹ÇÒ€Á" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - "Á€" : 0, - "¡Ÿ" : 1, - "ÁÕ€" : 2, - "àÁÂ" : 3, - "Ÿ€" : 4, - "ÁÔÂ" : 5, - "¡€" : 6, - "Ê€" : 7, - "¡Â" : 8, - "µ€" : 9, - "ŸÂ" : 10, - "ž€" : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "ÍÒ·ÔµÂì", - "šÑ¹·Ãì", - "Íѧ€ÒÃ", - "ŸØמ", - "ŸÄËÑʺŽÕ", - "ÈØ¡Ãì", - "àÊÒÃì" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "µ¡Å§", - cancel : "¡àÅÔ¡", - yes : "ãªè", - no : "äÁèãªè" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "m/d/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Çѹ¹Õé", - minText : "This date is before the minimum date", - maxText : "This date is after the maximum date", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'àŽ×͹¶ÑŽä» (Control+Right)', - prevText : 'àŽ×͹¡è͹˹éÒ (Control+Left)', - monthYearText : 'àÅ×Í¡àŽ×͹ (Control+Up/Down to move years)', - todayTip : "{0} (Spacebar)", - format : "m/d/y", - okText : " µ¡Å§ ", - cancelText : "¡àÅÔ¡", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "˹éÒ", - afterPageText : "of {0}", - firstText : "˹éÒáá", - prevText : "¡è͹˹éÒ", - nextText : "¶ÑŽä»", - lastText : "˹éÒÊØŽ·éÒÂ", - refreshText : "ÃÕà¿Ãª", - displayMsg : "¡ÓÅѧáÊŽ§ {0} - {1} šÒ¡ {2}", - emptyMsg : 'äÁèÁÕ¢éÍÁÙÅáÊŽ§' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "The minimum length for this field is {0}", - maxLengthText : "The maximum length for this field is {0}", - blankText : "This field is required", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "The minimum value for this field is {0}", - maxText : "The maximum value for this field is {0}", - nanText : "{0} is not a valid number" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "»ÔŽ", - disabledDatesText : "»ÔŽ", - minText : "The date in this field must be after {0}", - maxText : "The date in this field must be before {0}", - invalidText : "{0} is not a valid date - it must be in the format {1}", - format : "m/d/y", - altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "¡ÓÅѧâËÅŽ...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'This field should be an e-mail address in the format "user@domain.com"', - urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', - alphaText : 'This field should only contain letters and _', - alphanumText : 'This field should only contain letters, numbers and _' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Please enter the URL for the link:', - buttonTips : { - bold : { - title: 'Bold (Ctrl+B)', - text: 'Make the selected text bold.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italic (Ctrl+I)', - text: 'Make the selected text italic.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Underline (Ctrl+U)', - text: 'Underline the selected text.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Grow Text', - text: 'Increase the font size.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Shrink Text', - text: 'Decrease the font size.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Text Highlight Color', - text: 'Change the background color of the selected text.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Font Color', - text: 'Change the color of the selected text.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Align Text Left', - text: 'Align text to the left.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Center Text', - text: 'Center text in the editor.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Align Text Right', - text: 'Align text to the right.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Bullet List', - text: 'Start a bulleted list.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numbered List', - text: 'Start a numbered list.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperlink', - text: 'Make the selected text a hyperlink.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Source Edit', - text: 'Switch to source editing mode.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Sort Ascending", - sortDescText : "Sort Descending", - lockText : "Lock Column", - unlockText : "Unlock Column", - columnsText : "Columns" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(None)', - groupByText : 'Group By This Field', - showGroupsText : 'Show in Groups' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Name", - valueText : "Value", - dateFormat : "m/j/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Drag to resize.", - collapsibleSplitTip : "Drag to resize. Double click to hide." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-tr.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-tr.js deleted file mode 100644 index 52a313ec792..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-tr.js +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * List compiled by mystix on the extjs.com forums. - * Thank you Mystix! - * - * Turkish translation by Alper YAZGAN - * 2008-01-24, 10:29 AM - * - * Updated to 2.2 by YargicX - * 2008-10-05, 06:22 PM - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Yükleniyor ...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.Grid){ - Ext.grid.Grid.prototype.ddText = "Seçili satýr sayýsý : {0}"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Sekmeyi kapat"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Bu alandaki deðer geçersiz"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Yükleniyor ..."; -} - -Date.monthNames = [ - "Ocak", - "Þžubat", - "Mart", - "Nisan", - "Mayýs", - "Haziran", - "Temmuz", - "Aðustos", - "Eylül", - "Ekim", - "Kasým", - "Aralýk" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - Jan : 0, - Feb : 1, - Mar : 2, - Apr : 3, - May : 4, - Jun : 5, - Jul : 6, - Aug : 7, - Sep : 8, - Oct : 9, - Nov : 10, - Dec : 11 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "Pazar", - "Pazartesi", - "Salý", - "LJarþŸamba", - "PerþŸembe", - "Cuma", - "Cumartesi" -]; - -Date.shortDayNames = [ - "Paz", - "Pzt", - "Sal", - "ÇrþŸ", - "Prþ", - "Cum", - "Cmt" -]; - -Date.getShortDayName = function(day) { - return Date.shortDayNames[day]; -}; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "Tamam", - cancel : "Ä°ptal", - yes : "Evet", - no : "Hayýr" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Bugün", - minText : "Bu tarih izin verilen en küçük tarihten daha önce", - maxText : "Bu tarih izin verilen en büyük tarihten daha sonra", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Gelecek Ay (Control+Right)', - prevText : 'Önceki Ay (Control+Left)', - monthYearText : 'Bir ay sŸeçiniz (Yýlý artýrmak/azaltmak için Control+Up/Down)', - todayTip : "{0} (BoþŸluk TuþŸu - Spacebar)", - format : "d/m/Y", - okText : " Tamam ", - cancelText : "Ä°ptal", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Sayfa", - afterPageText : " / {0}", - firstText : "Ä°lk Sayfa", - prevText : "Önceki Sayfa", - nextText : "Sonraki Sayfa", - lastText : "Son Sayfa", - refreshText : "Yenile", - displayMsg : "Gösterilen {0} - {1} / {2}", - emptyMsg : 'Gösterilebilecek veri yok' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Girilen verinin uzunluðu en az {0} olabilir", - maxLengthText : "Girilen verinin uzunluðu en fazla {0} olabilir", - blankText : "Bu alan boþŸ býrakýlamaz", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "En az {0} girilebilir", - maxText : "En çok {0} girilebilir", - nanText : "{0} geçersiz bir sayýdýr" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Disabled", - disabledDatesText : "Disabled", - minText : "Bu tarih, {0} tarihinden daha sonra olmalýdýr", - maxText : "Bu tarih, {0} tarihinden daha önce olmalýdýr", - invalidText : "{0} geçersiz bir tarihdir - tarih formatý {1} þŸeklinde olmalýdýr", - format : "d/m/Y", - altFormats : "d.m.y|d.m.Y|d/m/y|d-m-Y|d-m-y|d.m|d/m|d-m|dm|dmY|dmy|d|Y.m.d|Y-m-d|Y/m/d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Yükleniyor ...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.form.VTypes["emailText"]='Bu alan "user@domain.com" þŸeklinde elektronik posta formatýnda olmalýdýr'; - Ext.form.VTypes["urlText"]='Bu alan "http://www.domain.com" þŸeklinde URL adres formatýnda olmalýdýr'; - Ext.form.VTypes["alphaText"]='Bu alan sadece harf ve _ içermeli'; - Ext.form.VTypes["alphanumText"]='Bu alan sadece harf, sayý ve _ içermeli'; -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Lütfen bu baðlantý için gerekli URL adresini giriniz:', - buttonTips : { - bold : { - title: 'Kalýn(Bold) (Ctrl+B)', - text: 'Þžeçili yazýyý kalýn yapar.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Ä°talik(Italic) (Ctrl+I)', - text: 'Þžeçili yazýyý italik yapar.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Alt Çizgi(Underline) (Ctrl+U)', - text: 'Þžeçili yazýnýn altýný çizer.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Fontu büyült', - text: 'Yazý fontunu büyütür.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Fontu küçült', - text: 'Yazý fontunu küçültür.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Arka Plan Rengi', - text: 'Seçili yazýnýn arka plan rengini deðiþŸtir.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Yazý Rengi', - text: 'Seçili yazýnýn rengini deðiþŸtir.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Sola Daya', - text: 'Yazýyý sola daya.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Ortala', - text: 'Yazýyý editörde ortala.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Saða daya', - text: 'Yazýyý saða daya.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Noktalý Liste', - text: 'Noktalý listeye baþŸla.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numaralý Liste', - text: 'Numaralý lisyeye baþŸla.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Web Adresi(Hyperlink)', - text: 'Seçili yazýyý web adresi(hyperlink) yap.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Kaynak kodu Düzenleme', - text: 'Kaynak kodu düzenleme moduna geç.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Artan sýrada sýrala", - sortDescText : "Azalan sýrada sýrala", - lockText : "Kolonu kilitle", - unlockText : "Kolon kilidini kaldýr", - columnsText : "Kolonlar" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(Yok)', - groupByText : 'Bu Alana Göre Grupla', - showGroupsText : 'Gruplar Halinde Göster' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Ad", - valueText : "Deðer", - dateFormat : "d/m/Y" - }); -} - -if(Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Yeniden boyutlandýrmak için sürükle.", - collapsibleSplitTip : "Yeniden boyutlandýrmak için sürükle. Saklamak için çift týkla." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ukr.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ukr.js deleted file mode 100644 index 73224d6b6b4..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-ukr.js +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Ukrainian translation - * By zlatko (utf-8 encoding) - * 3 October 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Триває завантаження...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} вибраних стрічок"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Закрити цю вкладку"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Значення у цьому полі невірне"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Завантаження..."; -} - -Date.monthNames = [ - "Січень", - "Лютий", - "Березень", - "Квітень", - "Травень", - "Червень", - "Липень", - "Серпень", - "Вересень", - "Жовтень", - "Листопад", - "Грудень" -]; - -Date.dayNames = [ - "Неділя", - "Понеділок", - "Вівторок", - "Середа", - "Четвер", - "Пятниця", - "Субота" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "OK", - cancel : "Відміна", - yes : "Так", - no : "Ні" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d.m.Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Сьогодні", - minText : "Ця дата менше мінімальної дати", - maxText : "Ця дата більше максимальної дати", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Наступний місяць (Control+Вправо)', - prevText : 'Попередній місяць (Control+Вліво)', - monthYearText : 'Вибір місяця (Control+Вверх/Вниз для вибору року)', - todayTip : "{0} (Пробіл)", - format : "d.m.y", - okText : " OK ", - cancelText : "Відміна", - startDay : 1 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Сторінка", - afterPageText : "з {0}", - firstText : "Перша сторінка", - prevText : "Попередня сторінка", - nextText : "Наступна сторінка", - lastText : "Остання сторінка", - refreshText : "Обновити", - displayMsg : "Відображаються записи з {0} по {1}, всього {2}", - emptyMsg : 'Дані для відображення відсутні' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Мінімальна довжина цього поля {0}", - maxLengthText : "Максимальна довжина цього поля {0}", - blankText : "Це поле є обов’язковим для заповнення", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Значення цього поля не може бути менше {0}", - maxText : "Значення цього поля не може бути більше {0}", - nanText : "{0} не являється числом" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Не доступно", - disabledDatesText : "Не доступно", - minText : "Дата в цьому полі повинна бути більше {0}", - maxText : "Дата в цьому полі повинна бути менше {0}", - invalidText : "{0} неправильна дата - дата повинна бути вказана у форматі {1}", - format : "d.m.y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Завантаження...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Це поле повинно містити адресу електронної почти у форматі "user@domain.com"', - urlText : 'Це поле повинно містити URL у форматі "http:/'+'/www.domain.com"', - alphaText : 'Це поле повинно містити виключно латинські літери та символ підкреслення "_"', - alphanumText : 'Це поле повинно містити виключно латинські літери, цифри та символ підкреслення "_"' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'Будь-ласка введіть адресу:', - buttonTips : { - bold : { - title: 'Напівжирний (Ctrl+B)', - text: 'Застосування напівжирного до виділеного тексту.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Курсив (Ctrl+I)', - text: ' Застосування курсиву до виділеного тексту.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Підкреслений (Ctrl+U)', - text: ' Застосування підкреслення до виділенного тексту.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Збільшити розмір', - text: 'Збільшення розміру шрифта.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Зменшити розмір', - text: 'Зменшення розміру шрифта.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Заливка', - text: 'Зміна кольору фону для виділеного тексту або абзацу.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Колір тексту', - text: 'Зміна кольору тексту.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Вирівняти текст по лівій границі', - text: 'Вирівнювання тексту по лівій границі.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Вирівняти текст по центру', - text: 'Вирівнювання тексту по центру.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Вирівняти текст по правій границі', - text: 'Вирівнювання тексту по правій границі.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Маркери', - text: 'Почати маркований список.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Нумерація', - text: 'Почати нумернований список.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Вставити гіперпосилання', - text: 'Створення посилання із виділеного тексту.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Вихідний код', - text: 'Переключитись на вихідний код.', - cls: 'x-html-editor-tip' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Сортувати по зростанню", - sortDescText : "Сортувати по спаданню", - lockText : "Закріпити колонку", - unlockText : "Зняти закріплення колонки", - columnsText : "Колонки" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Назва", - valueText : "Значення", - dateFormat : "j.m.Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Тягніть для зміни розміру.", - collapsibleSplitTip : "Тягніть для зміни розміру. Подвійний клік сховає панель." - }); -} - diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-vn.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-vn.js deleted file mode 100644 index 1111831e8e1..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-vn.js +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/** - * List compiled by mystix on the extjs.com forums. - * Thank you Mystix! - */ - -/** - * Vietnamese translation - * By bpmtri - * 12-April-2007 04:06PM - */ - -Ext.UpdateManager.defaults.indicatorText = '
      Đang tải...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} dòng được chọn"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "Đóng thẻ này"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Giá trị của ô này không hợp lệ."; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "Đang tải..."; -} - -Date.monthNames = [ - "Tháng 1", - "Tháng 2", - "Tháng 3", - "Tháng 4", - "Tháng 5", - "Tháng 6", - "Tháng 7", - "Tháng 8", - "Tháng 9", - "Tháng 10", - "Tháng 11", - "Tháng 12" -]; - -Date.dayNames = [ - "Chủ nhật", - "Thứ hai", - "Thứ ba", - "Thứ tư", - "Thứ năm", - "Thứ sáu", - "Thứ bảy" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "Đồng ý", - cancel : "Hủy bỏ", - yes : "Có", - no : "Không" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "d/m/Y"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "Hôm nay", - minText : "Ngày này nhỏ hơn ngày nhỏ nhất", - maxText : "Ngày này lớn hơn ngày lớn nhất", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'Tháng sau (Control+Right)', - prevText : 'Tháng trước (Control+Left)', - monthYearText : 'Chọn một tháng (Control+Up/Down để thay đổi năm)', - todayTip : "{0} (Spacebar - Phím trắng)", - format : "d/m/y" - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "Trang", - afterPageText : "of {0}", - firstText : "Trang đầu", - prevText : "Trang trước", - nextText : "Trang sau", - lastText : "Trang cuối", - refreshText : "Tải lại", - displayMsg : "Hiển thị {0} - {1} của {2}", - emptyMsg : 'Không có dữ liệu để hiển thị' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Chiều dài tối thiểu của ô này là {0}", - maxLengthText : "Chiều dài tối đa của ô này là {0}", - blankText : "Ô này cần phải nhập giá trị", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "Giá trị nhỏ nhất của ô này là {0}", - maxText : "Giá trị lớn nhất của ô này là {0}", - nanText : "{0} hông phải là một số hợp lệ" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "Vô hiệu", - disabledDatesText : "Vô hiệu", - minText : "Ngày nhập trong ô này phải sau ngày {0}", - maxText : "Ngày nhập trong ô này phải trước ngày {0}", - invalidText : "{0} không phải là một ngày hợp lệ - phải có dạng {1}", - format : "d/m/y" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "Đang tải...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'Giá trị của ô này phải là một địa chỉ email có dạng như "ten@abc.com"', - urlText : 'Giá trị của ô này phải là một địa chỉ web(URL) hợp lệ, có dạng như "http:/'+'/www.domain.com"', - alphaText : 'Ô này chỉ được nhập các kí tự và gạch dưới(_)', - alphanumText : 'Ô này chỉ được nhập các kí tự, số và gạch dưới(_)' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Tăng dần", - sortDescText : "Giảm dần", - lockText : "Khóa cột", - unlockText : "Bỏ khóa cột", - columnsText : "Các cột" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "Tên", - valueText : "Giá trị", - dateFormat : "j/m/Y" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Kéo giữ chuột để thay đổi kích thước.", - collapsibleSplitTip : "Kéo giữ chuột để thay đổi kích thước. Nhấp đúp để ẩn đi." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-zh_CN.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-zh_CN.js deleted file mode 100644 index a9fb8ef010b..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-zh_CN.js +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Simplified Chinese translation - * By DavidHu - * 09 April 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      加载中...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} 选择行"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "关闭"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "输入值非法"; -} - -Date.monthNames = [ - "一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "九月", - "十月", - "十一月", - "十二月" -]; - -Date.dayNames = [ - "日", - "一", - "二", - "三", - "四", - "五", - "六" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "确定", - cancel : "取消", - yes : "是", - no : "否" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "y年m月d日"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "今天", - minText : "日期在最小日期之前", - maxText : "日期在最大日期之后", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : '下月 (Control+Right)', - prevText : '上月 (Control+Left)', - monthYearText : '选择一个月 (Control+Up/Down 来改变年)', - todayTip : "{0} (空格键选择)", - format : "y年m月d日", - okText : "确定", - cancelText : "取消" - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "页", - afterPageText : "页共 {0} 页", - firstText : "第一页", - prevText : "前一页", - nextText : "下一页", - lastText : "最后页", - refreshText : "刷新", - displayMsg : "显示 {0} - {1},共 {2} 条", - emptyMsg : '没有数据需要显示' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "该输入项的最小长度是 {0}", - maxLengthText : "该输入项的最大长度是 {0}", - blankText : "该输入项为必输项", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "该输入项的最小值是 {0}", - maxText : "该输入项的最大值是 {0}", - nanText : "{0} 不是有效数值" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "禁用", - disabledDatesText : "禁用", - minText : "该输入项的日期必须在 {0} 之后", - maxText : "该输入项的日期必须在 {0} 之前", - invalidText : "{0} 是无效的日期 - 必须符合格式: {1}", - format : "y年m月d日" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "加载...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : '该输入项必须是电子邮件地址,格式如: "user@domain.com"', - urlText : '该输入项必须是URL地址,格式如: "http:/'+'/www.domain.com"', - alphaText : '该输入项只能包含字符和_', - alphanumText : '该输入项只能包含字符,数字和_' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "正序", - sortDescText : "逆序", - lockText : "锁列", - unlockText : "解锁列", - columnsText : "列" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "名称", - valueText : "值", - dateFormat : "y年m月d日" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "拖动来改变尺寸.", - collapsibleSplitTip : "拖动来改变尺寸. 双击隐藏." - }); -} diff --git a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-zh_TW.js b/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-zh_TW.js deleted file mode 100644 index f1349fed069..00000000000 --- a/web-client/src/main/resources/apps/js/ext/src/locale/ext-lang-zh_TW.js +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Ext JS Library 2.3.0 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - * Traditional Chinese translation - * By hata1234 - * 09 April 2007 - */ - -Ext.UpdateManager.defaults.indicatorText = '
      讀取中...
      '; - -if(Ext.View){ - Ext.View.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "選擇了 {0} 行"; -} - -if(Ext.TabPanelItem){ - Ext.TabPanelItem.prototype.closeText = "關閉此標籤"; -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "數值不符合欄位規定"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "讀取中..."; -} - -Date.monthNames = [ - "一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "九月", - "十月", - "十一月", - "十二月" -]; - -Date.dayNames = [ - "日", - "一", - "二", - "三", - "四", - "五", - "六" -]; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "確定", - cancel : "取消", - yes : "是", - no : "否" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "Y/m/d"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "今天", - minText : "日期必須大於最小容許日期", - maxText : "日期必須小於最大容許日期", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : "下個月 (Ctrl+右方向鍵)", - prevText : "上個月 (Ctrl+左方向鍵)", - monthYearText : "選擇月份 (Ctrl+上/下方向鍵選擇年份)", - todayTip : "{0} (空白鍵)", - format : "y/m/d", - okText : "确定", - cancelText : "取消" - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "第", - afterPageText : "頁,共{0}頁", - firstText : "第一頁", - prevText : "上一頁", - nextText : "下一頁", - lastText : "最後頁", - refreshText : "重新整理", - displayMsg : "顯示{0} - {1}筆,共{2}筆", - emptyMsg : '沒有任何資料' - }); -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "此欄位最少要輸入 {0} 個字", - maxLengthText : "此欄位最多輸入 {0} 個字", - blankText : "此欄位為必填", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - minText : "此欄位之數值必須大於 {0}", - maxText : "此欄位之數值必須小於 {0}", - nanText : "{0} 不是合法的數字" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "無法使用", - disabledDatesText : "無法使用", - minText : "此欄位之日期必須在 {0} 之後", - maxText : "此欄位之日期必須在 {0} 之前", - invalidText : "{0} 不是正確的日期格式 - 必須像是 「 {1} 」 這樣的格式", - format : "Y/m/d" - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "讀取中 ...", - valueNotFoundText : undefined - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : '此欄位必須輸入像 "user@domain.com" 之E-Mail格式', - urlText : '此欄位必須輸入像 "http:/'+'/www.domain.com" 之網址格式', - alphaText : '此欄位僅能輸入半形英文字母及底線( _ )符號', - alphanumText : '此欄位僅能輸入半形英文字母、數字及底線( _ )符號' - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "正向排序", - sortDescText : "反向排序", - lockText : "鎖定欄位", - unlockText : "解開欄位鎖定", - columnsText : "欄位" - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "名稱", - valueText : "數值", - dateFormat : "Y/m/d" - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "拖曳縮放大小.", - collapsibleSplitTip : "拖曳縮放大小. 滑鼠雙擊隱藏." - }); -} diff --git a/web-client/src/main/resources/apps/js/proj4js-compressed.js b/web-client/src/main/resources/apps/js/proj4js-compressed.js deleted file mode 100644 index b794569fb10..00000000000 --- a/web-client/src/main/resources/apps/js/proj4js-compressed.js +++ /dev/null @@ -1,241 +0,0 @@ -/* - proj4js.js -- Javascript reprojection library. - - Authors: Mike Adair madairATdmsolutions.ca - Richard Greenwood richATgreenwoodmap.com - Didier Richard - Stephen Irons - License: LGPL as per: http://www.gnu.org/copyleft/lesser.html - Note: This program is an almost direct port of the C library - Proj4. -*/ -Proj4js={defaultDatum:'WGS84',transform:function(source,dest,point){if(!source.readyToUse||!dest.readyToUse){this.reportError("Proj4js initialization for "+source.srsCode+" not yet complete");return point;} -if((source.srsProjNumber=="900913"&&dest.datumCode!="WGS84")||(dest.srsProjNumber=="900913"&&source.datumCode!="WGS84")){var wgs84=Proj4js.WGS84;this.transform(source,wgs84,point);source=wgs84;} -if(source.projName=="longlat"){point.x*=Proj4js.common.D2R;point.y*=Proj4js.common.D2R;}else{if(source.to_meter){point.x*=source.to_meter;point.y*=source.to_meter;} -source.inverse(point);} -if(source.from_greenwich){point.x+=source.from_greenwich;} -point=this.datum_transform(source.datum,dest.datum,point);if(dest.from_greenwich){point.x-=dest.from_greenwich;} -if(dest.projName=="longlat"){point.x*=Proj4js.common.R2D;point.y*=Proj4js.common.R2D;}else{dest.forward(point);if(dest.to_meter){point.x/=dest.to_meter;point.y/=dest.to_meter;}} -return point;},datum_transform:function(source,dest,point){if(source.compare_datums(dest)){return point;} -if(source.datum_type==Proj4js.common.PJD_NODATUM||dest.datum_type==Proj4js.common.PJD_NODATUM){return point;} -if(source.datum_type==Proj4js.common.PJD_GRIDSHIFT) -{alert("ERROR: Grid shift transformations are not implemented yet.");} -if(dest.datum_type==Proj4js.common.PJD_GRIDSHIFT) -{alert("ERROR: Grid shift transformations are not implemented yet.");} -if(source.es!=dest.es||source.a!=dest.a||source.datum_type==Proj4js.common.PJD_3PARAM||source.datum_type==Proj4js.common.PJD_7PARAM||dest.datum_type==Proj4js.common.PJD_3PARAM||dest.datum_type==Proj4js.common.PJD_7PARAM) -{source.geodetic_to_geocentric(point);if(source.datum_type==Proj4js.common.PJD_3PARAM||source.datum_type==Proj4js.common.PJD_7PARAM){source.geocentric_to_wgs84(point);} -if(dest.datum_type==Proj4js.common.PJD_3PARAM||dest.datum_type==Proj4js.common.PJD_7PARAM){dest.geocentric_from_wgs84(point);} -dest.geocentric_to_geodetic(point);} -if(dest.datum_type==Proj4js.common.PJD_GRIDSHIFT) -{alert("ERROR: Grid shift transformations are not implemented yet.");} -return point;},reportError:function(msg){},extend:function(destination,source){destination=destination||{};if(source){for(var property in source){var value=source[property];if(value!==undefined){destination[property]=value;}}} -return destination;},Class:function(){var Class=function(){this.initialize.apply(this,arguments);};var extended={};var parent;for(var i=0;i-1)&&(index+scriptNameLen==src.length)){this.libPath=src.slice(0,-scriptNameLen);break;}}} -return this.libPath||"";},loadScript:function(url,onload,onfail,loadCheck){var script=document.createElement('script');script.defer=false;script.type="text/javascript";script.id=url;script.src=url;script.onload=onload;script.onerror=onfail;script.loadCheck=loadCheck;if(/MSIE/.test(navigator.userAgent)){script.onreadystatechange=this.checkReadyState;} -document.getElementsByTagName('head')[0].appendChild(script);},checkReadyState:function(){if(this.readyState=='loaded'){if(!this.loadCheck()){this.onerror();}else{this.onload();}}}};Proj4js.Proj=Proj4js.Class({readyToUse:false,title:null,projName:null,units:null,datum:null,initialize:function(srsCode){this.srsCodeInput=srsCode;if(srsCode.indexOf('urn:')==0){var urn=srsCode.split(':');if((urn[1]=='ogc'||urn[1]=='x-ogc')&&(urn[2]=='def')&&(urn[3]=='crs')&&urn.length==7){srsCode=urn[4]+':'+urn[6];}}else if(srsCode.indexOf('http://')==0){var url=srsCode.split('#');if(url[0].match(/epsg.org/)){srsCode='EPSG:'+url[1];}else if(url[0].match(/RIG.xml/)){srsCode='IGNF:'+url[1];}} -this.srsCode=srsCode.toUpperCase();if(this.srsCode.indexOf("EPSG")==0){this.srsCode=this.srsCode;this.srsAuth='epsg';this.srsProjNumber=this.srsCode.substring(5);}else if(this.srsCode.indexOf("IGNF")==0){this.srsCode=this.srsCode;this.srsAuth='IGNF';this.srsProjNumber=this.srsCode.substring(5);}else if(this.srsCode.indexOf("CRS")==0){this.srsCode=this.srsCode;this.srsAuth='CRS';this.srsProjNumber=this.srsCode.substring(4);}else{this.srsAuth='';this.srsProjNumber=this.srsCode;} -this.loadProjDefinition();},loadProjDefinition:function(){if(Proj4js.defs[this.srsCode]){this.defsLoaded();return;} -var url=Proj4js.getScriptLocation()+'defs/'+this.srsAuth.toUpperCase()+this.srsProjNumber+'.js';Proj4js.loadScript(url,Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.loadFromService,this),Proj4js.bind(this.checkDefsLoaded,this));},loadFromService:function(){var url=Proj4js.defsLookupService+'/'+this.srsAuth+'/'+this.srsProjNumber+'/proj4js';Proj4js.loadScript(url,Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.defsFailed,this),Proj4js.bind(this.checkDefsLoaded,this));},defsLoaded:function(){this.parseDefs();this.loadProjCode(this.projName);},checkDefsLoaded:function(){if(Proj4js.defs[this.srsCode]){return true;}else{return false;}},defsFailed:function(){Proj4js.reportError('failed to load projection definition for: '+this.srsCode);Proj4js.extend(Proj4js.defs[this.srsCode],Proj4js.defs['WGS84']);this.defsLoaded();},loadProjCode:function(projName){if(Proj4js.Proj[projName]){this.initTransforms();return;} -var url=Proj4js.getScriptLocation()+'projCode/'+projName+'.js';Proj4js.loadScript(url,Proj4js.bind(this.loadProjCodeSuccess,this,projName),Proj4js.bind(this.loadProjCodeFailure,this,projName),Proj4js.bind(this.checkCodeLoaded,this,projName));},loadProjCodeSuccess:function(projName){if(Proj4js.Proj[projName].dependsOn){this.loadProjCode(Proj4js.Proj[projName].dependsOn);}else{this.initTransforms();}},loadProjCodeFailure:function(projName){Proj4js.reportError("failed to find projection file for: "+projName);},checkCodeLoaded:function(projName){if(Proj4js.Proj[projName]){return true;}else{return false;}},initTransforms:function(){Proj4js.extend(this,Proj4js.Proj[this.projName]);this.init();this.readyToUse=true;},parseDefs:function(){this.defData=Proj4js.defs[this.srsCode];var paramName,paramVal;var paramArray=this.defData.split("+");for(var prop=0;prop1.0e-7){con=eccent*sinphi;return((1.0-eccent*eccent)*(sinphi/(1.0-con*con)-(.5/eccent)*Math.log((1.0-con)/(1.0+con))));}else{return(2.0*sinphi);}},asinz:function(x){if(Math.abs(x)>1.0){x=(x>1.0)?1.0:-1.0;} -return Math.asin(x);},e0fn:function(x){return(1.0-0.25*x*(1.0+x/16.0*(3.0+1.25*x)));},e1fn:function(x){return(0.375*x*(1.0+0.25*x*(1.0+0.46875*x)));},e2fn:function(x){return(0.05859375*x*x*(1.0+0.75*x));},e3fn:function(x){return(x*x*x*(35.0/3072.0));},mlfn:function(e0,e1,e2,e3,phi){return(e0*phi-e1*Math.sin(2.0*phi)+e2*Math.sin(4.0*phi)-e3*Math.sin(6.0*phi));},srat:function(esinp,exp){return(Math.pow((1.0-esinp)/(1.0+esinp),exp));},sign:function(x){if(x<0.0)return(-1);else return(1);},adjust_lon:function(x){x=(Math.abs(x)this.HALF_PI)return+Number.NaN;if(phi==this.HALF_PI)return Number.POSITIVE_INFINITY;if(phi==-1.0*this.HALF_PI)return-1.0*Number.POSITIVE_INFINITY;var con=eccent*sinphi;return Math.log(Math.tan((this.HALF_PI+phi)/2.0))+eccent*Math.log((1.0-con)/(1.0+con))/2.0;},fL:function(x,L){return 2.0*Math.atan(x*Math.exp(L))-this.HALF_PI;},invlatiso:function(eccent,ts){var phi=this.fL(1.0,ts);var Iphi=0.0;var con=0.0;do{Iphi=phi;con=eccent*Math.sin(Iphi);phi=this.fL(Math.exp(eccent*Math.log((1.0+con)/(1.0-con))/2.0),ts)}while(Math.abs(phi-Iphi)>1.0e-12);return phi;},sinh:function(x) -{var r=Math.exp(x);r=(r-1.0/r)/2.0;return r;},cosh:function(x) -{var r=Math.exp(x);r=(r+1.0/r)/2.0;return r;},tanh:function(x) -{var r=Math.exp(x);r=(r-1.0/r)/(r+1.0/r);return r;},asinh:function(x) -{var s=(x>=0?1.0:-1.0);return s*(Math.log(Math.abs(x)+Math.sqrt(x*x+1.0)));},acosh:function(x) -{return 2.0*Math.log(Math.sqrt((x+1.0)/2.0)+Math.sqrt((x-1.0)/2.0));},atanh:function(x) -{return Math.log((x-1.0)/(x+1.0))/2.0;},gN:function(a,e,sinphi) -{var temp=e*sinphi;return a/Math.sqrt(1.0-temp*temp);}};Proj4js.datum=Proj4js.Class({initialize:function(proj){this.datum_type=Proj4js.common.PJD_WGS84;if(proj.datumCode&&proj.datumCode=='none'){this.datum_type=Proj4js.common.PJD_NODATUM;} -if(proj&&proj.datum_params){for(var i=0;i3){if(proj.datum_params[3]!=0||proj.datum_params[4]!=0||proj.datum_params[5]!=0||proj.datum_params[6]!=0){this.datum_type=Proj4js.common.PJD_7PARAM;proj.datum_params[3]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[4]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[5]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[6]=(proj.datum_params[6]/1000000.0)+1.0;}}} -if(proj){this.a=proj.a;this.b=proj.b;this.es=proj.es;this.ep2=proj.ep2;this.datum_params=proj.datum_params;}},compare_datums:function(dest){if(this.datum_type!=dest.datum_type){return false;}else if(this.a!=dest.a||Math.abs(this.es-dest.es)>0.000000000050){return false;}else if(this.datum_type==Proj4js.common.PJD_3PARAM){return(this.datum_params[0]==dest.datum_params[0]&&this.datum_params[1]==dest.datum_params[1]&&this.datum_params[2]==dest.datum_params[2]);}else if(this.datum_type==Proj4js.common.PJD_7PARAM){return(this.datum_params[0]==dest.datum_params[0]&&this.datum_params[1]==dest.datum_params[1]&&this.datum_params[2]==dest.datum_params[2]&&this.datum_params[3]==dest.datum_params[3]&&this.datum_params[4]==dest.datum_params[4]&&this.datum_params[5]==dest.datum_params[5]&&this.datum_params[6]==dest.datum_params[6]);}else if(this.datum_type==Proj4js.common.PJD_GRIDSHIFT){return strcmp(pj_param(this.params,"snadgrids").s,pj_param(dest.params,"snadgrids").s)==0;}else{return true;}},geodetic_to_geocentric:function(p){var Longitude=p.x;var Latitude=p.y;var Height=p.z?p.z:0;var X;var Y;var Z;var Error_Code=0;var Rn;var Sin_Lat;var Sin2_Lat;var Cos_Lat;if(Latitude<-Proj4js.common.HALF_PI&&Latitude>-1.001*Proj4js.common.HALF_PI){Latitude=-Proj4js.common.HALF_PI;}else if(Latitude>Proj4js.common.HALF_PI&&Latitude<1.001*Proj4js.common.HALF_PI){Latitude=Proj4js.common.HALF_PI;}else if((Latitude<-Proj4js.common.HALF_PI)||(Latitude>Proj4js.common.HALF_PI)){Proj4js.reportError('geocent:lat out of range:'+Latitude);return null;} -if(Longitude>Proj4js.common.PI)Longitude-=(2*Proj4js.common.PI);Sin_Lat=Math.sin(Latitude);Cos_Lat=Math.cos(Latitude);Sin2_Lat=Sin_Lat*Sin_Lat;Rn=this.a/(Math.sqrt(1.0e0-this.es*Sin2_Lat));X=(Rn+Height)*Cos_Lat*Math.cos(Longitude);Y=(Rn+Height)*Cos_Lat*Math.sin(Longitude);Z=((Rn*(1-this.es))+Height)*Sin_Lat;p.x=X;p.y=Y;p.z=Z;return Error_Code;},geocentric_to_geodetic:function(p){var genau=1.E-12;var genau2=(genau*genau);var maxiter=30;var P;var RR;var CT;var ST;var RX;var RK;var RN;var CPHI0;var SPHI0;var CPHI;var SPHI;var SDPHI;var At_Pole;var iter;var X=p.x;var Y=p.y;var Z=p.z?p.z:0.0;var Longitude;var Latitude;var Height;At_Pole=false;P=Math.sqrt(X*X+Y*Y);RR=Math.sqrt(X*X+Y*Y+Z*Z);if(P/this.agenau2&&iter0) -{Longitude=Proj4js.common.HALF_PI;} -else if(Y<0) -{Longitude=-Proj4js.common.HALF_PI;} -else -{At_Pole=true;Longitude=0.0;if(Z>0.0) -{Latitude=Proj4js.common.HALF_PI;} -else if(Z<0.0) -{Latitude=-Proj4js.common.HALF_PI;} -else -{Latitude=Proj4js.common.HALF_PI;Height=-this.b;return;}}} -W2=X*X+Y*Y;W=Math.sqrt(W2);T0=Z*Proj4js.common.AD_C;S0=Math.sqrt(T0*T0+W2);Sin_B0=T0/S0;Cos_B0=W/S0;Sin3_B0=Sin_B0*Sin_B0*Sin_B0;T1=Z+this.b*this.ep2*Sin3_B0;Sum=W-this.a*this.es*Cos_B0*Cos_B0*Cos_B0;S1=Math.sqrt(T1*T1+Sum*Sum);Sin_p1=T1/S1;Cos_p1=Sum/S1;Rn=this.a/Math.sqrt(1.0-this.es*Sin_p1*Sin_p1);if(Cos_p1>=Proj4js.common.COS_67P5) -{Height=W/Cos_p1-Rn;} -else if(Cos_p1<=-Proj4js.common.COS_67P5) -{Height=W/-Cos_p1-Rn;} -else -{Height=Z/Sin_p1+Rn*(this.es-1.0);} -if(At_Pole==false) -{Latitude=Math.atan(Sin_p1/Cos_p1);} -p.x=Longitude;p.y=Latitude;p.z=Height;return p;},geocentric_to_wgs84:function(p){if(this.datum_type==Proj4js.common.PJD_3PARAM) -{p.x+=this.datum_params[0];p.y+=this.datum_params[1];p.z+=this.datum_params[2];} -else if(this.datum_type==Proj4js.common.PJD_7PARAM) -{var Dx_BF=this.datum_params[0];var Dy_BF=this.datum_params[1];var Dz_BF=this.datum_params[2];var Rx_BF=this.datum_params[3];var Ry_BF=this.datum_params[4];var Rz_BF=this.datum_params[5];var M_BF=this.datum_params[6];var x_out=M_BF*(p.x-Rz_BF*p.y+Ry_BF*p.z)+Dx_BF;var y_out=M_BF*(Rz_BF*p.x+p.y-Rx_BF*p.z)+Dy_BF;var z_out=M_BF*(-Ry_BF*p.x+Rx_BF*p.y+p.z)+Dz_BF;p.x=x_out;p.y=y_out;p.z=z_out;}},geocentric_from_wgs84:function(p){if(this.datum_type==Proj4js.common.PJD_3PARAM) -{p.x-=this.datum_params[0];p.y-=this.datum_params[1];p.z-=this.datum_params[2];} -else if(this.datum_type==Proj4js.common.PJD_7PARAM) -{var Dx_BF=this.datum_params[0];var Dy_BF=this.datum_params[1];var Dz_BF=this.datum_params[2];var Rx_BF=this.datum_params[3];var Ry_BF=this.datum_params[4];var Rz_BF=this.datum_params[5];var M_BF=this.datum_params[6];var x_tmp=(p.x-Dx_BF)/M_BF;var y_tmp=(p.y-Dy_BF)/M_BF;var z_tmp=(p.z-Dz_BF)/M_BF;p.x=x_tmp+Rz_BF*y_tmp-Ry_BF*z_tmp;p.y=-Rz_BF*x_tmp+y_tmp+Rx_BF*z_tmp;p.z=Ry_BF*x_tmp-Rx_BF*y_tmp+z_tmp;}}});Proj4js.Point=Proj4js.Class({initialize:function(x,y,z){if(typeof x=='object'){this.x=x[0];this.y=x[1];this.z=x[2]||0.0;}else if(typeof x=='string'){var coords=x.split(',');this.x=parseFloat(coords[0]);this.y=parseFloat(coords[1]);this.z=parseFloat(coords[2])||0.0;}else{this.x=x;this.y=y;this.z=z||0.0;}},clone:function(){return new Proj4js.Point(this.x,this.y,this.z);},toString:function(){return("x="+this.x+",y="+this.y);},toShortString:function(){return(this.x+", "+this.y);}});Proj4js.PrimeMeridian={"greenwich":0.0,"lisbon":-9.131906111111,"paris":2.337229166667,"bogota":-74.080916666667,"madrid":-3.687938888889,"rome":12.452333333333,"bern":7.439583333333,"jakarta":106.807719444444,"ferro":-17.666666666667,"brussels":4.367975,"stockholm":18.058277777778,"athens":23.7163375,"oslo":10.722916666667};Proj4js.Ellipsoid={"MERIT":{a:6378137.0,rf:298.257,ellipseName:"MERIT 1983"},"SGS85":{a:6378136.0,rf:298.257,ellipseName:"Soviet Geodetic System 85"},"GRS80":{a:6378137.0,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},"IAU76":{a:6378140.0,rf:298.257,ellipseName:"IAU 1976"},"airy":{a:6377563.396,b:6356256.910,ellipseName:"Airy 1830"},"APL4.":{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},"NWL9D":{a:6378145.0,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},"mod_airy":{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},"andrae":{a:6377104.43,rf:300.0,ellipseName:"Andrae 1876 (Den., Iclnd.)"},"aust_SA":{a:6378160.0,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},"GRS67":{a:6378160.0,rf:298.2471674270,ellipseName:"GRS 67(IUGG 1967)"},"bessel":{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},"bess_nam":{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},"clrk66":{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},"clrk80":{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},"CPM":{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},"delmbr":{a:6376428.0,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},"engelis":{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},"evrst30":{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},"evrst48":{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},"evrst56":{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},"evrst69":{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},"evrstSS":{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},"fschr60":{a:6378166.0,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},"fschr60m":{a:6378155.0,rf:298.3,ellipseName:"Fischer 1960"},"fschr68":{a:6378150.0,rf:298.3,ellipseName:"Fischer 1968"},"helmert":{a:6378200.0,rf:298.3,ellipseName:"Helmert 1906"},"hough":{a:6378270.0,rf:297.0,ellipseName:"Hough"},"intl":{a:6378388.0,rf:297.0,ellipseName:"International 1909 (Hayford)"},"kaula":{a:6378163.0,rf:298.24,ellipseName:"Kaula 1961"},"lerch":{a:6378139.0,rf:298.257,ellipseName:"Lerch 1979"},"mprts":{a:6397300.0,rf:191.0,ellipseName:"Maupertius 1738"},"new_intl":{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},"plessis":{a:6376523.0,rf:6355863.0,ellipseName:"Plessis 1817 (France)"},"krass":{a:6378245.0,rf:298.3,ellipseName:"Krassovsky, 1942"},"SEasia":{a:6378155.0,b:6356773.3205,ellipseName:"Southeast Asia"},"walbeck":{a:6376896.0,b:6355834.8467,ellipseName:"Walbeck"},"WGS60":{a:6378165.0,rf:298.3,ellipseName:"WGS 60"},"WGS66":{a:6378145.0,rf:298.25,ellipseName:"WGS 66"},"WGS72":{a:6378135.0,rf:298.26,ellipseName:"WGS 72"},"WGS84":{a:6378137.0,rf:298.257223563,ellipseName:"WGS 84"},"sphere":{a:6370997.0,b:6370997.0,ellipseName:"Normal Sphere (r=6370997)"}};Proj4js.Datum={"WGS84":{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},"GGRS87":{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},"NAD83":{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},"NAD27":{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},"potsdam":{towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},"carthage":{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},"hermannskogel":{towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},"ire65":{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},"nzgd49":{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},"OSGB36":{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"}};Proj4js.WGS84=new Proj4js.Proj('WGS84');Proj4js.Datum['OSB36']=Proj4js.Datum['OSGB36'];Proj4js.Proj.aea={init:function(){if(Math.abs(this.lat1+this.lat2)Proj4js.common.EPSLN){this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1);}else{this.ns0=this.con;} -this.c=this.ms1*this.ms1+this.ns0*this.qs1;this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0;},forward:function(p){var lon=p.x;var lat=p.y;this.sin_phi=Math.sin(lat);this.cos_phi=Math.cos(lat);var qs=Proj4js.common.qsfnz(this.e3,this.sin_phi,this.cos_phi);var rh1=this.a*Math.sqrt(this.c-this.ns0*qs)/this.ns0;var theta=this.ns0*Proj4js.common.adjust_lon(lon-this.long0);var x=rh1*Math.sin(theta)+this.x0;var y=this.rh-rh1*Math.cos(theta)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var rh1,qs,con,theta,lon,lat;p.x-=this.x0;p.y=this.rh-p.y+this.y0;if(this.ns0>=0){rh1=Math.sqrt(p.x*p.x+p.y*p.y);con=1.0;}else{rh1=-Math.sqrt(p.x*p.x+p.y*p.y);con=-1.0;} -theta=0.0;if(rh1!=0.0){theta=Math.atan2(con*p.x,con*p.y);} -con=rh1*this.ns0/this.a;qs=(this.c-con*con)/this.ns0;if(this.e3>=1e-10){con=1-.5*(1.0-this.es)*Math.log((1.0-this.e3)/(1.0+this.e3))/this.e3;if(Math.abs(Math.abs(con)-Math.abs(qs))>.0000000001){lat=this.phi1z(this.e3,qs);}else{if(qs>=0){lat=.5*PI;}else{lat=-.5*PI;}}}else{lat=this.phi1z(e3,qs);} -lon=Proj4js.common.adjust_lon(theta/this.ns0+this.long0);p.x=lon;p.y=lat;return p;},phi1z:function(eccent,qs){var con,com,dphi;var phi=Proj4js.common.asinz(.5*qs);if(eccent=max_iter){Proj4js.reportError("tmerc:inverse: Latitude failed to converge");return(95);}} -if(Math.abs(phi)Proj4js.common.HALF_PI){Proj4js.reportError("equi:Inv:DataError");} -var lon=Proj4js.common.adjust_lon(this.long0+p.x/(this.a*Math.cos(this.lat0)));p.x=lon;p.y=lat;}};Proj4js.Proj.merc={init:function(){if(this.lat_ts){if(this.sphere){this.k0=Math.cos(this.lat_ts);}else{this.k0=Proj4js.common.msfnz(this.es,Math.sin(this.lat_ts),Math.cos(this.lat_ts));}}},forward:function(p){var lon=p.x;var lat=p.y;if(lat*Proj4js.common.R2D>90.0&&lat*Proj4js.common.R2D<-90.0&&lon*Proj4js.common.R2D>180.0&&lon*Proj4js.common.R2D<-180.0){Proj4js.reportError("merc:forward: llInputOutOfRange: "+lon+" : "+lat);return null;} -var x,y;if(Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN){Proj4js.reportError("merc:forward: ll2mAtPoles");return null;}else{if(this.sphere){x=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(lon-this.long0);y=this.y0+this.a*this.k0*Math.log(Math.tan(Proj4js.common.FORTPI+0.5*lat));}else{var sinphi=Math.sin(lat);var ts=Proj4js.common.tsfnz(this.e,lat,sinphi);x=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(lon-this.long0);y=this.y0-this.a*this.k0*Math.log(ts);} -p.x=x;p.y=y;return p;}},inverse:function(p){var x=p.x-this.x0;var y=p.y-this.y0;var lon,lat;if(this.sphere){lat=Proj4js.common.HALF_PI-2.0*Math.atan(Math.exp(-y/this.a*this.k0));}else{var ts=Math.exp(-y/(this.a*this.k0));lat=Proj4js.common.phi2z(this.e,ts);if(lat==-9999){Proj4js.reportError("merc:inverse: lat = -9999");return null;}} -lon=Proj4js.common.adjust_lon(this.long0+x/(this.a*this.k0));p.x=lon;p.y=lat;return p;}};Proj4js.Proj.sinu={init:function(){this.R=6370997.0;},forward:function(p){var x,y,delta_lon;var lon=p.x;var lat=p.y;delta_lon=Proj4js.common.adjust_lon(lon-this.long0);x=this.R*delta_lon*Math.cos(lat)+this.x0;y=this.R*lat+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var lat,temp,lon;p.x-=this.x0;p.y-=this.y0;lat=p.y/this.R;if(Math.abs(lat)>Proj4js.common.HALF_PI){Proj4js.reportError("sinu:Inv:DataError");} -temp=Math.abs(lat)-Proj4js.common.HALF_PI;if(Math.abs(temp)>Proj4js.common.EPSLN){temp=this.long0+p.x/(this.R*Math.cos(lat));lon=Proj4js.common.adjust_lon(temp);}else{lon=this.long0;} -p.x=lon;p.y=lat;return p;}};Proj4js.Proj.eqdc={init:function(){if(!this.mode)this.mode=0;this.temp=this.b/this.a;this.es=1.0-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.sinphi=Math.sin(this.lat1);this.cosphi=Math.cos(this.lat1);this.ms1=Proj4js.common.msfnz(this.e,this.sinphi,this.cosphi);this.ml1=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat1);if(this.mode!=0){if(Math.abs(this.lat1+this.lat2)=Proj4js.common.EPSLN){this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1);}else{this.ns=this.sinphi;}}else{this.ns=this.sinphi;} -this.g=this.ml1+this.ms1/this.ns;this.ml0=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0);this.rh=this.a*(this.g-this.ml0);},forward:function(p){var lon=p.x;var lat=p.y;var ml=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,lat);var rh1=this.a*(this.g-ml);var theta=this.ns*Proj4js.common.adjust_lon(lon-this.long0);var x=this.x0+rh1*Math.sin(theta);var y=this.y0+this.rh-rh1*Math.cos(theta);p.x=x;p.y=y;return p;},inverse:function(p){p.x-=this.x0;p.y=this.rh-p.y+this.y0;var con,rh1;if(this.ns>=0){var rh1=Math.sqrt(p.x*p.x+p.y*p.y);var con=1.0;}else{rh1=-Math.sqrt(p.x*p.x+p.y*p.y);con=-1.0;} -var theta=0.0;if(rh1!=0.0)theta=Math.atan2(con*p.x,con*p.y);var ml=this.g-rh1/this.a;var lat=this.phi3z(this.ml,this.e0,this.e1,this.e2,this.e3);var lon=Proj4js.common.adjust_lon(this.long0+theta/this.ns);p.x=lon;p.y=lat;return p;},phi3z:function(ml,e0,e1,e2,e3){var phi;var dphi;phi=ml;for(var i=0;i<15;i++){dphi=(ml+e1*Math.sin(2.0*phi)-e2*Math.sin(4.0*phi)+e3*Math.sin(6.0*phi))/e0-phi;phi+=dphi;if(Math.abs(dphi)<=.0000000001){return phi;}} -Proj4js.reportError("PHI3Z-CONV:Latitude failed to converge after 15 iterations");return null;}};function phi4z(eccent,e0,e1,e2,e3,a,b,c,phi){var sinphi,sin2ph,tanph,ml,mlp,con1,con2,con3,dphi,i;phi=a;for(i=1;i<=15;i++){sinphi=Math.sin(phi);tanphi=Math.tan(phi);c=tanphi*Math.sqrt(1.0-eccent*sinphi*sinphi);sin2ph=Math.sin(2.0*phi);ml=e0*phi-e1*sin2ph+e2*Math.sin(4.0*phi)-e3*Math.sin(6.0*phi);mlp=e0-2.0*e1*Math.cos(2.0*phi)+4.0*e2*Math.cos(4.0*phi)-6.0*e3*Math.cos(6.0*phi);con1=2.0*ml+c*(ml*ml+b)-2.0*a*(c*ml+1.0);con2=eccent*sin2ph*(ml*ml+b-2.0*a*ml)/(2.0*c);con3=2.0*(a-ml)*(c*mlp-2.0/sin2ph)-2.0*mlp;dphi=con1/(con2+con3);phi+=dphi;if(Math.abs(dphi)<=.0000000001)return(phi);} -Proj4js.reportError("phi4z: No convergence");return null;} -function e4fn(x){var con,com;con=1.0+x;com=1.0-x;return(Math.sqrt((Math.pow(con,con))*(Math.pow(com,com))));} -Proj4js.Proj.poly={init:function(){var temp;if(this.lat0=0)this.lat0=90;this.temp=this.b/this.a;this.es=1.0-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.ml0=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0);},forward:function(p){var sinphi,cosphi;var al;var c;var con,ml;var ms;var x,y;var lon=p.x;var lat=p.y;con=Proj4js.common.adjust_lon(lon-this.long0);if(Math.abs(lat)<=.0000001){x=this.x0+this.a*con;y=this.y0-this.a*this.ml0;}else{sinphi=Math.sin(lat);cosphi=Math.cos(lat);ml=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,lat);ms=Proj4js.common.msfnz(this.e,sinphi,cosphi);con=sinphi;x=this.x0+this.a*ms*Math.sin(con)/sinphi;y=this.y0+this.a*(ml-this.ml0+ms*(1.0-Math.cos(con))/sinphi);} -p.x=x;p.y=y;return p;},inverse:function(p){var sin_phi,cos_phi;var al;var b;var c;var con,ml;var iflg;var lon,lat;p.x-=this.x0;p.y-=this.y0;al=this.ml0+p.y/this.a;iflg=0;if(Math.abs(al)<=.0000001){lon=p.x/this.a+this.long0;lat=0.0;}else{b=al*al+(p.x/this.a)*(p.x/this.a);iflg=phi4z(this.es,this.e0,this.e1,this.e2,this.e3,this.al,b,c,lat);if(iflg!=1)return(iflg);lon=Proj4js.common.adjust_lon((asinz(p.x*c/this.a)/Math.sin(lat))+this.long0);} -p.x=lon;p.y=lat;return p;}};Proj4js.defs["GOOGLE"]="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs";Proj4js.defs["EPSG:900913"]=Proj4js.defs["GOOGLE"];Proj4js.Proj.gstmerc={init:function(){var temp=this.b/this.a;this.e=Math.sqrt(1.0-temp*temp);this.lc=this.long0;this.rs=Math.sqrt(1.0+this.e*this.e*Math.pow(Math.cos(this.lat0),4.0)/(1.0-this.e*this.e));var sinz=Math.sin(this.lat0);var pc=Math.asin(sinz/this.rs);var sinzpc=Math.sin(pc);this.cp=Proj4js.common.latiso(0.0,pc,sinzpc)-this.rs*Proj4js.common.latiso(this.e,this.lat0,sinz);this.n2=this.k0*this.a*Math.sqrt(1.0-this.e*this.e)/(1.0-this.e*this.e*sinz*sinz);this.xs=this.x0;this.ys=this.y0-this.n2*pc;if(!this.title)this.title="Gauss Schreiber transverse mercator";},forward:function(p){var lon=p.x;var lat=p.y;var L=this.rs*(lon-this.lc);var Ls=this.cp+(this.rs*Proj4js.common.latiso(this.e,lat,Math.sin(lat)));var lat1=Math.asin(Math.sin(L)/Proj4js.common.cosh(Ls));var Ls1=Proj4js.common.latiso(0.0,lat1,Math.sin(lat1));p.x=this.xs+(this.n2*Ls1);p.y=this.ys+(this.n2*Math.atan(Proj4js.common.sinh(Ls)/Math.cos(L)));return p;},inverse:function(p){var x=p.x;var y=p.y;var L=Math.atan(Proj4js.common.sinh((x-this.xs)/this.n2)/Math.cos((y-this.ys)/this.n2));var lat1=Math.asin(Math.sin((y-this.ys)/this.n2)/Proj4js.common.cosh((x-this.xs)/this.n2));var LC=Proj4js.common.latiso(0.0,lat1,Math.sin(lat1));p.x=this.lc+L/this.rs;p.y=Proj4js.common.invlatiso(this.e,(LC-this.cp)/this.rs);return p;}};Proj4js.Proj.ortho={init:function(def){;this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0);},forward:function(p){var sinphi,cosphi;var dlon;var coslon;var ksp;var g;var lon=p.x;var lat=p.y;dlon=Proj4js.common.adjust_lon(lon-this.long0);sinphi=Math.sin(lat);cosphi=Math.cos(lat);coslon=Math.cos(dlon);g=this.sin_p14*sinphi+this.cos_p14*cosphi*coslon;ksp=1.0;if((g>0)||(Math.abs(g)<=Proj4js.common.EPSLN)){var x=this.a*ksp*cosphi*Math.sin(dlon);var y=this.y0+this.a*ksp*(this.cos_p14*sinphi-this.sin_p14*cosphi*coslon);}else{Proj4js.reportError("orthoFwdPointError");} -p.x=x;p.y=y;return p;},inverse:function(p){var rh;var z;var sinz,cosz;var temp;var con;var lon,lat;p.x-=this.x0;p.y-=this.y0;rh=Math.sqrt(p.x*p.x+p.y*p.y);if(rh>this.a+.0000001){Proj4js.reportError("orthoInvDataError");} -z=Proj4js.common.asinz(rh/this.a);sinz=Math.sin(z);cosi=Math.cos(z);lon=this.long0;if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=this.lat0;} -lat=Proj4js.common.asinz(cosz*this.sin_p14+(y*sinz*this.cos_p14)/rh);con=Math.abs(lat0)-Proj4js.common.HALF_PI;if(Math.abs(con)<=Proj4js.common.EPSLN){if(this.lat0>=0){lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x,-p.y));}else{lon=Proj4js.common.adjust_lon(this.long0-Math.atan2(-p.x,p.y));}} -con=cosz-this.sin_p14*Math.sin(lat);if((Math.abs(con)>=Proj4js.common.EPSLN)||(Math.abs(x)>=Proj4js.common.EPSLN)){lon=Proj4js.common.adjust_lon(this.long0+Math.atan2((p.x*sinz*this.cos_p14),(con*rh)));} -p.x=lon;p.y=lat;return p;}};Proj4js.Proj.somerc={init:function(){var phy0=this.lat0;this.lambda0=this.long0;var sinPhy0=Math.sin(phy0);var semiMajorAxis=this.a;var invF=this.rf;var flattening=1/invF;var e2=2*flattening-Math.pow(flattening,2);var e=this.e=Math.sqrt(e2);this.R=semiMajorAxis*Math.sqrt(1-e2)/(1-e2*Math.pow(sinPhy0,2.0));this.alpha=Math.sqrt(1+e2/(1-e2)*Math.pow(Math.cos(phy0),4.0));this.b0=Math.asin(sinPhy0/this.alpha);this.K=Math.log(Math.tan(Math.PI/4.0+this.b0/2.0)) --this.alpha*Math.log(Math.tan(Math.PI/4.0+phy0/2.0)) -+this.alpha*e/2*Math.log((1+e*sinPhy0)/(1-e*sinPhy0));},forward:function(p){var Sa1=Math.log(Math.tan(Math.PI/4.0-p.y/2.0));var Sa2=this.e/2.0*Math.log((1+this.e*Math.sin(p.y))/(1-this.e*Math.sin(p.y)));var S=-this.alpha*(Sa1+Sa2)+this.K;var b=2.0*(Math.atan(Math.exp(S))-Math.PI/4.0);var I=this.alpha*(p.x-this.lambda0);var rotI=Math.atan(Math.sin(I)/(Math.sin(this.b0)*Math.tan(b)+ -Math.cos(this.b0)*Math.cos(I)));var rotB=Math.asin(Math.cos(this.b0)*Math.sin(b)- -Math.sin(this.b0)*Math.cos(b)*Math.cos(I));p.y=this.R/2.0*Math.log((1+Math.sin(rotB))/(1-Math.sin(rotB))) -+this.y0;p.x=this.R*rotI+this.x0;return p;},inverse:function(p){var Y=p.x-this.x0;var X=p.y-this.y0;var rotI=Y/this.R;var rotB=2*(Math.atan(Math.exp(X/this.R))-Math.PI/4.0);var b=Math.asin(Math.cos(this.b0)*Math.sin(rotB) -+Math.sin(this.b0)*Math.cos(rotB)*Math.cos(rotI));var I=Math.atan(Math.sin(rotI)/(Math.cos(this.b0)*Math.cos(rotI)-Math.sin(this.b0)*Math.tan(rotB)));var lambda=this.lambda0+I/this.alpha;var S=0.0;var phy=b;var prevPhy=-1000.0;var iteration=0;while(Math.abs(phy-prevPhy)>0.0000001) -{if(++iteration>20) -{Proj4js.reportError("omercFwdInfinity");return;} -S=1.0/this.alpha*(Math.log(Math.tan(Math.PI/4.0+b/2.0))-this.K) -+this.e*Math.log(Math.tan(Math.PI/4.0 -+Math.asin(this.e*Math.sin(phy))/2.0));prevPhy=phy;phy=2.0*Math.atan(Math.exp(S))-Math.PI/2.0;} -p.x=lambda;p.y=phy;return p;}};Proj4js.Proj.stere={ssfn_:function(phit,sinphi,eccen){sinphi*=eccen;return(Math.tan(.5*(Proj4js.common.HALF_PI+phit))*Math.pow((1.-sinphi)/(1.+sinphi),.5*eccen));},TOL:1.e-8,NITER:8,CONV:1.e-10,S_POLE:0,N_POLE:1,OBLIQ:2,EQUIT:3,init:function(){this.phits=this.lat_ts?this.lat_ts:Proj4js.common.HALF_PI;var t=Math.abs(this.lat0);if((Math.abs(t)-Proj4js.common.HALF_PI)Proj4js.common.EPSLN?this.OBLIQ:this.EQUIT;} -this.phits=Math.abs(this.phits);if(this.es){var X;switch(this.mode){case this.N_POLE:case this.S_POLE:if(Math.abs(this.phits-Proj4js.common.HALF_PI)=Proj4js.common.EPSLN?Math.cos(this.phits)/Math.tan(Proj4js.common.FORTPI-.5*this.phits):2.*this.k0;break;}}},forward:function(p){var lon=p.x;var lat=p.y;var x,y -if(this.sphere){var sinphi,cosphi,coslam,sinlam;sinphi=Math.sin(lat);cosphi=Math.cos(lat);coslam=Math.cos(lon);sinlam=Math.sin(lon);switch(this.mode){case this.EQUIT:y=1.+cosphi*coslam;if(y<=Proj4js.common.EPSLN){F_ERROR;} -y=this.akm1/y;x=y*cosphi*sinlam;y*=sinphi;break;case this.OBLIQ:y=1.+this.sinph0*sinphi+this.cosph0*cosphi*coslam;if(y<=Proj4js.common.EPSLN){F_ERROR;} -y=this.akm1/y;x=y*cosphi*sinlam;y*=this.cosph0*sinphi-this.sinph0*cosphi*coslam;break;case this.N_POLE:coslam=-coslam;lat=-lat;case this.S_POLE:if(Math.abs(lat-Proj4js.common.HALF_PI)-1.001*HALF_PI) -Latitude=-HALF_PI;else if(Latitude>HALF_PI&&Latitude<1.001*HALF_PI) -Latitude=HALF_PI;else if((Latitude<-HALF_PI)||(Latitude>HALF_PI)) -{Error_Code|=GEOCENT_LAT_ERROR;} -if(!Error_Code) -{if(Longitude>PI) -Longitude-=(2*PI);Sin_Lat=Math.sin(Latitude);Cos_Lat=Math.cos(Latitude);Sin2_Lat=Sin_Lat*Sin_Lat;Rn=cs.a/(Math.sqrt(1.0e0-cs.es*Sin2_Lat));X=(Rn+Height)*Cos_Lat*Math.cos(Longitude);Y=(Rn+Height)*Cos_Lat*Math.sin(Longitude);Z=((Rn*(1-cs.es))+Height)*Sin_Lat;} -p.x=X;p.y=Y;p.z=Z;return Error_Code;} -function cs_geocentric_to_geodetic(cs,p){var X=p.x;var Y=p.y;var Z=p.z;var Longitude;var Latitude;var Height;var W;var W2;var T0;var T1;var S0;var S1;var Sin_B0;var Sin3_B0;var Cos_B0;var Sin_p1;var Cos_p1;var Rn;var Sum;var At_Pole;X=parseFloat(X);Y=parseFloat(Y);Z=parseFloat(Z);At_Pole=false;if(X!=0.0) -{Longitude=Math.atan2(Y,X);} -else -{if(Y>0) -{Longitude=HALF_PI;} -else if(Y<0) -{Longitude=-HALF_PI;} -else -{At_Pole=true;Longitude=0.0;if(Z>0.0) -{Latitude=HALF_PI;} -else if(Z<0.0) -{Latitude=-HALF_PI;} -else -{Latitude=HALF_PI;Height=-cs.b;return;}}} -W2=X*X+Y*Y;W=Math.sqrt(W2);T0=Z*AD_C;S0=Math.sqrt(T0*T0+W2);Sin_B0=T0/S0;Cos_B0=W/S0;Sin3_B0=Sin_B0*Sin_B0*Sin_B0;T1=Z+cs.b*cs.ep2*Sin3_B0;Sum=W-cs.a*cs.es*Cos_B0*Cos_B0*Cos_B0;S1=Math.sqrt(T1*T1+Sum*Sum);Sin_p1=T1/S1;Cos_p1=Sum/S1;Rn=cs.a/Math.sqrt(1.0-cs.es*Sin_p1*Sin_p1);if(Cos_p1>=COS_67P5) -{Height=W/Cos_p1-Rn;} -else if(Cos_p1<=-COS_67P5) -{Height=W/-Cos_p1-Rn;} -else -{Height=Z/Sin_p1+Rn*(cs.es-1.0);} -if(At_Pole==false) -{Latitude=Math.atan(Sin_p1/Cos_p1);} -p.x=Longitude;p.y=Latitude;p.z=Height;return 0;} -function cs_geocentric_to_wgs84(defn,p){if(defn.datum_type==PJD_3PARAM) -{p.x+=defn.datum_params[0];p.y+=defn.datum_params[1];p.z+=defn.datum_params[2];} -else -{var Dx_BF=defn.datum_params[0];var Dy_BF=defn.datum_params[1];var Dz_BF=defn.datum_params[2];var Rx_BF=defn.datum_params[3];var Ry_BF=defn.datum_params[4];var Rz_BF=defn.datum_params[5];var M_BF=defn.datum_params[6];var x_out=M_BF*(p.x-Rz_BF*p.y+Ry_BF*p.z)+Dx_BF;var y_out=M_BF*(Rz_BF*p.x+p.y-Rx_BF*p.z)+Dy_BF;var z_out=M_BF*(-Ry_BF*p.x+Rx_BF*p.y+p.z)+Dz_BF;p.x=x_out;p.y=y_out;p.z=z_out;}} -function cs_geocentric_from_wgs84(defn,p){if(defn.datum_type==PJD_3PARAM) -{p.x-=defn.datum_params[0];p.y-=defn.datum_params[1];p.z-=defn.datum_params[2];} -else -{var Dx_BF=defn.datum_params[0];var Dy_BF=defn.datum_params[1];var Dz_BF=defn.datum_params[2];var Rx_BF=defn.datum_params[3];var Ry_BF=defn.datum_params[4];var Rz_BF=defn.datum_params[5];var M_BF=defn.datum_params[6];var x_tmp=(p.x-Dx_BF)/M_BF;var y_tmp=(p.y-Dy_BF)/M_BF;var z_tmp=(p.z-Dz_BF)/M_BF;p.x=x_tmp+Rz_BF*y_tmp-Ry_BF*z_tmp;p.y=-Rz_BF*x_tmp+y_tmp+Rx_BF*z_tmp;p.z=Ry_BF*x_tmp-Rx_BF*y_tmp+z_tmp;}} -Proj4js.Proj.vandg={init:function(){this.R=6370997.0;},forward:function(p){var lon=p.x;var lat=p.y;var dlon=Proj4js.common.adjust_lon(lon-this.long0);var x,y;if(Math.abs(lat)<=Proj4js.common.EPSLN){x=this.x0+this.R*dlon;y=this.y0;} -var theta=Proj4js.common.asinz(2.0*Math.abs(lat/Proj4js.common.PI));if((Math.abs(dlon)<=Proj4js.common.EPSLN)||(Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN)){x=this.x0;if(lat>=0){y=this.y0+Proj4js.common.PI*this.R*Math.tan(.5*theta);}else{y=this.y0+Proj4js.common.PI*this.R*-Math.tan(.5*theta);}} -var al=.5*Math.abs((Proj4js.common.PI/dlon)-(dlon/Proj4js.common.PI));var asq=al*al;var sinth=Math.sin(theta);var costh=Math.cos(theta);var g=costh/(sinth+costh-1.0);var gsq=g*g;var m=g*(2.0/sinth-1.0);var msq=m*m;var con=Proj4js.common.PI*this.R*(al*(g-msq)+Math.sqrt(asq*(g-msq)*(g-msq)-(msq+asq)*(gsq-msq)))/(msq+asq);if(dlon<0){con=-con;} -x=this.x0+con;con=Math.abs(con/(Proj4js.common.PI*this.R));if(lat>=0){y=this.y0+Proj4js.common.PI*this.R*Math.sqrt(1.0-con*con-2.0*al*con);}else{y=this.y0-Proj4js.common.PI*this.R*Math.sqrt(1.0-con*con-2.0*al*con);} -p.x=x;p.y=y;return p;},inverse:function(p){var dlon;var xx,yy,xys,c1,c2,c3;var al,asq;var a1;var m1;var con;var th1;var d;p.x-=this.x0;p.y-=this.y0;con=Proj4js.common.PI*this.R;xx=p.x/con;yy=p.y/con;xys=xx*xx+yy*yy;c1=-Math.abs(yy)*(1.0+xys);c2=c1-2.0*yy*yy+xx*xx;c3=-2.0*c1+1.0+2.0*yy*yy+xys*xys;d=yy*yy/c3+(2.0*c2*c2*c2/c3/c3/c3-9.0*c1*c2/c3/c3)/27.0;a1=(c1-c2*c2/3.0/c3)/c3;m1=2.0*Math.sqrt(-a1/3.0);con=((3.0*d)/a1)/m1;if(Math.abs(con)>1.0){if(con>=0.0){con=1.0;}else{con=-1.0;}} -th1=Math.acos(con)/3.0;if(p.y>=0){lat=(-m1*Math.cos(th1+Proj4js.common.PI/3.0)-c2/3.0/c3)*Proj4js.common.PI;}else{lat=-(-m1*Math.cos(th1+PI/3.0)-c2/3.0/c3)*Proj4js.common.PI;} -if(Math.abs(xx)0;--i){lat=2.0*Math.atan(num*Proj4js.common.srat(this.e*Math.sin(p.y),-0.5*this.e))-Proj4js.common.HALF_PI;if(Math.abs(lat-p.y)0.0){if(this.lat0>=0.0){this.f=this.d+Math.sqrt(this.d*this.d-1.0);}else{this.f=this.d-Math.sqrt(this.d*this.d-1.0);}}else{this.f=this.d;} -this.el=this.f*Math.pow(this.ts,this.bl);} -if(this.mode!=0){this.g=.5*(this.f-1.0/this.f);this.gama=Proj4js.common.asinz(Math.sin(this.alpha)/this.d);this.longc=this.longc-Proj4js.common.asinz(this.g*Math.tan(this.gama))/this.bl;this.con=Math.abs(this.lat0);if((this.con>Proj4js.common.EPSLN)&&(Math.abs(this.con-Proj4js.common.HALF_PI)>Proj4js.common.EPSLN)){this.singam=Math.sin(this.gama);this.cosgam=Math.cos(this.gama);this.sinaz=Math.sin(this.alpha);this.cosaz=Math.cos(this.alpha);if(this.lat0>=0){this.u=(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1.0)/this.cosaz);}else{this.u=-(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1.0)/this.cosaz);}}else{Proj4js.reportError("omerc:Init:DataError");}}else{this.sinphi=Math.sin(this.at1);this.ts1=Proj4js.common.tsfnz(this.e,this.lat1,this.sinphi);this.sinphi=Math.sin(this.lat2);this.ts2=Proj4js.common.tsfnz(this.e,this.lat2,this.sinphi);this.h=Math.pow(this.ts1,this.bl);this.l=Math.pow(this.ts2,this.bl);this.f=this.el/this.h;this.g=.5*(this.f-1.0/this.f);this.j=(this.el*this.el-this.l*this.h)/(this.el*this.el+this.l*this.h);this.p=(this.l-this.h)/(this.l+this.h);this.dlon=this.lon1-this.lon2;if(this.dlon<-Proj4js.common.PI)this.lon2=this.lon2-2.0*Proj4js.common.PI;if(this.dlon>Proj4js.common.PI)this.lon2=this.lon2+2.0*Proj4js.common.PI;this.dlon=this.lon1-this.lon2;this.longc=.5*(this.lon1+this.lon2)-Math.atan(this.j*Math.tan(.5*this.bl*this.dlon)/this.p)/this.bl;this.dlon=Proj4js.common.adjust_lon(this.lon1-this.longc);this.gama=Math.atan(Math.sin(this.bl*this.dlon)/this.g);this.alpha=Proj4js.common.asinz(this.d*Math.sin(this.gama));if(Math.abs(this.lat1-this.lat2)<=Proj4js.common.EPSLN){Proj4js.reportError("omercInitDataError");}else{this.con=Math.abs(this.lat1);} -if((this.con<=Proj4js.common.EPSLN)||(Math.abs(this.con-HALF_PI)<=Proj4js.common.EPSLN)){Proj4js.reportError("omercInitDataError");}else{if(Math.abs(Math.abs(this.lat0)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN){Proj4js.reportError("omercInitDataError");}} -this.singam=Math.sin(this.gam);this.cosgam=Math.cos(this.gam);this.sinaz=Math.sin(this.alpha);this.cosaz=Math.cos(this.alpha);if(this.lat0>=0){this.u=(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1.0)/this.cosaz);}else{this.u=-(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1.0)/this.cosaz);}}},forward:function(p){var theta;var sin_phi,cos_phi;var b;var c,t,tq;var con,n,ml;var q,us,vl;var ul,vs;var s;var dlon;var ts1;var lon=p.x;var lat=p.y;sin_phi=Math.sin(lat);dlon=Proj4js.common.adjust_lon(lon-this.longc);vl=Math.sin(this.bl*dlon);if(Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI)>Proj4js.common.EPSLN){ts1=Proj4js.common.tsfnz(this.e,lat,sin_phi);q=this.el/(Math.pow(ts1,this.bl));s=.5*(q-1.0/q);t=.5*(q+1.0/q);ul=(s*this.singam-vl*this.cosgam)/t;con=Math.cos(this.bl*dlon);if(Math.abs(con)<.0000001){us=this.al*this.bl*dlon;}else{us=this.al*Math.atan((s*this.cosgam+vl*this.singam)/con)/this.bl;if(con<0)us=us+Proj4js.common.PI*this.al/this.bl;}}else{if(lat>=0){ul=this.singam;}else{ul=-this.singam;} -us=this.al*lat/this.bl;} -if(Math.abs(Math.abs(ul)-1.0)<=Proj4js.common.EPSLN){Proj4js.reportError("omercFwdInfinity");} -vs=.5*this.al*Math.log((1.0-ul)/(1.0+ul))/this.bl;us=us-this.u;var x=this.x0+vs*this.cosaz+us*this.sinaz;var y=this.y0+us*this.cosaz-vs*this.sinaz;p.x=x;p.y=y;return p;},inverse:function(p){var delta_lon;var theta;var delta_theta;var sin_phi,cos_phi;var b;var c,t,tq;var con,n,ml;var vs,us,q,s,ts1;var vl,ul,bs;var dlon;var flag;p.x-=this.x0;p.y-=this.y0;flag=0;vs=p.x*this.cosaz-p.y*this.sinaz;us=p.y*this.cosaz+p.x*this.sinaz;us=us+this.u;q=Math.exp(-this.bl*vs/this.al);s=.5*(q-1.0/q);t=.5*(q+1.0/q);vl=Math.sin(this.bl*us/this.al);ul=(vl*this.cosgam+s*this.singam)/t;if(Math.abs(Math.abs(ul)-1.0)<=Proj4js.common.EPSLN) -{lon=this.longc;if(ul>=0.0){lat=Proj4js.common.HALF_PI;}else{lat=-Proj4js.common.HALF_PI;}}else{con=1.0/this.bl;ts1=Math.pow((this.el/Math.sqrt((1.0+ul)/(1.0-ul))),con);lat=Proj4js.common.phi2z(this.e,ts1);theta=this.longc-Math.atan2((s*this.cosgam-vl*this.singam),con)/this.bl;lon=Proj4js.common.adjust_lon(theta);} -p.x=lon;p.y=lat;return p;}};Proj4js.Proj.lcc={init:function(){if(!this.lat2){this.lat2=this.lat0;} -if(!this.k0)this.k0=1.0;if(Math.abs(this.lat1+this.lat2)Proj4js.common.EPSLN){this.ns=Math.log(ms1/ms2)/Math.log(ts1/ts2);}else{this.ns=sin1;} -this.f0=ms1/(this.ns*Math.pow(ts1,this.ns));this.rh=this.a*this.f0*Math.pow(ts0,this.ns);if(!this.title)this.title="Lambert Conformal Conic";},forward:function(p){var lon=p.x;var lat=p.y;if(lat<=90.0&&lat>=-90.0&&lon<=180.0&&lon>=-180.0){}else{Proj4js.reportError("lcc:forward: llInputOutOfRange: "+lon+" : "+lat);return null;} -var con=Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI);var ts;if(con>Proj4js.common.EPSLN){ts=Proj4js.common.tsfnz(this.e,lat,Math.sin(lat));rh1=this.a*this.f0*Math.pow(ts,this.ns);}else{con=lat*this.ns;if(con<=0){Proj4js.reportError("lcc:forward: No Projection");return null;} -rh1=0;} -var theta=this.ns*Proj4js.common.adjust_lon(lon-this.long0);p.x=this.k0*(rh1*Math.sin(theta))+this.x0;p.y=this.k0*(this.rh-rh1*Math.cos(theta))+this.y0;return p;},inverse:function(p){var rh1,con,ts;var lat,lon;x=(p.x-this.x0)/this.k0;y=(this.rh-(p.y-this.y0)/this.k0);if(this.ns>0){rh1=Math.sqrt(x*x+y*y);con=1.0;}else{rh1=-Math.sqrt(x*x+y*y);con=-1.0;} -var theta=0.0;if(rh1!=0){theta=Math.atan2((con*x),(con*y));} -if((rh1!=0)||(this.ns>0.0)){con=1.0/this.ns;ts=Math.pow((rh1/(this.a*this.f0)),con);lat=Proj4js.common.phi2z(this.e,ts);if(lat==-9999)return null;}else{lat=-Proj4js.common.HALF_PI;} -lon=Proj4js.common.adjust_lon(theta/this.ns+this.long0);p.x=lon;p.y=lat;return p;}};Proj4js.Proj.laea={init:function(){this.sin_lat_o=Math.sin(this.lat0);this.cos_lat_o=Math.cos(this.lat0);},forward:function(p){var lon=p.x;var lat=p.y;var delta_lon=Proj4js.common.adjust_lon(lon-this.long0);var sin_lat=Math.sin(lat);var cos_lat=Math.cos(lat);var sin_delta_lon=Math.sin(delta_lon);var cos_delta_lon=Math.cos(delta_lon);var g=this.sin_lat_o*sin_lat+this.cos_lat_o*cos_lat*cos_delta_lon;if(g==-1.0){Proj4js.reportError("laea:fwd:Point projects to a circle of radius "+2.0*R);return null;} -var ksp=this.a*Math.sqrt(2.0/(1.0+g));var x=ksp*cos_lat*sin_delta_lon+this.x0;var y=ksp*(this.cos_lat_o*sin_lat-this.sin_lat_o*cos_lat*cos_delta_lon)+this.y0;p.x=x;p.y=y -return p;},inverse:function(p){p.x-=this.x0;p.y-=this.y0;var Rh=Math.sqrt(p.x*p.x+p.y*p.y);var temp=Rh/(2.0*this.a);if(temp>1){Proj4js.reportError("laea:Inv:DataError");return null;} -var z=2.0*Proj4js.common.asinz(temp);var sin_z=Math.sin(z);var cos_z=Math.cos(z);var lon=this.long0;if(Math.abs(Rh)>Proj4js.common.EPSLN){var lat=Proj4js.common.asinz(this.sin_lat_o*cos_z+this.cos_lat_o*sin_z*p.y/Rh);var temp=Math.abs(this.lat0)-Proj4js.common.HALF_PI;if(Math.abs(temp)>Proj4js.common.EPSLN){temp=cos_z-this.sin_lat_o*Math.sin(lat);if(temp!=0.0)lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x*sin_z*this.cos_lat_o,temp*Rh));}else if(this.lat0<0.0){lon=Proj4js.common.adjust_lon(this.long0-Math.atan2(-p.x,p.y));}else{lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x,-p.y));}}else{lat=this.lat0;} -p.x=lon;p.y=lat;return p;}};Proj4js.Proj.aeqd={init:function(){this.sin_p12=Math.sin(this.lat0) -this.cos_p12=Math.cos(this.lat0)},forward:function(p){var lon=p.x;var lat=p.y;var ksp;var sinphi=Math.sin(p.y);var cosphi=Math.cos(p.y);var dlon=Proj4js.common.adjust_lon(lon-this.long0);var coslon=Math.cos(dlon);var g=this.sin_p12*sinphi+this.cos_p12*cosphi*coslon;if(Math.abs(Math.abs(g)-1.0)(2.0*Proj4js.common.HALF_PI*this.a)){Proj4js.reportError("aeqdInvDataError");return;} -var z=rh/this.a;var sinz=Math.sin(z) -var cosz=Math.cos(z) -var lon=this.long0;var lat;if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=this.lat0;}else{lat=Proj4js.common.asinz(cosz*this.sin_p12+(p.y*sinz*this.cos_p12)/rh);var con=Math.abs(this.lat0)-Proj4js.common.HALF_PI;if(Math.abs(con)<=Proj4js.common.EPSLN){if(lat0>=0.0){lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x,-p.y));}else{lon=Proj4js.common.adjust_lon(this.long0-Math.atan2(-p.x,p.y));}}else{con=cosz-this.sin_p12*Math.sin(lat);if((Math.abs(con)=50){Proj4js.reportError("moll:Fwd:IterationError");}} -theta/=2.0;if(Proj4js.common.PI/2-Math.abs(lat)0.999999999999)arg=0.999999999999;var theta=Math.asin(arg);var lon=Proj4js.common.adjust_lon(this.long0+(p.x/(0.900316316158*this.a*Math.cos(theta))));if(lon<(-Proj4js.common.PI))lon=-Proj4js.common.PI;if(lon>Proj4js.common.PI)lon=Proj4js.common.PI;arg=(2.0*theta+Math.sin(2.0*theta))/Proj4js.common.PI;if(Math.abs(arg)>1.0)arg=1.0;var lat=Math.asin(arg);p.x=lon;p.y=lat;return p;}}; \ No newline at end of file diff --git a/web-client/src/main/resources/apps/search/help_eng.html b/web-client/src/main/resources/apps/search/help_eng.html deleted file mode 100644 index 8a4442a4aa4..00000000000 --- a/web-client/src/main/resources/apps/search/help_eng.html +++ /dev/null @@ -1,45 +0,0 @@ -

      -

      - - - - - -
      -

      More information

      -
      - Close -
      -
      -

      Documentation

      - GeoNetwork documentation is available here. - -

      Keyboard shortcuts

      -

      Application parameters

      - - - - - - - - - - - - - -
      - uuid={uuid} - - Popup the metadata with this uuid (eg search/?uuid=ed3263bc-8d0f-4047-9495-8120464b5121). -
      - mode={0|1} - - Display the map panel by default if mode set to "1" (eg. search/?mode=1). -
      - edit={id} - - Open the editor for the metadata identified by "id" according to user privileges. -
      -

      diff --git a/web-client/src/main/resources/apps/search/help_fre.html b/web-client/src/main/resources/apps/search/help_fre.html deleted file mode 100644 index 89a129cf68e..00000000000 --- a/web-client/src/main/resources/apps/search/help_fre.html +++ /dev/null @@ -1,44 +0,0 @@ -

      -

      - - - - - -
      -

      Plus d'information

      -
      - Fermer -
      -
      -

      Documentation

      - Consulter la documentation ici. -

      Raccourcis clavier

      -

      Permaliens

      - - - - - - - - - - - - - -
      - uuid={uuid} - - Affiche la métadonnée avec l'identifiant indiqué en mode consultation (eg search/?uuid=ed3263bc-8d0f-4047-9495-8120464b5121). -
      - mode={0|1} - - Active le mode cartographique au lancement (eg. search/?mode=1). -
      - edit={id} - - Affiche la métadonnée en mode édition (fonction des privilèges de l'utilisateur). -
      -

      diff --git a/web-client/src/main/resources/apps/search/home_eng.html b/web-client/src/main/resources/apps/search/home_eng.html deleted file mode 100644 index 7368cd16260..00000000000 --- a/web-client/src/main/resources/apps/search/home_eng.html +++ /dev/null @@ -1,42 +0,0 @@ -

      Find Interactive Maps, GIS datasets, Satellite Imagery and Related Applications

      -
      -

      - GeoNetwork's purpose is: -

        -
      • - To improve access to and integrated use of spatial data and information -
      • -
      • - To support decision making -
      • -
      • - To promote multidisciplinary approaches to sustainable development -
      • -
      • - To enhance understanding of the benefits of geographic information -
      • -
      -
      - Access this catalogue using the following services: - -
      - GeoNetwork opensource allows to easily share geographically referenced thematic information between different organizations. For more information please contact -

      -
      -
      -

      Quick links

      -
      -
      -
      -
      -

      Latest news

      -
      -
      -
      - - diff --git a/web-client/src/main/resources/apps/search/home_fre.html b/web-client/src/main/resources/apps/search/home_fre.html deleted file mode 100644 index a4a442a68ae..00000000000 --- a/web-client/src/main/resources/apps/search/home_fre.html +++ /dev/null @@ -1,51 +0,0 @@ -

      GeoNetwork pour trouver des cartes interactives, des jeux de données, des cartes, des images satellites ...

      -
      -

      -

        -
      • - Améliore l'accès et l'usage des informations et données spatiales -
      • -
      • - Aide les processus de prise de décision -
      • -
      • - Favorise l'approche multidisciplinaire nécessaire au développement durable -
      • -
      • - Améliore la compréhension des apports de l'information géographique -
      • -
      - -
      - Vous pouvez accéder à ce catalogue en utilisant les services : - -
      - GeoNetwork opensource permet de partager des informations géographiques thématiques entre organisations. - Si vous rencontrez des difficultés, - vous pouvez consulter - la documentation, - le wiki - ou - la liste de diffusion. -
      -

      -
      -
      -

      Liens rapides

      -
      -
      -
      -
      -

      Nouveautés

      -
      -
      -
      - diff --git a/web-client/src/main/resources/apps/search/index.html b/web-client/src/main/resources/apps/search/index.html deleted file mode 100644 index a07f52965e3..00000000000 --- a/web-client/src/main/resources/apps/search/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - -

      JavaScript warning

      -

      To use GeoNetwork you need to enable JavaScript in your browser

      - - diff --git a/web-client/src/main/resources/apps/search/index_debug.html b/web-client/src/main/resources/apps/search/index_debug.html deleted file mode 100644 index fd404c6ae2e..00000000000 --- a/web-client/src/main/resources/apps/search/index_debug.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - -
      -
      -
      Loading ...
      -
      - - -
      - -
      -
      -
      -
      - - -
      - -
      -
      - -
      - - - - - - - - - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/search/js/App.js b/web-client/src/main/resources/apps/search/js/App.js deleted file mode 100644 index 6437bdd120c..00000000000 --- a/web-client/src/main/resources/apps/search/js/App.js +++ /dev/null @@ -1,1008 +0,0 @@ -Ext.namespace('GeoNetwork'); - -var catalogue; -var app; -var cookie; - -var nodeInfo = /([a-zA-Z0-9_\-]+)\/([a-z]{3})\/find/ - .exec(window.location.href); -var catalogueLang = nodeInfo[2] || GeoNetwork.Util.defaultLocale; -var catalogueNode = nodeInfo[1] || 'srv'; - -GeoNetwork.app = function () { - // private vars: - var geonetworkUrl; - var searching = false; - var editorWindow; - var editorPanel; - - /** - * Application parameters are : - * - * * any search form ids (eg. any) - * * mode=1 for visualization - * * advanced: to open advanced search form by default - * * search: to trigger the search - * * uuid: to display a metadata record based on its uuid - * * extent: to set custom map extent - */ - var urlParameters = {}; - - /** - * Catalogue manager - */ - var catalogue; - - /** - * An interactive map panel for data visualization - */ - var iMap, searchForm, facetsPanel, resultsPanel, metadataResultsView, tBar, bBar, - mainTagCloudViewPanel, infoPanel, latestView, - visualizationModeInitialized = false; - - // private function: - /** - * Create a radio button switch in order to change perspective from a search - * mode to a map visualization mode. - */ - function createModeSwitcher() { - var ms = { - xtype: 'radiogroup', - id: 'ms', - hidden: !GeoNetwork.MapModule, - items: [{ - name: 'mode', - ctCls: 'mn-main', - boxLabel: OpenLayers.i18n('discovery'), - id: 'discoveryMode', - width: 110, - inputValue: 0, - checked: true - }, { - name: 'mode', - ctCls: 'mn-main', - width: 140, - boxLabel: OpenLayers.i18n('visualization'), - id: 'visualizationMode', - inputValue: 1 - }], - listeners: { - change: function (rg, checked) { - app.switchMode(checked.getGroupValue(), false); - /* TODO : update viewport */ - } - } - }; - - return new Ext.form.FormPanel({ - renderTo: 'mode-form', - border: false, - layout: 'hbox', - items: ms - }); - } - - - function initMap() { - iMap = new GeoNetwork.mapApp(); - var layers={}, options={}; - if(GeoNetwork.map.CONTEXT || GeoNetwork.map.OWS) { - options = GeoNetwork.map.CONTEXT_MAIN_MAP_OPTIONS; - } else { - options = GeoNetwork.map.MAIN_MAP_OPTIONS; - layers = GeoNetwork.map.BACKGROUND_LAYERS; - } - iMap.init(layers, options); - metadataResultsView.addMap(iMap.getMap()); - visualizationModeInitialized = true; - } - - - /** - * Create a language switcher mode - * - * @return - */ - function createLanguageSwitcher(lang) { - return new Ext.form.FormPanel({ - renderTo: 'lang-form', - width: 95, - border: false, - layout: 'hbox', - hidden: GeoNetwork.Util.locales.length === 1 ? true : false, - items: [new Ext.form.ComboBox({ - mode: 'local', - triggerAction: 'all', - width: 95, - store: new Ext.data.ArrayStore({ - idIndex: 2, - fields: ['id', 'name', 'id2'], - data: GeoNetwork.Util.locales - }), - valueField: 'id2', - displayField: 'name', - value: lang, - listeners: { - select: function (cb, record, idx) { - window.location.replace('?hl=' + cb.getValue()); - } - } - })] - }); - } - - - /** - * Create a default login form and register extra events in case of error. - * - * @return - */ - function createLoginForm() { - var loginForm = new GeoNetwork.LoginForm({ - renderTo: 'login-form', - catalogue: catalogue, - layout: 'hbox', - searchForm: Ext.getCmp('searchForm'), - withUserMenu: true, - hideLoginLabels: GeoNetwork.hideLoginLabels - }); - - catalogue.on('afterBadLogin', loginAlert, this); - - // Store user info in cookie to be displayed if user reload the page - // Register events to set cookie values - catalogue.on('afterLogin', function () { - cookie.set('user', catalogue.identifiedUser); - loadNews(); - }); - catalogue.on('afterLogout', function () { - cookie.set('user', undefined); - loadNews(); - }); - - // Refresh login form if needed - var user = cookie.get('user'); - if (user) { - catalogue.identifiedUser = user; - loginForm.login(catalogue, true); - } - } - - - /** - * Error message in case of bad login - * - * @param cat - * @param user - * @return - */ - function loginAlert(cat, user) { - Ext.Msg.show({ - title: 'Login', - msg: 'Login failed. Check your username and password.', - /* TODO : Get more info about the error */ - icon: Ext.MessageBox.ERROR, - buttons: Ext.MessageBox.OK - }); - } - - /** - * Create a default search form with advanced mode button - * - * @return - */ - function createSearchForm() { - - // Add advanced mode criteria to simple form - start - var advancedCriteria = []; - var services = catalogue.services; -// var orgNameField = new GeoNetwork.form.OpenSearchSuggestionTextField({ -// hideLabel: false, -// minChars: 0, -// hideTrigger: false, -// url: services.opensearchSuggest, -// field: 'orgName', -// name: 'E_orgName', -// fieldLabel: OpenLayers.i18n('org') -// }); - // Multi select organisation field - var orgNameStore = new GeoNetwork.data.OpenSearchSuggestionStore({ - url: services.opensearchSuggest, - rootId: 1, - baseParams: { - field: 'orgName', - sortBy: 'ALPHA' - } - }); - var orgNameField = new Ext.ux.form.SuperBoxSelect({ - hideLabel: false, - minChars: 0, - queryParam: 'q', - hideTrigger: false, - id: 'E_orgName', - name: 'E_orgName', - store: orgNameStore, - valueField: 'value', - displayField: 'value', - valueDelimiter: ' or ', - listWidth: 'width:auto', -// tpl: tpl, - fieldLabel: OpenLayers.i18n('org') - }); - - - - - // Multi select keyword - var themekeyStore = new GeoNetwork.data.OpenSearchSuggestionStore({ - url: services.opensearchSuggest, - rootId: 1, - baseParams: { - field: 'keyword', - sortBy: 'ALPHA' - } - }); -// FIXME : could not underline current search criteria in tpl -// var tpl = '
      ' + -// '{[values.value.replace(Ext.getDom(\'E_themekey\').value, \'\' + Ext.getDom(\'E_themekey\').value + \'\')]}' + -// '
      '; - var themekeyField = new Ext.ux.form.SuperBoxSelect({ - hideLabel: false, - minChars: 0, - queryParam: 'q', - hideTrigger: false, - id: 'E_keyword', - name: 'E_keyword', - store: themekeyStore, - valueField: 'value', - displayField: 'value', - valueDelimiter: ' or ', -// tpl: tpl, - fieldLabel: OpenLayers.i18n('keyword') -// FIXME : Allow new data is not that easy -// allowAddNewData: true, -// addNewDataOnBlur: true, -// listeners: { -// newitem: function(bs,v, f){ -// var newObj = { -// value: v -// }; -// bs.addItem(newObj, true); -// } -// } - }); - - - var when = new Ext.form.FieldSet({ - title: OpenLayers.i18n('when'), - autoWidth: true, - //layout: 'row', - defaultType: 'datefield', - collapsible: true, - collapsed: true, - items: GeoNetwork.util.SearchFormTools.getWhen() - }); - - - var catalogueField = GeoNetwork.util.SearchFormTools.getCatalogueField(services.getSources, services.logoUrl, true); - var groupField = GeoNetwork.util.SearchFormTools.getGroupField(services.getGroups, true); - var metadataTypeField = GeoNetwork.util.SearchFormTools.getMetadataTypeField(true); - var categoryField = GeoNetwork.util.SearchFormTools.getCategoryField(services.getCategories, '../../apps/images/default/category/', true); - var validField = GeoNetwork.util.SearchFormTools.getValidField(true); - var spatialTypes = GeoNetwork.util.SearchFormTools.getSpatialRepresentationTypeField(null, true); - var denominatorField = GeoNetwork.util.SearchFormTools.getScaleDenominatorField(true); - var statusField = GeoNetwork.util.SearchFormTools.getStatusField(services.getStatus, true); - - advancedCriteria.push(themekeyField, orgNameField, categoryField, - when, spatialTypes, denominatorField, - catalogueField, groupField, - metadataTypeField, validField, statusField); - - // Create INSPIRE fields if enabled in administration - var inspirePanel = catalogue.getInspireInfo().enableSearchPanel === "true"; - if (inspirePanel) { - var inspire = new Ext.form.FieldSet({ - title: OpenLayers.i18n('inspireSearchOptions'), - collapsible: true, - collapsed: true, - items: GeoNetwork.util.INSPIRESearchFormTools.getINSPIREFields(catalogue.services, true) - }); - advancedCriteria.push(inspire); - } - - var adv = new Ext.form.FieldSet({ - title: OpenLayers.i18n('advancedSearchOptions'), - autoHeight: true, - collapsible: true, - collapsed: urlParameters.advanced !== undefined ? false : true, - defaultType: 'checkbox', - defaults: { - anchor: '100%' - }, - items: advancedCriteria - }); - - // Check good map options if we load map config from WMC or OWS - var mapOptions; - if(GeoNetwork.map.CONTEXT || GeoNetwork.map.OWS) { - mapOptions = GeoNetwork.map.CONTEXT_MAP_OPTIONS; - } else { - mapOptions = GeoNetwork.map.MAP_OPTIONS; - } - - - var formItems = []; - formItems.push( - new GeoNetwork.form.OpenSearchSuggestionTextField({ - hideLabel: true, - minChars: 2, - suggestionField: 'anylight', - loadingText: '...', - hideTrigger: true, - url: catalogue.services.opensearchSuggest - }), - GeoNetwork.util.SearchFormTools.getTypesFieldWithAutocompletion(catalogue.services), - GeoNetwork.util.SearchFormTools.getSimpleMap(GeoNetwork.map.BACKGROUND_LAYERS, mapOptions, - GeoNetwork.searchDefault.activeMapControlExtent, {width: 290}), - adv, - GeoNetwork.util.SearchFormTools.getOptions(catalogue.services, undefined) - ); - // Add advanced mode criteria to simple form - end - - - // Hide or show extra fields after login event - var adminFields = [groupField, metadataTypeField, validField, statusField]; - Ext.each(adminFields, function (item) { - item.setVisible(false); - }); - - catalogue.on('afterLogin', function () { - Ext.each(adminFields, function (item) { - item.setVisible(true); - }); - groupField.getStore().reload(); - }); - catalogue.on('afterLogout', function () { - Ext.each(adminFields, function (item) { - item.setVisible(false); - }); - groupField.getStore().reload(); - }); - - - return new GeoNetwork.SearchFormPanel({ - id: 'searchForm', - stateId: 's', - border: false, - searchCb: function () { - if (metadataResultsView && Ext.getCmp('geometryMap')) { - metadataResultsView.addMap(Ext.getCmp('geometryMap').map, true); - } - var any = Ext.get('E_any'); - if (any) { - if (any.getValue() === OpenLayers.i18n('fullTextSearch')) { - any.setValue(''); - } - } - - catalogue.startRecord = 1; // Reset start record - search(); - }, - padding: 5, - defaults: { - anchor: '100%' - }, - listeners: { - onreset: function (args) { - facetsPanel.reset(); - - // Remove field added by URL or quick search - this.cascade(function(cur){ - if (cur.extraCriteria) { - this.remove(cur); - } - }, this); - - if (!args.nosearch) { - this.fireEvent('search'); - } - } - }, - items: formItems - }); - } - - function search() { - searching = true; - catalogue.search('searchForm', app.loadResults, null, catalogue.startRecord, true); - } - - function initPanels() { - var infoPanel = Ext.getCmp('infoPanel'), - resultsPanel = Ext.getCmp('resultsPanel'); - if (infoPanel.isVisible()) { - infoPanel.hide(); - } - if (!resultsPanel.isVisible()) { - resultsPanel.show(); - } - - // Init map on first search to prevent error - // when user add WMS layer without initializing - // Visualization mode - if (GeoNetwork.MapModule && !visualizationModeInitialized) { - initMap(); - } - } - - /** - * Results panel layout with top, bottom bar and DataView - * - * @return - */ - function createResultsPanel(permalinkProvider) { - metadataResultsView = new GeoNetwork.MetadataResultsView({ - catalogue: catalogue, - displaySerieMembers: true, - autoScroll: true, - tpl: GeoNetwork.Templates.FULL, - featurecolor: GeoNetwork.Settings.results.featurecolor, - colormap: GeoNetwork.Settings.results.colormap, - featurecolorCSS: GeoNetwork.Settings.results.featurecolorCSS - }); - - catalogue.resultsView = metadataResultsView; - - tBar = new GeoNetwork.MetadataResultsToolbar({ - catalogue: catalogue, - searchFormCmp: Ext.getCmp('searchForm'), - sortByCmp: Ext.getCmp('E_sortBy'), - metadataResultsView: metadataResultsView, - permalinkProvider: permalinkProvider, - withPaging: true, - searchCb: search - }); - - - var resultPanel = new Ext.Panel({ - id: 'resultsPanel', - border: false, - hidden: true, - bodyCssClass: 'md-view', - autoWidth: true, - layout: 'fit', - tbar: tBar, - items: metadataResultsView - }); - return resultPanel; - } - /** - * Main tagcloud displayed in the information panel - * - * @return - */ - function createMainTagCloud() { - var tagCloudView = new GeoNetwork.TagCloudView({ - catalogue: catalogue, - root: GeoNetwork.Settings.tagCloud.root, - query: 'fast=true&summaryOnly=true', - renderTo: 'tag', - onSuccess: 'app.loadResults' - }); - - return tagCloudView; - } - function loadNews() { - catalogue.kvpSearch(GeoNetwork.Settings.latestQuery, null, null, null, true, latestView.getStore()); - } - function loadCallback(el, success, response, options) { - if (success) { - createMainTagCloud(); - createLatestUpdate(); - } else { - Ext.get('infoPanel').getUpdater().update({url: '../../apps/search/home_' + catalogueLang + '.html'}); - Ext.get('helpPanel').getUpdater().update({url: '../../apps/search/help_' + catalogueLang + '.html'}); - } - } - /** private: methode[createInfoPanel] - * Main information panel displayed on load - * - * :return: - */ - function createInfoPanel() { - return new Ext.Panel({ - border: true, - id: 'infoPanel', - baseCls: 'md-info', - autoWidth: true, - contentEl: 'infoContent', - autoLoad: { - url: '../../apps/search/home_' + catalogue.LANG + '.html', - callback: loadCallback, - scope: this, - loadScripts: false - } - }); - } - /** private: methode[createHelpPanel] - * Help panel displayed on load - * - * :return: - */ - function createHelpPanel() { - return new Ext.Panel({ - border: false, - frame: false, - baseCls: 'none', - id: 'helpPanel', - autoWidth: true, - renderTo: 'shortcut', - autoLoad: { - url: '../../apps/search/help_' + catalogue.LANG + '.html', - callback: initShortcut, - scope: this, - loadScripts: false - } - }); - } - /** - * Create latest metadata panel. - */ - function createLatestUpdate(){ - latestView = new GeoNetwork.MetadataResultsView({ - catalogue: catalogue, - autoScroll: true, - tpl: GeoNetwork.Settings.latestTpl - }); - var latestStore = GeoNetwork.Settings.mdStore(); - latestView.setStore(latestStore); - latestStore.on('load', function(){ - Ext.ux.Lightbox.register('a[rel^=lightbox]'); - }); - new Ext.Panel({ - border: false, - bodyCssClass: 'md-view', - items: latestView, - renderTo: 'latest' - }); - loadNews(); - } - function show(uuid, record, url, maximized, width, height) { - var showFeedBackButton = record.get('email'); - - var win = new GeoNetwork.view.ViewWindow({ - serviceUrl: url, - lang: this.lang, - currTab: GeoNetwork.defaultViewMode || 'simple', - printDefaultForTabs: GeoNetwork.printDefaultForTabs || false, - catalogue: this, - maximized: maximized || false, - metadataUuid: uuid, - showFeedBackButton: showFeedBackButton, - record: record, - resultsView: this.resultsView - }); - win.show(this.resultsView); - win.alignTo(Ext.getBody(), 'tr-tr'); - - - - // Adapt page title and meta according to current record - - // If more than one metadata records opened, the last one opened set the title - // When metadata windows is closed, reset to default title - win.on('close', function () { - GeoNetwork.Util.updateHeadInfo({ - title: catalogue.getInfo().name - }); - }); - - // Get title, keywords and author for current record - // in order to populate the META tag in the HEAD of the HTML page. - var contacts = []; - Ext.each(record.get('contact'), function (item) { - contacts.push(item.name); - }); - var subjects = []; - Ext.each(record.get('subject'), function (item) { - subjects.push(item.value); - }); - GeoNetwork.Util.updateHeadInfo({ - title: catalogue.getInfo().name + ' | ' - + record.get('title') - + (record.get('type') ? ' (' + record.get('type') + ')' : ''), - meta: { - subject: record.get('abstract'), - keywords: subjects, - author: contacts - } - }); - } - function edit(metadataId, create, group, child, isTemplate, schema){ - var record = catalogue.metadataStore.getAt(catalogue.metadataStore.find('id', metadataId)); - - if (!this.editorWindow) { - this.editorPanel = new GeoNetwork.editor.EditorPanel({ - defaultEditMode : GeoNetwork.Settings.editor.defaultViewMode, - defaultViewMode: GeoNetwork.Settings.editor.defaultViewMode, - editMode : GeoNetwork.Settings.editor.editMode, - catalogue: catalogue, - selectionPanelImgPath: '../../apps/js/ext-ux/images', - xlinkOptions: {CONTACT: true} - }); - - this.editorWindow = new Ext.Window({ - tools: [{ - id: 'newwindow', - qtip: OpenLayers.i18n('newWindow'), - handler: function (e, toolEl, panel, tc) { - window.open(GeoNetwork.Util.getBaseUrl(location.href) + "#edit=" + panel.getComponent('editorPanel').metadataId); - panel.hide(); - }, - scope: this - }], - title: OpenLayers.i18n('mdEditor'), - id : 'editorWindow', - layout: 'fit', - modal: false, - items: this.editorPanel, - closeAction: 'hide', - collapsible: true, - collapsed: false, - // Unsuported. Needs some kind of component to store minimized windows - maximizable: false, - maximized: true, - resizable: true, -// constrain: true, - width: 980, - height: 800 - }); - this.editorPanel.setContainer(this.editorWindow); - this.editorPanel.on('editorClosed', function () { - Ext.getCmp('searchForm').fireEvent('search'); - }); - } - - if (metadataId) { - this.editorWindow.show(); - var recordSchema = record && record.get('schema'); - this.editorPanel.init(metadataId, create, group, child, isTemplate, true, recordSchema || schema); - } - } - - function createHeader() { - var info = catalogue.getInfo(); - Ext.getDom('title').innerHTML = '

      ' + info.name + '

      '; - document.title = info.name; - } - - // public space: - return { - init: function () { - var geonetworkUrl = GeoNetwork.URL || window.location.href.match( - /(http.*\/.*)\/.*\/.*\/.*/, '')[1]; - - urlParameters = GeoNetwork.Util.getParameters(location.href); - var lang = urlParameters.hl || GeoNetwork.Util.defaultLocale; - if (urlParameters.extent) { - urlParameters.bounds = new OpenLayers.Bounds(urlParameters.extent[0], urlParameters.extent[1], urlParameters.extent[2], urlParameters.extent[3]); - } - - if (urlParameters.wmc) { - GeoNetwork.map.CONTEXT = urlParameters.wmc; - } - if (urlParameters.ows) { - GeoNetwork.map.OWS = urlParameters.ows; - } - - // Init cookie - cookie = new Ext.state.CookieProvider({ - expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 365)) - }); - - // set a permalink provider which will be the main state provider. - var permalinkProvider = new GeoExt.state.PermalinkProvider({encodeType: false}); - - Ext.state.Manager.setProvider(permalinkProvider); - - // Create connexion to the catalogue - catalogue = new GeoNetwork.Catalogue({ - statusBarId: 'info', - lang: lang, - node: catalogueNode, - hostUrl: geonetworkUrl, - mdOverlayedCmpId: 'resultsPanel', - adminAppUrl: geonetworkUrl + '/' + catalogueNode + '/' + lang + '/admin.console', - // Declare default store to be used for records and summary - metadataStore: GeoNetwork.Settings.mdStore ? GeoNetwork.Settings.mdStore() : GeoNetwork.data.MetadataResultsStore(), - metadataCSWStore : GeoNetwork.data.MetadataCSWResultsStore(), - summaryStore: GeoNetwork.data.MetadataSummaryStore(), - editMode: 2, // TODO : create constant - metadataEditFn: edit, - metadataShowFn: show - }); - - // Extra stuffs - infoPanel = createInfoPanel(); - try { - helpPanel = createHelpPanel(); - } catch (e) { - // TODO: IE7 does not support help panel - } - createHeader(); - - // Search form - searchForm = createSearchForm(); - - // Search result - resultsPanel = createResultsPanel(permalinkProvider); - - // Top navigation widgets - createModeSwitcher(); - createLanguageSwitcher(lang); - createLoginForm(); - edit(); - - - // Register events on the catalogue - - var margins = '35 0 0 0'; - var breadcrumb = new Ext.Panel({ - cls: 'breadcrumb', - defaultType: 'button', - border: false, - split: false - }); - facetsPanel = new GeoNetwork.FacetsPanel({ - searchForm: searchForm, - breadcrumb: breadcrumb, - maxDisplayedItems: GeoNetwork.Settings.facetMaxItems || 7, - facetListConfig: GeoNetwork.Settings.facetListConfig || [] - }); - - var viewport = new Ext.Viewport({ - layout: 'border', - id: 'vp', - items: [{ - region: 'west', - id: 'west', - split: true, - border: false, - minWidth: 200, - width: 300, - maxWidth: 400, - autoScroll: true, - collapsible: true, - hideCollapseTool: true, - collapseMode: 'mini', - margins: margins, - //layout : 's', - forceLayout: true, - layoutConfig: { - animate: true - }, - items: [searchForm, breadcrumb, facetsPanel] - }, { - region: 'center', - id: 'center', - split: true, - border: false, - margins: margins, - items: [infoPanel, resultsPanel] - }, { - region: 'east', - id: 'east', - layout: 'fit', - split: true, - border: false, - collapsible: true, - hideCollapseTool: true, - collapseMode: 'mini', - collapsed: true, - hidden: !GeoNetwork.MapModule, - margins: margins, - minWidth: 300, - width: 500, - listeners: { - beforeexpand: function () { - app.getIMap(); - this.add(iMap.getViewport()); - this.doLayout(); - } - } - }] - }); - - /* Trigger visualization mode if mode parameter is 1 - TODO : Add visualization only mode with legend panel on - */ - if (urlParameters.mode) { - app.switchMode(urlParameters.mode, false); - } - if (urlParameters.edit !== undefined && urlParameters.edit !== '') { - catalogue.metadataEdit(urlParameters.edit); - } - if (urlParameters.create !== undefined) { - resultsPanel.getTopToolbar().createMetadataAction.fireEvent('click'); - } - if (urlParameters.uuid !== undefined) { - catalogue.metadataShow(urlParameters.uuid, true); - } else if (urlParameters.id !== undefined) { - catalogue.metadataShowById(urlParameters.id, true); - } - if (urlParameters.insert !== undefined) { - setTimeout(function () { - var actionCtn = Ext.getCmp('resultsPanel').getTopToolbar(); - actionCtn.mdImportAction.handler.apply(actionCtn); - }, 500); - } - - // FIXME : should be in Search field configuration - Ext.get('E_any').setWidth(285); - Ext.get('E_any').setHeight(28); - if (GeoNetwork.searchDefault.activeMapControlExtent) { - Ext.getCmp('geometryMap').setExtent(); - } - if (urlParameters.bounds) { - Ext.getCmp('geometryMap').map.zoomToExtent(urlParameters.bounds); - } - - var events = ['afterDelete', 'afterRating', 'afterStatus', 'afterLogout', 'afterLogin']; - Ext.each(events, function (e) { - catalogue.on(e, function () { - if (searching === true) { - searchForm.fireEvent('search'); - } - }); - }); - // Hack to run search after all app is rendered within a sec ... - // It could have been better to trigger event in SearchFormPanel#applyState - // FIXME - if (urlParameters.s_search !== undefined) { - setTimeout(function () { - searchForm.fireEvent('search'); - }, 500); - } - }, - getIMap: function () { - // init map if not yet initialized - if (!iMap) { - initMap(); - } - - // TODO : maybe we should switch to visualization mode also ? - return iMap; - }, - getCatalogue: function () { - return catalogue; - }, - /** - * Do layout - * - * @param response - * @return - */ - loadResults: function (response) { - - initPanels(); - facetsPanel.refresh(response); - // FIXME : result panel need to update layout in case of slider - // Ext.getCmp('resultsPanel').syncSize(); - Ext.getCmp('previousBt').setDisabled(catalogue.startRecord === 1); - Ext.getCmp('nextBt').setDisabled(catalogue.startRecord + - parseInt(Ext.getCmp('E_hitsperpage').getValue(), 10) > catalogue.metadataStore.totalLength); - if (Ext.getCmp('E_sortBy').getValue()) { - Ext.getCmp('sortByToolBar').setValue(Ext.getCmp('E_sortBy').getValue() + "#" + Ext.getCmp('sortOrder').getValue()); - } else { - Ext.getCmp('sortByToolBar').setValue(Ext.getCmp('E_sortBy').getValue()); - } - - resultsPanel.syncSize(); - resultsPanel.setHeight(Ext.getCmp('center').getHeight()); - - Ext.getCmp('west').syncSize(); - Ext.getCmp('center').syncSize(); - Ext.ux.Lightbox.register('a[rel^=lightbox]'); - - // Update page title based on search results and params - var formParams = GeoNetwork.util.SearchTools.getFormValues(searchForm); - - // Update page title based on search results and params - var formParams = GeoNetwork.util.SearchTools.getFormValues(searchForm); - var criteria = [], - excludedSearchParam = {E_hitsperpage: null, timeType: null, - sortOrder: null, sortBy: null}; - for (var item in formParams) { - if (formParams.hasOwnProperty(item) && excludedSearchParam[item] === undefined) { - var value = formParams[item]; - if (value != '') { - fieldName = item.split('_'); - criteria.push(OpenLayers.i18n(fieldName[1] || item) + ': ' + value); - } - } - } - - var title = (catalogue.metadataStore.totalLength || 0) + OpenLayers.i18n('recordsFound') - + (criteria.length > 0 ? ' | ' + criteria.join(', ') : ''); - - GeoNetwork.Util.updateHeadInfo({ - title: catalogue.getInfo().name + ' | ' + title - }); - }, - /** - * Switch from one mode to another - * - * @param mode - * @param force - * @return - */ - switchMode: function (mode, force) { - var ms = Ext.getCmp('ms'), - e = Ext.getCmp('east'), - c = Ext.getCmp('center'), - w = Ext.getCmp('west'), - currentMode; - - // Set discovery mode as default if undefined - if (mode === null) { - currentMode = ms.getValue().getGroupValue(); - if (currentMode === '0') { - ms.onSetValue(Ext.getCmp('visualizationMode'), true); - } else { - ms.onSetValue(Ext.getCmp('discoveryMode'), true); - } - mode = currentMode = ms.getValue().getGroupValue(); - } - - if (force) { - if (mode === '1') { - ms.onSetValue(Ext.getCmp('visualizationMode'), true); - } else { - ms.onSetValue(Ext.getCmp('discoveryMode'), true); - } - } - - if (mode === '1' && !visualizationModeInitialized) { - initMap(); - } - - if (mode === '1' && iMap) { - e.add(iMap.getViewport()); - e.doLayout(); - if (e.collapsed) { - e.toggleCollapse(); - } - if (!w.collapsed) { - w.toggleCollapse(); - } - - Ext.getCmp('vp').syncSize(); - } else { - if (!e.collapsed) { - e.toggleCollapse(); - } - if (w.collapsed) { - w.toggleCollapse(); - } - } - } - }; -}; - -Ext.onReady(function () { - var lang = /hl=([a-z]{3})/.exec(location.href); - GeoNetwork.Util.setLang(lang && lang[1], '..'); - - Ext.QuickTips.init(); - setTimeout(function () { - Ext.get('loading').remove(); - Ext.get('loading-mask').fadeOut({remove: true}); - }, 250); - - app = new GeoNetwork.app(); - app.init(); - catalogue = app.getCatalogue(); - - /* Focus on full text search field */ - Ext.getDom('E_any').focus(true); -}); diff --git a/web-client/src/main/resources/apps/search/js/Settings.js b/web-client/src/main/resources/apps/search/js/Settings.js deleted file mode 100644 index 61f6929329d..00000000000 --- a/web-client/src/main/resources/apps/search/js/Settings.js +++ /dev/null @@ -1,122 +0,0 @@ -GeoNetwork.Settings = { -// hideAngularEditor: true, -// hideExtEditor: false -}; - -// Default to absolute path without apps/search -// GeoNetwork.URL = '../..'; - -//OpenLayers.ProxyHostURL = '/cgi-bin/proxy.cgi?url='; -// GeoNetwork proxy is much more permissive than OL one -OpenLayers.ProxyHostURL = '../../proxy?url='; - -OpenLayers.ProxyHost = function(url){ - /** - * Do not use proxy for local domain. - * This is required to keep the session activated. - */ - if (url && url.indexOf(window.location.host) != -1) { - return url; - } else { - return OpenLayers.ProxyHostURL + encodeURIComponent(url); - } -}; - - -GeoNetwork.Util.defaultLocale = 'eng'; -// Restrict locales to a subset of languages -//GeoNetwork.Util.locales = [ -// ['en', 'English', 'eng'], -// ['fr', 'Français', 'fre'] -// ]; -GeoNetwork.searchDefault = { - activeMapControlExtent: false -}; -GeoNetwork.advancedFormButton = true; - -GeoNetwork.Settings.editor = { - disableIfSubmittedForEditor: false, - defaultViewMode : 'simple', - // Define which edit mode to use by default - // according to metadata schema - editMode: { -// 'iso19139': 'identification' - }, - editHarvested: false -// defaultViewMode : 'inspire' -}; - -GeoNetwork.Settings.privileges = { - // Customize column to be displayed and the order - columnOrder: ['0', '5', '1', '2', '3'] - // Use topGroups to place those groups with internet, intranet groups - // on top of the privileges panel. -// topGroups: ['82'] -}; - -// Define if default mode should be used for HTML print output instead of tabs only -GeoNetwork.printDefaultForTabs = false; - -// Define if label needs to be displayed for login form next to username/password fields -GeoNetwork.hideLoginLabels = true; - -// Define custom user menu for quick search links -//GeoNetwork.Settings.userQuickLinks = { -// 'Editor': [{ -// label : OpenLayers.i18n('templates'), -// criteria : {"E_template" : "y"} -// }] -// }; - -// Define which type of search to use -// Old mode (xml.search with lucene, db access and XSL formatting) -//GeoNetwork.Settings.mdStore = GeoNetwork.data.MetadataResultsStore; -// IndexOnly mode (xml.search with lucene only) - recommended -GeoNetwork.Settings.mdStore = GeoNetwork.data.MetadataResultsFastStore; - -GeoNetwork.Settings.tagCloud = { -// root: 'inspireThemes.inspireTheme' - root: 'keywords.keyword' -}; - -// List of facet to display. If none, the server configuration is use. -GeoNetwork.Settings.facetListConfig = [{name: 'orgNames'}, - {name: 'types'}, - {name: 'serviceTypes'}, - {name: 'denominators'}, - {name: 'keywords'}, - {name: 'createDateYears'}, - {name: 'formats'}]; -GeoNetwork.Settings.facetMaxItems = 7; - -// Latest update info query -GeoNetwork.Settings.latestQuery = "from=1&to=6&sortBy=changeDate&fast=index"; -GeoNetwork.Settings.latestTpl = GeoNetwork.Templates.THUMBNAIL; -GeoNetwork.Settings.results = { - // Parameters to set bounding box highlighter colors - // Use a custom single color for bounding box - featurecolor: 'orange', - // Use a random color map with 2 colors - //colormap: GeoNetwork.Util.generateColorMap(2), - // Use a default color map with 10 colors - //colormap: GeoNetwork.Util.defaultColorMap, - // Use a custom color map - //colormap: ['red', 'green', 'blue'], - colormap: undefined, - // Use a custom CSS rules - //featurecolorCSS: "border-width: 5px;border-style: solid; border-color: ${featurecolor}" - featurecolorCSS: undefined, - // Look for relation for all records (true) or only series (default). - // Only for series is recommended to not trigger to much queries when - // displaying search results. It may be relevant to search for all - // if record related to a dataset using largerWorkCitation is used. - //loadRelationForAll: true - loadRelationForAll: undefined -}; -GeoNetwork.MapModule = true; -GeoNetwork.ProjectionList = [['EPSG:4326', 'WGS84 (lat/lon)']]; -GeoNetwork.WMSList = [['Geoserver', 'http://localhost/geoserver/wms?']]; - -GeoNetwork.defaultViewMode = 'view-simple'; - -Ext.BLANK_IMAGE_URL = '../../apps/js/ext/resources/images/default/s.gif'; diff --git a/web-client/src/main/resources/apps/search/js/Shortcuts.js b/web-client/src/main/resources/apps/search/js/Shortcuts.js deleted file mode 100644 index 171b1b37f86..00000000000 --- a/web-client/src/main/resources/apps/search/js/Shortcuts.js +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Init shortcut - * - * @return - */ -function initShortcut() { - - // Define editor shortcut here. - var searchConfig = [{ - key: "f", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('focusOnAny'), - fn: function () { - var e = Ext.get('E_any'); - e.highlight(); - e.dom.focus(true); - } - }, { - key: "s", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('runSearch'), - fn: function () { - var e = Ext.getCmp('searchForm'); - e.getEl().fadeIn(); - e.fireEvent('search'); - } - }, { - key: Ext.EventObject.LEFT, - keyLabel: "LEFT", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('previousPage'), - fn: function () { - Ext.getCmp('previousBt').handler(); - } - }, { - key: Ext.EventObject.RIGHT, - keyLabel: "RIGHT", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('nextPage'), - fn: function () { - Ext.getCmp('nextBt').handler(); - } - }, { - key: Ext.EventObject.UP, - keyLabel: "UP", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('upInPage'), - fn: function () { - catalogue.resultsView.getEl().scroll('t', 170, true); - } - }, { - key: Ext.EventObject.DOWN, - keyLabel: "DOWN", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('downInPage'), - fn: function () { - catalogue.resultsView.getEl().scroll('b', 170, true); - } - }, { - key: "d", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('hideSearchForm'), - fn: function () { - var r = Ext.getCmp('west'); - r.toggleCollapse(); - } - }, { - key: "r", - ctrl: true, - shift: true, - label: OpenLayers.i18n('resetSearchForm'), - fn: function () { - var e = Ext.getCmp('searchForm'); - e.getEl().fadeIn(); - e.fireEvent('reset'); - } - }, { - key: "v", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('switchMode'), - fn: function () { - app.switchMode(null, true); - } - }, { - key: "m", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('toggleLayerManager'), - fn: function () { - var r = Ext.getCmp('layerManager'); - r.toggleCollapse(); - } - }, { - key: "l", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('focusOnLogin'), - fn: function () { - var e = Ext.get('username'); - if (e.isVisible()) { - e.highlight(); - e.dom.focus(true); - } else { - catalogue.logout(); - } - - } - }, { - key: "a", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('openAdmin'), - fn: function () { - if (catalogue.isIdentified()) { - catalogue.admin(); - } - } - }, { - key: "c", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('newMetadata'), - fn: function () { - if (catalogue.isIdentified()) { - var actionCtn = Ext.getCmp('resultsPanel').getTopToolbar(); - actionCtn.createMetadataAction.handler.apply(actionCtn); - } - } - }, { - key: "i", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('displayInfoPanel'), - fn: function () { - var infoPanel = Ext.getCmp('infoPanel'); - var resultsPanel = Ext.getCmp('resultsPanel'); - if (resultsPanel.isVisible()) { - resultsPanel.hide(); - } - if (!infoPanel.isVisible()) { - infoPanel.show(); - } - } - }, { - key: 'h', // FIXME - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('displayHelpPanel'), - fn: function () { - var ss = Ext.getDom('shortcut').style; - if (ss.display === 'block') { - Ext.getDom('shortcut').style.display = 'none'; - } else { - Ext.getDom('shortcut').style.display = 'block'; - } - } - }]; - var map = new Ext.KeyMap(document, searchConfig); - map.enable(); - - var helpEl = Ext.getDom('shortcutHelp'); - if (helpEl) { - var help = ''; - for (var i = 0; i < searchConfig.length; i++) { - var c = searchConfig[i]; - help += '' + - (c.ctrl === true ? '<Ctrl> + ' : '') + - (c.shift === true ? '<Shift> + ' : '') + - '' + - (c.keyLabel ? c.keyLabel : c.key) + - '' + - ':' + - c.label + - ''; - } - - var html = '
      ' + help + '
      '; - Ext.DomHelper.insertHtml('afterEnd', helpEl, html); - } - // Launch search when enter key press - var formMap = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function () { - Ext.getCmp('searchForm').fireEvent('search'); - } - }]); - - formMap.enable(); -} diff --git a/web-client/src/main/resources/apps/search/js/map/MapApp.js b/web-client/src/main/resources/apps/search/js/map/MapApp.js deleted file mode 100644 index 797c44a6795..00000000000 --- a/web-client/src/main/resources/apps/search/js/map/MapApp.js +++ /dev/null @@ -1,1432 +0,0 @@ -/* - * Copyright (C) 2009 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ -Ext.namespace('GeoNetwork'); - -var mapInit = false; - -var activeIndex = 0; - - -// create application -GeoNetwork.mapApp = function() { - // private vars: - var toolbar, toctoolbar, tocbbar, viewport; - - var tree, legendPanel, mapLateralPanel, printPanel, printProvider, printPage, pageLayer; - - var featureinfo; - - var activeNode; - - // private - var map; - - var fixedScales; - - var featureinfolayer; - - var layerLoadingMask; - - var layers; - - var setMap = function(mapC) { - map = mapC; - }; - - // private functions - - /** - * Creates the OL Map - * - */ - var createMap = function(mapOptions, scales) { - var options = mapOptions || { - projection: "EPSG:4326", - units: "degrees", - maxExtent: new OpenLayers.Bounds(-180,-90,180,90), - restrictedExtent: new OpenLayers.Bounds(-180,-90,180,90), - controls: [] - }; - - if (GeoNetwork.map.CONTEXT) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.CONTEXT, - async: false - }); - if (request.responseText) { - - var text = request.responseText; - var format = new OpenLayers.Format.WMC(); - map = format.read(text, {map:options}); - } - } - else if (GeoNetwork.map.OWS) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.OWS, - async: false - }); - if (request.responseText) { - var parser = new OpenLayers.Format.OWSContext(); - var text = request.responseText; - map = parser.read(text, {map: options}); - } - } - else { - map = new OpenLayers.Map('ol_map', options); - fixedScales = scales; - } - }; - - /** - * Adds a layer to the map - * - */ - var createWmsLayer = function(name, url, params, options) { - map.addLayer(new OpenLayers.Layer.WMS(name, url, params, options)); - }; - - var createLayer = function(olLayer) { - map.addLayer(olLayer); - }; - - - var createDummyBaseLayer = function() { - var graphic = new OpenLayers.Layer.Image('Dummy', '../../../js/OpenLayers/img/blank.gif', new OpenLayers.Bounds(0, 300000, 300000, 625000), - map.getSize(), {isBaseLayer: true, displayInLayerSwitcher: false}); - map.addLayer(graphic); - }; - - /** - * Configure the map controls - * - */ - var addMapControls = function() { - map.addControl(new GeoNetwork.Control.ZoomWheel()); - map.addControl(new OpenLayers.Control.LoadingPanel()); - //map.addControl(new OpenLayers.Control.ScaleBar()); - }; - - /** - * Handler to manage the remove of a layer in the map - * - */ - var removeLayerHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if (layer) { - if (!layer.isBaseLayer) { - if ((typeof(layer.isLoading) == "undefined") || // Layers added from WMC - (layer.isLoading == false)) { - map.removeLayer(layer); - //Ext.getCmp('legendwms').forceRemoveLegend(node.attributes.layer.id); - - if (activeNode == node) activeNode = null; - refreshTocToolbar(activeNode); - Ext.getCmp('toctree').getSelectionModel().clearSelections(); - } - } - } - } - }; - - var removeLayerHandlerContextMenu = function(){ - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - removeLayerHandler(node); - }; - /** - * Handler to manage WMS time layers - * - */ - var wmsTimeHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if (layer && layer.dimensions && layer.dimensions.time) { - GeoNetwork.WindowManager.showWindow("wmstime"); - GeoNetwork.WindowManager.getWindow("wmstime").setLayer(layer); - } - } - }; - - var wmsTimeHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - wmsTimeHandler(node); - }; - - /** - * Handler to manage the selection of WMS layers with several SLD styles defined - * - */ - var stylesLayerHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if ((layer) && (layer.styles) && (layer.styles.length > 1)) { - GeoNetwork.WindowManager.showWindow("layerstyles"); - GeoNetwork.WindowManager.getWindow("layerstyles").showLayerStyles(layer); - } - } - }; - - var stylesLayerHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - stylesLayerHandler(node); - }; - - /** - * Handler to manage the WMS info window for the layers - * - */ - var metadataLayerHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - GeoNetwork.WindowManager.showWindow("wmsinfo"); - GeoNetwork.WindowManager.getWindow("wmsinfo").showLayerInfo(layer); - } - }; - - var metadataLayerHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - metadataLayerHandler(node); - }; - - - /** - * Updates the TOC toolbar buttons depending on TOC layer selected - * - */ - var refreshTocToolbar = function(node) { - - activeNode = node; - - if ((node) && (node.attributes.layer)) { - if (node.parentNode.attributes.nodeType == "gx_baselayercontainer") { - Ext.getCmp("tbRemoveButton").disable(); - } else { - Ext.getCmp("tbRemoveButton").enable(); - } - - var layer = node.attributes.layer; - - if (layer && layer.dimensions && layer.dimensions.time) { - Ext.getCmp("tbWmsTimeButton").enable(); - } else { - Ext.getCmp("tbWmsTimeButton").disable(); - } - - if ((layer) && ((!layer.styles) || (layer.styles.length < 2))) { - Ext.getCmp("tbStylesButton").disable(); - } else { - Ext.getCmp("tbStylesButton").enable(); - } - - if (node.layer && node.layer.dimensions && node.layer.dimensions.time) { - Ext.getCmp("tbWmsTimeButton").enable(); - } else { - Ext.getCmp("tbWmsTimeButton").disable(); - } - if ((node.layer) && ((!node.layer.styles) || (node.layer.styles.length < 2))) { - Ext.getCmp("tbStylesButton").disable(); - } else { - Ext.getCmp("tbStylesButton").enable(); - } - Ext.getCmp("tbMetadataButton").setDisabled(!(node.layer instanceof OpenLayers.Layer.WMS)); - - Ext.getCmp("btnZoomToExtent").enable(); - - - - } else { - Ext.getCmp("tbRemoveButton").disable(); - Ext.getCmp("tbWmsTimeButton").disable(); - Ext.getCmp("tbStylesButton").disable(); - Ext.getCmp("tbMetadataButton").disable(); - Ext.getCmp("btnZoomToExtent").disable(); - } - }; - var createPrintPanel = function() { - // The printProvider that connects us to the print service - printProvider = new GeoExt.data.PrintProvider({ - method: "POST", - url: GeoNetwork.map.printCapabilities, - baseParams: { - url: GeoNetwork.map.printCapabilities - }, - autoLoad: true - }); - printProvider.on('printexception', function (provider, response) { - alert(response.responseText); - }); - printPage = new GeoExt.data.PrintPage({ - printProvider: printProvider - }); - - pageLayer = new OpenLayers.Layer.Vector(OpenLayers.i18n('printLayer'), {visibility: false}); - pageLayer.addFeatures(printPage.feature); - - map.addLayer(pageLayer); - - // The form with fields controlling the print output - printPanel = new Ext.form.FormPanel({ - title: OpenLayers.i18n("mf.print.print"), - bodyStyle: "padding:5px", - labelAlign: "top", - defaults: {anchor: "100%"}, - items: [{ - xtype: "textarea", - name: "comment", - value: "", - fieldLabel: OpenLayers.i18n("mf.print.comment"), - plugins: new GeoExt.plugins.PrintPageField({ - printPage: printPage - }) - }, { - xtype: "combo", - store: printProvider.layouts, - displayField: "name", - fieldLabel: OpenLayers.i18n("layout"), - typeAhead: true, - mode: "local", - triggerAction: "all", - plugins: new GeoExt.plugins.PrintProviderField({ - printProvider: printProvider - }) - }, { - xtype: "combo", - store: printProvider.dpis, - displayField: "name", - fieldLabel: OpenLayers.i18n("mf.print.dpi"), - tpl: '
      {name} dpi
      ', - typeAhead: true, - mode: "local", - triggerAction: "all", - plugins: new GeoExt.plugins.PrintProviderField({ - printProvider: printProvider - }), - // the plugin will work even if we modify a combo value - setValue: function(v) { - v = parseInt(v, 10) + " dpi"; - Ext.form.ComboBox.prototype.setValue.apply(this, arguments); - } - }, { - xtype: "combo", - store: printProvider.scales, - displayField: "name", - fieldLabel: OpenLayers.i18n("mf.print.scale"), - typeAhead: true, - mode: "local", - triggerAction: "all", - plugins: new GeoExt.plugins.PrintPageField({ - printPage: printPage - }) - }, { - xtype: "textfield", - name: "rotation", - fieldLabel: OpenLayers.i18n("mf.print.rotation"), - plugins: new GeoExt.plugins.PrintPageField({ - printPage: printPage - }) - }], - buttons: [{ - text: OpenLayers.i18n("mf.print.generatingPDF"), - handler: function() { - printProvider.print(Ext.getCmp('mappanel'), printPage); - } - }], - listeners: { - beforeexpand: function() { - this.setVisibility(true); - }, - beforecollapse: function() { - this.setVisibility(false); - }, - scope: pageLayer - } - }); - - map.events.register('moveend', map, function () { - if (!printPanel.collapsed) { - printPage.fit(this, { - mode: "screen" - }); - } - }); - }; - /** - * Creates the map viewer toolbars - */ - var createToolbars = function() { - toctoolbar = []; - // Layer TOC toolbar - var action = new GeoExt.Action({ - handler: function() { - GeoNetwork.WindowManager.showWindow("addwms"); - }, - iconCls: 'addLayer', - tooltip: OpenLayers.i18n("addWMSButtonText") - }); - - toctoolbar.push(action); - action = new GeoExt.Action({ - id: "tbRemoveButton", - handler: function() { - removeLayerHandler(activeNode); - }, - iconCls: 'deleteLayer', - tooltip: OpenLayers.i18n("removeButtonText") - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id: "tbStylesButton", - handler: function() { - stylesLayerHandler(activeNode); - }, - iconCls: 'layerStyles', - tooltip: OpenLayers.i18n("chooseLayerStyle") - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id: "tbMetadataButton", - handler: function() { - metadataLayerHandler(activeNode); - }, - iconCls: 'wmsInfo', - tooltip: OpenLayers.i18n("metadataButtonText") - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id: "tbWmsTimeButton", - handler: function() { - wmsTimeHandler(activeNode); - }, - iconCls: 'wmsTime', - tooltip: OpenLayers.i18n("wmsTime") - }); - - toctoolbar.push(action); - - - // Main toolbar - toolbar = []; - - action = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomToMaxExtent(), - map: map, - iconCls: 'zoomfull' - //, - //tooltip: {title: OpenLayers.i18n("zoomToMaxExtentTooltipTitle"), text: OpenLayers.i18n("zoomToMaxExtentTooltipText")} - }); - - toolbar.push(action); - - toolbar.push("-"); - - action = new GeoExt.Action({ - iconCls: 'zoomlayer', - id: 'btnZoomToExtent', - //tooltip: {title: OpenLayers.i18n("zoomlayerTooltipTitle"), text: OpenLayers.i18n("zoomlayerTooltipText")}, - handler: function() { - var node = activeNode; - var layer; - - if (node) { - layer = node.attributes.layer; - if (layer) { - if (layer.llbbox) { - // store info as wgs84 - var mapProj = map.getProjectionObject(); - var wgs84 = new OpenLayers.Projection("WGS84"); - - var minMapxy = new OpenLayers.LonLat(layer.llbbox[0], layer.llbbox[1]).transform(wgs84, mapProj); - var maxMapxy = new OpenLayers.LonLat(layer.llbbox[2], layer.llbbox[3]).transform(wgs84, mapProj); - - var extent = new OpenLayers.Bounds(); - extent.left = minMapxy.lon; - extent.right = maxMapxy.lon; - extent.top = maxMapxy.lat; - extent.bottom = minMapxy.lat; - - map.zoomToExtent(extent); - - // If layer has no boundingbox info, use full extent - } else { - map.zoomToMaxExtent(); - } - } else { - Ext.MessageBox.alert(OpenLayers.i18n("zoomlayer.selectLayerTitle"), - OpenLayers.i18n("zoomlayer.selectLayerText")); - } - } else { - Ext.MessageBox.alert(OpenLayers.i18n("zoomlayer.selectLayerTitle"), - OpenLayers.i18n("zoomlayer.selectLayerText")); - } - - } - }); - - toolbar.push(action); - - toolbar.push("-"); - - action = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomBox(), - map: map, - toggleGroup: "move", - allowDepress: false, - iconCls: 'zoomin' - //tooltip: {title: OpenLayers.i18n("zoominTooltipTitle"), text: OpenLayers.i18n("zoominTooltipText")} - }); - - toolbar.push(action); - - action = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomBox({ - displayClass: 'ZoomOut', - out: true - }), - toggleGroup: "move", - allowDepress: false, - map: map, - iconCls: 'zoomout' - //tooltip: {title: OpenLayers.i18n("zoomoutTooltipTitle"), text: OpenLayers.i18n("zoomoutTooltipText")} - }); - - toolbar.push(action); - - action = new GeoExt.Action({ - control: new OpenLayers.Control.DragPan({ - isDefault: true - }), - toggleGroup: "move", - allowDepress: false, - pressed: true, - map: map, - iconCls: 'pan' - //tooltip: {title: OpenLayers.i18n("dragTooltipTitle"), text: OpenLayers.i18n("dragTooltipText")} - }); - - toolbar.push(action); - - toolbar.push("-"); - - featureinfo = new OpenLayers.Control.WMSGetFeatureInfo({drillDown: true, infoFormat: 'application/vnd.ogc.gml'}); - - var moveLayerToTop = function(layertomove) { - var idx = -1; - for (var i=0, len = map.layers.length; i'); - toolbar.push({xtype: 'gn_projectionselector', projections: GeoNetwork.ProjectionList, fieldLabel: OpenLayers.i18n("projectionTitle"), map: map}); - }; - - /** - * Map overlay with scale image and scale selector - * - */ - var createMapOverlay = function() { - var scaleLinePanel = new Ext.Panel({ - cls: 'olControlScaleLine overlay-element overlay-scaleline', - border: false - }); - - scaleLinePanel.on('render', function(){ - var scaleLine = new OpenLayers.Control.ScaleLine({ - div: scaleLinePanel.body.dom - }); - - map.addControl(scaleLine); - scaleLine.activate(); - }, this); - - var zoomStore; - - if (fixedScales && fixedScales.length > 0) { - var zooms = []; - var scales = fixedScales; - var units = map.baseLayer.units; - - for (var i=scales.length-1; i >= 0; i--) { - var scale = scales[i]; - zooms.push({ - level: i, - resolution: OpenLayers.Util.getResolutionFromScale(scale, units), - scale: scale - }); - } - - zoomStore = new GeoExt.data.ScaleStore({}); - zoomStore.loadData(zooms); - - } else { - zoomStore = new GeoExt.data.ScaleStore({ - map: map - }); - } - - var zoomSelector = new Ext.form.ComboBox({ - emptyText: 'Zoom level', - tpl: '
      1 : {[parseInt(values.scale)]}
      ', - editable: false, - triggerAction: 'all', - mode: 'local', - store: zoomStore, - width: 110 - }); - - zoomSelector.on('click', function(evt){evt.stopEvent();}); - zoomSelector.on('mousedown', function(evt){evt.stopEvent();}); - - zoomSelector.on('select', function(combo, record, index) { - map.zoomTo(record.data.level); - }, - this); - - var zoomSelectorWrapper = new Ext.Panel({ - items: [zoomSelector], - cls: 'overlay-element overlay-scalechooser', - border: false }); - - map.events.register('zoomend', this, function() { - var scale = zoomStore.queryBy(function(record){ - return map.getZoom() == record.data.level; - }); - - if (scale.length > 0) { - scale = scale.items[0]; - zoomSelector.setValue("1 : " + parseInt(scale.data.scale, 10)); - } else { - if (!zoomSelector.rendered) { - return; - } - zoomSelector.clearValue(); - } - }); - - var mapOverlay = new Ext.Panel({ - // title: "Overlay", - cls: 'map-overlay', - items: [ - scaleLinePanel, - zoomSelectorWrapper - ] - }); - - - mapOverlay.on("afterlayout", function(){ - scaleLinePanel.body.dom.style.position = 'relative'; - scaleLinePanel.body.dom.style.display = 'inline'; - - mapOverlay.getEl().on("click", function(x){x.stopEvent();}); - mapOverlay.getEl().on("mousedown", function(x){x.stopEvent();}); - }, this); - - return mapOverlay; - }; - - /** - * Measure control - * - */ - var createMeasureControl = function(handlerType, title) { - var styleMap = new OpenLayers.StyleMap({ - "default": new OpenLayers.Style(null, { - rules: [new OpenLayers.Rule({ - symbolizer: { - "Point": { - pointRadius: 4, - graphicName: "square", - fillColor: "white", - fillOpacity: 1, - strokeWidth: 1, - strokeOpacity: 1, - strokeColor: "#333333" - }, - "Line": { - strokeWidth: 3, - strokeOpacity: 1, - strokeColor: "#666666", - strokeDashstyle: "dash" - }, - "Polygon": { - strokeWidth: 2, - strokeOpacity: 1, - strokeColor: "#666666", - fillColor: "white", - fillOpacity: 0.3 - } - } - })] - }) - }); - - var cleanup = function() { - if (measureToolTip) { - measureToolTip.destroy(); - } - }; - - var makeString = function(metricData) { - var metric = metricData.measure; - var metricUnit = metricData.units; - - measureControl.displaySystem = "english"; - - var englishData = metricData.geometry.CLASS_NAME.indexOf("LineString") > -1 ? - measureControl.getBestLength(metricData.geometry) : - measureControl.getBestArea(metricData.geometry); - - var english = englishData[0]; - var englishUnit = englishData[1]; - - measureControl.displaySystem = "metric"; - var dim = metricData.order == 2 ? - '2' : - ''; - - return metric.toFixed(2) + " " + metricUnit + dim + "
      " + - english.toFixed(2) + " " + englishUnit + dim; - }; - - var measureToolTip; - var measureControl = new OpenLayers.Control.Measure(handlerType, { - persist: true, - handlerOptions: {layerOptions: {styleMap: styleMap}}, - eventListeners: { - measurepartial: function(event) { - cleanup(); - measureToolTip = new Ext.ToolTip({ - html: makeString(event), - title: title, - autoHide: false, - closable: true, - draggable: false, - mouseOffset: [0, 0], - showDelay: 1, - listeners: {hide: cleanup} - }); - if(event.measure > 0) { - var px = measureControl.handler.lastUp; - var p0 = Ext.getCmp('mappanel').getPosition(); - measureToolTip.targetXY = [p0[0] + px.x, p0[1] + px.y]; - measureToolTip.show(); - } - }, - measure: function(event) { - cleanup(); - measureToolTip = new Ext.ToolTip({ - target: Ext.getBody(), - html: makeString(event), - title: title, - autoHide: false, - closable: true, - draggable: false, - mouseOffset: [0, 0], - showDelay: 1, - listeners: { - hide: function() { - measureControl.cancel(); - cleanup(); - } - } - }); - }, - deactivate: cleanup, - scope: this - } - }); - - return measureControl; - }; - - - /** - * Creates the layers tree control - * - */ - var createTree = function() { - - // using OpenLayers.Format.JSON to create a nice formatted string of the - // configuration for editing it in the UI - var treeConfig = new OpenLayers.Format.JSON().write([{ - nodeType: "gx_baselayercontainer", - text: OpenLayers.i18n('baseLayerList') - }, { - nodeType: "gx_overlaylayercontainer", - text: OpenLayers.i18n('overlaysList'), - expanded: true, - // render the nodes inside this container with a radio button, - // and assign them the group "foo". - loader: { - baseAttrs: { - radioGroup: "foo", - slider: "layeropacityslider", - uiProvider: "layernodeui" - } - } - }], true); - - var LayerNodeUI = Ext.extend( - GeoExt.tree.LayerNodeUI, new GeoExt.tree.TreeNodeUIEventMixin() - ); - - // create the tree with the configuration from above - tree = new Ext.tree.TreePanel({ - title: OpenLayers.i18n('layerTree'), - id: "toctree", - enableDD: true, - loader: new Ext.tree.TreeLoader({ - // applyLoader has to be set to false to not interfer with loaders - // of nodes further down the tree hierarchy - applyLoader: false, - uiProviders: { - "layernodeui": LayerNodeUI - } - }), - plugins: [ -// new GeoExt.plugins.TreeNodeRadioButton({ -// listeners: { -// "radiochange": function(node) { -// activeNode = node; -// } -// } -// }), - new GeoExt.tree.LayerOpacitySliderPlugin({ - listeners: { - "opacityslide": function(node, value) { - } - } - }) - ], - root: { - nodeType: "async", - // the children property of an Ext.tree.AsyncTreeNode is used to - // provide an initial set of layer nodes. We use the treeConfig - // from above, that we created with OpenLayers.Format.JSON.write. - children: Ext.decode(treeConfig) - }, - listeners:{ - contextmenu:function(node,e){ - if ((node.attributes.nodeType != "gx_overlaylayercontainer") && - (node.attributes.nodeType != "gx_baselayercontainer")) - { - node.select(); - var c = node.getOwnerTree().contextMenu; - if (node.parentNode.attributes.nodeType == "gx_baselayercontainer") { - c.items.get("removeMenu").disable(); - } else { - c.items.get("removeMenu").enable(); - } - - c.items.get("addMenu").hide(); - - var layer = node.layer; - c.items.get("metadataMenu").setDisabled(!(layer instanceof OpenLayers.Layer.WMS)); - - if (layer && layer.dimensions && layer.dimensions.time) { - c.items.get("wmsTimeMenu").enable(); - } else { - c.items.get("wmsTimeMenu").disable(); - } - - if ((layer) && ((!layer.styles) || (layer.styles.length < 2))) { - c.items.get("stylesMenu").disable(); - } else { - c.items.get("stylesMenu").enable(); - } - - c.contextNode=node; - c.showAt(e.getXY()); - } else { - - if (node.attributes.nodeType == "gx_overlaylayercontainer") { - - node.select(); - c = node.getOwnerTree().contextMenu; - - c.items.get("addMenu").show(); - c.items.get("removeMenu").hide(); - c.items.get("wmsTimeMenu").hide(); - c.items.get("stylesMenu").hide(); - c.items.get("metadataMenu").hide(); - - c.contextNode=node; - c.showAt(e.getXY()); - } - } - },scope:this}, - contextMenu:new Ext.menu.Menu({ - items:[{ - text: OpenLayers.i18n("addWMSButtonText"), - id: "addMenu", - handler: function () { - GeoNetwork.WindowManager.showWindow("addwms"); - } - }, - { - text:OpenLayers.i18n("removeButtonText"), - id: "removeMenu", - handler: removeLayerHandlerContextMenu - }, - { - text: OpenLayers.i18n("metadataButtonText"), - id: "metadataMenu", - handler: metadataLayerHandlerContextMenu - }, - { - text: "Styles", - id: "stylesMenu", - handler: stylesLayerHandlerContextMenu - }, - { - text: OpenLayers.i18n('WMSTimeWindowTitle'), - id: "wmsTimeMenu", - disabled: true, - handler: wmsTimeHandlerContextMenu - } - - ]}), - tbar: toctoolbar, - rootVisible: false, - lines: false, - border: false, - region: 'center' - }); - - }; - - /** - * Creates the legend panel control - * - */ - var createLegendPanel = function() { - legendPanel = new GeoExt.LegendPanel({ - defaults: { - labelCls: 'mylabel', - style: 'padding:5px' - }, - title: 'Legend', - height:200, - autoScroll: true, - split: true, - collapsible: true, - collapsed: true, - border: false, - region: 'south' - }); - }; - - /** - * Creates the map viewport - * - */ - var createViewport = function() { - createToolbars(); - createTree(); - createLegendPanel(); - createPrintPanel(); - - var mapOverlay = createMapOverlay(); - - // Accordion panel with layer tree and advanced print config - var accordion = new Ext.Panel({ - region: 'center', - border: false, - layout: 'accordion', - deferredRender:false, - items: [ - tree, printPanel - ] - }); - - viewport = new Ext.Panel({ - layout: 'border', - border: false, - //renderTo:'map_container', - items: [{ - id: 'layerManager', - region: 'east', - xtype: 'panel', - collapsible: true, - collapsed : true, - collapseMode: "mini", - split:true, - border: false, - width:170, - minSize: 170, - maxSize: 300, - layout: 'border', - items: [accordion, legendPanel] - },{ - region: 'center', - layout: 'fit', - frame: false, - border: false, - margins: '0 0 0 0', - items: [{ - id: 'mappanel', - xtype: 'gx_mappanel', - map: map, - tbar: toolbar, - border: false, - items: [mapOverlay] - }] - } - ] - }); - - - Ext.getCmp("toctree").on({ - "click": function(node) { - if (node.ui.radio) { - node.ui.radio.checked = true; - node.ui.fireEvent("radiochange", node); - - } - - refreshTocToolbar(node); - - }, - scope: this - }); - - Ext.getCmp("toctree").on("nodedragover", function(evt) { - // Only allow to move layers in the gx_overlaylayercontainer (user layers) - if ((evt.dropNode.parentNode.attributes.nodeType == "gx_baselayercontainer") || // restrict move baselayers - (evt.target.attributes.nodeType == "gx_baselayercontainer") || // restrict move layers to baselayer container - (evt.target.parentNode.attributes.nodeType == "gx_baselayercontainer") || - (evt.target.parentNode == evt.tree.root)) { // restrict move layers to outside of layercontainers - evt.cancel=true; - } - }); - - refreshTocToolbar(activeNode); - }; - - - /** - * Method: processLayersSuccess - * Called when the GetCapabilities response is in. - * - * Parameters: - * response - {Object} The response object - */ -var processLayersSuccess = function(response) { - layerLoadingMask.hide(); - - var parser = new OpenLayers.Format.WMSCapabilities(); - var caps = parser.read(response.responseXML || response.responseText); - if (caps.capability) { - // GetCapabilities disclaimer - var accessContraints = caps.service.accessContraints; - - if ((accessContraints) && (accessContraints.toLowerCase() != "none") && - (accessContraints != "-")) { - var disclaimerWindow = new GeoNetwork.DisclaimerWindow({ - disclaimer: accessContraints - }); - disclaimerWindow.show(); - disclaimerWindow = null; - } - - if (map) { - for(var i = 0, len=layers.length; i < len; i++) { - var name = layers[i][0]; - var url = layers[i][1]; - var layer = layers[i][2]; - var metadata_id = layers[i][3]; - - var ol_layer = new OpenLayers.Layer.WMS(name, url, - {layers: layer, format: 'image/png', transparent: 'TRUE', version: caps.version, language: GeoNetwork.OGCUtil.getLanguage()}, - {queryable: true, singleTile: true, ratio: 1, buffer: 0, transitionEffect: 'resize', metadata_id: metadata_id} ); - - if (!GeoNetwork.OGCUtil.layerExistsInMap(ol_layer, map)) { - // TODO: these events are never removed? - ol_layer.events.on({"loadstart": function() { - this.isLoading = true; - }}); - - ol_layer.events.on({"loadend": function() { - this.isLoading = false; - }}); - - var layerCap = getLayer(caps, caps.capability.layers, ol_layer); - if (layerCap) { - ol_layer.queryable = layerCap.queryable; - ol_layer.name = layerCap.title || ol_layer.name; - ol_layer.llbbox = layerCap.llbbox; - ol_layer.styles = layerCap.styles; - ol_layer.dimensions = layerCap.dimensions; - ol_layer.metadataURLs = layerCap.metadataURLs; - ol_layer.abstractInfo = layerCap['abstract'] - } - map.addLayer(ol_layer); - } - } - - } - } - }; - - /** - * Method: processLayersFailure - * Called when the GetCapabilities response is in and failed. - * - * Parameters: - * response - {Object} The response object - */ - var processLayersFailure = function(response) { - layerLoadingMask.hide(); - - Ext.MessageBox.alert(OpenLayers.i18n("loadLayer.error.title"), - OpenLayers.i18n("loadLayer.error.message")); - }; - - - /** - * Function: getLayer - * Recursive function to process a layer and their childLayers in the - * capabilities document, searching for the requested layer - * - * Parameters: - * caps - {Object} capabilities from the WMSCapabilities parser - * caplayers - {Object} list of layer objects from the WMSCapabilities parser - * layer - {Object} layer to return from capabilities document - * - * Returns: - * {Object} The layer if found, otherwise null - */ - var getLayer = function(caps, caplayers, layer) { - var findedLayer = null; - - for (var i = 0, len = caplayers.length; i < len; ++i) { - var lr = caplayers[i]; - - try { - var layerName = lr.name.split(","); - - if (layerName.indexOf(layer.params.LAYERS) != -1) { - findedLayer = lr; - break; - } - } catch(e) { - } - - if (typeof(lr.childLayers) != "undefined") { - findedLayer = getLayer(caps, lr.childLayers, layer); - if (findedLayer !== null) { - break; - } - } - - } - - return findedLayer; - }; - - // public space: - return { - init: function(layers, mapOptions, fixedScales) { - //Ext.QuickTips.init(); - - createMap(mapOptions, fixedScales); - - for (var i=0; i -1) ? '&' : '?'; - onlineResource += separator + paramString; - - var req = OpenLayers.Request.GET({ - url: onlineResource, //OpenLayers.Util.removeTail(OpenLayers.ProxyHostURL), - //method: 'GET', - //params: {url: onlineResource}, - success: processLayersSuccess, - failure: processLayersFailure, - timeout: 10000 - }); - }, - - getViewport: function() { - return viewport; - }, - - refreshViewport: function() { - // IE shows the west panel hidden when the map is shown after a window resize - Ext.get("west_panel").setWidth(westPanelWidth); - - viewport.doLayout(); - }, - - getMap: function() { - return map; - } - }; -}; // end of app - -// Extension to add title in ExtJs collapsed panels -//Ext.onReady(function(){ -// Ext.layout.BorderLayout.Region.prototype.getCollapsedEl = Ext.layout.BorderLayout.Region.prototype.getCollapsedEl.createSequence(function() { -// if ((this.position == 'north' || this.position == 'south') && !this.collapsedEl.titleEl) { -// this.collapsedEl.titleEl = this.collapsedEl.createChild({cls: 'x-collapsed-title', cn: this.panel.title}); -// } -// }); -//}); diff --git a/web-client/src/main/resources/apps/search/js/map/Settings.js b/web-client/src/main/resources/apps/search/js/map/Settings.js deleted file mode 100644 index 0074f653674..00000000000 --- a/web-client/src/main/resources/apps/search/js/map/Settings.js +++ /dev/null @@ -1,89 +0,0 @@ -OpenLayers.DOTS_PER_INCH = 90.71; -//OpenLayers.ImgPath = '../js/OpenLayers/theme/default/img/'; -OpenLayers.ImgPath = '../js/OpenLayers/img/'; - -OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; - -// Define a constant with the base url to the MapFish web service. -//mapfish.SERVER_BASE_URL = '../../../../../'; // '../../'; - -// Remove pink background when a tile fails to load -OpenLayers.Util.onImageLoadErrorColor = "transparent"; - -// Lang -OpenLayers.Lang.setCode(GeoNetwork.defaultLocale); - -OpenLayers.Util.onImageLoadError = function () { - this._attempts = (this._attempts) ? (this._attempts + 1) : 1; - if (this._attempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) { - this.src = this.src; - } else { - this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor; - this.style.display = "none"; - } -}; - -// add Proj4js.defs here -// Proj4js.defs["EPSG:27572"] = "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"; -Proj4js.defs["EPSG:2154"] = "+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"; -//new OpenLayers.Projection("EPSG:900913") - - -GeoNetwork.map.printCapabilities = "../../pdf"; - -// Config for WGS84 based maps -GeoNetwork.map.PROJECTION = "EPSG:4326"; -GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-180, -90, 180, 90); -//GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-5.1,41,9.7,51); - -GeoNetwork.map.BACKGROUND_LAYERS = [ - new OpenLayers.Layer.WMS("Background layer", "/geoserver/wms", {layers: 'gn:world,gn:ne_50m_boundary_da,gn:ne_50m_boundary_lines_land,gn:ne_50m_coastline', format: 'image/jpeg'}, {isBaseLayer: true}) - //new OpenLayers.Layer.WMS("Background layer", "http://www2.demis.nl/mapserver/wms.asp?", {layers: 'Countries', format: 'image/jpeg'}, {isBaseLayer: true}) -]; - -//// Config for OSM based maps -GeoNetwork.map.PROJECTION = "EPSG:900913"; -//GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-550000, 5000000, 1200000, 7000000); -GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34); -GeoNetwork.map.BACKGROUND_LAYERS = [ - new OpenLayers.Layer.OSM() - //new OpenLayers.Layer.Google("Google Streets"); -]; - -//GeoNetwork.map.RESOLUTIONS = []; - -// Define background map layer from an OGC Context. -// If a context is defined then GeoNetwork.map.BACKGROUND_LAYERS is ignored. -//* DEMIS country layer -//GeoNetwork.map.OWS = "../../maps/demis.xml"; -//* Default GeoServer layers -//GeoNetwork.map.OWS = "../../maps/geoserver_localhost.xml"; -//GeoNetwork.map.CONTEXT = "../../maps/geoserver_localhost.wmc"; - -GeoNetwork.map.CONTEXT_MAP_OPTIONS = { - controls: [], - theme:null -}; - -GeoNetwork.map.CONTEXT_MAIN_MAP_OPTIONS = { - controls: [], - theme:null -}; - -GeoNetwork.map.MAP_OPTIONS = { - projection: GeoNetwork.map.PROJECTION, - maxExtent: GeoNetwork.map.EXTENT, - restrictedExtent: GeoNetwork.map.EXTENT, - resolutions: GeoNetwork.map.RESOLUTIONS, - controls: [], - theme:null -}; - -GeoNetwork.map.MAIN_MAP_OPTIONS = { - projection: GeoNetwork.map.PROJECTION, - maxExtent: GeoNetwork.map.EXTENT, - restrictedExtent: GeoNetwork.map.EXTENT, - resolutions: GeoNetwork.map.RESOLUTIONS, - controls: [], - theme:null -}; diff --git a/web-client/src/main/resources/apps/search/print.html b/web-client/src/main/resources/apps/search/print.html deleted file mode 100644 index 5ff93d541e9..00000000000 --- a/web-client/src/main/resources/apps/search/print.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - GeoNetwork - - - - - - - - - - - - - - - - - -
      - - diff --git a/web-client/src/main/resources/apps/tabsearch/css/gndefault.css b/web-client/src/main/resources/apps/tabsearch/css/gndefault.css deleted file mode 100644 index 2a14a7d96ed..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/css/gndefault.css +++ /dev/null @@ -1,485 +0,0 @@ -body { - /*font-family : helvetica, tahoma, verdana, sans-serif;*/ - font-family : "Helvetica Neue", sans-serif; - padding : 20px; - padding-top : 32px; - font-size : 12px; - background-color : #fff !important; -} -a { - color: #0076A1; -} -p { - margin-bottom : 15px; -} -h1 { - font-size : large; - margin-bottom : 20px; -} -h2 { - font-size : 14px; - color : #333; - font-weight : bold; - margin : 10px 0; -} -pre.code { - background : #F8F8F8; - border : 1px solid #e8e8e8; - padding : 10px; - margin : 10px; - margin-left : 0px; - border-left : 5px solid #e8e8e8; - font-size : 12px !important; - line-height : 14px !important; -} -.msg .x-box-mc { - font-size : 14px; -} -#msg-div { - position : absolute; - left : 35%; - top : 10px; - width : 250px; - z-index : 20000; -} -.x-grid3-row-body p { - margin : 5px 5px 10px 5px !important; -} - - -/* Overide ext style */ -.x-layout-split, -.x-layout-collapsed { - /*background-color : #003366;*/ - background-color : #eeeeee; - width : 3px; -} -.md-info { - background-color : #FFF; - /*padding: 5px;*/ -} - -.md-info { - padding : 20px; -} -#mode-form { - width : 260px; -} -#search-form, #searchForm { - height: 100%; - position:relative; /* Required for IE */ -} - -#infoContent { - /*padding: 5px;*/ -} -.latest { - clear: both; - float: right; - width: 80%; - height: 250px; -} -.latest * input[type='checkbox'] { - display: none; -} - -.info { - float : right; - width : 28%; - height : 40%; - -moz-border-radius : 0px 0px 54px 0px; - -webkit-border-radius : 0px 0px 54px 0px; - border-radius : 0px 0px 54px 0px; - background-color : rgba(217, 210, 123, 0.85); - border : 1px solid rgba(0, 51, 102, 0.25); - padding : 3px; - margin : 13px; -} - -.info h3, .latest h3 { - border-bottom : 2px solid #003366; -} - -ul.main { - list-style-type: circle -} - -#shortcut { - position : absolute; - top : 14%; - left : 14%; - width : 72%; - height : 72%; - padding : 1em; - -moz-border-radius : 0px 34px 34px 34px; - -webkit-border-radius : 0px 34px 34px 34px; - border-radius : 0px 34px 34px 34px; - background-color : rgba(0, 0, 0, 0.85) !important; - background-color : #000000; - border-top : 1px solid rgba(0, 0, 0, 0.85); - z-index : 999; - color : #FFF; -} -#shortcut div { - width : 100%; - border-bottom : 1px solid #d9d27b; -} -#shortcut a { - color : #FFF; -} -#shortcut h1, -#shortcut h2 { - color : #d9d27b; - font-weight : bold; -} -#shortcut .label { - color : #d9d27b; - font-weight : bold; -} - -#editor { - height : 100%; - width : 100%; -} - -.metadata { - background-color : #fff; -} - -#infoContent { - vertical-align : bottom; -} -#infoContent div.md-info h2 { - border-bottom : 2px solid #959532; -} -#infoContent div.md-info { - width : 15%; - height : 200px; - float : left; - margin : 2px; - -moz-border-radius : 4px; - -webkit-border-radius : 4px; - border-radius : 4px; - background-color : rgba(10, 10, 10, 0.15); - border-top : 1px solid rgba(0, 0, 0, 0.15); -} -#header { - //border-bottom : 3px solid #0076A1; - //height : 33px; -} - -#header .catLogo { -//max-height : 31px; -} -#header div { - float : left; - width : auto; - display : inline; -} - -#footer { - height : 20px; - /* bottom: 0px; */ - text-align : center; -} -.right { - text-align: right !important; -} - -.footer { - margin : 10px; - position : absolute; - bottom : 0; -} - -.left { - left : 0; -} -#logo { - background-image : url(../../apps/images/default/gn-logo.png); - background-repeat : no-repeat; - height : 30px; -} -#mn-top { - position : absolute; - top : 0px; - right : 5px; - height : 30px; -} -.pipe { - float : right; - width : auto; - height : inherit; - /*border-left : 1px solid #C6E09B;*/ - display : inline; - margin : 0; - padding : 0 8px; -} -.pipe div { -} -.first { - border-left : 0; -} - -table.related * a, -#mn-top div a, -.mn-main { - color : #0076A1; - font-family : "Lucida Sans", "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; - text-decoration : none; -} -#mn-top div a, -.mn-main { - font-size : 1.2em; - font-weight : bold; - position : relative; - top : 2px; -} - -table.related * a:hover, -#mn-top div a:hover { - color : #959532; -} - -.mn-main { - vertical-align: top; -} - -/* Icon based on protocol prefix in related resource table */ -.WWWLINK { - background-image : url(../../apps/images/default/link.png); -} -.WWWDOWNLOAD { - background-image : url(../../apps/images/default/database_yellow.png); -} -.OGCWMS { - background-image : url(../../apps/images/default/map/server_picture.png); -} -.OGCWFS { - background-image : url(../../apps/images/default/map/server_vector.png); -} - - -/* Other icons */ -.md-mn-reset { - background-image : url(../../apps/images/default/cross.png); -} -.md-mn-kml { - background-image : url(../../apps/images/default/google-earth-link.png); -} -.md-mn-www { - background-image : url(../../apps/images/default/link.png); -} -.xmlIcon { - background-image : url(../../apps/images/default/page_code.png); -} -.addIcon { - background-image : url(../../apps/images/default/add.png) !important; -} -.privIcon { - background-image : url(../../apps/images/default/group_key.png) !important; -} -.downloadAllIcon { - background-image : url(../../apps/images/default/folder_page_white.png) !important; -} -.searchIcon { - background-image : url(../../apps/images/default/find.png) !important; -} -.validationReportIcon { - background-image : url(../../apps/images/default/schematron.gif) !important; -} -.shortcutHelpIcon { - background-image : url(../../apps/images/default/schematron.gif) !important; -} -.viewModeIcon { - background-image : url(../../apps/images/default/application_view_tile.png) !important; -} -.linkIcon { - background-image : url(../../apps/images/default/link.png) !important; -} -.addVector { - background-image : url(../../apps/images/default/vector_add.png) !important; -} -.delVector { - background-image : url(../../apps/images/default/vector_delete.png) !important; -} -.connect { - background-image : url(../../apps/images/default/connect.png) !important; -} -.subtemplateIcon { - background-image : url(../../apps/images/default/report_magnify.png) !important; -} -.processMetadata { - background-image : url(../../apps/images/default/table_gear.png) !important; -} -.repository { - background-image : url(../../apps/images/default/database_yellow.png) !important; - background-repeat : no-repeat; - padding-left : 15px; -} - -.logo-wrap div img { - max-height : 80px; - max-width : 80px; -} -.logo-wrap { - height : 90px; - width : 90px; - float : left; - margin : 4px; - margin-right : 0; - padding : 5px; - border : 1px solid #fff; -} -.logo-wrap span { - display : block; - overflow : hidden; - text-align : center; -} -.logo-over { - border : 1px solid #dddddd; -} -.logo-selected { - border : 1px solid #99bbe8; - background-color : #dddddd; - padding : 4px; -} - -#loading-mask { - position : absolute; - left : 0; - top : 0; - width : 100%; - height : 100%; - z-index : 20000; - background-color : white; -} - -#loading { - position : absolute; - left : 5px; - top : 5px; - padding : 2px; - z-index : 20001; - height : auto; -} - -#loading .loading-indicator { - background : url(../../apps/images/default/spinner.gif) no-repeat; - color : #555; - text-align : center; - height : 40px; - width : 100px; -} -span.madeBy { - color : #555; - font-size : 85%; -} -span.madeBy img { - vertical-align : middle; -} -span.madeBy a { - color : #666 -} - -.loginInfo { - text-align: right; - padding: 1px; -} - -.xmltag { - color : #25b7e6; -} -.xmlatt { - color : #959532; -} -.xmlattvalue { - color : #444; - font-weight : bold; -} -.xmltagvalue { - font-weight : bold; -} -.xmlns { - color : #959532; - font-style : italic; -} -dl.xml { - color : #444; - padding-left : 2px; -} -dl.xml * dd { - padding-left : 2px; -} -div.facets * ul, -div.facets * li { - list-style: none; -} -/** - * Facet category label - */ -div.facets > ul > li { - margin: 0px; - padding: 0px; - border-top: 1px solid #CCC; - font-weight: bold; -} -/** - * Facet sub elements - */ -div.facets ul ul { - margin-left: 5px; - margin-bottom: 5px; - font-size: 85%; -} -/** - * Facet count between (number) displayed next to a facet value - */ -.facet-count { - color: #71C0DD; - padding-left: 3px; -} -/** - * Facet clickable link which trigger the filter action - */ -div.facets * a { - text-decoration: none; -} -div.facets * .facet-more-bt, -div.facets * .facet-less-bt { - color: #71C0DD; -} -.breadcrumb * .x-btn-tl, -.breadcrumb * .x-btn-tr, -.breadcrumb * .x-btn-tc, -.breadcrumb * .x-btn-ml, -.breadcrumb * .x-btn-mr, -.breadcrumb * .x-btn-mc, -.breadcrumb * .x-btn-bl, -.breadcrumb * .x-btn-br, -.breadcrumb * .x-btn-bc{ - background: none; -} -.breadcrumb * button { - color: #0076A1; - font-size: smaller; - font-weight: bold; -} -.breadcrumb * button:hover { - color : #959532; - text-decoration: underline; -} -.breadcrumb-mn { - background-color: #FFF !important; - background-image: none; -} -.breadcrumb-mn * .current-mn { - font-weight: bold; -} -.breadcrumb-mn * a.x-menu-item { - line-height: 10px; -} -.breadcrumb-mn * .x-menu-item-icon { - height: 10px; - width: 10px; -} diff --git a/web-client/src/main/resources/apps/tabsearch/css/gnmapdefault.css b/web-client/src/main/resources/apps/tabsearch/css/gnmapdefault.css deleted file mode 100644 index 998d0c89c2f..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/css/gnmapdefault.css +++ /dev/null @@ -1,221 +0,0 @@ -.olCursorWait { - cursor : wait; -} -.print { - background-image : url(../../images/default/map/icon_print.png) !important; - height : 20px !important; - width : 20px !important; -} -.addLayerIcon { - background-image : url(../../images/default/map/add_layer.png) !important; -} -.addLayer { - background-image : url(../../images/default/map/map_go.png) !important; - height : 20px !important; - width : 20px !important; -} -.deleteLayer { - background-image : url(../../images/default/map/delete_layer.png) !important; - height : 20px !important; - width : 20px !important; -} -.measure { - background-image : url(../../images/default/map/icon_measure.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomin { - background-image : url(../../images/default/map/icon_zoomin.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomout { - background-image : url(../../images/default/map/icon_zoomout.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomfull { - background-image : url(../../images/default/map/icon_zoomfull.png) !important; - height : 20px !important; - width : 20px !important; -} -.zoomlayer { - background-image : url(../../images/default/map/icon_zoomlayer.png) !important; - height : 20px !important; - width : 20px !important; -} - -.pan { - background-image : url(../../images/default/map/icon_pan.png) !important; - height : 20px !important; - width : 20px !important; -} -.selextent { - background-image : url(../../images/default/map/icon_selextent.png) !important; - height : 20px !important; - width : 20px !important; -} -.query { - background-image : url(../../images/default/map/icon_featureinfo.png) !important; - height : 20px !important; - width : 20px !important; -} -.next { - background-image : url(../../images/default/map/resultset_next.png) !important; - height : 20px !important; - width : 20px !important; -} -.back { - background-image : url(../../images/default/map/resultset_previous.png) !important; - height : 20px !important; - width : 20px !important; -} -.savewmc { - background-image : url(../../images/default/map/icon_savewmc.png) !important; - height : 20px !important; - width : 20px !important; -} -.wmsTime { - background-image : url(../../images/default/map/wmstime.gif) !important; - height : 20px !important; - width : 20px !important; -} -.layerStyles { - background-image : url(../../images/default/map/layerstyles.png) !important; - height : 20px !important; - width : 20px !important; -} -.layerOpacity { - background-image : url(../../images/default/map/opacity.png) !important; - height : 20px !important; - width : 20px !important; -} -.wmsInfo { - background-image : url(../../images/default/map/wmsinfo.png) !important; - height : 20px !important; - width : 20px !important; -} - -.olControlLoadingPanel { - background-image : url(../../images/default/map/indicator_medium.gif); - background-position : center; - background-repeat : no-repeat; -} - -.loadwmc { - background-image : url(../../images/default/map/icon_loadwmc.png) !important; - height : 20px !important; - width : 20px !important; -} -.selectfile { - background : url(../../images/default/map/icon_selectfile.png) no-repeat 0 0 !important; -} - -.olControlMousePosition { - font-family : tahoma, arial, verdana, sans-serif; - font-size : 9pt; - font-weight : bold; -} -.olControlScaleBar { - bottom : 25px; - color : #000000; - font-family : tahoma, arial, verdana, sans-serif; - right : 10px; -} -.olControlScaleBarBar { - background-color : #000000; - border : 1px solid #000000; - height : 5px; - top : 12px; -} -.olControlScaleBarBarAlt { - background-color : #FFFFFF; - border : 1px solid #000000; - height : 5px; - top : 12px; -} -.olControlScaleBarNumbersBox { - font-size : 9pt; - top : 19px; - width : 40px; -} -.olControlScaleBarLabelBox { - font-size : 9pt; - height : 15px; - letter-spacing : 0.1em; - top : -5px; -} -.styler { - background-image : url(../../images/default/map/layerstyles.png) !important; -} -.drawPolygon { - background-image : url(../../images/default/map/draw_polygon_off.png) !important; -} -.drawCircle { - background-image : url(../../images/default/map/draw_circle_off.png) !important; -} -.drawRectangle { - background-image : url(../../images/default/map/draw_rectangle_off.png) !important; -} -.clearPolygon { - background-image : url(../../images/default/map/draw_polygon_clear_off.png) !important; -} -.icon-measure-length { - background : url(../../images/default/map/ruler.png) no-repeat scroll 0 0 transparent !important; - height : 16px !important; - margin : 0 !important; - width : 16px !important; -} - -.icon-measure-area { - background : url(../../images/default/map/ruler_square.png) no-repeat scroll 0 0 transparent !important; - height : 16px !important; - margin : 0 !important; - width : 16px !important; -} - -div.map-overlay div.overlay-element { - display : inline; - float : left; - margin : 5px; -} - -.olControlScaleLine { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; - left : 10px; -} - -.overlay-scaleline { - bottom : 0; - left : 0; - margin-top : 0; -} - -.overlay-scalechooser { - float : right !important; -} - -div.map-overlay { - bottom : 5px; - position : absolute; - right : 5px; - z-index : 1000; - width : 250px; /* For IE */ -} - -.olControlScaleLineTop { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; -} -.olControlScaleLineBottom { - font-family : tahoma, arial, helvetica, sans-serif; - font-size : xx-small; -} - -.x-collapsed-title { - color : #15428B; - font : bold 11px / 15pxtahoma, arial, verdana, sans-serif; - padding : 2px 5px; -} - diff --git a/web-client/src/main/resources/apps/tabsearch/css/gnmetadatadefault.css b/web-client/src/main/resources/apps/tabsearch/css/gnmetadatadefault.css deleted file mode 100644 index 2ad7c93280d..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/css/gnmetadatadefault.css +++ /dev/null @@ -1,542 +0,0 @@ -.metadata a { - font-weight : bold; -} - -/* Specific elements */ -.title { - font-size : 120%; - font-weight : bold; - padding-bottom : 5px; - padding-top : 15px; -} - -.x-tool-newwindow { - background-image : url(../../images/default/newwindow.png) !important; -} - -.metadata * img.logo { - max-height : 100px; - max-width : 100px; - border : 1px solid #B3D4E6; - margin : 5px; -} - -.mandatory * { - /*color : red !important;*/ - font-weight : bold; -} - -img.thumb-small { - max-width : 80px; - max-height : 80px; - min-height : 40px; -} - -span.success { - padding-left : 15px !important; - background-repeat : no-repeat; - background-image : url(../../images/default/flag_green.png); -} -span.error { - padding-left : 15px !important; - background-repeat : no-repeat; - background-image : url(../../images/default/flag_red.png); -} -.mandatory + td span input, -.mandatory + td span textarea, -.mandatory + td span select { - /*border-color : red !important;*/ - border : 2px solid #767676; -} - - -.metadata * div.info { - width : 100%; - text-align : center; - font-style : italic; - font-size : 80%; -} - -/* Help & suggestion */ -li.suggestion, -div.help { - padding : 5px; - border-bottom : 1px solid #7EADD9; -} - -li.thumbnail { - padding : 5px; - width : 100px; - text-align : center; - float : left; -} - -li.thumbnail-over, -li.suggestion-over { - background-color : #F7EEE1; -} -li.thumbnail-selected, -li.suggestion-selected { - background-color : #7EADD9; -} - -div.attr { - clear: both; -} - - -/* Tab navigation - start */ -div#tabs ul li ul { - font: bold 11px Verdana; - list-style-type: none; - margin-bottom: 0; - margin-left: 0; - margin-top: 1px; - padding: 3px 0; - text-align: left; - border-bottom: 1px solid #777788; - padding-bottom : 21px; -} -div#tabs ul li span.mode { - display : none; -} - -div#tabs ul li ul li { - float : left; - border: 1px solid #777788; - margin:0; -} -div#tabs ul li ul li.active { - background-image: url("../images/shadeactive.gif"); - border-bottom-color: white; - top:1px; - padding: 3px 7px; -} -#tabs a { - float : left; - display : block; - background: url("../images/shade.gif") repeat-x scroll left top white; - color: #2D2B2B; - margin-right: 3px; - padding: 3px 7px; - position: relative; - text-decoration: none; - z-index: 1; -} -#tabs a:hover { - color: #000000; -} -/* Tab navigation - end */ - - - -/* Layout view/edit */ -.metadata * div.el { - width : 100%; - clear : both; -} -.metadata * div.el label { - margin-right: 5px; -} -.metadata * label { - color : #767676; - float : left; -} -/* -label + span { - clear: right; - float:left; -} -*/ -.metadata * fieldset { - border-top : 1px solid #8c8c8c; - border-bottom : none; - border-left : none; - border-right : none; - padding : 0px; - margin : 0px; -} - -.metadata * legend { - font-size : 110%; - font-weight : bold; - color : #016599; - padding : 5px 0px 4px 0px; -} - - - - -/* Form - start */ - - -.metadata * input, -.metadata * textarea, -.metadata * select { - color : #353a3b; - border-color : #C1C1C1; - border : 1px solid #7EADD9; - padding : 1px 3px; -} - -.metadata * input[type='radio'] { - border-width: 0px; -} - -.metadata * select { - max-width : 200px -} - -.metadata * input.error, -.metadata * textarea.error, -.metadata * select.error { - border : 2px solid red; -} - -.metadata * input, -.metadata * textarea { - width : 60%; - float: left; -} - -.metadata * table.map * input { - float: none !important; -} - -.metadata * input.small { - width : 10%; -} - -.metadata * input[type = checkbox] { - width : 20px; -} - - -.metadata * input:focus, -.metadata * textarea:focus, -.metadata * select:focus -{ - color : #000; - background-color : #F7EEE1; -} - -.metadata * textarea { - resize : both; -} -.metadata * textarea.small { - height : 60px; -} -.metadata * textarea.medium { - height : 140px; -} -.metadata * textarea.large { - height : 240px; -} -.metadata * textarea.xml { - width : 100% !important; - min-height : 700px; /* FIXME : Auto height*/ - height : 100% !important; -} - -/* Form - end */ - - - - - - -/* Table - start */ - -.metadata * table.gn { - border-collapse : collapse; - background-color : #fff; - clear : both; - padding : 0px; - margin : 0px; - width : 100%; -} -.metadata * table.gn > tbody > tr { - -} -.metadata * table.gn > tbody > tr > td, -.metadata * table.gn > tbody > tr > th { - padding : 7px 0px 7px 7px; - vertical-align : top; - text-align : left; -} -.metadata * table.gn > tbody > tr > td.col { - padding : 0px; - width: 50%; -} - -.metadata * table.gn > tbody > tr > td.main, -.metadata * table.gn > tbody > tr > th.main { - width : 25%; -} - -.metadata * table.gn p { - margin-bottom: 5px; -} - -table.related { - border-collapse: collapse; - border-spacing: 0px; - width: 100%; -} -table.related > tbody > tr { - height : 30px; -} -table.related > tbody > tr > td { - color : #069; - border-top : 1px solid #D9AF71; - border-bottom : 1px solid #D9AF71; -} -table.related > tbody > tr > td.main { - background-color : #F7EEE1; -} -table.related * ul { - padding-top: 5px; - padding-left: 10px; -} - - -table.gn { - /*border : 1px solid #B3D4E6;*/ -} -table.gn > tbody > tr > td, -table.gn > tbody > tr > th { - border-bottom : 1px solid #B3D4E6; - color : #069; -} - -table.gn > tbody > tr > th.complex, -table.gn > tbody > tr > td.complex { - border : none; -} - -table.gn > tbody > tr > td.main, -table.gn > tbody > tr > th.main { - background-color : #EBF5FA; -} - -table.map > tbody > tr > td { - text-align : center; -} -table.map > tbody > tr > td > input, -table.map > tbody > tr > td > label { - width : 80px !important; -} - -/* Table - end */ - - - - - -/* Icon and button - start */ -span.icon { - padding-left : 20px; - background-repeat : no-repeat; -} - -span.buttons { - background-color : inherit; - text-align : left; - vertical-align : middle; -} -span.buttons a { - border-width : 0px !important; - cursor : hand; - cursor : pointer; -} -span.buttons a.small span { - margin : 1px; - padding : 0px 4px; - width : 6px !important; - height : 5px !important; - background-repeat : no-repeat; -} -.buttons a.find span { - padding-left : 15px !important; - background-image : url(../../images/default/find.png); -} -.buttons a.findsub span { - padding-left : 15px !important; - background-image : url(../../images/default/find.png); -} -.buttons a.error span { - padding-left : 15px !important; - background-image : url(../../images/default/flag_red.png); -} -.buttons a.add span { - background-image : url(../../images/default/bullet_toggle_plus.png); -} -.buttons a.del span { - background-image : url(../../images/default/bullet_toggle_minus.png); -} -.buttons a.up span { - background-image : url(../../images/default/bullet_arrow_up.png); -} -.buttons a.down span { - background-image : url(../../images/default/bullet_arrow_down.png); -} - -div.button { - float : left; - background-repeat : no-repeat; - min-width: 15px; - min-height: 15px; -} - -.tgRight { - background-image : url(../../images/default/bullet_arrow_right.png); -} -.tgDown { - background-image : url(../../images/default/bullet_arrow_down.png); -} -.edit { - background-image : url(../../images/default/page_white.png) !important; -} -.editing { - background-image : url(../../images/default/page_white_edit.png) !important; -} -.saveMetadata { - background-image : url(../../images/default/page_save.png) !important; -} -.quitMetadata { - background-image : url(../../images/default/page_go.png) !important; -} -.validateMetadata { - background-image : url(../../images/default/page_lightning.png) !important; -} -.refreshMetadata { - background-image : url(../../images/default/page_refresh.png) !important; -} -.cancel { - background-image : url(../../images/default/cancel.png) !important; -} -.configIcon { - background-image : url(../../images/default/cog.png) !important; -} -.groupKey { - background-image : url(../../images/default/group_key.png) !important; -} -.flagGreen { - background-image : url(../../images/default/flag_green.png) !important; -} -.flagOrange { - background-image : url(../../images/default/flag_orange.png) !important; -} -.flagRed { - background-image : url(../../images/default/flag_red.png) !important; -} -.valid-1 { - background-image : url(../../images/default/flag_green.png) !important; -} -.valid-0 { - background-image : url(../../images/default/flag_red.png) !important; -} -.valid--1 { -} -.cat-children, .cat-parent { - background-image : url(../../images/default/chart_organisation.png) !important; -} -.book { - background-image : url(../../images/default/book.png) !important; -} -.feedback { - background-image : url(../../images/default/feedback.png) !important; -} -.subtemplateIcon { - background-image : url(../../images/default/report_magnify.png) !important; -} -.thumbnailIcon { - background-image : url(../../images/default/picture.png) !important; -} -.thumbnailAddIcon { - background-image : url(../../images/default/picture_add.png) !important; -} -.thumbnailDelIcon { - background-image : url(../../images/default/picture_delete.png) !important; -} -.thumbnailGoIcon { - background-image : url(../../images/default/picture_go.png) !important; -} -.attached { - background-image : url(../../images/default/folder_brick.png) !important; -} -.attachedAdd { - background-image : url(../../images/default/folder_go.png) !important; -} -.uploadIconAdd { - background-image : url(../../images/default/folder_page_white.png) !important; -} -.uploadIcon { - background-image : url(../../images/default/folder_go.png) !important; -} -.suggestionIcon { - background-image : url(../../images/default/cog.png) !important; -} -.suggestionRunIcon { - background-image : url(../../images/default/page_gear.png) !important; -} -.relatedAddIcon { - background-image : url(../../images/default/link_add.png) !important; -} -.relatedDelIcon { - background-image : url(../../images/default/link_del.png) !important; -} -.lightBox { - background-image : url(../../images/default/map/icon_zoomin.png) !important; -} -.cat-applications { - background-image : url(../../images/default/category/applications.png) !important; -} -.cat-dataset { - background-image : url(../../images/default/category/dataset.png) !important; -} -.cat-datasets { - background-image : url(../../images/default/category/datasets.png) !important; -} -.cat-services, .cat-service { - background-image : url(../../images/default/category/service.png) !important; -} -.cat-maps { - background-image : url(../../images/default/category/maps.png) !important; -} -.cat-audioVideo { - background-image : url(../../images/default/category/audioVideo.png) !important; -} -.cat-caseStudies { - background-image : url(../../images/default/category/caseStudies.png) !important; -} -.cat-directories { - background-image : url(../../images/default/category/directories.png) !important; -} -.cat-related, .cat-featureCatalogue, .cat-fcats { - background-image : url(../../images/default/category/featureCatalogue.png) !important; -} -.cat-interactiveResources { - background-image : url(../../images/default/category/interactiveResources.png) !important; -} -.cat-model { - background-image : url(../../images/default/category/model.png) !important; -} -.cat-photo { - background-image : url(../../images/default/category/photo.png) !important; -} -.cat-otherResources { - background-image : url(../../images/default/category/otherResources.png) !important; -} -.cat-proceedings { - background-image : url(../../images/default/category/proceedings.png) !important; -} -/* Icon and button - end */ - - - -/* Codelist have a class attribute which could -be use for custom styling in view mode */ -.topSecret *, .confidential *, .restricted *, .secret * { - color: #ff0a0f !important; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/tabsearch/css/gnmetadataprint.css b/web-client/src/main/resources/apps/tabsearch/css/gnmetadataprint.css deleted file mode 100644 index ddb9680ed9d..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/css/gnmetadataprint.css +++ /dev/null @@ -1,62 +0,0 @@ -div.metadata { - width : auto; - border : 0; - margin : 0 5%; - padding : 0; - float : none !important; -} - -div#tabs { - display : none !important; -} - -* { - color : black !important; -} - -td.complex div h1 { - font-size : 110%; - font-weight : bold; - color : #016599; - padding : 5px 0px 4px -} - -a:link, -a:visited { - color : #520 !important; - background : transparent; - font-weight : bold; - text-decoration : underline; -} - -/* Increase thumbnails size */ -.metadata * img.logo { - max-height:none !important; - max-width : 650px !important; - float: left; - clear: both; -} - -/* Badly supported by browser - a small line strike through the legend element */ -.metadata * fieldset { - border-top : none !important; -} - -/* Display link between square bracket next to the hyperlinks */ -li a:link:after, -li a:visited:after, -td a:link:after, -td a:visited:after { - content : " [" attr(href) "] "; - font-size : 80%; -} - -/* Do not display absolute URL or Javascripts */ -a[href^="/"]:after, a[href^="#"]:after, a[href^="#"]:after, a[href^="mailto:"]:after { - content: "" !important; -} - -/* Always break page before map to avoid missing map parts */ -div.extentViewer { - page-break-before: always; -} diff --git a/web-client/src/main/resources/apps/tabsearch/css/hidemap.css b/web-client/src/main/resources/apps/tabsearch/css/hidemap.css deleted file mode 100644 index 8adf6b00614..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/css/hidemap.css +++ /dev/null @@ -1,7 +0,0 @@ -.md-mn-kml { - display: none; -} - -.addLayer { - display: none; -} \ No newline at end of file diff --git a/web-client/src/main/resources/apps/tabsearch/help_dut.html b/web-client/src/main/resources/apps/tabsearch/help_dut.html deleted file mode 100644 index dfafd12b7a4..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/help_dut.html +++ /dev/null @@ -1,32 +0,0 @@ - -

      Documentatie

      - De GeoNetwork OpenSource documentatie bevindt zich hier. -

      Snelkoppelingen

      -

      URL parameters

      - - - - - - - - - - - - - -
      - uuid={uuid} - - Toon direct de metadata van 1 record (bv search/?uuid=ed3263bc-8d0f-4047-9495-8120464b5121). -
      - mode={0|1} - - Open direct het tabblad kaart (bv. search/?mode=1). -
      - edit={id} - - Open de metadata direct in muteer modus (afhankelijk van gebruikersrechten). -
      - diff --git a/web-client/src/main/resources/apps/tabsearch/help_eng.html b/web-client/src/main/resources/apps/tabsearch/help_eng.html deleted file mode 100644 index 0d8ddbae61e..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/help_eng.html +++ /dev/null @@ -1,33 +0,0 @@ - -

      Documentation

      - GeoNetwork documentation is available here. - -

      Keyboard shortcuts

      -

      Application parameters

      - - - - - - - - - - - - - -
      - uuid={uuid} - - Popup the metadata with this uuid (eg search/?uuid=ed3263bc-8d0f-4047-9495-8120464b5121). -
      - mode={0|1} - - Display the map panel by default if mode set to "1" (eg. search/?mode=1). -
      - edit={id} - - Open the editor for the metadata identified by "id" according to user privileges. -
      - diff --git a/web-client/src/main/resources/apps/tabsearch/help_fre.html b/web-client/src/main/resources/apps/tabsearch/help_fre.html deleted file mode 100644 index a6887ae81db..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/help_fre.html +++ /dev/null @@ -1,32 +0,0 @@ - -

      Documentation

      - Consulter la documentation ici. -

      Raccourcis clavier

      -

      Permaliens

      - - - - - - - - - - - - - -
      - uuid={uuid} - - Affiche la métadonnée avec l'identifiant indiqué en mode consultation (eg search/?uuid=ed3263bc-8d0f-4047-9495-8120464b5121). -
      - mode={0|1} - - Active le mode cartographique au lancement (eg. search/?mode=1). -
      - edit={id} - - Affiche la métadonnée en mode édition (fonction des privilèges de l'utilisateur). -
      - diff --git a/web-client/src/main/resources/apps/tabsearch/help_ger.html b/web-client/src/main/resources/apps/tabsearch/help_ger.html deleted file mode 100644 index 1c5a90430b8..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/help_ger.html +++ /dev/null @@ -1,35 +0,0 @@ - - -

      Dokumentation

      - GeoNetwork Dokumentation finden Sie hier. - -

      Tastatur-Shortcuts

      - -

      Anwendungsparameter

      - - - - - - - - - - - - - -
      - uuid={uuid} - - Zeige die Metadaten mit diesem uuid (zB Suche /? uuid = ed3263bc-8d0f-4.047-9.495-8120464b5121). -
      - mode={0|1} - - Zeigt die Karte Panel standardm??ig, wenn mode auf "1" gesetzt (zB Suche / mode = 1?). -
      - edit={id} - - ?ffnen Sie den Editor f?r die Metadaten, die von "id" nach User-Privilegien identifiziert. -
      - diff --git a/web-client/src/main/resources/apps/tabsearch/help_spa.html b/web-client/src/main/resources/apps/tabsearch/help_spa.html deleted file mode 100644 index 1472eb14390..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/help_spa.html +++ /dev/null @@ -1,34 +0,0 @@ - -

      Documentaci?n

      - Documentaci?n de GeoNetwork est? disponible aqu?. - -

      atajos de teclado

      - -

      Par?metros de aplicaci?n

      - - - - - - - - - - - - - -
      - uuid={uuid} - - Muestra los metadatos con el uuid (por ejemplo, search /? uuid = ed3263bc-8d0f-4047 hasta 9495-8120464b5121). -
      - mode={0|1} - - Muestra el panel de mapa de forma predeterminada si el modo establecido en "1" (b?squeda por ejemplo, / mode = 1?). -
      - edit={id} - - Abre el editor de los metadatos identificados por "id" de acuerdo a los privilegios del usuario. -
      - diff --git a/web-client/src/main/resources/apps/tabsearch/home_dut.html b/web-client/src/main/resources/apps/tabsearch/home_dut.html deleted file mode 100644 index 07984d34f23..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/home_dut.html +++ /dev/null @@ -1,32 +0,0 @@ -

      Vindt interactieve kaarten, GIS datasets, Satelliet beelden en gerelateerde applicaties

      -

      - GeoNetwork's doel is: -

        -
      • - Het verbeteren van de toegang tot en geintegreerd gebruik van ruimtelijke data en informatie -
      • -
      • - Ter ondersteuning van beleid -
      • -
      • - Ter ondersteuning van multidisciplinair gebruik ten behoeve van duurzame ontwikkeling - -
      • -
      • - Ter verbetering van het begrip van de voordelen van geografische informatie -
      • -
      -
      - Benader deze catalogus met de volgende standaarden - -
      - - GeoNetwork opensource faciliteert het eenvoudig delen van geografisch gerefereerde thematische informatie tussen organisaties. Voor extra informatie neem contact op met - -

      - diff --git a/web-client/src/main/resources/apps/tabsearch/home_eng.html b/web-client/src/main/resources/apps/tabsearch/home_eng.html deleted file mode 100644 index e5674516d08..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/home_eng.html +++ /dev/null @@ -1,29 +0,0 @@ -

      Find Interactive Maps, GIS datasets, Satellite Imagery and Related Applications

      -

      - GeoNetwork's purpose is: -

        -
      • - To improve access to and integrated use of spatial data and information -
      • -
      • - To support decision making -
      • -
      • - To promote multidisciplinary approaches to sustainable development -
      • -
      • - To enhance understanding of the benefits of geographic information -
      • -
      -
      - Access this catalogue using the following services: - -
      - GeoNetwork opensource allows to easily share geographically referenced thematic information between different organizations. For more information please contact -

      - diff --git a/web-client/src/main/resources/apps/tabsearch/home_fre.html b/web-client/src/main/resources/apps/tabsearch/home_fre.html deleted file mode 100644 index 6e7d4166e13..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/home_fre.html +++ /dev/null @@ -1,38 +0,0 @@ -

      GeoNetwork pour trouver des cartes interactives, des jeux de données, des cartes, des images satellites ...

      - -

      -

        -
      • - Améliore l'accès et l'usage des informations et données spatiales -
      • -
      • - Aide les processus de prise de décision -
      • -
      • - Favorise l'approche multidisciplinaire nécessaire au développement durable -
      • -
      • - Améliore la compréhension des apports de l'information géographique -
      • -
      - -
      - Vous pouvez accéder à ce catalogue en utilisant les services : - -
      - GeoNetwork opensource permet de partager des informations géographiques thématiques entre organisations. - Si vous rencontrez des difficultés, - vous pouvez consulter - la documentation, - le wiki - ou - la liste de diffusion. -
      -

      - - diff --git a/web-client/src/main/resources/apps/tabsearch/images/GeoNetwork_opensource_logo_.png b/web-client/src/main/resources/apps/tabsearch/images/GeoNetwork_opensource_logo_.png deleted file mode 100644 index ffcc8653f33..00000000000 Binary files a/web-client/src/main/resources/apps/tabsearch/images/GeoNetwork_opensource_logo_.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/tabsearch/images/abstract_background_blue.jpg b/web-client/src/main/resources/apps/tabsearch/images/abstract_background_blue.jpg deleted file mode 100644 index db66f451dfd..00000000000 Binary files a/web-client/src/main/resources/apps/tabsearch/images/abstract_background_blue.jpg and /dev/null differ diff --git a/web-client/src/main/resources/apps/tabsearch/images/banner_logo.png b/web-client/src/main/resources/apps/tabsearch/images/banner_logo.png deleted file mode 100644 index 17738c6ab10..00000000000 Binary files a/web-client/src/main/resources/apps/tabsearch/images/banner_logo.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/tabsearch/images/main-bg.png b/web-client/src/main/resources/apps/tabsearch/images/main-bg.png deleted file mode 100644 index 6afafb16aa6..00000000000 Binary files a/web-client/src/main/resources/apps/tabsearch/images/main-bg.png and /dev/null differ diff --git a/web-client/src/main/resources/apps/tabsearch/images/shade.gif b/web-client/src/main/resources/apps/tabsearch/images/shade.gif deleted file mode 100644 index 2dd62496ae4..00000000000 Binary files a/web-client/src/main/resources/apps/tabsearch/images/shade.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/tabsearch/images/shadeactive.gif b/web-client/src/main/resources/apps/tabsearch/images/shadeactive.gif deleted file mode 100644 index 0a7823211e4..00000000000 Binary files a/web-client/src/main/resources/apps/tabsearch/images/shadeactive.gif and /dev/null differ diff --git a/web-client/src/main/resources/apps/tabsearch/index.html b/web-client/src/main/resources/apps/tabsearch/index.html deleted file mode 100644 index b053a04427b..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/index.html +++ /dev/null @@ -1,103 +0,0 @@ -<<<<<<< HEAD - - - - - - - - - - -

      JavaScript warning

      -

      To use GeoNetwork you need to enable JavaScript in your browser

      - - -======= - - - - GeoNetwork - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -
      -
      Loading ...
      -
      - - -
      - -
      -
      -
      - -
      - - - - - - - - - - - - ->>>>>>> 0e1f31f11638fcdc12918f1df339d3b54c7632b4 diff --git a/web-client/src/main/resources/apps/tabsearch/index_debug.html b/web-client/src/main/resources/apps/tabsearch/index_debug.html deleted file mode 100644 index 4fb0f17e568..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/index_debug.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - GeoNetwork - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -
      -
      Loading ...
      -
      - - -
      - -
      -
      -
      - -
      - - - - - - - - - - - \ No newline at end of file diff --git a/web-client/src/main/resources/apps/tabsearch/js/App.js b/web-client/src/main/resources/apps/tabsearch/js/App.js deleted file mode 100644 index c1836ec0ef1..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/js/App.js +++ /dev/null @@ -1,1263 +0,0 @@ -Ext.namespace('GeoNetwork'); - -var catalogue; -var app; -var cookie; - -var nodeInfo = /([a-zA-Z0-9_\-]+)\/([a-z]{3})\/tabsearch/ - .exec(window.location.href); -var catalogueLang = nodeInfo[2] || GeoNetwork.Util.defaultLocale; -var catalogueNode = nodeInfo[1] || 'srv'; - - -GeoNetwork.app = function () { - // private vars: - var geonetworkUrl; - var searching = false; - var editorWindow; - var editorPanel; - var resultPanel; - - /** - * Application parameters are : * any search form ids (eg. any) * mode=1 for - * visualization * advanced: to open advanced search form by default * - * search: to trigger the search * uuid: to display a metadata record based - * on its uuid * extent: to set custom map extent - */ - var urlParameters = {}; - - /** - * Catalogue manager - */ - var catalogue; - - /** - * An interactive map panel for data visualization - */ - var iMap; - - var searchForm; - - var facetsPanel; - - var optionsForm; - - var resultsPanel; - - var metadataResultsView; - - var tBar, bBar; - - var mainTagCloudViewPanel, tagCloudViewPanel; - - var visualizationModeInitialized = false; - - - function setTab(id) { - var tabPanel = Ext.getCmp("GNtabs"), - tabs = tabPanel.find('id', id); - if (tabs[0]) { - tabPanel.setActiveTab(tabs[0]); - } - } - - function addWMSLayer(arr) { - app.switchMode(); - app.getIMap().addWMSLayer(arr); - } - - /** - * Create a mapControl - * - * @return - */ - function initMap() { - iMap = new GeoNetwork.mapApp(); - var layers={}, options={}; - if(GeoNetwork.map.CONTEXT || GeoNetwork.map.OWS) { - options = GeoNetwork.map.CONTEXT_MAIN_MAP_OPTIONS; - } else { - options = GeoNetwork.map.MAIN_MAP_OPTIONS; - layers = GeoNetwork.map.BACKGROUND_LAYERS; - } - iMap.init(layers, options); - metadataResultsView.addMap(iMap.getMap()); - visualizationModeInitialized = true; - return iMap; - } - - /** - * Create a language switcher mode - * - * @return - */ - function createLanguageSwitcher(lang) { - return new Ext.form.FormPanel({ - renderTo : 'lang-form', - width : 80, - border : false, - layout : 'hbox', - hidden : GeoNetwork.Util.locales.length === 1 ? true : false, - items : [ new Ext.form.ComboBox({ - mode : 'local', - triggerAction : 'all', - width : 80, - store : new Ext.data.ArrayStore({ - idIndex : 2, - fields : [ 'id', 'name', 'id2' ], - data : GeoNetwork.Util.locales - }), - valueField : 'id2', - displayField : 'name', - value : lang, - listeners : { - select : function (cb, record, idx) { - window.location.replace('?hl=' + cb.getValue()); - } - } - }) ] - }); - } - - /** - * Error message in case of bad login - * - * @param cat - * @param user - * @return - */ - function loginAlert(cat, user) { - Ext.Msg.show({ - title : 'Login', - msg : 'Login failed. Check your username and password.', - /* TODO : Get more info about the error */ - icon : Ext.MessageBox.ERROR, - buttons : Ext.MessageBox.OK - }); - } - - /** - * Create a default login form and register extra events in case of error. - * - * @return - */ - function createLoginForm() { - var loginForm = new GeoNetwork.LoginForm({ - renderTo : 'login-form', - catalogue : catalogue, - layout : 'hbox', - bodyStyle : { - "background-color" : "transparent" - }, - hideLoginLabels : GeoNetwork.hideLoginLabels - }); - - catalogue.on('afterBadLogin', loginAlert, this); - - // Store user info in cookie to be displayed if user reload the page - // Register events to set cookie values - catalogue.on('afterLogin', function () { - cookie.set('user', catalogue.identifiedUser); - }); - catalogue.on('afterLogout', function () { - cookie.set('user', undefined); - }); - - // Refresh login form if needed - var user = cookie.get('user'); - if (user) { - catalogue.identifiedUser = user; - loginForm.login(catalogue, true); - } - } - function getResultsMap() { - // Create map panel - var map = undefined; - - if (GeoNetwork.map.CONTEXT) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.CONTEXT, - async: false - }); - if (request.responseText) { - var text = request.responseText; - var format = new OpenLayers.Format.WMC(); - map = format.read(text, {map: GeoNetwork.map.CONTEXT_MAP_OPTIONS}); - } - } - else if (GeoNetwork.map.OWS) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.OWS, - async: false - }); - if (request.responseText) { - var parser = new OpenLayers.Format.OWSContext(); - var text = request.responseText; - map = parser.read(text, {map: GeoNetwork.map.CONTEXT_MAP_OPTIONS}); - } - } - - if (!map) { - map = new OpenLayers.Map('results_map', GeoNetwork.map.MAP_OPTIONS); - map.addLayers(GeoNetwork.map.BACKGROUND_LAYERS); - map.zoomToMaxExtent(); - } - - var mapPanel = new GeoExt.MapPanel({ - id : "resultsMap", - height : 125, - width : 250, - stateful: false, - map : map - }); - - return mapPanel; - } - - /** - * Create a default search form with advanced mode button - * - * @return - */ - function createSearchForm() { - // Add advanced mode criteria to simple form - start - var advancedCriteria = []; - var services = catalogue.services; - - // Multi select organisation field - var orgNameStore = new GeoNetwork.data.OpenSearchSuggestionStore({ - url : services.opensearchSuggest, - rootId : 1, - baseParams : { - field : 'orgName' - } - }); - - var orgNameField = new Ext.ux.form.SuperBoxSelect({ - hideLabel : false, - minChars : 0, - queryParam : 'q', - hideTrigger : false, - id : 'E_orgName', - name : 'E_orgName', - store : orgNameStore, - valueField : 'value', - displayField : 'value', - valueDelimiter : ' or ', - // tpl: tpl, - fieldLabel : OpenLayers.i18n('org') - }); - - // Multi select keyword - var themekeyStore = new GeoNetwork.data.OpenSearchSuggestionStore({ - url : services.opensearchSuggest, - rootId : 1, - baseParams : { - field : 'keyword' - } - }); - - var themekeyField = new Ext.ux.form.SuperBoxSelect({ - hideLabel : false, - minChars : 0, - queryParam : 'q', - hideTrigger : false, - id : 'E_themekey', - name : 'E_themekey', - store : themekeyStore, - valueField : 'value', - displayField : 'value', - valueDelimiter : ' or ', - fieldLabel : OpenLayers.i18n('keyword') - }); - - var catalogueField = GeoNetwork.util.SearchFormTools.getCatalogueField( - services.getSources, services.logoUrl, true); - var groupField = GeoNetwork.util.SearchFormTools.getGroupField( - services.getGroups, true); - var metadataTypeField = GeoNetwork.util.SearchFormTools - .getMetadataTypeField(true); - var categoryField = GeoNetwork.util.SearchFormTools.getCategoryField( - services.getCategories, '../../apps/images/default/category/', true); - var validField = GeoNetwork.util.SearchFormTools.getValidField(true); - var spatialTypes = GeoNetwork.util.SearchFormTools - .getSpatialRepresentationTypeField(null, true); - var denominatorField = GeoNetwork.util.SearchFormTools - .getScaleDenominatorField(true); - - // Add hidden fields to be use by quick metadata links from the admin - // panel (eg. my metadata). - var ownerField = new Ext.form.TextField({ - name : 'E__owner', - hidden : true - }); - var isHarvestedField = new Ext.form.TextField({ - name : 'E__isHarvested', - hidden : true - }); - - advancedCriteria.push(themekeyField, orgNameField, categoryField, - spatialTypes, denominatorField, catalogueField, groupField, - metadataTypeField, validField, ownerField, isHarvestedField); - - // Hide or show extra fields after login event - var adminFields = [ groupField, metadataTypeField, validField ]; - Ext.each(adminFields, function (item) { - item.setVisible(false); - }); - - catalogue.on('afterLogin', function () { - Ext.each(adminFields, function (item) { - item.setVisible(true); - }); - groupField.getStore().reload(); - }); - catalogue.on('afterLogout', function () { - Ext.each(adminFields, function (item) { - item.setVisible(false); - }); - groupField.getStore().reload(); - }); - - var hideInspirePanel = catalogue.getInspireInfo().enable === "false"; - var searchCb = function () { - var any = Ext.get('E_any'); - if (any) { - if (any.getValue() === OpenLayers.i18n('fullTextSearch')) { - any.setValue(''); - } - } - catalogue.startRecord = 1; // Reset - // start - // record - search(); - setTab('results'); - - /// Trigger the onsearch event which update search form state - Ext.getCmp('searchForm').fireEvent('onsearch'); - }; - - return new GeoNetwork.SearchFormPanel({ - id : 'searchForm', - stateId: 's', - bodyStyle : 'text-align: center;', - border : false, - searchBt: null, - searchCb: searchCb, - resetBt: null, - items : [ - // Simple search form and search buttons - { - bodyStyle : { - 'padding-top' : '50px' - }, - layout : { - type : 'hbox', - pack : 'center', - align : 'center' - }, - border : false, - items : [ - { - html : '

      ' + - OpenLayers.i18n('Searchforspatialdataon') + '

      ', - margins : '5 10 5 10', - border : false - }, - new GeoNetwork.form.OpenSearchSuggestionTextField({ - // hideLabel: true, - width : 285, - height : 40, - minChars : 2, - loadingText : '...', - hideTrigger : true, - url : catalogue.services.opensearchSuggest - }), - new Ext.Button({ - text : OpenLayers.i18n('search'), - id : 'searchBt', - margins : '3 5 3 5', - icon : '../images/default/find.png', - iconAlign : 'right', - listeners : { - click : searchCb - } - }), - new Ext.Button({ - text : OpenLayers - .i18n('reset'), - tooltip : OpenLayers - .i18n('resetSearchForm'), - // iconCls: 'md-mn-reset', - id : 'resetBt', - margins : '3 5 3 5', - icon : '../images/default/cross.png', - iconAlign : 'right', - listeners : { - click : function () { - facetsPanel.reset(); - Ext.getCmp('searchForm').getForm().reset(); - } - } - }) - ] - }, - // Panel with Advanced search, Help and About Links - { - layout : { - type : 'hbox', - pack : 'center', - align : 'center' - }, - id : 'advSearch', - autoScroll : true, - border : false, - height : 60, - defaults : { - bodyStyle : {}, - margins : '0 10 0 10', - border : false - }, - items : [{ - html : '' + - OpenLayers.i18n('Advanced') + '' - }, - { - html : '' + - OpenLayers.i18n('Help') + '' - }, - { - html : '' + - OpenLayers.i18n('About') + '

      ' - }] - }, - // Advanced search form - { - id : 'advSearchTabs', - layout : { - type : 'hbox', - pack : 'center', - align : 'center' - }, - plain : true, - autoHeight : true, - border : false, - autoScroll : true, - deferredRender : false, - defaults : { - bodyStyle : 'padding:10px' - }, - items : [{ - title : OpenLayers.i18n('What'), - margins : '0 5 0 0', - layout : 'form', - items : [ - advancedCriteria, - GeoNetwork.util.SearchFormTools - .getTypesField( - GeoNetwork.searchDefault.activeMapControlExtent, - true) - ] - }, - // Where panel - { - title : OpenLayers.i18n('Where'), - margins : '0 5 0 5', - bodyStyle : 'padding:0px', - layout : 'form', - items : [ GeoNetwork.util.SearchFormTools - .getSimpleMap( - GeoNetwork.map.BACKGROUND_LAYERS, - GeoNetwork.map.MAP_OPTIONS, - false) - ] - }, - // When & Options panel - { - title : OpenLayers.i18n('When') + ' & ' + OpenLayers.i18n('Options'), - margins : '0 5 0 5', - defaultType : 'datefield', - layout : 'form', - items : [ - GeoNetwork.util.SearchFormTools - .getWhen(), { - xtype : 'box', - autoEl : 'div', - height : 20 - }, - optionsForm - ] - }, - // INSPIRE panel - { - title : 'INSPIRE', - margins : '0 5 0 5', - // hidden: hideInspirePanel, - defaultType : 'datefield', - layout : 'form', - items : GeoNetwork.util.INSPIRESearchFormTools - .getINSPIREFields( - catalogue.services, - true) - } - ] - } - ] - }); - } - - function search() { - searching = true; - catalogue.search('searchForm', app.loadResults, null, - catalogue.startRecord, true); - } - - function initPanels() { - var resultsPanel = Ext.getCmp('resultsPanel'); - if (!resultsPanel.isVisible()) { - resultsPanel.show(); - } - - } - /** - * Bottom bar - * - * @return - */ - function createBBar() { - - var previousAction = new Ext.Action({ - id : 'previousBt', - text : '<<', - handler : function () { - var from = catalogue.startRecord - parseInt(Ext.getCmp('E_hitsperpage').getValue(), 10); - if (from > 0) { - catalogue.startRecord = from; - search(); - } - }, - scope : this - }); - - var nextAction = new Ext.Action({ - id : 'nextBt', - text : '>>', - handler : function () { - catalogue.startRecord += parseInt(Ext.getCmp('E_hitsperpage') - .getValue(), 10); - search(); - }, - scope : this - }); - - return new Ext.Toolbar({ - items : [ previousAction, '|', nextAction, '|', { - xtype : 'tbtext', - text : '', - id : 'info' - } ] - }); - - } - - /** - * Results panel layout with top, bottom bar and DataView - * - * @return - */ - function createResultsPanel(permalinkProvider) { - metadataResultsView = new GeoNetwork.MetadataResultsView({ - catalogue : catalogue, - displaySerieMembers : true, - autoScroll : true, - tpl : GeoNetwork.Templates.FULL - }); - - catalogue.resultsView = metadataResultsView; - - tBar = new GeoNetwork.MetadataResultsToolbar({ - catalogue : catalogue, - searchBtCmp : Ext.getCmp('searchBt'), - sortByCmp : Ext.getCmp('E_sortBy'), - metadataResultsView : metadataResultsView, - permalinkProvider : permalinkProvider - }); - - bBar = createBBar(); - - resultPanel = new Ext.Panel({ - id : 'resultsPanel', - border : false, - hidden : true, - bodyCssClass : 'md-view', - autoScroll : true, - autoWidth : true, - tbar : tBar, - layout : 'fit', - items : metadataResultsView, - // paging bar on the bottom - bbar : bBar - }); - - return resultPanel; - } - function loadCallback(el, success, response, options) { - - if (!success) { - // createMainTagCloud(); - // createLatestUpdate(); -// } else { - Ext.get('helpPanel').getUpdater().update({ - url : '../../apps/tabsearch/help_eng.html' - }); - } - } - /** - * private: methode[creatAboutPanel] About information panel displayed on - * load - * - * :return: - */ - function creatAboutPanel() { - return new Ext.Panel({ - border : true, - id : 'infoPanel', - baseCls : 'md-info', - autoWidth : true, - autoLoad : { - url : catalogue.services.rootUrl + '/about?modal=true', - callback : loadCallback, - scope : this, - loadScripts : true - } - }); - } - /** - * private: methode[createHelpPanel] Help panel displayed on load - * - * :return: - */ - function createHelpPanel() { - return new Ext.Panel({ - border : false, - frame : false, - bodyStyle : { - 'background-color' : 'white', - padding : '5px' - }, - autoScroll : true, - baseCls : 'none', - id : 'helpPanel', - autoWidth : true, - autoLoad : { - url : '../../apps/tabsearch/help_' + catalogue.LANG + '.html', - callback: initShortcut, - scope : this, - loadScripts : false - } - }); - } - - /** - * Main tagcloud displayed in the information panel - * - * @return - */ - function createMainTagCloud() { - var tagCloudView = new GeoNetwork.TagCloudView({ - catalogue : catalogue, - query : 'fast=true&summaryOnly=true', - renderTo : 'tag', - onSuccess : 'app.loadResults' - }); - - return tagCloudView; - } - /** - * Create latest metadata panel. - */ - function createLatestUpdate() { - var latestView = new GeoNetwork.MetadataResultsView({ - catalogue : catalogue, - autoScroll : true, - tpl : GeoNetwork.Settings.latestTpl - }); - var latestStore = GeoNetwork.Settings.mdStore(); - latestView.setStore(latestStore); - latestStore.on('load', function () { - Ext.ux.Lightbox.register('a[rel^=lightbox]'); - }); - var p = new Ext.Panel({ - border : false, - bodyCssClass : 'md-view', - items : latestView, - renderTo : 'latest' - }); - catalogue.kvpSearch(GeoNetwork.Settings.latestQuery, null, null, null, - true, latestView.getStore()); - } - /** - * Extra tag cloud to displayed current search summary TODO : not really a - * narrow your search component. - * - * @return - */ - function createTagCloud() { - var tagCloudView = new GeoNetwork.TagCloudView({ - catalogue : catalogue - }); - - return new Ext.Panel({ - id : 'tagCloudPanel', - border : true, - hidden : true, - baseCls : 'md-view', - items : tagCloudView - }); - } - - function edit(metadataId, create, group, child) { - - if (!this.editorWindow) { - this.editorPanel = new GeoNetwork.editor.EditorPanel({ - defaultViewMode : GeoNetwork.Settings.editor.defaultViewMode, - catalogue : catalogue, - xlinkOptions : { - CONTACT : true - } - }); - - this.editorWindow = new Ext.Window({ - tools : [ { - id : 'newwindow', - qtip : OpenLayers.i18n('newWindow'), - handler : function (e, toolEl, panel, tc) { - window.open(GeoNetwork.Util.getBaseUrl(location.href) + "#edit=" + - panel.getComponent('editorPanel').metadataId); - panel.hide(); - }, - scope : this - } ], - title : OpenLayers.i18n('mdEditor'), - id : 'editorWindow', - layout : 'fit', - modal : false, - items : this.editorPanel, - closeAction : 'hide', - collapsible : true, - collapsed : false, - maximizable : true, - maximized : true, - resizable : true, - // constrain: true, - width : 980, - height : 800 - }); - this.editorPanel.setContainer(this.editorWindow); - this.editorPanel.on('editorClosed', function () { - Ext.getCmp('searchBt').fireEvent('click'); - }); - } - if (metadataId) { - this.editorWindow.show(); - this.editorPanel.init(metadataId, create, group, child); - } - } - function createOptionsForm() { - var hitsPerPage = [ [ '10' ], [ '20' ], [ '50' ], [ '100' ] ], items = []; - - items.push(GeoNetwork.util.SearchFormTools.getSortByCombo()); - - items.push(new Ext.form.ComboBox({ - id : 'E_hitsperpage', - name : 'E_hitsperpage', - mode : 'local', - triggerAction : 'all', - fieldLabel : OpenLayers.i18n('hitsPerPage'), - value : hitsPerPage[1], // Set arbitrarily the second value of the - // array as the default one. - store : new Ext.data.ArrayStore({ - id : 0, - fields : [ 'id' ], - data : hitsPerPage - }), - valueField : 'id', - displayField : 'id' - })); - - return items; - } - - function createHeader() { - var info = catalogue.getInfo(); - Ext.getDom('title').innerHTML = ''; - document.title = info.name; - } - - // public space: - return { - init : function () { - var geonetworkUrl = GeoNetwork.URL || window.location.href.match( - /(http.*\/.*)\/.*\/.*\/.*/, '')[1]; - - urlParameters = GeoNetwork.Util.getParameters(location.href); - var lang = urlParameters.hl || GeoNetwork.Util.defaultLocale; - - if (urlParameters.extent) { - urlParameters.bounds = new OpenLayers.Bounds( - urlParameters.extent[0], urlParameters.extent[1], - urlParameters.extent[2], urlParameters.extent[3]); - } - - if (urlParameters.wmc) { - GeoNetwork.map.CONTEXT = urlParameters.wmc; - } - if (urlParameters.ows) { - GeoNetwork.map.OWS = urlParameters.ows; - } - - // Init cookie - cookie = new Ext.state.CookieProvider({ - expires : new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 365)) - }); - - // set a permalink provider which will be the main state provider. - var permalinkProvider = new GeoExt.state.PermalinkProvider({ - encodeType : false - }); - - Ext.state.Manager.setProvider(permalinkProvider); - - // Create connexion to the catalogue - catalogue = new GeoNetwork.Catalogue({ - statusBarId : 'info', - lang: lang, - node: catalogueNode, - hostUrl: geonetworkUrl, - mdOverlayedCmpId: 'resultsPanel', - adminAppUrl: geonetworkUrl + '/' + catalogueNode + '/' + lang + '/admin.console', - // Declare default store to be used for records and - // summary - metadataStore : GeoNetwork.Settings.mdStore ? GeoNetwork.Settings - .mdStore() - : GeoNetwork.data.MetadataResultsStore(), - metadataCSWStore : GeoNetwork.data - .MetadataCSWResultsStore(), - summaryStore : GeoNetwork.data.MetadataSummaryStore(), - editMode : 2, // TODO : create constant - metadataEditFn : edit - }); - - createHeader(); - - // Options Panel - optionsForm = createOptionsForm(); - - // Search form - searchForm = createSearchForm(); - - // Top navigation widgets - // createModeSwitcher(); - createLanguageSwitcher(lang); - createLoginForm(); - edit(); - - // Results map - var resultsMap = getResultsMap(); - - // Search result - resultsPanel = createResultsPanel(permalinkProvider); - - tagCloudViewPanel = createTagCloud(); - - // Initialize map viewer - initMap(); - - // Register events on the catalogue - var margins = '0 0 0 0'; - var breadcrumb = new Ext.Panel({ - layout:'column', - cls: 'breadcrumb', - defaultType: 'button', - border: false, - split: false -// layoutConfig: { -// columns:3 -// } - }); - facetsPanel = new GeoNetwork.FacetsPanel({ - searchForm: searchForm, - breadcrumb: breadcrumb, - maxDisplayedItems: GeoNetwork.Settings.facetMaxItems || 7, - facetListConfig: GeoNetwork.Settings.facetListConfig || [] - }); - - var viewport = new Ext.Viewport({ - layout : 'border', - id : 'vp', - items : [ // todo: should add header here? - { - id : 'header', - height : 80, - region : 'north', - border : false - }, - new Ext.TabPanel({ - region : 'center', - id : 'GNtabs', - deferredRender : false, - plain : true, - autoScroll : true, - defaults : { - autoScroll : true - }, - margins : '0 0 0 0', - border : false, - activeTab : 0, - items : [ {// basic search panel - title : OpenLayers.i18n('Home'), - // contentEl:'dvZoeken', - layout : 'fit', - closable : false, - autoScroll : true, - items : [ { - id : 'alignCenter', - border : false, - layout : 'column', - layoutConfig : { - pack : 'center', - align : 'center' - }, - items : [{ - columnWidth : 0.05, - border : false, - html : ' ' - }, { - columnWidth : 0.90, - border : false, - items : [ searchForm ] - }, { - border : false, - columnWidth : 0.05, - items : [ tagCloudViewPanel ] - } ] - } ] - }, {// search results panel - id : 'results', - title : OpenLayers.i18n('List'), - autoScroll : false, - layout : 'border', - items : [{ - region : 'north', - border : false, - height: 30, - items : [ breadcrumb ] - }, {// sidebar searchform - region : 'west', - id : 'west', - border : true, - width : 250, - items : [ resultsMap, facetsPanel ] - }, { - layout : 'fit', - region : 'center', - border : false, - autoScroll : true, - items : [ resultPanel ] - } ], - /* - * Hide tab panel until a search is done - * Seem "hidden:true" as in other places - * doesn't work for Tabs, and need to - * use a listener! - * - * See - * http://www.sencha.com/forum/showthread.php?65441-Starting-A-Tab-Panel-with-a-Hidden-Tab - */ - listeners : { - render : function (c) { - c.ownerCt.hideTabStripItem(c); - } - } - - }, {// map - id : 'map', - title : OpenLayers.i18n('Map'), - layout : 'fit', - margins : margins, - listeners : { - // Only initialized the map - // application when the tab is - // activated - // then the layout is done and all - // sub widget like printPanel could - // access the map layout. - activate : function (p) { - p.add(iMap.getViewport()); - p.doLayout(); - } - } - } ] - }), - { - id : 'footer', - region : 'south', - align : 'left', - bodyStyle : { - 'text-align' : 'left', - padding : '0px 3px' - }, - border : true, - html : "" + OpenLayers.i18n('Poweredby') + - " ", - layout : 'fit' - } - ] - }); - - // Hide advanced search options - Ext.get("advSearchTabs").hide(); - - // Ext.getCmp('mapprojectionselector').syncSize(); - // Ext.getCmp('mapprojectionselector').setWidth(130); - - /* Init form field URL according to URL parameters */ - GeoNetwork.util.SearchTools.populateFormFromParams(searchForm, - urlParameters); - - /* Trigger search if search is in URL parameters */ - if (urlParameters.search !== undefined) { - Ext.getCmp('searchBt').fireEvent('click'); - } - if (urlParameters.edit !== undefined && urlParameters.edit !== '') { - catalogue.metadataEdit(urlParameters.edit); - } - if (urlParameters.create !== undefined) { - resultPanel.getTopToolbar().createMetadataAction - .fireEvent('click'); - } - if (urlParameters.uuid !== undefined) { - catalogue.metadataShow(urlParameters.uuid, true); - } else if (urlParameters.id !== undefined) { - catalogue.metadataShowById(urlParameters.id, true); - } - - if (urlParameters.insert !== undefined) { - setTimeout(function () { - var actionCtn = Ext.getCmp('resultsPanel').getTopToolbar(); - actionCtn.mdImportAction.handler.apply(actionCtn); - }, 500); - } - - // FIXME : should be in Search field configuration - Ext.get('E_any').setWidth(285); - Ext.get('E_any').setHeight(28); - - metadataResultsView.addMap(Ext.getCmp('resultsMap').map); - - if (GeoNetwork.searchDefault.activeMapControlExtent) { - Ext.getCmp('geometryMap').setExtent(); - } - if (urlParameters.bounds) { - Ext.getCmp('geometryMap').map - .zoomToExtent(urlParameters.bounds); - } - - // resultPanel.setHeight(Ext.getCmp('center').getHeight()); - - var events = [ 'afterDelete', 'afterRating', 'afterLogout', - 'afterLogin' ]; - Ext.each(events, function (e) { - catalogue.on(e, function () { - if (searching === true) { - Ext.getCmp('searchBt').fireEvent('click'); - } - - }); - }); - - // Hack to run search after all app is rendered within a sec ... - // It could have been better to trigger event in - // SearchFormPanel#applyState - // FIXME - if (urlParameters.s_search !== undefined) { - setTimeout(function () { - Ext.getCmp('searchBt').fireEvent('click'); - }, 500); - } - - initShortcut(); - }, - getIMap : function () { - // init map if not yet initialized - if (!iMap) { - initMap(); - } - - // TODO : maybe we should switch to visualization mode also ? - return iMap; - }, - getHelpWindow : function () { - return new Ext.Window({ - title : OpenLayers.i18n('Help'), - layout : 'fit', - height : 600, - width : 600, - closable : true, - resizable : true, - draggable : true, - items : [ createHelpPanel() ] - }); - }, - getAboutWindow : function () { - return new Ext.Window({ - title : OpenLayers.i18n('About'), - layout : 'fit', - height : 600, - width : 600, - closable : true, - resizable : true, - draggable : true, - items : [ creatAboutPanel() ] - }); - }, - getCatalogue : function () { - return catalogue; - }, - getMetadataResultsView : function () { - return metadataResultsView; - }, - /** - * Do layout - * - * @param response - * @return - */ - loadResults : function (response) { - // Show "List results" panel - var tabPanel = Ext.getCmp("GNtabs"); - tabPanel.unhideTabStripItem(tabPanel.items.itemAt(1)); - - initPanels(); - facetsPanel.refresh(response); - - // FIXME : result panel need to update layout in case of slider - // Ext.getCmp('resultsPanel').syncSize(); - - Ext.getCmp('previousBt').setDisabled(catalogue.startRecord === 1); - Ext.getCmp('nextBt').setDisabled( - catalogue.startRecord + parseInt(Ext.getCmp('E_hitsperpage').getValue(), - 10) > catalogue.metadataStore.totalLength); - if (Ext.getCmp('E_sortBy').getValue()) { - Ext.getCmp('sortByToolBar').setValue( - Ext.getCmp('E_sortBy').getValue() + "#" + Ext.getCmp('sortOrder').getValue()); - - } else { - Ext.getCmp('sortByToolBar').setValue( - Ext.getCmp('E_sortBy').getValue()); - - } - - // Fix for width sortBy combo in toolbar - // See this: - // http://www.sencha.com/forum/showthread.php?122454-TabPanel-deferred-render-false-nested-toolbar-layout-problem - Ext.getCmp('sortByToolBar').syncSize(); - Ext.getCmp('sortByToolBar').setWidth(130); - - resultsPanel.syncSize(); - - Ext.ux.Lightbox.register('a[rel^=lightbox]'); - }, - /** - * Activate map tab - */ - switchMode : function () { - setTab('map'); - } - }; -}; - -Ext.onReady(function () { - var lang = /hl=([a-z]{3})/.exec(location.href); - GeoNetwork.Util.setLang(lang && lang[1], '..'); - - Ext.QuickTips.init(); - setTimeout(function () { - Ext.get('loading').remove(); - Ext.get('loading-mask').fadeOut({ - remove : true - }); - }, 250); - - app = new GeoNetwork.app(); - app.init(); - catalogue = app.getCatalogue(); - - // overwrite default detail-click action - catalogue.metadataShow = function (uuid) { - var tabPanel = Ext.getCmp("GNtabs"), - tabs = tabPanel.find('id', uuid); - - if (tabs[0]) { - tabPanel.setActiveTab(tabs[0]); - } else { - // Retrieve information in synchrone mode todo: this doesn't work - // here - var store = GeoNetwork.data.MetadataResultsFastStore(); - catalogue.kvpSearch("fast=index&uuid=" + uuid, null, null, null, - true, store, null, false); - var record = store.getAt(store.find('uuid', uuid)); - var showFeedBackButton = record.get('email'); - var RowTitle = uuid; - - try { - RowTitle = record.data.title; - } catch (e) { - } - var RowLabel = RowTitle; - if (RowLabel.length > 18) { - RowLabel = RowLabel.substr(0, 17) + "..."; - } - - var aResTab = new GeoNetwork.view.ViewPanel({ - serviceUrl : catalogue.services.mdView + '?uuid=' + uuid, - lang : catalogue.lang, - autoScroll : true, - resultsView : app.getMetadataResultsView(), - layout : 'fit', - // autoHeight:true, - padding : '5px 25px', - currTab : GeoNetwork.defaultViewMode || 'simple', - printDefaultForTabs : GeoNetwork.printDefaultForTabs || false, - catalogue : catalogue, - // maximized: true, - metadataUuid : uuid, - showFeedBackButton: showFeedBackButton, - record : record - }); - - // Override zoomToAction (maye better way?). TODO: Check as seem - // calling old handler code - aResTab.actionMenu.zoomToAction.setHandler(function () { - var uuid = this.record.get('uuid'); - this.resultsView.zoomTo(uuid); - - // Custom code to display Map tab - tabPanel.setActiveTab(tabPanel.items.itemAt(2)); - }, aResTab.actionMenu); - - aResTab.actionMenu.viewAction.hide(); - - tabPanel.add({ - title : RowLabel, - tabTip : RowTitle, - iconCls : 'tabs', - id : uuid, - closable : true, - items : [ aResTab ] - }).show(); - } - }; -}); diff --git a/web-client/src/main/resources/apps/tabsearch/js/Settings.js b/web-client/src/main/resources/apps/tabsearch/js/Settings.js deleted file mode 100644 index 4c9dc9356c2..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/js/Settings.js +++ /dev/null @@ -1,91 +0,0 @@ -GeoNetwork.Settings = {}; - -// Default to absolute path without apps/search -GeoNetwork.URL = '../..'; - -//OpenLayers.ProxyHostURL = '/cgi-bin/proxy.cgi?url='; -// GeoNetwork proxy is much more permissive than OL one -OpenLayers.ProxyHostURL = '../../proxy?url='; - -OpenLayers.ProxyHost = function(url){ - /** - * Do not use proxy for local domain. - * This is required to keep the session activated. - */ - if (url && url.indexOf(window.location.host) != -1) { - return url; - } else { - return OpenLayers.ProxyHostURL + encodeURIComponent(url); - } -}; - - -GeoNetwork.Util.defaultLocale = 'eng'; -// Restrict locales to a subset of languages -//Restrict locales to a subset of languages -//GeoNetwork.Util.locales = [ -// ['en', 'English', 'eng'], -// ['fr', 'Français', 'fre'] -// ]; -GeoNetwork.searchDefault = { - activeMapControlExtent: false -}; -GeoNetwork.advancedFormButton = true; - -GeoNetwork.Settings.editor = { - defaultViewMode : 'simple', - editHarvested: false -// defaultViewMode : 'inspire' -}; - -//List of facet to display. If none, the server configuration is use. -GeoNetwork.Settings.facetListConfig = [{name: 'orgNames'}, - {name: 'types'}, - {name: 'serviceTypes'}, - {name: 'denominators'}, - {name: 'keywords'}, - {name: 'createDateYears'}]; -GeoNetwork.Settings.facetMaxItems = 7; - -GeoNetwork.Settings.results = { - // Parameters to set bounding box highlighter colors - // Use a custom single color for bounding box - featurecolor: 'orange', - // Use a random color map with 2 colors - //colormap: GeoNetwork.Util.generateColorMap(2), - // Use a default color map with 10 colors - //colormap: GeoNetwork.Util.defaultColorMap, - // Use a custom color map - //colormap: ['red', 'green', 'blue'], - colormap: undefined, - // Use a custom CSS rules - //featurecolorCSS: "border-width: 5px;border-style: solid; border-color: ${featurecolor}" - featurecolorCSS: undefined, - // Look for relation for all records (true) or only series (default). - // Only for series is recommended to not trigger to much queries when - // displaying search results. It may be relevant to search for all - // if record related to a dataset using largerWorkCitation is used. - //loadRelationForAll: true - loadRelationForAll: undefined -}; -// Define if default mode should be used for HTML print output instead of tabs only -GeoNetwork.printDefaultForTabs = false; - -// Define if label needs to be displayed for login form next to username/password fields -GeoNetwork.hideLoginLabels = true; - - -// Define which type of search to use -// Old mode (xml.search with lucene, db access and XSL formatting) -//GeoNetwork.Settings.mdStore = GeoNetwork.data.MetadataResultsStore; -// IndexOnly mode (xml.search with lucene only) - recommended -GeoNetwork.Settings.mdStore = GeoNetwork.data.MetadataResultsFastStore; - - -GeoNetwork.MapModule = true; -GeoNetwork.ProjectionList = [['EPSG:4326', 'WGS84 (lat/lon)']]; -GeoNetwork.WMSList = [['Geoserver', 'http://localhost/geoserver/wms?']]; - -GeoNetwork.defaultViewMode = 'view-simple'; - -Ext.BLANK_IMAGE_URL = '../../apps/js/ext/resources/images/default/s.gif'; diff --git a/web-client/src/main/resources/apps/tabsearch/js/Shortcuts.js b/web-client/src/main/resources/apps/tabsearch/js/Shortcuts.js deleted file mode 100644 index 171b1b37f86..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/js/Shortcuts.js +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Init shortcut - * - * @return - */ -function initShortcut() { - - // Define editor shortcut here. - var searchConfig = [{ - key: "f", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('focusOnAny'), - fn: function () { - var e = Ext.get('E_any'); - e.highlight(); - e.dom.focus(true); - } - }, { - key: "s", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('runSearch'), - fn: function () { - var e = Ext.getCmp('searchForm'); - e.getEl().fadeIn(); - e.fireEvent('search'); - } - }, { - key: Ext.EventObject.LEFT, - keyLabel: "LEFT", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('previousPage'), - fn: function () { - Ext.getCmp('previousBt').handler(); - } - }, { - key: Ext.EventObject.RIGHT, - keyLabel: "RIGHT", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('nextPage'), - fn: function () { - Ext.getCmp('nextBt').handler(); - } - }, { - key: Ext.EventObject.UP, - keyLabel: "UP", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('upInPage'), - fn: function () { - catalogue.resultsView.getEl().scroll('t', 170, true); - } - }, { - key: Ext.EventObject.DOWN, - keyLabel: "DOWN", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('downInPage'), - fn: function () { - catalogue.resultsView.getEl().scroll('b', 170, true); - } - }, { - key: "d", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('hideSearchForm'), - fn: function () { - var r = Ext.getCmp('west'); - r.toggleCollapse(); - } - }, { - key: "r", - ctrl: true, - shift: true, - label: OpenLayers.i18n('resetSearchForm'), - fn: function () { - var e = Ext.getCmp('searchForm'); - e.getEl().fadeIn(); - e.fireEvent('reset'); - } - }, { - key: "v", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('switchMode'), - fn: function () { - app.switchMode(null, true); - } - }, { - key: "m", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('toggleLayerManager'), - fn: function () { - var r = Ext.getCmp('layerManager'); - r.toggleCollapse(); - } - }, { - key: "l", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('focusOnLogin'), - fn: function () { - var e = Ext.get('username'); - if (e.isVisible()) { - e.highlight(); - e.dom.focus(true); - } else { - catalogue.logout(); - } - - } - }, { - key: "a", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('openAdmin'), - fn: function () { - if (catalogue.isIdentified()) { - catalogue.admin(); - } - } - }, { - key: "c", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('newMetadata'), - fn: function () { - if (catalogue.isIdentified()) { - var actionCtn = Ext.getCmp('resultsPanel').getTopToolbar(); - actionCtn.createMetadataAction.handler.apply(actionCtn); - } - } - }, { - key: "i", - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('displayInfoPanel'), - fn: function () { - var infoPanel = Ext.getCmp('infoPanel'); - var resultsPanel = Ext.getCmp('resultsPanel'); - if (resultsPanel.isVisible()) { - resultsPanel.hide(); - } - if (!infoPanel.isVisible()) { - infoPanel.show(); - } - } - }, { - key: 'h', // FIXME - ctrl: true, - shift: true, - stopEvent: true, - label: OpenLayers.i18n('displayHelpPanel'), - fn: function () { - var ss = Ext.getDom('shortcut').style; - if (ss.display === 'block') { - Ext.getDom('shortcut').style.display = 'none'; - } else { - Ext.getDom('shortcut').style.display = 'block'; - } - } - }]; - var map = new Ext.KeyMap(document, searchConfig); - map.enable(); - - var helpEl = Ext.getDom('shortcutHelp'); - if (helpEl) { - var help = ''; - for (var i = 0; i < searchConfig.length; i++) { - var c = searchConfig[i]; - help += '' + - (c.ctrl === true ? '<Ctrl> + ' : '') + - (c.shift === true ? '<Shift> + ' : '') + - '' + - (c.keyLabel ? c.keyLabel : c.key) + - '' + - ':' + - c.label + - ''; - } - - var html = '
      ' + help + '
      '; - Ext.DomHelper.insertHtml('afterEnd', helpEl, html); - } - // Launch search when enter key press - var formMap = new Ext.KeyMap("searchForm", [{ - key: [10, 13], - fn: function () { - Ext.getCmp('searchForm').fireEvent('search'); - } - }]); - - formMap.enable(); -} diff --git a/web-client/src/main/resources/apps/tabsearch/js/map/MapApp.js b/web-client/src/main/resources/apps/tabsearch/js/map/MapApp.js deleted file mode 100644 index be1d954bf1e..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/js/map/MapApp.js +++ /dev/null @@ -1,1405 +0,0 @@ -/* - * Copyright (C) 2009 GeoNetwork - * - * This file is part of GeoNetwork - * - * GeoNetwork is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GeoNetwork is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoNetwork. If not, see . - */ -Ext.namespace('GeoNetwork'); - -var mapInit = false; - -var activeIndex = 0; - - -// create application -GeoNetwork.mapApp = function() { - // private vars: - var toolbar, toctoolbar, tocbbar, viewport; - - var tree, legendPanel, mapLateralPanel, printPanel, printProvider, printPage, pageLayer; - - var featureinfo; - - var activeNode; - - // private - var map; - - var fixedScales; - - var featureinfolayer; - - var layerLoadingMask; - - var layers; - - var setMap = function(mapC) { - map = mapC; - }; - - // private functions - - /** - * Creates the OL Map - * - */ - var createMap = function(mapOptions, scales) { - var options = mapOptions || { - projection: "EPSG:4326", - units: "degrees", - maxExtent: new OpenLayers.Bounds(-180,-90,180,90), - restrictedExtent: new OpenLayers.Bounds(-180,-90,180,90), - controls: [] - }; - - if (GeoNetwork.map.CONTEXT) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.CONTEXT, - async: false - }); - if (request.responseText) { - - var text = request.responseText; - var format = new OpenLayers.Format.WMC(); - map = format.read(text, {map:options}); - } - } - else if (GeoNetwork.map.OWS) { - // Load map context - var request = OpenLayers.Request.GET({ - url: GeoNetwork.map.OWS, - async: false - }); - if (request.responseText) { - var parser = new OpenLayers.Format.OWSContext(); - var text = request.responseText; - map = parser.read(text, {map: options}); - } - } - else { - map = new OpenLayers.Map('ol_map', options); - fixedScales = scales; - } - }; - - /** - * Adds a layer to the map - * - */ - var createWmsLayer = function(name, url, params, options) { - map.addLayer(new OpenLayers.Layer.WMS(name, url, params, options)); - }; - - var createLayer = function(olLayer) { - map.addLayer(olLayer); - }; - - - var createDummyBaseLayer = function() { - var graphic = new OpenLayers.Layer.Image('Dummy', '../../../js/OpenLayers/img/blank.gif', new OpenLayers.Bounds(0, 300000, 300000, 625000), - map.getSize(), {isBaseLayer: true, displayInLayerSwitcher: false}); - map.addLayer(graphic); - }; - - /** - * Configure the map controls - * - */ - var addMapControls = function() { - map.addControl(new GeoNetwork.Control.ZoomWheel()); - map.addControl(new OpenLayers.Control.LoadingPanel()); - //map.addControl(new OpenLayers.Control.ScaleBar()); - }; - - /** - * Handler to manage the remove of a layer in the map - * - */ - var removeLayerHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if (layer) { - if (!layer.isBaseLayer) { - if ((typeof(layer.isLoading) == "undefined") || // Layers added from WMC - (layer.isLoading == false)) { - map.removeLayer(layer); - //Ext.getCmp('legendwms').forceRemoveLegend(node.attributes.layer.id); - - if (activeNode == node) activeNode = null; - refreshTocToolbar(activeNode); - Ext.getCmp('toctree').getSelectionModel().clearSelections(); - } - } - } - } - }; - - var removeLayerHandlerContextMenu = function(){ - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - removeLayerHandler(node); - }; - /** - * Handler to manage WMS time layers - * - */ - var wmsTimeHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if (layer && layer.dimensions && layer.dimensions.time) { - GeoNetwork.WindowManager.showWindow("wmstime"); - GeoNetwork.WindowManager.getWindow("wmstime").setLayer(layer); - } - } - }; - - var wmsTimeHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - wmsTimeHandler(node); - }; - - /** - * Handler to manage the selection of WMS layers with several SLD styles defined - * - */ - var stylesLayerHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if ((layer) && (layer.styles) && (layer.styles.length > 1)) { - GeoNetwork.WindowManager.showWindow("layerstyles"); - GeoNetwork.WindowManager.getWindow("layerstyles").showLayerStyles(layer); - } - } - }; - - var stylesLayerHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - stylesLayerHandler(node); - }; - - /** - * Handler to manage the WMS info window for the layers - * - */ - var metadataLayerHandler = function(node) { - if (node) { - var layer; - layer = node.attributes.layer; - if (layer) { - GeoNetwork.WindowManager.showWindow("wmsinfo"); - GeoNetwork.WindowManager.getWindow("wmsinfo").showLayerInfo(layer); - } - } - }; - - var metadataLayerHandlerContextMenu = function() { - var node = Ext.getCmp('toctree').getSelectionModel().getSelectedNode(); - metadataLayerHandler(node); - }; - - - /** - * Updates the TOC toolbar buttons depending on TOC layer selected - * - */ - var refreshTocToolbar = function(node) { - - activeNode = node; - - if ((node) && (node.attributes.layer)) { - if (node.parentNode.attributes.nodeType == "gx_baselayercontainer") { - Ext.getCmp("tbRemoveButton").disable(); - } else { - Ext.getCmp("tbRemoveButton").enable(); - } - - var layer = node.attributes.layer; - - if (layer && layer.dimensions && layer.dimensions.time) { - Ext.getCmp("tbWmsTimeButton").enable(); - } else { - Ext.getCmp("tbWmsTimeButton").disable(); - } - - if ((layer) && ((!layer.styles) || (layer.styles.length < 2))) { - Ext.getCmp("tbStylesButton").disable(); - } else { - Ext.getCmp("tbStylesButton").enable(); - } - - Ext.getCmp("tbMetadataButton").enable(); - Ext.getCmp("btnZoomToExtent").enable(); - - - - } else { - Ext.getCmp("tbRemoveButton").disable(); - Ext.getCmp("tbWmsTimeButton").disable(); - Ext.getCmp("tbStylesButton").disable(); - Ext.getCmp("tbMetadataButton").disable(); - Ext.getCmp("btnZoomToExtent").disable(); - } - }; - var createPrintPanel = function() { - // The printProvider that connects us to the print service - printProvider = new GeoExt.data.PrintProvider({ - method: "POST", - url: GeoNetwork.map.printCapabilities, - autoLoad: true - }); - - printPage = new GeoExt.data.PrintPage({ - printProvider: printProvider - }); - - pageLayer = new OpenLayers.Layer.Vector(OpenLayers.i18n('printLayer'), {visibility: false}); - pageLayer.addFeatures(printPage.feature); - - map.addLayer(pageLayer); - - map.events.register('moveend', map, function(){ - printPage.fit(this, { - mode: "screen" - }); - }); - // The form with fields controlling the print output - printPanel = new Ext.form.FormPanel({ - title: OpenLayers.i18n("mf.print.print"), - bodyStyle: "padding:5px", - labelAlign: "top", - defaults: {anchor: "100%"}, - items: [{ - xtype: "textarea", - name: "comment", - value: "", - fieldLabel: OpenLayers.i18n("mf.print.comment"), - plugins: new GeoExt.plugins.PrintPageField({ - printPage: printPage - }) - }, { - xtype: "combo", - store: printProvider.layouts, - displayField: "name", - fieldLabel: OpenLayers.i18n("layout"), - typeAhead: true, - mode: "local", - triggerAction: "all", - plugins: new GeoExt.plugins.PrintProviderField({ - printProvider: printProvider - }) - }, { - xtype: "combo", - store: printProvider.dpis, - displayField: "name", - fieldLabel: OpenLayers.i18n("mf.print.dpi"), - tpl: '
      {name} dpi
      ', - typeAhead: true, - mode: "local", - triggerAction: "all", - plugins: new GeoExt.plugins.PrintProviderField({ - printProvider: printProvider - }), - // the plugin will work even if we modify a combo value - setValue: function(v) { - v = parseInt(v, 10) + " dpi"; - Ext.form.ComboBox.prototype.setValue.apply(this, arguments); - } - }, { - xtype: "combo", - store: printProvider.scales, - displayField: "name", - fieldLabel: OpenLayers.i18n("mf.print.scale"), - typeAhead: true, - mode: "local", - triggerAction: "all", - plugins: new GeoExt.plugins.PrintPageField({ - printPage: printPage - }) - }, { - xtype: "textfield", - name: "rotation", - fieldLabel: OpenLayers.i18n("mf.print.rotation"), - plugins: new GeoExt.plugins.PrintPageField({ - printPage: printPage - }) - }], - buttons: [{ - text: OpenLayers.i18n("mf.print.generatingPDF"), - handler: function() { - printProvider.print(Ext.getCmp('mappanel'), printPage); - } - }], - listeners: { - beforeexpand: function() { - this.setVisibility(true); - }, - beforecollapse: function() { - this.setVisibility(false); - }, - scope: pageLayer - } - }); - }; - /** - * Creates the map viewer toolbars - */ - var createToolbars = function() { - toctoolbar = []; - // Layer TOC toolbar - var action = new GeoExt.Action({ - handler: function() { - GeoNetwork.WindowManager.showWindow("addwms"); - }, - iconCls: 'addLayer', - tooltip: OpenLayers.i18n("addWMSButtonText") - }); - - toctoolbar.push(action); - action = new GeoExt.Action({ - id: "tbRemoveButton", - handler: function() { - removeLayerHandler(activeNode); - }, - iconCls: 'deleteLayer', - tooltip: OpenLayers.i18n("removeButtonText") - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id: "tbStylesButton", - handler: function() { - stylesLayerHandler(activeNode); - }, - iconCls: 'layerStyles', - tooltip: "Layer styles" - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id: "tbMetadataButton", - handler: function() { - metadataLayerHandler(activeNode); - }, - iconCls: 'wmsInfo', - tooltip: OpenLayers.i18n("metadataButtonText") - }); - - toctoolbar.push(action); - - toctoolbar.push("-"); - - action = new GeoExt.Action({ - id: "tbWmsTimeButton", - handler: function() { - wmsTimeHandler(activeNode); - }, - iconCls: 'wmsTime', - tooltip: "WMS Time" - }); - - toctoolbar.push(action); - - - // Main toolbar - toolbar = []; - - action = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomToMaxExtent(), - map: map, - iconCls: 'zoomfull' - //, - //tooltip: {title: OpenLayers.i18n("zoomToMaxExtentTooltipTitle"), text: OpenLayers.i18n("zoomToMaxExtentTooltipText")} - }); - - toolbar.push(action); - - toolbar.push("-"); - - action = new GeoExt.Action({ - iconCls: 'zoomlayer', - id: 'btnZoomToExtent', - //tooltip: {title: OpenLayers.i18n("zoomlayerTooltipTitle"), text: OpenLayers.i18n("zoomlayerTooltipText")}, - handler: function() { - var node = activeNode; - var layer; - - if (node) { - layer = node.attributes.layer; - if (layer) { - if (layer.llbbox) { - // store info as wgs84 - var mapProj = map.getProjectionObject(); - var wgs84 = new OpenLayers.Projection("WGS84"); - - var minMapxy = new OpenLayers.LonLat(layer.llbbox[0], layer.llbbox[1]).transform(wgs84, mapProj); - var maxMapxy = new OpenLayers.LonLat(layer.llbbox[2], layer.llbbox[3]).transform(wgs84, mapProj); - - var extent = new OpenLayers.Bounds(); - extent.left = minMapxy.lon; - extent.right = maxMapxy.lon; - extent.top = maxMapxy.lat; - extent.bottom = minMapxy.lat; - - map.zoomToExtent(extent); - - // If layer has no boundingbox info, use full extent - } else { - map.zoomToMaxExtent(); - } - } else { - Ext.MessageBox.alert(OpenLayers.i18n("zoomlayer.selectLayerTitle"), - OpenLayers.i18n("zoomlayer.selectLayerText")); - } - } else { - Ext.MessageBox.alert(OpenLayers.i18n("zoomlayer.selectLayerTitle"), - OpenLayers.i18n("zoomlayer.selectLayerText")); - } - - } - }); - - toolbar.push(action); - - toolbar.push("-"); - - action = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomBox(), - map: map, - toggleGroup: "move", - allowDepress: false, - iconCls: 'zoomin' - //tooltip: {title: OpenLayers.i18n("zoominTooltipTitle"), text: OpenLayers.i18n("zoominTooltipText")} - }); - - toolbar.push(action); - - action = new GeoExt.Action({ - control: new OpenLayers.Control.ZoomBox({ - displayClass: 'ZoomOut', - out: true - }), - toggleGroup: "move", - allowDepress: false, - map: map, - iconCls: 'zoomout' - //tooltip: {title: OpenLayers.i18n("zoomoutTooltipTitle"), text: OpenLayers.i18n("zoomoutTooltipText")} - }); - - toolbar.push(action); - - action = new GeoExt.Action({ - control: new OpenLayers.Control.DragPan({ - isDefault: true - }), - toggleGroup: "move", - allowDepress: false, - pressed: true, - map: map, - iconCls: 'pan' - //tooltip: {title: OpenLayers.i18n("dragTooltipTitle"), text: OpenLayers.i18n("dragTooltipText")} - }); - - toolbar.push(action); - - toolbar.push("-"); - - featureinfo = new OpenLayers.Control.WMSGetFeatureInfo({drillDown: true, infoFormat: 'application/vnd.ogc.gml'}); - - var moveLayerToTop = function(layertomove) { - var idx = -1; - for (var i=0, len = map.layers.length; i'); - toolbar.push({xtype: 'gn_projectionselector', projections: GeoNetwork.ProjectionList, fieldLabel: OpenLayers.i18n("projectionTitle"), map: map}); - }; - - /** - * Map overlay with scale image and scale selector - * - */ - var createMapOverlay = function() { - var scaleLinePanel = new Ext.Panel({ - cls: 'olControlScaleLine overlay-element overlay-scaleline', - border: false - }); - - scaleLinePanel.on('render', function(){ - var scaleLine = new OpenLayers.Control.ScaleLine({ - div: scaleLinePanel.body.dom - }); - - map.addControl(scaleLine); - scaleLine.activate(); - }, this); - - var zoomStore; - - if (fixedScales && fixedScales.length > 0) { - var zooms = []; - var scales = fixedScales; - var units = map.baseLayer.units; - - for (var i=scales.length-1; i >= 0; i--) { - var scale = scales[i]; - zooms.push({ - level: i, - resolution: OpenLayers.Util.getResolutionFromScale(scale, units), - scale: scale - }); - } - - zoomStore = new GeoExt.data.ScaleStore({}); - zoomStore.loadData(zooms); - - } else { - zoomStore = new GeoExt.data.ScaleStore({ - map: map - }); - } - - var zoomSelector = new Ext.form.ComboBox({ - emptyText: 'Zoom level', - tpl: '
      1 : {[parseInt(values.scale)]}
      ', - editable: false, - triggerAction: 'all', - mode: 'local', - store: zoomStore, - width: 110 - }); - - zoomSelector.on('click', function(evt){evt.stopEvent();}); - zoomSelector.on('mousedown', function(evt){evt.stopEvent();}); - - zoomSelector.on('select', function(combo, record, index) { - map.zoomTo(record.data.level); - }, - this); - - var zoomSelectorWrapper = new Ext.Panel({ - items: [zoomSelector], - cls: 'overlay-element overlay-scalechooser', - border: false }); - - map.events.register('zoomend', this, function() { - var scale = zoomStore.queryBy(function(record){ - return map.getZoom() == record.data.level; - }); - - if (scale.length > 0) { - scale = scale.items[0]; - zoomSelector.setValue("1 : " + parseInt(scale.data.scale, 10)); - } else { - if (!zoomSelector.rendered) { - return; - } - zoomSelector.clearValue(); - } - }); - - var mapOverlay = new Ext.Panel({ - // title: "Overlay", - cls: 'map-overlay', - items: [ - scaleLinePanel, - zoomSelectorWrapper - ] - }); - - - mapOverlay.on("afterlayout", function(){ - scaleLinePanel.body.dom.style.position = 'relative'; - scaleLinePanel.body.dom.style.display = 'inline'; - - mapOverlay.getEl().on("click", function(x){x.stopEvent();}); - mapOverlay.getEl().on("mousedown", function(x){x.stopEvent();}); - }, this); - - return mapOverlay; - }; - - /** - * Measure control - * - */ - var createMeasureControl = function(handlerType, title) { - var styleMap = new OpenLayers.StyleMap({ - "default": new OpenLayers.Style(null, { - rules: [new OpenLayers.Rule({ - symbolizer: { - "Point": { - pointRadius: 4, - graphicName: "square", - fillColor: "white", - fillOpacity: 1, - strokeWidth: 1, - strokeOpacity: 1, - strokeColor: "#333333" - }, - "Line": { - strokeWidth: 3, - strokeOpacity: 1, - strokeColor: "#666666", - strokeDashstyle: "dash" - }, - "Polygon": { - strokeWidth: 2, - strokeOpacity: 1, - strokeColor: "#666666", - fillColor: "white", - fillOpacity: 0.3 - } - } - })] - }) - }); - - var cleanup = function() { - if (measureToolTip) { - measureToolTip.destroy(); - } - }; - - var makeString = function(metricData) { - var metric = metricData.measure; - var metricUnit = metricData.units; - - measureControl.displaySystem = "english"; - - var englishData = metricData.geometry.CLASS_NAME.indexOf("LineString") > -1 ? - measureControl.getBestLength(metricData.geometry) : - measureControl.getBestArea(metricData.geometry); - - var english = englishData[0]; - var englishUnit = englishData[1]; - - measureControl.displaySystem = "metric"; - var dim = metricData.order == 2 ? - '2' : - ''; - - return metric.toFixed(2) + " " + metricUnit + dim + "
      " + - english.toFixed(2) + " " + englishUnit + dim; - }; - - var measureToolTip; - var measureControl = new OpenLayers.Control.Measure(handlerType, { - persist: true, - handlerOptions: {layerOptions: {styleMap: styleMap}}, - eventListeners: { - measurepartial: function(event) { - cleanup(); - measureToolTip = new Ext.ToolTip({ - html: makeString(event), - title: title, - autoHide: false, - closable: true, - draggable: false, - mouseOffset: [0, 0], - showDelay: 1, - listeners: {hide: cleanup} - }); - if(event.measure > 0) { - var px = measureControl.handler.lastUp; - var p0 = Ext.getCmp('mappanel').getPosition(); - measureToolTip.targetXY = [p0[0] + px.x, p0[1] + px.y]; - measureToolTip.show(); - } - }, - measure: function(event) { - cleanup(); - measureToolTip = new Ext.ToolTip({ - target: Ext.getBody(), - html: makeString(event), - title: title, - autoHide: false, - closable: true, - draggable: false, - mouseOffset: [0, 0], - showDelay: 1, - listeners: { - hide: function() { - measureControl.cancel(); - cleanup(); - } - } - }); - }, - deactivate: cleanup, - scope: this - } - }); - - return measureControl; - }; - - - /** - * Creates the layers tree control - * - */ - var createTree = function() { - - // using OpenLayers.Format.JSON to create a nice formatted string of the - // configuration for editing it in the UI - var treeConfig = new OpenLayers.Format.JSON().write([{ - nodeType: "gx_baselayercontainer", - text: OpenLayers.i18n('baseLayerList') - }, { - nodeType: "gx_overlaylayercontainer", - text: OpenLayers.i18n('overlaysList'), - expanded: true, - // render the nodes inside this container with a radio button, - // and assign them the group "foo". - loader: { - baseAttrs: { - radioGroup: "foo", - slider: "layeropacityslider", - uiProvider: "layernodeui" - } - } - }], true); - - var LayerNodeUI = Ext.extend( - GeoExt.tree.LayerNodeUI, new GeoExt.tree.TreeNodeUIEventMixin() - ); - - // create the tree with the configuration from above - tree = new Ext.tree.TreePanel({ - title: OpenLayers.i18n('layerTree'), - id: "toctree", - enableDD: true, - loader: new Ext.tree.TreeLoader({ - // applyLoader has to be set to false to not interfer with loaders - // of nodes further down the tree hierarchy - applyLoader: false, - uiProviders: { - "layernodeui": LayerNodeUI - } - }), - plugins: [ -// new GeoExt.plugins.TreeNodeRadioButton({ -// listeners: { -// "radiochange": function(node) { -// activeNode = node; -// } -// } -// }), - new GeoExt.tree.LayerOpacitySliderPlugin({ - listeners: { - "opacityslide": function(node, value) { - } - } - }) - ], - root: { - nodeType: "async", - // the children property of an Ext.tree.AsyncTreeNode is used to - // provide an initial set of layer nodes. We use the treeConfig - // from above, that we created with OpenLayers.Format.JSON.write. - children: Ext.decode(treeConfig) - }, - listeners:{ - contextmenu:function(node,e){ - if ((node.attributes.nodeType != "gx_overlaylayercontainer") && - (node.attributes.nodeType != "gx_baselayercontainer")) - { - node.select(); - var c = node.getOwnerTree().contextMenu; - if (node.parentNode.attributes.nodeType == "gx_baselayercontainer") { - c.items.get("removeMenu").disable(); - } else { - c.items.get("removeMenu").enable(); - } - - c.items.get("addMenu").hide(); - - var layer = node.attributes.layer; - - if (layer && layer.dimensions && layer.dimensions.time) { - c.items.get("wmsTimeMenu").enable(); - } else { - c.items.get("wmsTimeMenu").disable(); - } - - if ((layer) && ((!layer.styles) || (layer.styles.length < 2))) { - c.items.get("stylesMenu").disable(); - } else { - c.items.get("stylesMenu").enable(); - } - - c.contextNode=node; - c.showAt(e.getXY()); - } else { - - if (node.attributes.nodeType == "gx_overlaylayercontainer") { - - node.select(); - c = node.getOwnerTree().contextMenu; - - c.items.get("addMenu").show(); - c.items.get("removeMenu").hide(); - c.items.get("wmsTimeMenu").hide(); - c.items.get("stylesMenu").hide(); - c.items.get("metadataMenu").hide(); - - c.contextNode=node; - c.showAt(e.getXY()); - } - } - },scope:this}, - contextMenu:new Ext.menu.Menu({ - items:[{ - text: OpenLayers.i18n("addWMSButtonText"), - id: "addMenu", - handler: function () { - GeoNetwork.WindowManager.showWindow("addwms"); - } - }, - { - text:OpenLayers.i18n("removeButtonText"), - id: "removeMenu", - handler: removeLayerHandlerContextMenu - }, - { - text: OpenLayers.i18n("metadataButtonText"), - id: "metadataMenu", - handler: metadataLayerHandlerContextMenu - }, - { - text: "Styles", - id: "stylesMenu", - handler: stylesLayerHandlerContextMenu - }, - { - text: OpenLayers.i18n('WMSTimeWindowTitle'), - id: "wmsTimeMenu", - disabled: true, - handler: wmsTimeHandlerContextMenu - } - - ]}), - tbar: toctoolbar, - rootVisible: false, - lines: false, - border: false, - region: 'center' - }); - - }; - - /** - * Creates the legend panel control - * - */ - var createLegendPanel = function() { - legendPanel = new GeoExt.LegendPanel({ - defaults: { - labelCls: 'mylabel', - style: 'padding:5px' - }, - title: 'Legend', - height:200, - autoScroll: true, - split: true, - collapsible: true, - collapsed: true, - border: false, - region: 'south' - }); - }; - - /** - * Creates the map viewport - * - */ - var createViewport = function() { - createToolbars(); - createTree(); - createLegendPanel(); - createPrintPanel(); - - var mapOverlay = createMapOverlay(); - - // Accordion panel with layer tree and advanced print config - var accordion = new Ext.Panel({ - region: 'center', - border: false, - layout: 'accordion', - deferredRender:false, - items: [ - tree, printPanel - ] - }); - - viewport = new Ext.Panel({ - layout: 'border', - border: false, - //renderTo:'map_container', - items: [{ - id: 'layerManager', - region: 'east', - xtype: 'panel', - collapsible: true, - collapseMode: "mini", - split:true, - border: false, - width:170, - minSize: 170, - maxSize: 300, - layout: 'border', - items: [accordion, legendPanel] - },{ - region: 'center', - layout: 'fit', - frame: false, - border: false, - margins: '0 0 0 0', - items: [{ - id: 'mappanel', - xtype: 'gx_mappanel', - map: map, - tbar: toolbar, - border: false, - extent: GeoNetwork.map.EXTENT, - items: [mapOverlay] - }] - } - ] - }); - - - Ext.getCmp("toctree").on({ - "click": function(node) { - if (node.ui.radio) { - node.ui.radio.checked = true; - node.ui.fireEvent("radiochange", node); - - } - - refreshTocToolbar(node); - - }, - scope: this - }); - - Ext.getCmp("toctree").on("nodedragover", function(evt) { - // Only allow to move layers in the gx_overlaylayercontainer (user layers) - if ((evt.dropNode.parentNode.attributes.nodeType == "gx_baselayercontainer") || // restrict move baselayers - (evt.target.attributes.nodeType == "gx_baselayercontainer") || // restrict move layers to baselayer container - (evt.target.parentNode.attributes.nodeType == "gx_baselayercontainer") || - (evt.target.parentNode == evt.tree.root)) { // restrict move layers to outside of layercontainers - evt.cancel=true; - } - }); - - refreshTocToolbar(activeNode); - }; - - - /** - * Method: processLayersSuccess - * Called when the GetCapabilities response is in. - * - * Parameters: - * response - {Object} The response object - */ -var processLayersSuccess = function(response) { - layerLoadingMask.hide(); - - var parser = new OpenLayers.Format.WMSCapabilities(); - var caps = parser.read(response.responseXML || response.responseText); - if (caps.capability) { - // GetCapabilities disclaimer - var accessContraints = caps.service.accessContraints; - - if ((accessContraints) && (accessContraints.toLowerCase() != "none") && - (accessContraints != "-")) { - var disclaimerWindow = new GeoNetwork.DisclaimerWindow({ - disclaimer: accessContraints - }); - disclaimerWindow.show(); - disclaimerWindow = null; - } - - if (map) { - for(var i = 0, len=layers.length; i < len; i++) { - var name = layers[i][0]; - var url = layers[i][1]; - var layer = layers[i][2]; - var metadata_id = layers[i][3]; - - var ol_layer = new OpenLayers.Layer.WMS(name, url, - {layers: layer, format: 'image/png', transparent: 'TRUE', version: caps.version, language: GeoNetwork.OGCUtil.getLanguage()}, - {queryable: true, singleTile: true, ratio: 1, buffer: 0, transitionEffect: 'resize', metadata_id: metadata_id} ); - - if (!GeoNetwork.OGCUtil.layerExistsInMap(ol_layer, map)) { - // TODO: these events are never removed? - ol_layer.events.on({"loadstart": function() { - this.isLoading = true; - }}); - - ol_layer.events.on({"loadend": function() { - this.isLoading = false; - }}); - - var layerCap = getLayer(caps, caps.capability.layers, ol_layer); - - if (layerCap) { - ol_layer.queryable = layerCap.queryable; - ol_layer.name = layerCap.title || ol_layer.name; - ol_layer.llbbox = layerCap.llbbox; - ol_layer.styles = layerCap.styles; - ol_layer.dimensions = layerCap.dimensions; - } - - map.addLayer(ol_layer); - } - } - - } - } - }; - - /** - * Method: processLayersFailure - * Called when the GetCapabilities response is in and failed. - * - * Parameters: - * response - {Object} The response object - */ - var processLayersFailure = function(response) { - layerLoadingMask.hide(); - - Ext.MessageBox.alert(OpenLayers.i18n("loadLayer.error.title"), - OpenLayers.i18n("loadLayer.error.message")); - }; - - - /** - * Function: getLayer - * Recursive function to process a layer and their childLayers in the - * capabilities document, searching for the requested layer - * - * Parameters: - * caps - {Object} capabilities from the WMSCapabilities parser - * caplayers - {Object} list of layer objects from the WMSCapabilities parser - * layer - {Object} layer to return from capabilities document - * - * Returns: - * {Object} The layer if found, otherwise null - */ - var getLayer = function(caps, caplayers, layer) { - var findedLayer = null; - - for (var i = 0, len = caplayers.length; i < len; ++i) { - var lr = caplayers[i]; - - try { - var layerName = lr.name.split(","); - - if (layerName.indexOf(layer.params.LAYERS) != -1) { - findedLayer = lr; - break; - } - } catch(e) { - } - - if (typeof(lr.childLayers) != "undefined") { - findedLayer = getLayer(caps, lr.childLayers, layer); - if (findedLayer !== null) { - break; - } - } - - } - - return findedLayer; - }; - - // public space: - return { - init: function(layers, mapOptions, fixedScales) { - //Ext.QuickTips.init(); - - createMap(mapOptions, fixedScales); - - for (var i=0; i -1) ? '&' : '?'; - onlineResource += separator + paramString; - - var req = OpenLayers.Request.GET({ - url: onlineResource, //OpenLayers.Util.removeTail(OpenLayers.ProxyHostURL), - //method: 'GET', - //params: {url: onlineResource}, - success: processLayersSuccess, - failure: processLayersFailure, - timeout: 10000 - }); - }, - - getViewport: function() { - return viewport; - }, - - refreshViewport: function() { - // IE shows the west panel hidden when the map is shown after a window resize - Ext.get("west_panel").setWidth(westPanelWidth); - - viewport.doLayout(); - }, - - getMap: function() { - return map; - } - }; -}; // end of app - -// Extension to add title in ExtJs collapsed panels -//Ext.onReady(function(){ -// Ext.layout.BorderLayout.Region.prototype.getCollapsedEl = Ext.layout.BorderLayout.Region.prototype.getCollapsedEl.createSequence(function() { -// if ((this.position == 'north' || this.position == 'south') && !this.collapsedEl.titleEl) { -// this.collapsedEl.titleEl = this.collapsedEl.createChild({cls: 'x-collapsed-title', cn: this.panel.title}); -// } -// }); -//}); diff --git a/web-client/src/main/resources/apps/tabsearch/js/map/Settings.js b/web-client/src/main/resources/apps/tabsearch/js/map/Settings.js deleted file mode 100644 index 2cd32b25bcd..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/js/map/Settings.js +++ /dev/null @@ -1,89 +0,0 @@ -OpenLayers.DOTS_PER_INCH = 90.71; -//OpenLayers.ImgPath = '../js/OpenLayers/theme/default/img/'; -OpenLayers.ImgPath = '../js/OpenLayers/img/'; - -OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; - -// Define a constant with the base url to the MapFish web service. -//mapfish.SERVER_BASE_URL = '../../../../../'; // '../../'; - -// Remove pink background when a tile fails to load -OpenLayers.Util.onImageLoadErrorColor = "transparent"; - -// Lang -OpenLayers.Lang.setCode(GeoNetwork.defaultLocale); - -OpenLayers.Util.onImageLoadError = function() { - this._attempts = (this._attempts) ? (this._attempts + 1) : 1; - if (this._attempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) { - this.src = this.src; - } else { - this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor; - this.style.display = "none"; - } -}; - -// add Proj4js.defs here -// Proj4js.defs["EPSG:27572"] = "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"; -Proj4js.defs["EPSG:2154"] = "+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"; -//new OpenLayers.Projection("EPSG:900913") - - -GeoNetwork.map.printCapabilities = "../../pdf"; - -// Config for WGS84 based maps -GeoNetwork.map.PROJECTION = "EPSG:4326"; -GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-180,-90,180,90); -//GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-5.1,41,9.7,51); - -GeoNetwork.map.BACKGROUND_LAYERS = [ - new OpenLayers.Layer.WMS("Background layer", "/geoserver/wms", {layers: 'gn:world,gn:ne_50m_boundary_da,gn:ne_50m_boundary_lines_land,gn:ne_50m_coastline', format: 'image/jpeg'}, {isBaseLayer: true}) - //new OpenLayers.Layer.WMS("Background layer", "http://www2.demis.nl/mapserver/wms.asp?", {layers: 'Countries', format: 'image/jpeg'}, {isBaseLayer: true}) - ]; - -// Config for OSM based maps -//GeoNetwork.map.PROJECTION = "EPSG:900913"; -////GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-550000, 5000000, 1200000, 7000000); -//GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34); -//GeoNetwork.map.BACKGROUND_LAYERS = [ -// new OpenLayers.Layer.OSM() -// //new OpenLayers.Layer.Google("Google Streets"); -// ]; - -//GeoNetwork.map.RESOLUTIONS = []; - -//Define background map layer from an OGC Context. -//If a context is defined then GeoNetwork.map.BACKGROUND_LAYERS is ignored. -//* DEMIS country layer -//GeoNetwork.map.OWS = "../../maps/demis.xml"; -//* Default GeoServer layers -//GeoNetwork.map.OWS = "../../maps/geoserver_localhost.xml"; -GeoNetwork.map.CONTEXT = "../../maps/geoserver_localhost.wmc"; - -GeoNetwork.map.CONTEXT_MAP_OPTIONS = { - controls: [], - theme:null -}; - -GeoNetwork.map.CONTEXT_MAIN_MAP_OPTIONS = { - controls: [], - theme:null -}; - -GeoNetwork.map.MAP_OPTIONS = { - projection: GeoNetwork.map.PROJECTION, - maxExtent: GeoNetwork.map.EXTENT, - restrictedExtent: GeoNetwork.map.EXTENT, - resolutions: GeoNetwork.map.RESOLUTIONS, - controls: [], - theme:null -}; - -GeoNetwork.map.MAIN_MAP_OPTIONS = { - projection: GeoNetwork.map.PROJECTION, - maxExtent: GeoNetwork.map.EXTENT, - restrictedExtent: GeoNetwork.map.EXTENT, - resolutions: GeoNetwork.map.RESOLUTIONS, - controls: [], - theme:null -}; diff --git a/web-client/src/main/resources/apps/tabsearch/print.html b/web-client/src/main/resources/apps/tabsearch/print.html deleted file mode 100644 index 9de76de3d16..00000000000 --- a/web-client/src/main/resources/apps/tabsearch/print.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - GeoNetwork - - - - - - - - - - - - - - - - - -
      - - \ No newline at end of file diff --git a/web-ui/src/main/resources/catalog/locales/en-admin.json b/web-ui/src/main/resources/catalog/locales/en-admin.json index 6456ebe558a..693cd73c615 100644 --- a/web-ui/src/main/resources/catalog/locales/en-admin.json +++ b/web-ui/src/main/resources/catalog/locales/en-admin.json @@ -775,13 +775,8 @@ "system/localrating": "Metadata rating", "system/localrating/enable": "Local rating", "system/localrating/enable-help": "If set, GeoNetwork will calculate user ratings for metadata from this node only (not distributed among other GeoNetwork nodes).", - "system/metadata": "Metadata views", + "system/metadata": "Metadata configuration", "system/metadata/prefergrouplogo": "Prefer Group Logo", - "system/metadata/defaultView": "Default view", - "system/metadata/enableInspireView": "INSPIRE view", - "system/metadata/enableIsoView": "ISO view", - "system/metadata/enableSimpleView": "Simple view", - "system/metadata/enableXmlView": "XML view", "system/metadata/allThesaurus": "Virtual 'All' Thesaurus", "system/metadata/allThesaurus-help": "If true then a virtual thesaurus will be created that contains all keywords in all other thesauri. This is useful in editor when the name of the thesaurus is unimportant and only the keyword is important. In order to ensure that the correct keyword blocks are maintained (with correct thesaurus name) enabling this will also enable a transform in update-fixed-info that will assign the keyword in the 'all' thesaurus to keyword blocks with the correct thesaurus for the keyword", "system/metadataprivs": "Metadata privileges", diff --git a/web/pom.xml b/web/pom.xml index e56a49049f8..8c375828868 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -426,13 +426,6 @@ jsoup 0.2.2 - - - ${project.groupId} - geonetwork-client - ${project.version} - provided - ${project.groupId} web-ui @@ -618,53 +611,12 @@ WEB-INF/data/config/schema_plugins - ${project.basedir}/../web-ui/src/main/resources ${build.webapp.resources} - - - - @@ -714,12 +666,6 @@ /geonetwork ${project.build.directory}/WEB-INF/web.xml - ${project.basedir}/src/main/webapp, ${rootProjectDir}/web-ui/src/main/resources/, diff --git a/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql b/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql index 10ef551a36d..04989fdf986 100644 --- a/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql +++ b/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql @@ -625,11 +625,6 @@ INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/harvesting/mail/level2', 'false', 2, 9027, 'y'); INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/harvesting/mail/level3', 'false', 2, 9028, 'y'); INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadata/prefergrouplogo', 'true', 2, 9111, 'y'); -INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadata/enableSimpleView', 'true', 2, 9110, 'y'); -INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadata/enableIsoView', 'true', 2, 9120, 'y'); -INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadata/enableInspireView', 'false', 2, 9130, 'y'); -INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadata/enableXmlView', 'true', 2, 9140, 'y'); -INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadata/defaultView', 'simple', 0, 9150, 'n'); INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadata/allThesaurus', 'false', 2, 9160, 'n'); INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadatacreate/generateUuid', 'true', 2, 9100, 'n'); INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/metadataprivs/usergrouponly', 'false', 2, 9180, 'n'); diff --git a/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v310/migrate-default.sql b/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v310/migrate-default.sql index 6c66b8fa594..f12fb186e88 100644 --- a/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v310/migrate-default.sql +++ b/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v310/migrate-default.sql @@ -1,6 +1,13 @@ UPDATE Settings SET value='3.1.0' WHERE name='system/platform/version'; UPDATE Settings SET value='SNAPSHOT' WHERE name='system/platform/subVersion'; +DELETE FROM Settings WHERE name = 'system/metadata/enableSimpleView'; +DELETE FROM Settings WHERE name = 'system/metadata/enableIsoView'; +DELETE FROM Settings WHERE name = 'system/metadata/enableInspireView'; +DELETE FROM Settings WHERE name = 'system/metadata/enableXmlView'; +DELETE FROM Settings WHERE name = 'system/metadata/defaultView'; + + INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/feedback/mailServer/tls', 'false', 2, 644, 'y'); INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/xlinkResolver/ignore', 'operatesOn,featureCatalogueCitation,Anchor,source', 0, 2312, 'n'); diff --git a/web/src/main/webapp/WEB-INF/config-gui.xml b/web/src/main/webapp/WEB-INF/config-gui.xml deleted file mode 100644 index 3018efeceee..00000000000 --- a/web/src/main/webapp/WEB-INF/config-gui.xml +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 100% - 300px - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ../../proxy? - - - - - - - - - - - - - - - - - - - - - - - http://raw.github.com/geonetwork/util-repository/master/thesaurus.xml - - diff --git a/web/src/main/webapp/WEB-INF/config-security/config-security-core.xml b/web/src/main/webapp/WEB-INF/config-security/config-security-core.xml index d4c4ddb9064..2bff6fe27a4 100644 --- a/web/src/main/webapp/WEB-INF/config-security/config-security-core.xml +++ b/web/src/main/webapp/WEB-INF/config-security/config-security-core.xml @@ -44,7 +44,6 @@ - @@ -53,11 +52,9 @@ - - diff --git a/web/src/main/webapp/WEB-INF/config-security/config-security-mapping.xml b/web/src/main/webapp/WEB-INF/config-security/config-security-mapping.xml index cd39769c4ad..56d78049b6e 100644 --- a/web/src/main/webapp/WEB-INF/config-security/config-security-mapping.xml +++ b/web/src/main/webapp/WEB-INF/config-security/config-security-mapping.xml @@ -154,10 +154,6 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans - diff --git a/web/src/main/webapp/WEB-INF/config.xml b/web/src/main/webapp/WEB-INF/config.xml index 5c1f08f6fbf..b4ca9cf5d1e 100644 --- a/web/src/main/webapp/WEB-INF/config.xml +++ b/web/src/main/webapp/WEB-INF/config.xml @@ -59,9 +59,7 @@ - - - + @@ -91,7 +89,6 @@ - - - - - - - - - diff --git a/web/src/main/webapp/WEB-INF/overrides/examples/config-overrides-example.xml b/web/src/main/webapp/WEB-INF/overrides/examples/config-overrides-example.xml index 6a8ea94a3ac..4c46fcf01d7 100644 --- a/web/src/main/webapp/WEB-INF/overrides/examples/config-overrides-example.xml +++ b/web/src/main/webapp/WEB-INF/overrides/examples/config-overrides-example.xml @@ -48,13 +48,6 @@ - - - - - - http://geonetwork.svn.sourceforge.net/svnroot/geonetwork/utilities/repository/thesaurus.xml - diff --git a/web/src/main/webapp/WEB-INF/wro-sources.xml b/web/src/main/webapp/WEB-INF/wro-sources.xml index f2191619d5c..5e9fd0d5f43 100644 --- a/web/src/main/webapp/WEB-INF/wro-sources.xml +++ b/web/src/main/webapp/WEB-INF/wro-sources.xml @@ -24,8 +24,6 @@ - - diff --git a/web/src/main/webapp/maps/demis.xml b/web/src/main/webapp/maps/demis.xml deleted file mode 100644 index e9d2a60442d..00000000000 --- a/web/src/main/webapp/maps/demis.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - -180 -90 - 180 90 - - Default map - - - - - \ No newline at end of file diff --git a/web/src/main/webapp/maps/geoserver_localhost.wmc b/web/src/main/webapp/maps/geoserver_localhost.wmc deleted file mode 100644 index d8be913f310..00000000000 --- a/web/src/main/webapp/maps/geoserver_localhost.wmc +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - </General> - <LayerList> - <Layer queryable="0" hidden="0"> - <Server service="OGC:WMS" version="1.1.1"> - <OnlineResource xlink:type="simple" - xlink:href="http://localhost:8080/geoserver/wms?SERVICE=WMS"/> - </Server> - <Name>gn:world</Name> - <Title>World - - image/jpeg - - - - - - - false - 15 - true - true - false - - - - - diff --git a/web/src/main/webapp/maps/geoserver_localhost.xml b/web/src/main/webapp/maps/geoserver_localhost.xml deleted file mode 100644 index a61dbdab3ed..00000000000 --- a/web/src/main/webapp/maps/geoserver_localhost.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - -180 -90 - 180 90 - - Default map - - - - - - - diff --git a/web/src/main/webapp/maps/mapviewer.wmc b/web/src/main/webapp/maps/mapviewer.wmc deleted file mode 100644 index 5193fa5c72f..00000000000 --- a/web/src/main/webapp/maps/mapviewer.wmc +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - </General> - <LayerList> - <Layer queryable="0" hidden="0"> - <Server service="OGC:WMS" version="1.1.1"> - <OnlineResource xlink:type="simple" - xlink:href="http://localhost:8080/geoserver/wms?SERVICE=WMS"/> - </Server> - <Name>gn:world</Name> - <Title>World - - image/jpeg - - - - - - - false - 15 - true - true - false - - - - - diff --git a/web/src/main/webapp/maps/mapviewer_demis.wmc b/web/src/main/webapp/maps/mapviewer_demis.wmc deleted file mode 100644 index adaa5b956f1..00000000000 --- a/web/src/main/webapp/maps/mapviewer_demis.wmc +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - <Extension> - <ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-180.000000000000000" - miny="-90.0000000000000000" maxx="180.000000000000000" maxy="90.0000000000000000"/> - </Extension> - </General> - <LayerList> - <Layer queryable="0" hidden="0"> - <Server service="OGC:WMS" version="1.1.1"> - <OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" - xlink:href="http://www2.demis.nl/mapserver/wms.asp?"/> - </Server> - <Name>Countries</Name> - <Title>Background layer - - image/jpeg - - - - - - - - 16 - degrees - true - true - false - - - - diff --git a/web/src/main/webapp/xsl/home.xsl b/web/src/main/webapp/xsl/home.xsl deleted file mode 100644 index 591e361f19f..00000000000 --- a/web/src/main/webapp/xsl/home.xsl +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - -

      JavaScript warning

      -

      To use GeoNetwork you need to enable JavaScript in your browser

      - - -
      -
      diff --git a/web/src/main/webapp/xsl/metadata-tab-utils.xsl b/web/src/main/webapp/xsl/metadata-tab-utils.xsl index eb54a97f7ce..d0ffc43b888 100644 --- a/web/src/main/webapp/xsl/metadata-tab-utils.xsl +++ b/web/src/main/webapp/xsl/metadata-tab-utils.xsl @@ -88,7 +88,6 @@ - diff --git a/web/src/main/webapp/xsl/search-cat.xsl b/web/src/main/webapp/xsl/search-cat.xsl deleted file mode 100644 index ef87bdbaef0..00000000000 --- a/web/src/main/webapp/xsl/search-cat.xsl +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <meta http-equiv="X-UA-Compatible" content="IE=9"/> - <link rel="icon" type="image/gif" href="../../images/logos/favicon.png"/> - <link href="../../srv/en/rss.latest?georss=gml" rel="alternate" - type="application/rss+xml" title="GeoNetwork opensource GeoRSS | Recent Changes"/> - <link href="../../srv/en/portal.opensearch" rel="search" - type="application/opensearchdescription+xml" title="GeoNetwork"/> - - <link rel="stylesheet" type="text/css" - href="../../apps/js/ext/resources/css/ext-all.css"/> - <link rel="stylesheet" type="text/css" - href="../../apps/js/ext/resources/css/xtheme-gray.css"/> - <link rel="stylesheet" type="text/css" - href="../../apps/js/OpenLayers/theme/default/style.css"/> - <xsl:choose> - <xsl:when test="/root/request/debug"> - <link rel="stylesheet" type="text/css" href="../../static/geonetwork-client-ext-ux_css.css?minimize=false"/> - <link rel="stylesheet" type="text/css" href="../../static/geonetwork-client_css.css?minimize=false"/> - </xsl:when> - <xsl:otherwise> - <link rel="stylesheet" type="text/css" href="../../static/geonetwork-client-ext-ux_css.css"/> - <link rel="stylesheet" type="text/css" href="../../static/geonetwork-client_css.css"/> - </xsl:otherwise> - </xsl:choose> - </head> - <body> - <div id="loading-mask"></div> - <div id="loading"> - <div class="loading-indicator">Loading ...</div> - </div> - - <div id="header"> - <div id="title" class="mn-main"></div> - </div> - <div id="mn-top"> - <div class="pipe"><a href="#" onclick="Ext.getDom('shortcut').style.display='block';">?</a></div> - <div class="pipe" id="lang-form"></div> - <div class="pipe" id="login-form"></div> - <div class="pipe first" id="mode-form"></div> - </div> - - - <div id="infoContent"> - - </div> - <div id="tag"> - - </div> - <div id="shortcut" style="display:none;"> - - </div> - - <xsl:choose> - <xsl:when test="/root/request/debug"> - - <script type="text/javascript" src="../../apps/js/ext/adapter/ext/ext-base.js"></script> - <script type="text/javascript" src="../../apps/js/ext/ext-all-debug.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/Rating/RatingItem.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/FileUploadField/FileUploadField.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/TwinTriggerComboBox/TwinTriggerComboBox.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/DateTime/DateTime.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/RowExpander/RowExpander.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/MultiselectItemSelector-3.0/DDView.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/MultiselectItemSelector-3.0/Multiselect.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/SuperBoxSelect/SuperBoxSelect.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/LightBox/lightbox.js"></script> - <script type="text/javascript" src="../../apps/js/ext-ux/CheckColumn.js"></script> - - - <script type="text/javascript" src="../../apps/js/proj4js-compressed.js"></script> - <script type="text/javascript" src="../../apps/js/OpenLayers/lib/OpenLayers.js"></script> - <script type="text/javascript" src="../../apps/js/GeoExt/lib/overrides/override-ext-ajax.js"></script> - <script type="text/javascript" src="../../apps/js/GeoExt/lib/GeoExt.js"></script> - <script type="text/javascript" src="../../apps/js/GeoExt-ux/LayerOpacitySliderPlugin/LayerOpacitySliderPlugin.js"></script> - - <script type="text/javascript" src="../../apps/js/GeoNetwork/lib/GeoNetwork.js"></script> - - <script type="text/javascript" src="../../apps/search/js/Settings.js"></script> - <script type="text/javascript" src="../../apps/search/js/Shortcuts.js"></script> - <script type="text/javascript" src="../../apps/search/js/map/Settings.js"></script> - <script type="text/javascript" src="../../apps/search/js/map/MapApp.js"></script> - <script type="text/javascript" src="../../apps/search/js/App.js"></script> - - </xsl:when> - <xsl:otherwise> - <script type="text/javascript" src="../../apps/js/ext/adapter/ext/ext-base.js"></script> - <script type="text/javascript" src="../../apps/js/ext/ext-all.js"></script> - <script type="text/javascript" src="../../static/geonetwork-client-mini-nomap.js"></script> - <script type="text/javascript" src="../../static/geonetwork-client-mini.js"></script> - <script type="text/javascript" src="../../static/geonetwork-client-search-app.js"></script> - </xsl:otherwise> - </xsl:choose> - </body> - </html> - </xsl:template> -</xsl:stylesheet> diff --git a/web/src/main/webapp/xsl/search-tab.xsl b/web/src/main/webapp/xsl/search-tab.xsl deleted file mode 100644 index c7480dd4240..00000000000 --- a/web/src/main/webapp/xsl/search-tab.xsl +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:geonet="http://www.fao.org/geonetwork" xmlns:exslt="http://exslt.org/common" - exclude-result-prefixes="exslt geonet"> - <xsl:include href="metadata/common.xsl"/> - <xsl:output omit-xml-declaration="no" method="html" doctype-public="html" indent="yes" - encoding="UTF-8"/> - <xsl:variable name="hostUrl" - select="concat(/root/gui/env/server/protocol, '://', /root/gui/env/server/host, ':', /root/gui/env/server/port)"/> - <xsl:variable name="baseUrl" select="/root/gui/url"/> - <xsl:variable name="serviceUrl" select="concat($hostUrl, /root/gui/locService)"/> - <xsl:variable name="rssUrl" select="concat($serviceUrl, '/rss.search?sortBy=changeDate')"/> - <xsl:variable name="siteName" select="/root/gui/env/site/name"/> - - <!-- main page --> - <xsl:template match="/"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <title>GeoNetwork - - - - - - - - - - - - - - - - - - - - - - - - -
      -
      -
      Loading ...
      -
      - - -
      - -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -
      diff --git a/web/src/main/webapp/xsl/search.xsl b/web/src/main/webapp/xsl/search.xsl deleted file mode 100644 index 4ed2d085829..00000000000 --- a/web/src/main/webapp/xsl/search.xsl +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - <xsl:value-of select="$siteName" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /apps/js/OpenLayers/theme/default/style.css - - - - - /apps/js/ext/resources/css/ext-all.css - - - /apps/js/ext/resources/css/xtheme-gray.css - - - - /apps/js/ext-ux/Rating/rating.css - - - /apps/js/ext-ux/SuperBoxSelect/superboxselect.css - - - /apps/js/ext-ux/LightBox/lightbox.css - - - /apps/js/ext-ux/FileUploadField/file-upload.css - - - /apps/js/ext-ux/MultiselectItemSelector-3.0/Multiselect.css - - - - - /apps/html5ui/css/normalize.min.css - - - /apps/html5ui/css/main.css - - - /apps/html5ui/css/colors.css - - - /apps/html5ui/css/gnmetadatadefault.css - - - /apps/html5ui/css/gnmetadataview.css - - - - - - - - - - - - - - -
      -
      - - -
        - * - *
      • 1. Field specific validator - *
        - *

        A validator offers a way to customize and reuse a validation specification. - * If a field is configured with a {@link #validator} - * function, it will be passed the current field value. The {@link #validator} - * function is expected to return either: - *

          - *
        • Boolean true if the value is valid (validation continues).
        • - *
        • a String to represent the invalid message if invalid (validation halts).
        • - *
        - *
      • - * - *
      • 2. Basic Validation - *
        - *

        If the {@link #validator} has not halted validation, - * basic validation proceeds as follows:

        - * - *
          - * - *
        • {@link #allowBlank} : (Invalid message = - * {@link #emptyText})
          - * Depending on the configuration of {@link #allowBlank}, a - * blank field will cause validation to halt at this step and return - * Boolean true or false accordingly. - *
        • - * - *
        • {@link #minLength} : (Invalid message = - * {@link #minLengthText})
          - * If the passed value does not satisfy the {@link #minLength} - * specified, validation halts. - *
        • - * - *
        • {@link #maxLength} : (Invalid message = - * {@link #maxLengthText})
          - * If the passed value does not satisfy the {@link #maxLength} - * specified, validation halts. - *
        • - * - *
        - *
      • - * - *
      • 3. Preconfigured Validation Types (VTypes) - *
        - *

        If none of the prior validation steps halts validation, a field - * configured with a {@link #vtype} will utilize the - * corresponding {@link Ext.form.VTypes VTypes} validation function. - * If invalid, either the field's {@link #vtypeText} or - * the VTypes vtype Text property will be used for the invalid message. - * Keystrokes on the field will be filtered according to the VTypes - * vtype Mask property.

        - *
      • - * - *
      • 4. Field specific regex test - *
        - *

        If none of the prior validation steps halts validation, a field's - * configured {@link #regex} test will be processed. - * The invalid message for this test is configured with - * {@link #regexText}.

        - *
      • - * - * @param {Mixed} value The value to validate. The processed raw value will be used if nothing is passed - * @return {Array} Array of any validation errors - */ - getErrors: function(value) { - var errors = Ext.form.TextField.superclass.getErrors.apply(this, arguments); - - value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue()); - - if (Ext.isFunction(this.validator)) { - var msg = this.validator(value); - if (msg !== true) { - errors.push(msg); - } - } - - if (value.length < 1 || value === this.emptyText) { - if (this.allowBlank) { - //if value is blank and allowBlank is true, there cannot be any additional errors - return errors; - } else { - errors.push(this.blankText); - } - } - - if (!this.allowBlank && (value.length < 1 || value === this.emptyText)) { // if it's blank - errors.push(this.blankText); - } - - if (value.length < this.minLength) { - errors.push(String.format(this.minLengthText, this.minLength)); - } - - if (value.length > this.maxLength) { - errors.push(String.format(this.maxLengthText, this.maxLength)); - } - - if (this.vtype) { - var vt = Ext.form.VTypes; - if(!vt[this.vtype](value, this)){ - errors.push(this.vtypeText || vt[this.vtype +'Text']); - } - } - - if (this.regex && !this.regex.test(value)) { - errors.push(this.regexText); - } - - return errors; - }, - - /** - * Selects text in this field - * @param {Number} start (optional) The index where the selection should start (defaults to 0) - * @param {Number} end (optional) The index where the selection should end (defaults to the text length) - */ - selectText : function(start, end){ - var v = this.getRawValue(); - var doFocus = false; - if(v.length > 0){ - start = start === undefined ? 0 : start; - end = end === undefined ? v.length : end; - var d = this.el.dom; - if(d.setSelectionRange){ - d.setSelectionRange(start, end); - }else if(d.createTextRange){ - var range = d.createTextRange(); - range.moveStart('character', start); - range.moveEnd('character', end-v.length); - range.select(); - } - doFocus = Ext.isGecko || Ext.isOpera; - }else{ - doFocus = true; - } - if(doFocus){ - this.focus(); - } - }, - - /** - * Automatically grows the field to accomodate the width of the text up to the maximum field width allowed. - * This only takes effect if {@link #grow} = true, and fires the {@link #autosize} event. - */ - autoSize : function(){ - if(!this.grow || !this.rendered){ - return; - } - if(!this.metrics){ - this.metrics = Ext.util.TextMetrics.createInstance(this.el); - } - var el = this.el; - var v = el.dom.value; - var d = document.createElement('div'); - d.appendChild(document.createTextNode(v)); - v = d.innerHTML; - Ext.removeNode(d); - d = null; - v += ' '; - var w = Math.min(this.growMax, Math.max(this.metrics.getWidth(v) + /* add extra padding */ 10, this.growMin)); - this.el.setWidth(w); - this.fireEvent('autosize', this, w); - }, - - onDestroy: function(){ - if(this.validationTask){ - this.validationTask.cancel(); - this.validationTask = null; - } - Ext.form.TextField.superclass.onDestroy.call(this); - } -}); -Ext.reg('textfield', Ext.form.TextField); -/** - * @class Ext.form.TriggerField - * @extends Ext.form.TextField - * Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default). - * The trigger has no default action, so you must assign a function to implement the trigger click handler by - * overriding {@link #onTriggerClick}. You can create a TriggerField directly, as it renders exactly like a combobox - * for which you can provide a custom implementation. For example: - *
        
        -var trigger = new Ext.form.TriggerField();
        -trigger.onTriggerClick = myTriggerFn;
        -trigger.applyToMarkup('my-field');
        -
        - * - * However, in general you will most likely want to use TriggerField as the base class for a reusable component. - * {@link Ext.form.DateField} and {@link Ext.form.ComboBox} are perfect examples of this. - * - * @constructor - * Create a new TriggerField. - * @param {Object} config Configuration options (valid {@Ext.form.TextField} config options will also be applied - * to the base TextField) - * @xtype trigger - */ -Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { - /** - * @cfg {String} triggerClass - * An additional CSS class used to style the trigger button. The trigger will always get the - * class 'x-form-trigger' by default and triggerClass will be appended if specified. - */ - /** - * @cfg {Mixed} triggerConfig - *

        A {@link Ext.DomHelper DomHelper} config object specifying the structure of the - * trigger element for this Field. (Optional).

        - *

        Specify this when you need a customized element to act as the trigger button for a TriggerField.

        - *

        Note that when using this option, it is the developer's responsibility to ensure correct sizing, positioning - * and appearance of the trigger. Defaults to:

        - *
        {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}
        - */ - /** - * @cfg {String/Object} autoCreate

        A {@link Ext.DomHelper DomHelper} element spec, or true for a default - * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component. - * See {@link Ext.Component#autoEl autoEl} for details. Defaults to:

        - *
        {tag: "input", type: "text", size: "16", autocomplete: "off"}
        - */ - defaultAutoCreate : {tag: "input", type: "text", size: "16", autocomplete: "off"}, - /** - * @cfg {Boolean} hideTrigger true to hide the trigger element and display only the base - * text field (defaults to false) - */ - hideTrigger:false, - /** - * @cfg {Boolean} editable false to prevent the user from typing text directly into the field, - * the field will only respond to a click on the trigger to set the value. (defaults to true). - */ - editable: true, - /** - * @cfg {Boolean} readOnly true to prevent the user from changing the field, and - * hides the trigger. Superceeds the editable and hideTrigger options if the value is true. - * (defaults to false) - */ - readOnly: false, - /** - * @cfg {String} wrapFocusClass The class added to the to the wrap of the trigger element. Defaults to - * x-trigger-wrap-focus. - */ - wrapFocusClass: 'x-trigger-wrap-focus', - /** - * @hide - * @method autoSize - */ - autoSize: Ext.emptyFn, - // private - monitorTab : true, - // private - deferHeight : true, - // private - mimicing : false, - - actionMode: 'wrap', - - defaultTriggerWidth: 17, - - // private - onResize : function(w, h){ - Ext.form.TriggerField.superclass.onResize.call(this, w, h); - var tw = this.getTriggerWidth(); - if(Ext.isNumber(w)){ - this.el.setWidth(w - tw); - } - this.wrap.setWidth(this.el.getWidth() + tw); - }, - - getTriggerWidth: function(){ - var tw = this.trigger.getWidth(); - if(!this.hideTrigger && !this.readOnly && tw === 0){ - tw = this.defaultTriggerWidth; - } - return tw; - }, - - // private - alignErrorIcon : function(){ - if(this.wrap){ - this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]); - } - }, - - // private - onRender : function(ct, position){ - this.doc = Ext.isIE ? Ext.getBody() : Ext.getDoc(); - Ext.form.TriggerField.superclass.onRender.call(this, ct, position); - - this.wrap = this.el.wrap({cls: 'x-form-field-wrap x-form-field-trigger-wrap'}); - this.trigger = this.wrap.createChild(this.triggerConfig || - {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.triggerClass}); - this.initTrigger(); - if(!this.width){ - this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); - } - this.resizeEl = this.positionEl = this.wrap; - }, - - getWidth: function() { - return(this.el.getWidth() + this.trigger.getWidth()); - }, - - updateEditState: function(){ - if(this.rendered){ - if (this.readOnly) { - this.el.dom.readOnly = true; - this.el.addClass('x-trigger-noedit'); - this.mun(this.el, 'click', this.onTriggerClick, this); - this.trigger.setDisplayed(false); - } else { - if (!this.editable) { - this.el.dom.readOnly = true; - this.el.addClass('x-trigger-noedit'); - this.mon(this.el, 'click', this.onTriggerClick, this); - } else { - this.el.dom.readOnly = false; - this.el.removeClass('x-trigger-noedit'); - this.mun(this.el, 'click', this.onTriggerClick, this); - } - this.trigger.setDisplayed(!this.hideTrigger); - } - this.onResize(this.width || this.wrap.getWidth()); - } - }, - - /** - * Changes the hidden status of the trigger. - * @param {Boolean} hideTrigger True to hide the trigger, false to show it. - */ - setHideTrigger: function(hideTrigger){ - if(hideTrigger != this.hideTrigger){ - this.hideTrigger = hideTrigger; - this.updateEditState(); - } - }, - - /** - * Allow or prevent the user from directly editing the field text. If false is passed, - * the user will only be able to modify the field using the trigger. Will also add - * a click event to the text field which will call the trigger. This method - * is the runtime equivalent of setting the {@link #editable} config option at config time. - * @param {Boolean} value True to allow the user to directly edit the field text. - */ - setEditable: function(editable){ - if(editable != this.editable){ - this.editable = editable; - this.updateEditState(); - } - }, - - /** - * Setting this to true will supersede settings {@link #editable} and {@link #hideTrigger}. - * Setting this to false will defer back to {@link #editable} and {@link #hideTrigger}. This method - * is the runtime equivalent of setting the {@link #readOnly} config option at config time. - * @param {Boolean} value True to prevent the user changing the field and explicitly - * hide the trigger. - */ - setReadOnly: function(readOnly){ - if(readOnly != this.readOnly){ - this.readOnly = readOnly; - this.updateEditState(); - } - }, - - afterRender : function(){ - Ext.form.TriggerField.superclass.afterRender.call(this); - this.updateEditState(); - }, - - // private - initTrigger : function(){ - this.mon(this.trigger, 'click', this.onTriggerClick, this, {preventDefault:true}); - this.trigger.addClassOnOver('x-form-trigger-over'); - this.trigger.addClassOnClick('x-form-trigger-click'); - }, - - // private - onDestroy : function(){ - Ext.destroy(this.trigger, this.wrap); - if (this.mimicing){ - this.doc.un('mousedown', this.mimicBlur, this); - } - delete this.doc; - Ext.form.TriggerField.superclass.onDestroy.call(this); - }, - - // private - onFocus : function(){ - Ext.form.TriggerField.superclass.onFocus.call(this); - if(!this.mimicing){ - this.wrap.addClass(this.wrapFocusClass); - this.mimicing = true; - this.doc.on('mousedown', this.mimicBlur, this, {delay: 10}); - if(this.monitorTab){ - this.on('specialkey', this.checkTab, this); - } - } - }, - - // private - checkTab : function(me, e){ - if(e.getKey() == e.TAB){ - this.triggerBlur(); - } - }, - - // private - onBlur : Ext.emptyFn, - - // private - mimicBlur : function(e){ - if(!this.isDestroyed && !this.wrap.contains(e.target) && this.validateBlur(e)){ - this.triggerBlur(); - } - }, - - // private - triggerBlur : function(){ - this.mimicing = false; - this.doc.un('mousedown', this.mimicBlur, this); - if(this.monitorTab && this.el){ - this.un('specialkey', this.checkTab, this); - } - Ext.form.TriggerField.superclass.onBlur.call(this); - if(this.wrap){ - this.wrap.removeClass(this.wrapFocusClass); - } - }, - - beforeBlur : Ext.emptyFn, - - // private - // This should be overriden by any subclass that needs to check whether or not the field can be blurred. - validateBlur : function(e){ - return true; - }, - - /** - * The function that should handle the trigger's click event. This method does nothing by default - * until overridden by an implementing function. See Ext.form.ComboBox and Ext.form.DateField for - * sample implementations. - * @method - * @param {EventObject} e - */ - onTriggerClick : Ext.emptyFn - - /** - * @cfg {Boolean} grow @hide - */ - /** - * @cfg {Number} growMin @hide - */ - /** - * @cfg {Number} growMax @hide - */ -}); - -/** - * @class Ext.form.TwinTriggerField - * @extends Ext.form.TriggerField - * TwinTriggerField is not a public class to be used directly. It is meant as an abstract base class - * to be extended by an implementing class. For an example of implementing this class, see the custom - * SearchField implementation here: - * http://extjs.com/deploy/ext/examples/form/custom.html - */ -Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, { - /** - * @cfg {Mixed} triggerConfig - *

        A {@link Ext.DomHelper DomHelper} config object specifying the structure of the trigger elements - * for this Field. (Optional).

        - *

        Specify this when you need a customized element to contain the two trigger elements for this Field. - * Each trigger element must be marked by the CSS class x-form-trigger (also see - * {@link #trigger1Class} and {@link #trigger2Class}).

        - *

        Note that when using this option, it is the developer's responsibility to ensure correct sizing, - * positioning and appearance of the triggers.

        - */ - /** - * @cfg {String} trigger1Class - * An additional CSS class used to style the trigger button. The trigger will always get the - * class 'x-form-trigger' by default and triggerClass will be appended if specified. - */ - /** - * @cfg {String} trigger2Class - * An additional CSS class used to style the trigger button. The trigger will always get the - * class 'x-form-trigger' by default and triggerClass will be appended if specified. - */ - - initComponent : function(){ - Ext.form.TwinTriggerField.superclass.initComponent.call(this); - - this.triggerConfig = { - tag:'span', cls:'x-form-twin-triggers', cn:[ - {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger1Class}, - {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger2Class} - ]}; - }, - - getTrigger : function(index){ - return this.triggers[index]; - }, - - afterRender: function(){ - Ext.form.TwinTriggerField.superclass.afterRender.call(this); - var triggers = this.triggers, - i = 0, - len = triggers.length; - - for(; i < len; ++i){ - if(this['hideTrigger' + (i + 1)]){ - triggers[i].hide(); - } - - } - }, - - initTrigger : function(){ - var ts = this.trigger.select('.x-form-trigger', true), - triggerField = this; - - ts.each(function(t, all, index){ - var triggerIndex = 'Trigger'+(index+1); - t.hide = function(){ - var w = triggerField.wrap.getWidth(); - this.dom.style.display = 'none'; - triggerField.el.setWidth(w-triggerField.trigger.getWidth()); - triggerField['hidden' + triggerIndex] = true; - }; - t.show = function(){ - var w = triggerField.wrap.getWidth(); - this.dom.style.display = ''; - triggerField.el.setWidth(w-triggerField.trigger.getWidth()); - triggerField['hidden' + triggerIndex] = false; - }; - this.mon(t, 'click', this['on'+triggerIndex+'Click'], this, {preventDefault:true}); - t.addClassOnOver('x-form-trigger-over'); - t.addClassOnClick('x-form-trigger-click'); - }, this); - this.triggers = ts.elements; - }, - - getTriggerWidth: function(){ - var tw = 0; - Ext.each(this.triggers, function(t, index){ - var triggerIndex = 'Trigger' + (index + 1), - w = t.getWidth(); - if(w === 0 && !this['hidden' + triggerIndex]){ - tw += this.defaultTriggerWidth; - }else{ - tw += w; - } - }, this); - return tw; - }, - - // private - onDestroy : function() { - Ext.destroy(this.triggers); - Ext.form.TwinTriggerField.superclass.onDestroy.call(this); - }, - - /** - * The function that should handle the trigger's click event. This method does nothing by default - * until overridden by an implementing function. See {@link Ext.form.TriggerField#onTriggerClick} - * for additional information. - * @method - * @param {EventObject} e - */ - onTrigger1Click : Ext.emptyFn, - /** - * The function that should handle the trigger's click event. This method does nothing by default - * until overridden by an implementing function. See {@link Ext.form.TriggerField#onTriggerClick} - * for additional information. - * @method - * @param {EventObject} e - */ - onTrigger2Click : Ext.emptyFn -}); -Ext.reg('trigger', Ext.form.TriggerField); -/** - * @class Ext.form.TextArea - * @extends Ext.form.TextField - * Multiline text field. Can be used as a direct replacement for traditional textarea fields, plus adds - * support for auto-sizing. - * @constructor - * Creates a new TextArea - * @param {Object} config Configuration options - * @xtype textarea - */ -Ext.form.TextArea = Ext.extend(Ext.form.TextField, { - /** - * @cfg {Number} growMin The minimum height to allow when {@link Ext.form.TextField#grow grow}=true - * (defaults to 60) - */ - growMin : 60, - /** - * @cfg {Number} growMax The maximum height to allow when {@link Ext.form.TextField#grow grow}=true - * (defaults to 1000) - */ - growMax: 1000, - growAppend : ' \n ', - - enterIsSpecial : false, - - /** - * @cfg {Boolean} preventScrollbars true to prevent scrollbars from appearing regardless of how much text is - * in the field. This option is only relevant when {@link #grow} is true. Equivalent to setting overflow: hidden, defaults to - * false. - */ - preventScrollbars: false, - /** - * @cfg {String/Object} autoCreate

        A {@link Ext.DomHelper DomHelper} element spec, or true for a default - * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component. - * See {@link Ext.Component#autoEl autoEl} for details. Defaults to:

        - *
        {tag: "textarea", style: "width:100px;height:60px;", autocomplete: "off"}
        - */ - - // private - onRender : function(ct, position){ - if(!this.el){ - this.defaultAutoCreate = { - tag: "textarea", - style:"width:100px;height:60px;", - autocomplete: "off" - }; - } - Ext.form.TextArea.superclass.onRender.call(this, ct, position); - if(this.grow){ - this.textSizeEl = Ext.DomHelper.append(document.body, { - tag: "pre", cls: "x-form-grow-sizer" - }); - if(this.preventScrollbars){ - this.el.setStyle("overflow", "hidden"); - } - this.el.setHeight(this.growMin); - } - }, - - onDestroy : function(){ - Ext.removeNode(this.textSizeEl); - Ext.form.TextArea.superclass.onDestroy.call(this); - }, - - fireKey : function(e){ - if(e.isSpecialKey() && (this.enterIsSpecial || (e.getKey() != e.ENTER || e.hasModifier()))){ - this.fireEvent("specialkey", this, e); - } - }, - - // private - doAutoSize : function(e){ - return !e.isNavKeyPress() || e.getKey() == e.ENTER; - }, - - // inherit docs - filterValidation: function(e) { - if(!e.isNavKeyPress() || (!this.enterIsSpecial && e.keyCode == e.ENTER)){ - this.validationTask.delay(this.validationDelay); - } - }, - - /** - * Automatically grows the field to accomodate the height of the text up to the maximum field height allowed. - * This only takes effect if grow = true, and fires the {@link #autosize} event if the height changes. - */ - autoSize: function(){ - if(!this.grow || !this.textSizeEl){ - return; - } - var el = this.el, - v = Ext.util.Format.htmlEncode(el.dom.value), - ts = this.textSizeEl, - h; - - Ext.fly(ts).setWidth(this.el.getWidth()); - if(v.length < 1){ - v = "  "; - }else{ - v += this.growAppend; - if(Ext.isIE){ - v = v.replace(/\n/g, ' 
        '); - } - } - ts.innerHTML = v; - h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin)); - if(h != this.lastHeight){ - this.lastHeight = h; - this.el.setHeight(h); - this.fireEvent("autosize", this, h); - } - } -}); -Ext.reg('textarea', Ext.form.TextArea);/** - * @class Ext.form.NumberField - * @extends Ext.form.TextField - * Numeric text field that provides automatic keystroke filtering and numeric validation. - * @constructor - * Creates a new NumberField - * @param {Object} config Configuration options - * @xtype numberfield - */ -Ext.form.NumberField = Ext.extend(Ext.form.TextField, { - /** - * @cfg {RegExp} stripCharsRe @hide - */ - /** - * @cfg {RegExp} maskRe @hide - */ - /** - * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field x-form-num-field") - */ - fieldClass: "x-form-field x-form-num-field", - - /** - * @cfg {Boolean} allowDecimals False to disallow decimal values (defaults to true) - */ - allowDecimals : true, - - /** - * @cfg {String} decimalSeparator Character(s) to allow as the decimal separator (defaults to '.') - */ - decimalSeparator : ".", - - /** - * @cfg {Number} decimalPrecision The maximum precision to display after the decimal separator (defaults to 2) - */ - decimalPrecision : 2, - - /** - * @cfg {Boolean} allowNegative False to prevent entering a negative sign (defaults to true) - */ - allowNegative : true, - - /** - * @cfg {Number} minValue The minimum allowed value (defaults to Number.NEGATIVE_INFINITY) - */ - minValue : Number.NEGATIVE_INFINITY, - - /** - * @cfg {Number} maxValue The maximum allowed value (defaults to Number.MAX_VALUE) - */ - maxValue : Number.MAX_VALUE, - - /** - * @cfg {String} minText Error text to display if the minimum value validation fails (defaults to "The minimum value for this field is {minValue}") - */ - minText : "The minimum value for this field is {0}", - - /** - * @cfg {String} maxText Error text to display if the maximum value validation fails (defaults to "The maximum value for this field is {maxValue}") - */ - maxText : "The maximum value for this field is {0}", - - /** - * @cfg {String} nanText Error text to display if the value is not a valid number. For example, this can happen - * if a valid character like '.' or '-' is left in the field with no number (defaults to "{value} is not a valid number") - */ - nanText : "{0} is not a valid number", - - /** - * @cfg {String} baseChars The base set of characters to evaluate as valid numbers (defaults to '0123456789'). - */ - baseChars : "0123456789", - - /** - * @cfg {Boolean} autoStripChars True to automatically strip not allowed characters from the field. Defaults to false - */ - autoStripChars: false, - - // private - initEvents : function() { - var allowed = this.baseChars + ''; - if (this.allowDecimals) { - allowed += this.decimalSeparator; - } - if (this.allowNegative) { - allowed += '-'; - } - allowed = Ext.escapeRe(allowed); - this.maskRe = new RegExp('[' + allowed + ']'); - if (this.autoStripChars) { - this.stripCharsRe = new RegExp('[^' + allowed + ']', 'gi'); - } - - Ext.form.NumberField.superclass.initEvents.call(this); - }, - - /** - * Runs all of NumberFields validations and returns an array of any errors. Note that this first - * runs TextField's validations, so the returned array is an amalgamation of all field errors. - * The additional validations run test that the value is a number, and that it is within the - * configured min and max values. - * @param {Mixed} value The value to get errors for (defaults to the current field value) - * @return {Array} All validation errors for this field - */ - getErrors: function(value) { - var errors = Ext.form.NumberField.superclass.getErrors.apply(this, arguments); - - value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue()); - - if (value.length < 1) { // if it's blank and textfield didn't flag it then it's valid - return errors; - } - - value = String(value).replace(this.decimalSeparator, "."); - - if(isNaN(value)){ - errors.push(String.format(this.nanText, value)); - } - - var num = this.parseValue(value); - - if (num < this.minValue) { - errors.push(String.format(this.minText, this.minValue)); - } - - if (num > this.maxValue) { - errors.push(String.format(this.maxText, this.maxValue)); - } - - return errors; - }, - - getValue : function() { - return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this))); - }, - - setValue : function(v) { - v = Ext.isNumber(v) ? v : parseFloat(String(v).replace(this.decimalSeparator, ".")); - v = this.fixPrecision(v); - v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator); - return Ext.form.NumberField.superclass.setValue.call(this, v); - }, - - /** - * Replaces any existing {@link #minValue} with the new value. - * @param {Number} value The minimum value - */ - setMinValue : function(value) { - this.minValue = Ext.num(value, Number.NEGATIVE_INFINITY); - }, - - /** - * Replaces any existing {@link #maxValue} with the new value. - * @param {Number} value The maximum value - */ - setMaxValue : function(value) { - this.maxValue = Ext.num(value, Number.MAX_VALUE); - }, - - // private - parseValue : function(value) { - value = parseFloat(String(value).replace(this.decimalSeparator, ".")); - return isNaN(value) ? '' : value; - }, - - /** - * @private - * - */ - fixPrecision : function(value) { - var nan = isNaN(value); - - if (!this.allowDecimals || this.decimalPrecision == -1 || nan || !value) { - return nan ? '' : value; - } - - return parseFloat(parseFloat(value).toFixed(this.decimalPrecision)); - }, - - beforeBlur : function() { - var v = this.parseValue(this.getRawValue()); - - if (!Ext.isEmpty(v)) { - this.setValue(v); - } - } -}); - -Ext.reg('numberfield', Ext.form.NumberField); -/** - * @class Ext.form.DateField - * @extends Ext.form.TriggerField - * Provides a date input field with a {@link Ext.DatePicker} dropdown and automatic date validation. - * @constructor - * Create a new DateField - * @param {Object} config - * @xtype datefield - */ -Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { - /** - * @cfg {String} format - * The default date format string which can be overriden for localization support. The format must be - * valid according to {@link Date#parseDate} (defaults to 'm/d/Y'). - */ - format : "m/d/Y", - /** - * @cfg {String} altFormats - * Multiple date formats separated by "|" to try when parsing a user input value and it - * does not match the defined format (defaults to - * 'm/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j'). - */ - altFormats : "m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j", - /** - * @cfg {String} disabledDaysText - * The tooltip to display when the date falls on a disabled day (defaults to 'Disabled') - */ - disabledDaysText : "Disabled", - /** - * @cfg {String} disabledDatesText - * The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled') - */ - disabledDatesText : "Disabled", - /** - * @cfg {String} minText - * The error text to display when the date in the cell is before {@link #minValue} (defaults to - * 'The date in this field must be after {minValue}'). - */ - minText : "The date in this field must be equal to or after {0}", - /** - * @cfg {String} maxText - * The error text to display when the date in the cell is after {@link #maxValue} (defaults to - * 'The date in this field must be before {maxValue}'). - */ - maxText : "The date in this field must be equal to or before {0}", - /** - * @cfg {String} invalidText - * The error text to display when the date in the field is invalid (defaults to - * '{value} is not a valid date - it must be in the format {format}'). - */ - invalidText : "{0} is not a valid date - it must be in the format {1}", - /** - * @cfg {String} triggerClass - * An additional CSS class used to style the trigger button. The trigger will always get the - * class 'x-form-trigger' and triggerClass will be appended if specified - * (defaults to 'x-form-date-trigger' which displays a calendar icon). - */ - triggerClass : 'x-form-date-trigger', - /** - * @cfg {Boolean} showToday - * false to hide the footer area of the DatePicker containing the Today button and disable - * the keyboard handler for spacebar that selects the current date (defaults to true). - */ - showToday : true, - - /** - * @cfg {Number} startDay - * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday) - */ - startDay : 0, - - /** - * @cfg {Date/String} minValue - * The minimum allowed date. Can be either a Javascript date object or a string date in a - * valid format (defaults to null). - */ - /** - * @cfg {Date/String} maxValue - * The maximum allowed date. Can be either a Javascript date object or a string date in a - * valid format (defaults to null). - */ - /** - * @cfg {Array} disabledDays - * An array of days to disable, 0 based (defaults to null). Some examples:
        
        -// disable Sunday and Saturday:
        -disabledDays:  [0, 6]
        -// disable weekdays:
        -disabledDays: [1,2,3,4,5]
        -     * 
        - */ - /** - * @cfg {Array} disabledDates - * An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular - * expression so they are very powerful. Some examples:
        
        -// disable these exact dates:
        -disabledDates: ["03/08/2003", "09/16/2003"]
        -// disable these days for every year:
        -disabledDates: ["03/08", "09/16"]
        -// only match the beginning (useful if you are using short years):
        -disabledDates: ["^03/08"]
        -// disable every day in March 2006:
        -disabledDates: ["03/../2006"]
        -// disable every day in every March:
        -disabledDates: ["^03"]
        -     * 
        - * Note that the format of the dates included in the array should exactly match the {@link #format} config. - * In order to support regular expressions, if you are using a {@link #format date format} that has "." in - * it, you will have to escape the dot when restricting dates. For example: ["03\\.08\\.03"]. - */ - /** - * @cfg {String/Object} autoCreate - * A {@link Ext.DomHelper DomHelper element specification object}, or true for the default element - * specification object:
        
        -     * autoCreate: {tag: "input", type: "text", size: "10", autocomplete: "off"}
        -     * 
        - */ - - // private - defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"}, - - // in the absence of a time value, a default value of 12 noon will be used - // (note: 12 noon was chosen because it steers well clear of all DST timezone changes) - initTime: '12', // 24 hour format - - initTimeFormat: 'H', - - // PUBLIC -- to be documented - safeParse : function(value, format) { - if (Date.formatContainsHourInfo(format)) { - // if parse format contains hour information, no DST adjustment is necessary - return Date.parseDate(value, format); - } else { - // set time to 12 noon, then clear the time - var parsedDate = Date.parseDate(value + ' ' + this.initTime, format + ' ' + this.initTimeFormat); - - if (parsedDate) { - return parsedDate.clearTime(); - } - } - }, - - initComponent : function(){ - Ext.form.DateField.superclass.initComponent.call(this); - - this.addEvents( - /** - * @event select - * Fires when a date is selected via the date picker. - * @param {Ext.form.DateField} this - * @param {Date} date The date that was selected - */ - 'select' - ); - - if(Ext.isString(this.minValue)){ - this.minValue = this.parseDate(this.minValue); - } - if(Ext.isString(this.maxValue)){ - this.maxValue = this.parseDate(this.maxValue); - } - this.disabledDatesRE = null; - this.initDisabledDays(); - }, - - initEvents: function() { - Ext.form.DateField.superclass.initEvents.call(this); - this.keyNav = new Ext.KeyNav(this.el, { - "down": function(e) { - this.onTriggerClick(); - }, - scope: this, - forceKeyDown: true - }); - }, - - - // private - initDisabledDays : function(){ - if(this.disabledDates){ - var dd = this.disabledDates, - len = dd.length - 1, - re = "(?:"; - - Ext.each(dd, function(d, i){ - re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i]; - if(i != len){ - re += '|'; - } - }, this); - this.disabledDatesRE = new RegExp(re + ')'); - } - }, - - /** - * Replaces any existing disabled dates with new values and refreshes the DatePicker. - * @param {Array} disabledDates An array of date strings (see the {@link #disabledDates} config - * for details on supported values) used to disable a pattern of dates. - */ - setDisabledDates : function(dd){ - this.disabledDates = dd; - this.initDisabledDays(); - if(this.menu){ - this.menu.picker.setDisabledDates(this.disabledDatesRE); - } - }, - - /** - * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker. - * @param {Array} disabledDays An array of disabled day indexes. See the {@link #disabledDays} - * config for details on supported values. - */ - setDisabledDays : function(dd){ - this.disabledDays = dd; - if(this.menu){ - this.menu.picker.setDisabledDays(dd); - } - }, - - /** - * Replaces any existing {@link #minValue} with the new value and refreshes the DatePicker. - * @param {Date} value The minimum date that can be selected - */ - setMinValue : function(dt){ - this.minValue = (Ext.isString(dt) ? this.parseDate(dt) : dt); - if(this.menu){ - this.menu.picker.setMinDate(this.minValue); - } - }, - - /** - * Replaces any existing {@link #maxValue} with the new value and refreshes the DatePicker. - * @param {Date} value The maximum date that can be selected - */ - setMaxValue : function(dt){ - this.maxValue = (Ext.isString(dt) ? this.parseDate(dt) : dt); - if(this.menu){ - this.menu.picker.setMaxDate(this.maxValue); - } - }, - - /** - * Runs all of NumberFields validations and returns an array of any errors. Note that this first - * runs TextField's validations, so the returned array is an amalgamation of all field errors. - * The additional validation checks are testing that the date format is valid, that the chosen - * date is within the min and max date constraints set, that the date chosen is not in the disabledDates - * regex and that the day chosed is not one of the disabledDays. - * @param {Mixed} value The value to get errors for (defaults to the current field value) - * @return {Array} All validation errors for this field - */ - getErrors: function(value) { - var errors = Ext.form.DateField.superclass.getErrors.apply(this, arguments); - - value = this.formatDate(value || this.processValue(this.getRawValue())); - - if (value.length < 1) { // if it's blank and textfield didn't flag it then it's valid - return errors; - } - - var svalue = value; - value = this.parseDate(value); - if (!value) { - errors.push(String.format(this.invalidText, svalue, this.format)); - return errors; - } - - var time = value.getTime(); - if (this.minValue && time < this.minValue.clearTime().getTime()) { - errors.push(String.format(this.minText, this.formatDate(this.minValue))); - } - - if (this.maxValue && time > this.maxValue.clearTime().getTime()) { - errors.push(String.format(this.maxText, this.formatDate(this.maxValue))); - } - - if (this.disabledDays) { - var day = value.getDay(); - - for(var i = 0; i < this.disabledDays.length; i++) { - if (day === this.disabledDays[i]) { - errors.push(this.disabledDaysText); - break; - } - } - } - - var fvalue = this.formatDate(value); - if (this.disabledDatesRE && this.disabledDatesRE.test(fvalue)) { - errors.push(String.format(this.disabledDatesText, fvalue)); - } - - return errors; - }, - - // private - // Provides logic to override the default TriggerField.validateBlur which just returns true - validateBlur : function(){ - return !this.menu || !this.menu.isVisible(); - }, - - /** - * Returns the current date value of the date field. - * @return {Date} The date value - */ - getValue : function(){ - return this.parseDate(Ext.form.DateField.superclass.getValue.call(this)) || ""; - }, - - /** - * Sets the value of the date field. You can pass a date object or any string that can be - * parsed into a valid date, using {@link #format} as the date format, according - * to the same rules as {@link Date#parseDate} (the default format used is "m/d/Y"). - *
        Usage: - *
        
        -//All of these calls set the same date value (May 4, 2006)
        -
        -//Pass a date object:
        -var dt = new Date('5/4/2006');
        -dateField.setValue(dt);
        -
        -//Pass a date string (default format):
        -dateField.setValue('05/04/2006');
        -
        -//Pass a date string (custom format):
        -dateField.format = 'Y-m-d';
        -dateField.setValue('2006-05-04');
        -
        - * @param {String/Date} date The date or valid date string - * @return {Ext.form.Field} this - */ - setValue : function(date){ - return Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date))); - }, - - // private - parseDate : function(value) { - if(!value || Ext.isDate(value)){ - return value; - } - - var v = this.safeParse(value, this.format), - af = this.altFormats, - afa = this.altFormatsArray; - - if (!v && af) { - afa = afa || af.split("|"); - - for (var i = 0, len = afa.length; i < len && !v; i++) { - v = this.safeParse(value, afa[i]); - } - } - return v; - }, - - // private - onDestroy : function(){ - Ext.destroy(this.menu, this.keyNav); - Ext.form.DateField.superclass.onDestroy.call(this); - }, - - // private - formatDate : function(date){ - return Ext.isDate(date) ? date.dateFormat(this.format) : date; - }, - - /** - * @method onTriggerClick - * @hide - */ - // private - // Implements the default empty TriggerField.onTriggerClick function to display the DatePicker - onTriggerClick : function(){ - if(this.disabled){ - return; - } - if(this.menu == null){ - this.menu = new Ext.menu.DateMenu({ - hideOnClick: false, - focusOnSelect: false - }); - } - this.onFocus(); - Ext.apply(this.menu.picker, { - minDate : this.minValue, - maxDate : this.maxValue, - disabledDatesRE : this.disabledDatesRE, - disabledDatesText : this.disabledDatesText, - disabledDays : this.disabledDays, - disabledDaysText : this.disabledDaysText, - format : this.format, - showToday : this.showToday, - startDay: this.startDay, - minText : String.format(this.minText, this.formatDate(this.minValue)), - maxText : String.format(this.maxText, this.formatDate(this.maxValue)) - }); - this.menu.picker.setValue(this.getValue() || new Date()); - this.menu.show(this.el, "tl-bl?"); - this.menuEvents('on'); - }, - - //private - menuEvents: function(method){ - this.menu[method]('select', this.onSelect, this); - this.menu[method]('hide', this.onMenuHide, this); - this.menu[method]('show', this.onFocus, this); - }, - - onSelect: function(m, d){ - this.setValue(d); - this.fireEvent('select', this, d); - this.menu.hide(); - }, - - onMenuHide: function(){ - this.focus(false, 60); - this.menuEvents('un'); - }, - - // private - beforeBlur : function(){ - var v = this.parseDate(this.getRawValue()); - if(v){ - this.setValue(v); - } - } - - /** - * @cfg {Boolean} grow @hide - */ - /** - * @cfg {Number} growMin @hide - */ - /** - * @cfg {Number} growMax @hide - */ - /** - * @hide - * @method autoSize - */ -}); -Ext.reg('datefield', Ext.form.DateField); -/** - * @class Ext.form.DisplayField - * @extends Ext.form.Field - * A display-only text field which is not validated and not submitted. - * @constructor - * Creates a new DisplayField. - * @param {Object} config Configuration options - * @xtype displayfield - */ -Ext.form.DisplayField = Ext.extend(Ext.form.Field, { - validationEvent : false, - validateOnBlur : false, - defaultAutoCreate : {tag: "div"}, - /** - * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-display-field") - */ - fieldClass : "x-form-display-field", - /** - * @cfg {Boolean} htmlEncode false to skip HTML-encoding the text when rendering it (defaults to - * false). This might be useful if you want to include tags in the field's innerHTML rather than - * rendering them as string literals per the default logic. - */ - htmlEncode: false, - - // private - initEvents : Ext.emptyFn, - - isValid : function(){ - return true; - }, - - validate : function(){ - return true; - }, - - getRawValue : function(){ - var v = this.rendered ? this.el.dom.innerHTML : Ext.value(this.value, ''); - if(v === this.emptyText){ - v = ''; - } - if(this.htmlEncode){ - v = Ext.util.Format.htmlDecode(v); - } - return v; - }, - - getValue : function(){ - return this.getRawValue(); - }, - - getName: function() { - return this.name; - }, - - setRawValue : function(v){ - if(this.htmlEncode){ - v = Ext.util.Format.htmlEncode(v); - } - return this.rendered ? (this.el.dom.innerHTML = (Ext.isEmpty(v) ? '' : v)) : (this.value = v); - }, - - setValue : function(v){ - this.setRawValue(v); - return this; - } - /** - * @cfg {String} inputType - * @hide - */ - /** - * @cfg {Boolean} disabled - * @hide - */ - /** - * @cfg {Boolean} readOnly - * @hide - */ - /** - * @cfg {Boolean} validateOnBlur - * @hide - */ - /** - * @cfg {Number} validationDelay - * @hide - */ - /** - * @cfg {String/Boolean} validationEvent - * @hide - */ -}); - -Ext.reg('displayfield', Ext.form.DisplayField); -/** - * @class Ext.form.ComboBox - * @extends Ext.form.TriggerField - *

        A combobox control with support for autocomplete, remote-loading, paging and many other features.

        - *

        A ComboBox works in a similar manner to a traditional HTML <select> field. The difference is - * that to submit the {@link #valueField}, you must specify a {@link #hiddenName} to create a hidden input - * field to hold the value of the valueField. The {@link #displayField} is shown in the text field - * which is named according to the {@link #name}.

        - *

        Events

        - *

        To do something when something in ComboBox is selected, configure the select event:

        
        -var cb = new Ext.form.ComboBox({
        -    // all of your config options
        -    listeners:{
        -         scope: yourScope,
        -         'select': yourFunction
        -    }
        -});
        -
        -// Alternatively, you can assign events after the object is created:
        -var cb = new Ext.form.ComboBox(yourOptions);
        -cb.on('select', yourFunction, yourScope);
        - * 

        - * - *

        ComboBox in Grid

        - *

        If using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a {@link Ext.grid.Column#renderer renderer} - * will be needed to show the displayField when the editor is not active. Set up the renderer manually, or implement - * a reusable render, for example:

        
        -// create reusable renderer
        -Ext.util.Format.comboRenderer = function(combo){
        -    return function(value){
        -        var record = combo.findRecord(combo.{@link #valueField}, value);
        -        return record ? record.get(combo.{@link #displayField}) : combo.{@link #valueNotFoundText};
        -    }
        -}
        -
        -// create the combo instance
        -var combo = new Ext.form.ComboBox({
        -    {@link #typeAhead}: true,
        -    {@link #triggerAction}: 'all',
        -    {@link #lazyRender}:true,
        -    {@link #mode}: 'local',
        -    {@link #store}: new Ext.data.ArrayStore({
        -        id: 0,
        -        fields: [
        -            'myId',
        -            'displayText'
        -        ],
        -        data: [[1, 'item1'], [2, 'item2']]
        -    }),
        -    {@link #valueField}: 'myId',
        -    {@link #displayField}: 'displayText'
        -});
        -
        -// snippet of column model used within grid
        -var cm = new Ext.grid.ColumnModel([{
        -       ...
        -    },{
        -       header: "Some Header",
        -       dataIndex: 'whatever',
        -       width: 130,
        -       editor: combo, // specify reference to combo instance
        -       renderer: Ext.util.Format.comboRenderer(combo) // pass combo instance to reusable renderer
        -    },
        -    ...
        -]);
        - * 

        - * - *

        Filtering

        - *

        A ComboBox {@link #doQuery uses filtering itself}, for information about filtering the ComboBox - * store manually see {@link #lastQuery}.

        - * @constructor - * Create a new ComboBox. - * @param {Object} config Configuration options - * @xtype combo - */ -Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { - /** - * @cfg {Mixed} transform The id, DOM node or element of an existing HTML SELECT to convert to a ComboBox. - * Note that if you specify this and the combo is going to be in an {@link Ext.form.BasicForm} or - * {@link Ext.form.FormPanel}, you must also set {@link #lazyRender} = true. - */ - /** - * @cfg {Boolean} lazyRender true to prevent the ComboBox from rendering until requested - * (should always be used when rendering into an {@link Ext.Editor} (e.g. {@link Ext.grid.EditorGridPanel Grids}), - * defaults to false). - */ - /** - * @cfg {String/Object} autoCreate

        A {@link Ext.DomHelper DomHelper} element spec, or true for a default - * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component. - * See {@link Ext.Component#autoEl autoEl} for details. Defaults to:

        - *
        {tag: "input", type: "text", size: "24", autocomplete: "off"}
        - */ - /** - * @cfg {Ext.data.Store/Array} store The data source to which this combo is bound (defaults to undefined). - * Acceptable values for this property are: - *
          - *
        • any {@link Ext.data.Store Store} subclass
        • - *
        • an Array : Arrays will be converted to a {@link Ext.data.ArrayStore} internally, - * automatically generating {@link Ext.data.Field#name field names} to work with all data components. - *
            - *
          • 1-dimensional array : (e.g., ['Foo','Bar'])
            - * A 1-dimensional array will automatically be expanded (each array item will be used for both the combo - * {@link #valueField} and {@link #displayField})
          • - *
          • 2-dimensional array : (e.g., [['f','Foo'],['b','Bar']])
            - * For a multi-dimensional array, the value in index 0 of each item will be assumed to be the combo - * {@link #valueField}, while the value at index 1 is assumed to be the combo {@link #displayField}. - *
        - *

        See also {@link #mode}.

        - */ - /** - * @cfg {String} title If supplied, a header element is created containing this text and added into the top of - * the dropdown list (defaults to undefined, with no header element) - */ - - // private - defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"}, - /** - * @cfg {Number} listWidth The width (used as a parameter to {@link Ext.Element#setWidth}) of the dropdown - * list (defaults to the width of the ComboBox field). See also {@link #minListWidth} - */ - /** - * @cfg {String} displayField The underlying {@link Ext.data.Field#name data field name} to bind to this - * ComboBox (defaults to undefined if {@link #mode} = 'remote' or 'field1' if - * {@link #transform transforming a select} or if the {@link #store field name is autogenerated based on - * the store configuration}). - *

        See also {@link #valueField}.

        - *

        Note: if using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a - * {@link Ext.grid.Column#renderer renderer} will be needed to show the displayField when the editor is not - * active.

        - */ - /** - * @cfg {String} valueField The underlying {@link Ext.data.Field#name data value name} to bind to this - * ComboBox (defaults to undefined if {@link #mode} = 'remote' or 'field2' if - * {@link #transform transforming a select} or if the {@link #store field name is autogenerated based on - * the store configuration}). - *

        Note: use of a valueField requires the user to make a selection in order for a value to be - * mapped. See also {@link #hiddenName}, {@link #hiddenValue}, and {@link #displayField}.

        - */ - /** - * @cfg {String} hiddenName If specified, a hidden form field with this name is dynamically generated to store the - * field's data value (defaults to the underlying DOM element's name). Required for the combo's value to automatically - * post during a form submission. See also {@link #valueField}. - */ - /** - * @cfg {String} hiddenId If {@link #hiddenName} is specified, hiddenId can also be provided - * to give the hidden field a unique id. The hiddenId and combo {@link Ext.Component#id id} should be - * different, since no two DOM nodes should share the same id. - */ - /** - * @cfg {String} hiddenValue Sets the initial value of the hidden field if {@link #hiddenName} is - * specified to contain the selected {@link #valueField}, from the Store. Defaults to the configured - * {@link Ext.form.Field#value value}. - */ - /** - * @cfg {String} listClass The CSS class to add to the predefined 'x-combo-list' class - * applied the dropdown list element (defaults to ''). - */ - listClass : '', - /** - * @cfg {String} selectedClass CSS class to apply to the selected item in the dropdown list - * (defaults to 'x-combo-selected') - */ - selectedClass : 'x-combo-selected', - /** - * @cfg {String} listEmptyText The empty text to display in the data view if no items are found. - * (defaults to '') - */ - listEmptyText: '', - /** - * @cfg {String} triggerClass An additional CSS class used to style the trigger button. The trigger will always - * get the class 'x-form-trigger' and triggerClass will be appended if specified - * (defaults to 'x-form-arrow-trigger' which displays a downward arrow icon). - */ - triggerClass : 'x-form-arrow-trigger', - /** - * @cfg {Boolean/String} shadow true or "sides" for the default effect, "frame" for - * 4-way shadow, and "drop" for bottom-right - */ - shadow : 'sides', - /** - * @cfg {String/Array} listAlign A valid anchor position value. See {@link Ext.Element#alignTo} for details - * on supported anchor positions and offsets. To specify x/y offsets as well, this value - * may be specified as an Array of {@link Ext.Element#alignTo} method arguments.

        - *
        [ 'tl-bl?', [6,0] ]
        (defaults to 'tl-bl?') - */ - listAlign : 'tl-bl?', - /** - * @cfg {Number} maxHeight The maximum height in pixels of the dropdown list before scrollbars are shown - * (defaults to 300) - */ - maxHeight : 300, - /** - * @cfg {Number} minHeight The minimum height in pixels of the dropdown list when the list is constrained by its - * distance to the viewport edges (defaults to 90) - */ - minHeight : 90, - /** - * @cfg {String} triggerAction The action to execute when the trigger is clicked. - *
          - *
        • 'query' : Default - *

          {@link #doQuery run the query} using the {@link Ext.form.Field#getRawValue raw value}.

        • - *
        • 'all' : - *

          {@link #doQuery run the query} specified by the {@link #allQuery} config option

        • - *
        - *

        See also {@link #queryParam}.

        - */ - triggerAction : 'query', - /** - * @cfg {Number} minChars The minimum number of characters the user must type before autocomplete and - * {@link #typeAhead} activate (defaults to 4 if {@link #mode} = 'remote' or 0 if - * {@link #mode} = 'local', does not apply if - * {@link Ext.form.TriggerField#editable editable} = false). - */ - minChars : 4, - /** - * @cfg {Boolean} autoSelect true to select the first result gathered by the data store (defaults - * to true). A false value would require a manual selection from the dropdown list to set the components value - * unless the value of ({@link #typeAheadDelay}) were true. - */ - autoSelect : true, - /** - * @cfg {Boolean} typeAhead true to populate and autoselect the remainder of the text being - * typed after a configurable delay ({@link #typeAheadDelay}) if it matches a known value (defaults - * to false) - */ - typeAhead : false, - /** - * @cfg {Number} queryDelay The length of time in milliseconds to delay between the start of typing and - * sending the query to filter the dropdown list (defaults to 500 if {@link #mode} = 'remote' - * or 10 if {@link #mode} = 'local') - */ - queryDelay : 500, - /** - * @cfg {Number} pageSize If greater than 0, a {@link Ext.PagingToolbar} is displayed in the - * footer of the dropdown list and the {@link #doQuery filter queries} will execute with page start and - * {@link Ext.PagingToolbar#pageSize limit} parameters. Only applies when {@link #mode} = 'remote' - * (defaults to 0). - */ - pageSize : 0, - /** - * @cfg {Boolean} selectOnFocus true to select any existing text in the field immediately on focus. - * Only applies when {@link Ext.form.TriggerField#editable editable} = true (defaults to - * false). - */ - selectOnFocus : false, - /** - * @cfg {String} queryParam Name of the query ({@link Ext.data.Store#baseParam baseParam} name for the store) - * as it will be passed on the querystring (defaults to 'query') - */ - queryParam : 'query', - /** - * @cfg {String} loadingText The text to display in the dropdown list while data is loading. Only applies - * when {@link #mode} = 'remote' (defaults to 'Loading...') - */ - loadingText : 'Loading...', - /** - * @cfg {Boolean} resizable true to add a resize handle to the bottom of the dropdown list - * (creates an {@link Ext.Resizable} with 'se' {@link Ext.Resizable#pinned pinned} handles). - * Defaults to false. - */ - resizable : false, - /** - * @cfg {Number} handleHeight The height in pixels of the dropdown list resize handle if - * {@link #resizable} = true (defaults to 8) - */ - handleHeight : 8, - /** - * @cfg {String} allQuery The text query to send to the server to return all records for the list - * with no filtering (defaults to '') - */ - allQuery: '', - /** - * @cfg {String} mode Acceptable values are: - *
          - *
        • 'remote' : Default - *

          Automatically loads the {@link #store} the first time the trigger - * is clicked. If you do not want the store to be automatically loaded the first time the trigger is - * clicked, set to 'local' and manually load the store. To force a requery of the store - * every time the trigger is clicked see {@link #lastQuery}.

        • - *
        • 'local' : - *

          ComboBox loads local data

          - *
          
          -var combo = new Ext.form.ComboBox({
          -    renderTo: document.body,
          -    mode: 'local',
          -    store: new Ext.data.ArrayStore({
          -        id: 0,
          -        fields: [
          -            'myId',  // numeric value is the key
          -            'displayText'
          -        ],
          -        data: [[1, 'item1'], [2, 'item2']]  // data is local
          -    }),
          -    valueField: 'myId',
          -    displayField: 'displayText',
          -    triggerAction: 'all'
          -});
          -     * 
        • - *
        - */ - mode: 'remote', - /** - * @cfg {Number} minListWidth The minimum width of the dropdown list in pixels (defaults to 70, will - * be ignored if {@link #listWidth} has a higher value) - */ - minListWidth : 70, - /** - * @cfg {Boolean} forceSelection true to restrict the selected value to one of the values in the list, - * false to allow the user to set arbitrary text into the field (defaults to false) - */ - forceSelection : false, - /** - * @cfg {Number} typeAheadDelay The length of time in milliseconds to wait until the typeahead text is displayed - * if {@link #typeAhead} = true (defaults to 250) - */ - typeAheadDelay : 250, - /** - * @cfg {String} valueNotFoundText When using a name/value combo, if the value passed to setValue is not found in - * the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined). If this - * default text is used, it means there is no value set and no validation will occur on this field. - */ - - /** - * @cfg {Boolean} lazyInit true to not initialize the list for this combo until the field is focused - * (defaults to true) - */ - lazyInit : true, - - /** - * @cfg {Boolean} clearFilterOnReset true to clear any filters on the store (when in local mode) when reset is called - * (defaults to true) - */ - clearFilterOnReset : true, - - /** - * @cfg {Boolean} submitValue False to clear the name attribute on the field so that it is not submitted during a form post. - * If a hiddenName is specified, setting this to true will cause both the hidden field and the element to be submitted. - * Defaults to undefined. - */ - submitValue: undefined, - - /** - * The value of the match string used to filter the store. Delete this property to force a requery. - * Example use: - *
        
        -var combo = new Ext.form.ComboBox({
        -    ...
        -    mode: 'remote',
        -    ...
        -    listeners: {
        -        // delete the previous query in the beforequery event or set
        -        // combo.lastQuery = null (this will reload the store the next time it expands)
        -        beforequery: function(qe){
        -            delete qe.combo.lastQuery;
        -        }
        -    }
        -});
        -     * 
        - * To make sure the filter in the store is not cleared the first time the ComboBox trigger is used - * configure the combo with lastQuery=''. Example use: - *
        
        -var combo = new Ext.form.ComboBox({
        -    ...
        -    mode: 'local',
        -    triggerAction: 'all',
        -    lastQuery: ''
        -});
        -     * 
        - * @property lastQuery - * @type String - */ - - // private - initComponent : function(){ - Ext.form.ComboBox.superclass.initComponent.call(this); - this.addEvents( - /** - * @event expand - * Fires when the dropdown list is expanded - * @param {Ext.form.ComboBox} combo This combo box - */ - 'expand', - /** - * @event collapse - * Fires when the dropdown list is collapsed - * @param {Ext.form.ComboBox} combo This combo box - */ - 'collapse', - - /** - * @event beforeselect - * Fires before a list item is selected. Return false to cancel the selection. - * @param {Ext.form.ComboBox} combo This combo box - * @param {Ext.data.Record} record The data record returned from the underlying store - * @param {Number} index The index of the selected item in the dropdown list - */ - 'beforeselect', - /** - * @event select - * Fires when a list item is selected - * @param {Ext.form.ComboBox} combo This combo box - * @param {Ext.data.Record} record The data record returned from the underlying store - * @param {Number} index The index of the selected item in the dropdown list - */ - 'select', - /** - * @event beforequery - * Fires before all queries are processed. Return false to cancel the query or set the queryEvent's - * cancel property to true. - * @param {Object} queryEvent An object that has these properties:
          - *
        • combo : Ext.form.ComboBox
          This combo box
        • - *
        • query : String
          The query
        • - *
        • forceAll : Boolean
          True to force "all" query
        • - *
        • cancel : Boolean
          Set to true to cancel the query
        • - *
        - */ - 'beforequery' - ); - if(this.transform){ - var s = Ext.getDom(this.transform); - if(!this.hiddenName){ - this.hiddenName = s.name; - } - if(!this.store){ - this.mode = 'local'; - var d = [], opts = s.options; - for(var i = 0, len = opts.length;i < len; i++){ - var o = opts[i], - value = (o.hasAttribute ? o.hasAttribute('value') : o.getAttributeNode('value').specified) ? o.value : o.text; - if(o.selected && Ext.isEmpty(this.value, true)) { - this.value = value; - } - d.push([value, o.text]); - } - this.store = new Ext.data.ArrayStore({ - idIndex: 0, - fields: ['value', 'text'], - data : d, - autoDestroy: true - }); - this.valueField = 'value'; - this.displayField = 'text'; - } - s.name = Ext.id(); // wipe out the name in case somewhere else they have a reference - if(!this.lazyRender){ - this.target = true; - this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate); - this.render(this.el.parentNode, s); - } - Ext.removeNode(s); - } - //auto-configure store from local array data - else if(this.store){ - this.store = Ext.StoreMgr.lookup(this.store); - if(this.store.autoCreated){ - this.displayField = this.valueField = 'field1'; - if(!this.store.expandData){ - this.displayField = 'field2'; - } - this.mode = 'local'; - } - } - - this.selectedIndex = -1; - if(this.mode == 'local'){ - if(!Ext.isDefined(this.initialConfig.queryDelay)){ - this.queryDelay = 10; - } - if(!Ext.isDefined(this.initialConfig.minChars)){ - this.minChars = 0; - } - } - }, - - // private - onRender : function(ct, position){ - if(this.hiddenName && !Ext.isDefined(this.submitValue)){ - this.submitValue = false; - } - Ext.form.ComboBox.superclass.onRender.call(this, ct, position); - if(this.hiddenName){ - this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName, - id: (this.hiddenId || Ext.id())}, 'before', true); - - } - if(Ext.isGecko){ - this.el.dom.setAttribute('autocomplete', 'off'); - } - - if(!this.lazyInit){ - this.initList(); - }else{ - this.on('focus', this.initList, this, {single: true}); - } - }, - - // private - initValue : function(){ - Ext.form.ComboBox.superclass.initValue.call(this); - if(this.hiddenField){ - this.hiddenField.value = - Ext.value(Ext.isDefined(this.hiddenValue) ? this.hiddenValue : this.value, ''); - } - }, - - getParentZIndex : function(){ - var zindex; - if (this.ownerCt){ - this.findParentBy(function(ct){ - zindex = parseInt(ct.getPositionEl().getStyle('z-index'), 10); - return !!zindex; - }); - } - return zindex; - }, - - getZIndex : function(listParent){ - listParent = listParent || Ext.getDom(this.getListParent() || Ext.getBody()); - var zindex = parseInt(Ext.fly(listParent).getStyle('z-index'), 10); - if(!zindex){ - zindex = this.getParentZIndex(); - } - return (zindex || 12000) + 5; - }, - - // private - initList : function(){ - if(!this.list){ - var cls = 'x-combo-list', - listParent = Ext.getDom(this.getListParent() || Ext.getBody()); - - this.list = new Ext.Layer({ - parentEl: listParent, - shadow: this.shadow, - cls: [cls, this.listClass].join(' '), - constrain:false, - zindex: this.getZIndex(listParent) - }); - - var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth); - this.list.setSize(lw, 0); - this.list.swallowEvent('mousewheel'); - this.assetHeight = 0; - if(this.syncFont !== false){ - this.list.setStyle('font-size', this.el.getStyle('font-size')); - } - if(this.title){ - this.header = this.list.createChild({cls:cls+'-hd', html: this.title}); - this.assetHeight += this.header.getHeight(); - } - - this.innerList = this.list.createChild({cls:cls+'-inner'}); - this.mon(this.innerList, 'mouseover', this.onViewOver, this); - this.mon(this.innerList, 'mousemove', this.onViewMove, this); - this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); - - if(this.pageSize){ - this.footer = this.list.createChild({cls:cls+'-ft'}); - this.pageTb = new Ext.PagingToolbar({ - store: this.store, - pageSize: this.pageSize, - renderTo:this.footer - }); - this.assetHeight += this.footer.getHeight(); - } - - if(!this.tpl){ - /** - * @cfg {String/Ext.XTemplate} tpl

        The template string, or {@link Ext.XTemplate} instance to - * use to display each item in the dropdown list. The dropdown list is displayed in a - * DataView. See {@link #view}.

        - *

        The default template string is:

        
        -                  '<tpl for="."><div class="x-combo-list-item">{' + this.displayField + '}</div></tpl>'
        -                * 
        - *

        Override the default value to create custom UI layouts for items in the list. - * For example:

        
        -                  '<tpl for="."><div ext:qtip="{state}. {nick}" class="x-combo-list-item">{state}</div></tpl>'
        -                * 
        - *

        The template must contain one or more substitution parameters using field - * names from the Combo's {@link #store Store}. In the example above an - *

        ext:qtip
        attribute is added to display other fields from the Store.

        - *

        To preserve the default visual look of list items, add the CSS class name - *

        x-combo-list-item
        to the template's container element.

        - *

        Also see {@link #itemSelector} for additional details.

        - */ - this.tpl = '
        {' + this.displayField + '}
        '; - /** - * @cfg {String} itemSelector - *

        A simple CSS selector (e.g. div.some-class or span:first-child) that will be - * used to determine what nodes the {@link #view Ext.DataView} which handles the dropdown - * display will be working with.

        - *

        Note: this setting is required if a custom XTemplate has been - * specified in {@link #tpl} which assigns a class other than

        'x-combo-list-item'
        - * to dropdown list items - */ - } - - /** - * The {@link Ext.DataView DataView} used to display the ComboBox's options. - * @type Ext.DataView - */ - this.view = new Ext.DataView({ - applyTo: this.innerList, - tpl: this.tpl, - singleSelect: true, - selectedClass: this.selectedClass, - itemSelector: this.itemSelector || '.' + cls + '-item', - emptyText: this.listEmptyText, - deferEmptyText: false - }); - - this.mon(this.view, { - containerclick : this.onViewClick, - click : this.onViewClick, - scope :this - }); - - this.bindStore(this.store, true); - - if(this.resizable){ - this.resizer = new Ext.Resizable(this.list, { - pinned:true, handles:'se' - }); - this.mon(this.resizer, 'resize', function(r, w, h){ - this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight; - this.listWidth = w; - this.innerList.setWidth(w - this.list.getFrameWidth('lr')); - this.restrictHeight(); - }, this); - - this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px'); - } - } - }, - - /** - *

        Returns the element used to house this ComboBox's pop-up list. Defaults to the document body.

        - * A custom implementation may be provided as a configuration option if the floating list needs to be rendered - * to a different Element. An example might be rendering the list inside a Menu so that clicking - * the list does not hide the Menu:
        
        -var store = new Ext.data.ArrayStore({
        -    autoDestroy: true,
        -    fields: ['initials', 'fullname'],
        -    data : [
        -        ['FF', 'Fred Flintstone'],
        -        ['BR', 'Barney Rubble']
        -    ]
        -});
        -
        -var combo = new Ext.form.ComboBox({
        -    store: store,
        -    displayField: 'fullname',
        -    emptyText: 'Select a name...',
        -    forceSelection: true,
        -    getListParent: function() {
        -        return this.el.up('.x-menu');
        -    },
        -    iconCls: 'no-icon', //use iconCls if placing within menu to shift to right side of menu
        -    mode: 'local',
        -    selectOnFocus: true,
        -    triggerAction: 'all',
        -    typeAhead: true,
        -    width: 135
        -});
        -
        -var menu = new Ext.menu.Menu({
        -    id: 'mainMenu',
        -    items: [
        -        combo // A Field in a Menu
        -    ]
        -});
        -
        - */ - getListParent : function() { - return document.body; - }, - - /** - * Returns the store associated with this combo. - * @return {Ext.data.Store} The store - */ - getStore : function(){ - return this.store; - }, - - // private - bindStore : function(store, initial){ - if(this.store && !initial){ - if(this.store !== store && this.store.autoDestroy){ - this.store.destroy(); - }else{ - this.store.un('beforeload', this.onBeforeLoad, this); - this.store.un('load', this.onLoad, this); - this.store.un('exception', this.collapse, this); - } - if(!store){ - this.store = null; - if(this.view){ - this.view.bindStore(null); - } - if(this.pageTb){ - this.pageTb.bindStore(null); - } - } - } - if(store){ - if(!initial) { - this.lastQuery = null; - if(this.pageTb) { - this.pageTb.bindStore(store); - } - } - - this.store = Ext.StoreMgr.lookup(store); - this.store.on({ - scope: this, - beforeload: this.onBeforeLoad, - load: this.onLoad, - exception: this.collapse - }); - - if(this.view){ - this.view.bindStore(store); - } - } - }, - - reset : function(){ - if(this.clearFilterOnReset && this.mode == 'local'){ - this.store.clearFilter(); - } - Ext.form.ComboBox.superclass.reset.call(this); - }, - - // private - initEvents : function(){ - Ext.form.ComboBox.superclass.initEvents.call(this); - - /** - * @property keyNav - * @type Ext.KeyNav - *

        A {@link Ext.KeyNav KeyNav} object which handles navigation keys for this ComboBox. This performs actions - * based on keystrokes typed when the input field is focused.

        - *

        After the ComboBox has been rendered, you may override existing navigation key functionality, - * or add your own based upon key names as specified in the {@link Ext.KeyNav KeyNav} class.

        - *

        The function is executed in the scope (this reference of the ComboBox. Example:

        
        -myCombo.keyNav.esc = function(e) {  // Override ESC handling function
        -    this.collapse();                // Standard behaviour of Ext's ComboBox.
        -    this.setValue(this.startValue); // We reset to starting value on ESC
        -};
        -myCombo.keyNav.tab = function() {   // Override TAB handling function
        -    this.onViewClick(false);        // Select the currently highlighted row
        -};
        -
        - */ - this.keyNav = new Ext.KeyNav(this.el, { - "up" : function(e){ - this.inKeyMode = true; - this.selectPrev(); - }, - - "down" : function(e){ - if(!this.isExpanded()){ - this.onTriggerClick(); - }else{ - this.inKeyMode = true; - this.selectNext(); - } - }, - - "enter" : function(e){ - this.onViewClick(); - }, - - "esc" : function(e){ - this.collapse(); - }, - - "tab" : function(e){ - if (this.forceSelection === true) { - this.collapse(); - } else { - this.onViewClick(false); - } - return true; - }, - - scope : this, - - doRelay : function(e, h, hname){ - if(hname == 'down' || this.scope.isExpanded()){ - // this MUST be called before ComboBox#fireKey() - var relay = Ext.KeyNav.prototype.doRelay.apply(this, arguments); - if(!Ext.isIE && Ext.EventManager.useKeydown){ - // call Combo#fireKey() for browsers which use keydown event (except IE) - this.scope.fireKey(e); - } - return relay; - } - return true; - }, - - forceKeyDown : true, - defaultEventAction: 'stopEvent' - }); - this.queryDelay = Math.max(this.queryDelay || 10, - this.mode == 'local' ? 10 : 250); - this.dqTask = new Ext.util.DelayedTask(this.initQuery, this); - if(this.typeAhead){ - this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this); - } - if(!this.enableKeyEvents){ - this.mon(this.el, 'keyup', this.onKeyUp, this); - } - }, - - - // private - onDestroy : function(){ - if (this.dqTask){ - this.dqTask.cancel(); - this.dqTask = null; - } - this.bindStore(null); - Ext.destroy( - this.resizer, - this.view, - this.pageTb, - this.list - ); - Ext.destroyMembers(this, 'hiddenField'); - Ext.form.ComboBox.superclass.onDestroy.call(this); - }, - - // private - fireKey : function(e){ - if (!this.isExpanded()) { - Ext.form.ComboBox.superclass.fireKey.call(this, e); - } - }, - - // private - onResize : function(w, h){ - Ext.form.ComboBox.superclass.onResize.apply(this, arguments); - if(!isNaN(w) && this.isVisible() && this.list){ - this.doResize(w); - }else{ - this.bufferSize = w; - } - }, - - doResize: function(w){ - if(!Ext.isDefined(this.listWidth)){ - var lw = Math.max(w, this.minListWidth); - this.list.setWidth(lw); - this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); - } - }, - - // private - onEnable : function(){ - Ext.form.ComboBox.superclass.onEnable.apply(this, arguments); - if(this.hiddenField){ - this.hiddenField.disabled = false; - } - }, - - // private - onDisable : function(){ - Ext.form.ComboBox.superclass.onDisable.apply(this, arguments); - if(this.hiddenField){ - this.hiddenField.disabled = true; - } - }, - - // private - onBeforeLoad : function(){ - if(!this.hasFocus){ - return; - } - this.innerList.update(this.loadingText ? - '
        '+this.loadingText+'
        ' : ''); - this.restrictHeight(); - this.selectedIndex = -1; - }, - - // private - onLoad : function(){ - if(!this.hasFocus){ - return; - } - if(this.store.getCount() > 0 || this.listEmptyText){ - this.expand(); - this.restrictHeight(); - if(this.lastQuery == this.allQuery){ - if(this.editable){ - this.el.dom.select(); - } - - if(this.autoSelect !== false && !this.selectByValue(this.value, true)){ - this.select(0, true); - } - }else{ - if(this.autoSelect !== false){ - this.selectNext(); - } - if(this.typeAhead && this.lastKey != Ext.EventObject.BACKSPACE && this.lastKey != Ext.EventObject.DELETE){ - this.taTask.delay(this.typeAheadDelay); - } - } - }else{ - this.collapse(); - } - - }, - - // private - onTypeAhead : function(){ - if(this.store.getCount() > 0){ - var r = this.store.getAt(0); - var newValue = r.data[this.displayField]; - var len = newValue.length; - var selStart = this.getRawValue().length; - if(selStart != len){ - this.setRawValue(newValue); - this.selectText(selStart, newValue.length); - } - } - }, - - // private - assertValue : function(){ - var val = this.getRawValue(), - rec; - - if(this.valueField && Ext.isDefined(this.value)){ - rec = this.findRecord(this.valueField, this.value); - } - if(!rec || rec.get(this.displayField) != val){ - rec = this.findRecord(this.displayField, val); - } - if(!rec && this.forceSelection){ - if(val.length > 0 && val != this.emptyText){ - this.el.dom.value = Ext.value(this.lastSelectionText, ''); - this.applyEmptyText(); - }else{ - this.clearValue(); - } - }else{ - if(rec && this.valueField){ - // onSelect may have already set the value and by doing so - // set the display field properly. Let's not wipe out the - // valueField here by just sending the displayField. - if (this.value == val){ - return; - } - val = rec.get(this.valueField || this.displayField); - } - this.setValue(val); - } - }, - - // private - onSelect : function(record, index){ - if(this.fireEvent('beforeselect', this, record, index) !== false){ - this.setValue(record.data[this.valueField || this.displayField]); - this.collapse(); - this.fireEvent('select', this, record, index); - } - }, - - // inherit docs - getName: function(){ - var hf = this.hiddenField; - return hf && hf.name ? hf.name : this.hiddenName || Ext.form.ComboBox.superclass.getName.call(this); - }, - - /** - * Returns the currently selected field value or empty string if no value is set. - * @return {String} value The selected value - */ - getValue : function(){ - if(this.valueField){ - return Ext.isDefined(this.value) ? this.value : ''; - }else{ - return Ext.form.ComboBox.superclass.getValue.call(this); - } - }, - - /** - * Clears any text/value currently set in the field - */ - clearValue : function(){ - if(this.hiddenField){ - this.hiddenField.value = ''; - } - this.setRawValue(''); - this.lastSelectionText = ''; - this.applyEmptyText(); - this.value = ''; - }, - - /** - * Sets the specified value into the field. If the value finds a match, the corresponding record text - * will be displayed in the field. If the value does not match the data value of an existing item, - * and the valueNotFoundText config option is defined, it will be displayed as the default field text. - * Otherwise the field will be blank (although the value will still be set). - * @param {String} value The value to match - * @return {Ext.form.Field} this - */ - setValue : function(v){ - var text = v; - if(this.valueField){ - var r = this.findRecord(this.valueField, v); - if(r){ - text = r.data[this.displayField]; - }else if(Ext.isDefined(this.valueNotFoundText)){ - text = this.valueNotFoundText; - } - } - this.lastSelectionText = text; - if(this.hiddenField){ - this.hiddenField.value = Ext.value(v, ''); - } - Ext.form.ComboBox.superclass.setValue.call(this, text); - this.value = v; - return this; - }, - - // private - findRecord : function(prop, value){ - var record; - if(this.store.getCount() > 0){ - this.store.each(function(r){ - if(r.data[prop] == value){ - record = r; - return false; - } - }); - } - return record; - }, - - // private - onViewMove : function(e, t){ - this.inKeyMode = false; - }, - - // private - onViewOver : function(e, t){ - if(this.inKeyMode){ // prevent key nav and mouse over conflicts - return; - } - var item = this.view.findItemFromChild(t); - if(item){ - var index = this.view.indexOf(item); - this.select(index, false); - } - }, - - // private - onViewClick : function(doFocus){ - var index = this.view.getSelectedIndexes()[0], - s = this.store, - r = s.getAt(index); - if(r){ - this.onSelect(r, index); - }else { - this.collapse(); - } - if(doFocus !== false){ - this.el.focus(); - } - }, - - - // private - restrictHeight : function(){ - this.innerList.dom.style.height = ''; - var inner = this.innerList.dom, - pad = this.list.getFrameWidth('tb') + (this.resizable ? this.handleHeight : 0) + this.assetHeight, - h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight), - ha = this.getPosition()[1]-Ext.getBody().getScroll().top, - hb = Ext.lib.Dom.getViewHeight()-ha-this.getSize().height, - space = Math.max(ha, hb, this.minHeight || 0)-this.list.shadowOffset-pad-5; - - h = Math.min(h, space, this.maxHeight); - - this.innerList.setHeight(h); - this.list.beginUpdate(); - this.list.setHeight(h+pad); - this.list.alignTo.apply(this.list, [this.el].concat(this.listAlign)); - this.list.endUpdate(); - }, - - /** - * Returns true if the dropdown list is expanded, else false. - */ - isExpanded : function(){ - return this.list && this.list.isVisible(); - }, - - /** - * Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire. - * The store must be loaded and the list expanded for this function to work, otherwise use setValue. - * @param {String} value The data value of the item to select - * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the - * selected item if it is not currently in view (defaults to true) - * @return {Boolean} True if the value matched an item in the list, else false - */ - selectByValue : function(v, scrollIntoView){ - if(!Ext.isEmpty(v, true)){ - var r = this.findRecord(this.valueField || this.displayField, v); - if(r){ - this.select(this.store.indexOf(r), scrollIntoView); - return true; - } - } - return false; - }, - - /** - * Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire. - * The store must be loaded and the list expanded for this function to work, otherwise use setValue. - * @param {Number} index The zero-based index of the list item to select - * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the - * selected item if it is not currently in view (defaults to true) - */ - select : function(index, scrollIntoView){ - this.selectedIndex = index; - this.view.select(index); - if(scrollIntoView !== false){ - var el = this.view.getNode(index); - if(el){ - this.innerList.scrollChildIntoView(el, false); - } - } - - }, - - // private - selectNext : function(){ - var ct = this.store.getCount(); - if(ct > 0){ - if(this.selectedIndex == -1){ - this.select(0); - }else if(this.selectedIndex < ct-1){ - this.select(this.selectedIndex+1); - } - } - }, - - // private - selectPrev : function(){ - var ct = this.store.getCount(); - if(ct > 0){ - if(this.selectedIndex == -1){ - this.select(0); - }else if(this.selectedIndex !== 0){ - this.select(this.selectedIndex-1); - } - } - }, - - // private - onKeyUp : function(e){ - var k = e.getKey(); - if(this.editable !== false && this.readOnly !== true && (k == e.BACKSPACE || !e.isSpecialKey())){ - - this.lastKey = k; - this.dqTask.delay(this.queryDelay); - } - Ext.form.ComboBox.superclass.onKeyUp.call(this, e); - }, - - // private - validateBlur : function(){ - return !this.list || !this.list.isVisible(); - }, - - // private - initQuery : function(){ - this.doQuery(this.getRawValue()); - }, - - // private - beforeBlur : function(){ - this.assertValue(); - }, - - // private - postBlur : function(){ - Ext.form.ComboBox.superclass.postBlur.call(this); - this.collapse(); - this.inKeyMode = false; - }, - - /** - * Execute a query to filter the dropdown list. Fires the {@link #beforequery} event prior to performing the - * query allowing the query action to be canceled if needed. - * @param {String} query The SQL query to execute - * @param {Boolean} forceAll true to force the query to execute even if there are currently fewer - * characters in the field than the minimum specified by the {@link #minChars} config option. It - * also clears any filter previously saved in the current store (defaults to false) - */ - doQuery : function(q, forceAll){ - q = Ext.isEmpty(q) ? '' : q; - var qe = { - query: q, - forceAll: forceAll, - combo: this, - cancel:false - }; - if(this.fireEvent('beforequery', qe)===false || qe.cancel){ - return false; - } - q = qe.query; - forceAll = qe.forceAll; - if(forceAll === true || (q.length >= this.minChars)){ - if(this.lastQuery !== q){ - this.lastQuery = q; - if(this.mode == 'local'){ - this.selectedIndex = -1; - if(forceAll){ - this.store.clearFilter(); - }else{ - this.store.filter(this.displayField, q); - } - this.onLoad(); - }else{ - this.store.baseParams[this.queryParam] = q; - this.store.load({ - params: this.getParams(q) - }); - this.expand(); - } - }else{ - this.selectedIndex = -1; - this.onLoad(); - } - } - }, - - // private - getParams : function(q){ - var params = {}, - paramNames = this.store.paramNames; - if(this.pageSize){ - params[paramNames.start] = 0; - params[paramNames.limit] = this.pageSize; - } - return params; - }, - - /** - * Hides the dropdown list if it is currently expanded. Fires the {@link #collapse} event on completion. - */ - collapse : function(){ - if(!this.isExpanded()){ - return; - } - this.list.hide(); - Ext.getDoc().un('mousewheel', this.collapseIf, this); - Ext.getDoc().un('mousedown', this.collapseIf, this); - this.fireEvent('collapse', this); - }, - - // private - collapseIf : function(e){ - if(!this.isDestroyed && !e.within(this.wrap) && !e.within(this.list)){ - this.collapse(); - } - }, - - /** - * Expands the dropdown list if it is currently hidden. Fires the {@link #expand} event on completion. - */ - expand : function(){ - if(this.isExpanded() || !this.hasFocus){ - return; - } - - if(this.title || this.pageSize){ - this.assetHeight = 0; - if(this.title){ - this.assetHeight += this.header.getHeight(); - } - if(this.pageSize){ - this.assetHeight += this.footer.getHeight(); - } - } - - if(this.bufferSize){ - this.doResize(this.bufferSize); - delete this.bufferSize; - } - this.list.alignTo.apply(this.list, [this.el].concat(this.listAlign)); - - // zindex can change, re-check it and set it if necessary - this.list.setZIndex(this.getZIndex()); - this.list.show(); - if(Ext.isGecko2){ - this.innerList.setOverflow('auto'); // necessary for FF 2.0/Mac - } - this.mon(Ext.getDoc(), { - scope: this, - mousewheel: this.collapseIf, - mousedown: this.collapseIf - }); - this.fireEvent('expand', this); - }, - - /** - * @method onTriggerClick - * @hide - */ - // private - // Implements the default empty TriggerField.onTriggerClick function - onTriggerClick : function(){ - if(this.readOnly || this.disabled){ - return; - } - if(this.isExpanded()){ - this.collapse(); - this.el.focus(); - }else { - this.onFocus({}); - if(this.triggerAction == 'all') { - this.doQuery(this.allQuery, true); - } else { - this.doQuery(this.getRawValue()); - } - this.el.focus(); - } - } - - /** - * @hide - * @method autoSize - */ - /** - * @cfg {Boolean} grow @hide - */ - /** - * @cfg {Number} growMin @hide - */ - /** - * @cfg {Number} growMax @hide - */ - -}); -Ext.reg('combo', Ext.form.ComboBox); -/** - * @class Ext.form.Checkbox - * @extends Ext.form.Field - * Single checkbox field. Can be used as a direct replacement for traditional checkbox fields. - * @constructor - * Creates a new Checkbox - * @param {Object} config Configuration options - * @xtype checkbox - */ -Ext.form.Checkbox = Ext.extend(Ext.form.Field, { - /** - * @cfg {String} focusClass The CSS class to use when the checkbox receives focus (defaults to undefined) - */ - focusClass : undefined, - /** - * @cfg {String} fieldClass The default CSS class for the checkbox (defaults to 'x-form-field') - */ - fieldClass : 'x-form-field', - /** - * @cfg {Boolean} checked true if the checkbox should render initially checked (defaults to false) - */ - checked : false, - /** - * @cfg {String} boxLabel The text that appears beside the checkbox - */ - boxLabel: ' ', - /** - * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to - * {tag: 'input', type: 'checkbox', autocomplete: 'off'}) - */ - defaultAutoCreate : { tag: 'input', type: 'checkbox', autocomplete: 'off'}, - /** - * @cfg {String} inputValue The value that should go into the generated input element's value attribute - */ - /** - * @cfg {Function} handler A function called when the {@link #checked} value changes (can be used instead of - * handling the check event). The handler is passed the following parameters: - *
          - *
        • checkbox : Ext.form.Checkbox
          The Checkbox being toggled.
        • - *
        • checked : Boolean
          The new checked state of the checkbox.
        • - *
        - */ - /** - * @cfg {Object} scope An object to use as the scope ('this' reference) of the {@link #handler} function - * (defaults to this Checkbox). - */ - - // private - actionMode : 'wrap', - - // private - initComponent : function(){ - Ext.form.Checkbox.superclass.initComponent.call(this); - this.addEvents( - /** - * @event check - * Fires when the checkbox is checked or unchecked. - * @param {Ext.form.Checkbox} this This checkbox - * @param {Boolean} checked The new checked value - */ - 'check' - ); - }, - - // private - onResize : function(){ - Ext.form.Checkbox.superclass.onResize.apply(this, arguments); - if(!this.boxLabel && !this.fieldLabel){ - this.el.alignTo(this.wrap, 'c-c'); - } - }, - - // private - initEvents : function(){ - Ext.form.Checkbox.superclass.initEvents.call(this); - this.mon(this.el, { - scope: this, - click: this.onClick, - change: this.onClick - }); - }, - - /** - * @hide - * Overridden and disabled. The editor element does not support standard valid/invalid marking. - * @method - */ - markInvalid : Ext.emptyFn, - /** - * @hide - * Overridden and disabled. The editor element does not support standard valid/invalid marking. - * @method - */ - clearInvalid : Ext.emptyFn, - - // private - onRender : function(ct, position){ - Ext.form.Checkbox.superclass.onRender.call(this, ct, position); - if(this.inputValue !== undefined){ - this.el.dom.value = this.inputValue; - } - this.wrap = this.el.wrap({cls: 'x-form-check-wrap'}); - if(this.boxLabel){ - this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel}); - } - if(this.checked){ - this.setValue(true); - }else{ - this.checked = this.el.dom.checked; - } - // Need to repaint for IE, otherwise positioning is broken - if (Ext.isIE && !Ext.isStrict) { - this.wrap.repaint(); - } - this.resizeEl = this.positionEl = this.wrap; - }, - - // private - onDestroy : function(){ - Ext.destroy(this.wrap); - Ext.form.Checkbox.superclass.onDestroy.call(this); - }, - - // private - initValue : function() { - this.originalValue = this.getValue(); - }, - - /** - * Returns the checked state of the checkbox. - * @return {Boolean} True if checked, else false - */ - getValue : function(){ - if(this.rendered){ - return this.el.dom.checked; - } - return this.checked; - }, - - // private - onClick : function(){ - if(this.el.dom.checked != this.checked){ - this.setValue(this.el.dom.checked); - } - }, - - /** - * Sets the checked state of the checkbox, fires the 'check' event, and calls a - * {@link #handler} (if configured). - * @param {Boolean/String} checked The following values will check the checkbox: - * true, 'true', '1', or 'on'. Any other value will uncheck the checkbox. - * @return {Ext.form.Field} this - */ - setValue : function(v){ - var checked = this.checked, - inputVal = this.inputValue; - - if (v === false) { - this.checked = false; - } else { - this.checked = (v === true || v === 'true' || v == '1' || (inputVal ? v == inputVal : String(v).toLowerCase() == 'on')); - } - - if(this.rendered){ - this.el.dom.checked = this.checked; - this.el.dom.defaultChecked = this.checked; - } - if(checked != this.checked){ - this.fireEvent('check', this, this.checked); - if(this.handler){ - this.handler.call(this.scope || this, this, this.checked); - } - } - return this; - } -}); -Ext.reg('checkbox', Ext.form.Checkbox); -/** - * @class Ext.form.CheckboxGroup - * @extends Ext.form.Field - *

        A grouping container for {@link Ext.form.Checkbox} controls.

        - *

        Sample usage:

        - *
        
        -var myCheckboxGroup = new Ext.form.CheckboxGroup({
        -    id:'myGroup',
        -    xtype: 'checkboxgroup',
        -    fieldLabel: 'Single Column',
        -    itemCls: 'x-check-group-alt',
        -    // Put all controls in a single column with width 100%
        -    columns: 1,
        -    items: [
        -        {boxLabel: 'Item 1', name: 'cb-col-1'},
        -        {boxLabel: 'Item 2', name: 'cb-col-2', checked: true},
        -        {boxLabel: 'Item 3', name: 'cb-col-3'}
        -    ]
        -});
        - * 
        - * @constructor - * Creates a new CheckboxGroup - * @param {Object} config Configuration options - * @xtype checkboxgroup - */ -Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { - /** - * @cfg {Array} items An Array of {@link Ext.form.Checkbox Checkbox}es or Checkbox config objects - * to arrange in the group. - */ - /** - * @cfg {String/Number/Array} columns Specifies the number of columns to use when displaying grouped - * checkbox/radio controls using automatic layout. This config can take several types of values: - *
        • 'auto' :

          The controls will be rendered one per column on one row and the width - * of each column will be evenly distributed based on the width of the overall field container. This is the default.

        • - *
        • Number :

          If you specific a number (e.g., 3) that number of columns will be - * created and the contained controls will be automatically distributed based on the value of {@link #vertical}.

        • - *
        • Array : Object

          You can also specify an array of column widths, mixing integer - * (fixed width) and float (percentage width) values as needed (e.g., [100, .25, .75]). Any integer values will - * be rendered first, then any float values will be calculated as a percentage of the remaining space. Float - * values do not have to add up to 1 (100%) although if you want the controls to take up the entire field - * container you should do so.

        - */ - columns : 'auto', - /** - * @cfg {Boolean} vertical True to distribute contained controls across columns, completely filling each column - * top to bottom before starting on the next column. The number of controls in each column will be automatically - * calculated to keep columns as even as possible. The default value is false, so that controls will be added - * to columns one at a time, completely filling each row left to right before starting on the next row. - */ - vertical : false, - /** - * @cfg {Boolean} allowBlank False to validate that at least one item in the group is checked (defaults to true). - * If no items are selected at validation time, {@link @blankText} will be used as the error text. - */ - allowBlank : true, - /** - * @cfg {String} blankText Error text to display if the {@link #allowBlank} validation fails (defaults to "You must - * select at least one item in this group") - */ - blankText : "You must select at least one item in this group", - - // private - defaultType : 'checkbox', - - // private - groupCls : 'x-form-check-group', - - // private - initComponent: function(){ - this.addEvents( - /** - * @event change - * Fires when the state of a child checkbox changes. - * @param {Ext.form.CheckboxGroup} this - * @param {Array} checked An array containing the checked boxes. - */ - 'change' - ); - this.on('change', this.validate, this); - Ext.form.CheckboxGroup.superclass.initComponent.call(this); - }, - - // private - onRender : function(ct, position){ - if(!this.el){ - var panelCfg = { - autoEl: { - id: this.id - }, - cls: this.groupCls, - layout: 'column', - renderTo: ct, - bufferResize: false // Default this to false, since it doesn't really have a proper ownerCt. - }; - var colCfg = { - xtype: 'container', - defaultType: this.defaultType, - layout: 'form', - defaults: { - hideLabel: true, - anchor: '100%' - } - }; - - if(this.items[0].items){ - - // The container has standard ColumnLayout configs, so pass them in directly - - Ext.apply(panelCfg, { - layoutConfig: {columns: this.items.length}, - defaults: this.defaults, - items: this.items - }); - for(var i=0, len=this.items.length; i0 && i%rows==0){ - ri++; - } - if(this.items[i].fieldLabel){ - this.items[i].hideLabel = false; - } - cols[ri].items.push(this.items[i]); - }; - }else{ - for(var i=0, len=this.items.length; i
        of each column will be adjusted - * to fit the grid width and prevent horizontal scrolling. If columns are later resized (manually - * or programmatically), the other columns in the grid will not be resized to fit the grid width. - * See {@link #forceFit} also. - */ - autoFill : false, - - /** - * @cfg {Boolean} forceFit - *

        Defaults to false. Specify true to have the column widths re-proportioned - * at all times.

        - *

        The {@link Ext.grid.Column#width initially configured width} of each - * column will be adjusted to fit the grid width and prevent horizontal scrolling. If columns are - * later resized (manually or programmatically), the other columns in the grid will be resized - * to fit the grid width.

        - *

        Columns which are configured with fixed: true are omitted from being resized.

        - *

        See {@link #autoFill}.

        - */ - forceFit : false, - - /** - * @cfg {Array} sortClasses The CSS classes applied to a header when it is sorted. (defaults to ['sort-asc', 'sort-desc']) - */ - sortClasses : ['sort-asc', 'sort-desc'], - - /** - * @cfg {String} sortAscText The text displayed in the 'Sort Ascending' menu item (defaults to 'Sort Ascending') - */ - sortAscText : 'Sort Ascending', - - /** - * @cfg {String} sortDescText The text displayed in the 'Sort Descending' menu item (defaults to 'Sort Descending') - */ - sortDescText : 'Sort Descending', - - /** - * @cfg {String} columnsText The text displayed in the 'Columns' menu item (defaults to 'Columns') - */ - columnsText : 'Columns', - - /** - * @cfg {String} selectedRowClass The CSS class applied to a selected row (defaults to 'x-grid3-row-selected'). An - * example overriding the default styling: -
        
        -    .x-grid3-row-selected {background-color: yellow;}
        -    
        - * Note that this only controls the row, and will not do anything for the text inside it. To style inner - * facets (like text) use something like: -
        
        -    .x-grid3-row-selected .x-grid3-cell-inner {
        -        color: #FFCC00;
        -    }
        -    
        - * @type String - */ - selectedRowClass : 'x-grid3-row-selected', - - // private - borderWidth : 2, - tdClass : 'x-grid3-cell', - hdCls : 'x-grid3-hd', - - - /** - * @cfg {Boolean} markDirty True to show the dirty cell indicator when a cell has been modified. Defaults to true. - */ - markDirty : true, - - /** - * @cfg {Number} cellSelectorDepth The number of levels to search for cells in event delegation (defaults to 4) - */ - cellSelectorDepth : 4, - - /** - * @cfg {Number} rowSelectorDepth The number of levels to search for rows in event delegation (defaults to 10) - */ - rowSelectorDepth : 10, - - /** - * @cfg {Number} rowBodySelectorDepth The number of levels to search for row bodies in event delegation (defaults to 10) - */ - rowBodySelectorDepth : 10, - - /** - * @cfg {String} cellSelector The selector used to find cells internally (defaults to 'td.x-grid3-cell') - */ - cellSelector : 'td.x-grid3-cell', - - /** - * @cfg {String} rowSelector The selector used to find rows internally (defaults to 'div.x-grid3-row') - */ - rowSelector : 'div.x-grid3-row', - - /** - * @cfg {String} rowBodySelector The selector used to find row bodies internally (defaults to 'div.x-grid3-row') - */ - rowBodySelector : 'div.x-grid3-row-body', - - // private - firstRowCls: 'x-grid3-row-first', - lastRowCls: 'x-grid3-row-last', - rowClsRe: /(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g, - - /** - * @cfg {String} headerMenuOpenCls The CSS class to add to the header cell when its menu is visible. Defaults to 'x-grid3-hd-menu-open' - */ - headerMenuOpenCls: 'x-grid3-hd-menu-open', - - /** - * @cfg {String} rowOverCls The CSS class added to each row when it is hovered over. Defaults to 'x-grid3-row-over' - */ - rowOverCls: 'x-grid3-row-over', - - constructor : function(config) { - Ext.apply(this, config); - - // These events are only used internally by the grid components - this.addEvents( - /** - * @event beforerowremoved - * Internal UI Event. Fired before a row is removed. - * @param {Ext.grid.GridView} view - * @param {Number} rowIndex The index of the row to be removed. - * @param {Ext.data.Record} record The Record to be removed - */ - 'beforerowremoved', - - /** - * @event beforerowsinserted - * Internal UI Event. Fired before rows are inserted. - * @param {Ext.grid.GridView} view - * @param {Number} firstRow The index of the first row to be inserted. - * @param {Number} lastRow The index of the last row to be inserted. - */ - 'beforerowsinserted', - - /** - * @event beforerefresh - * Internal UI Event. Fired before the view is refreshed. - * @param {Ext.grid.GridView} view - */ - 'beforerefresh', - - /** - * @event rowremoved - * Internal UI Event. Fired after a row is removed. - * @param {Ext.grid.GridView} view - * @param {Number} rowIndex The index of the row that was removed. - * @param {Ext.data.Record} record The Record that was removed - */ - 'rowremoved', - - /** - * @event rowsinserted - * Internal UI Event. Fired after rows are inserted. - * @param {Ext.grid.GridView} view - * @param {Number} firstRow The index of the first inserted. - * @param {Number} lastRow The index of the last row inserted. - */ - 'rowsinserted', - - /** - * @event rowupdated - * Internal UI Event. Fired after a row has been updated. - * @param {Ext.grid.GridView} view - * @param {Number} firstRow The index of the row updated. - * @param {Ext.data.record} record The Record backing the row updated. - */ - 'rowupdated', - - /** - * @event refresh - * Internal UI Event. Fired after the GridView's body has been refreshed. - * @param {Ext.grid.GridView} view - */ - 'refresh' - ); - - Ext.grid.GridView.superclass.constructor.call(this); - }, - - /* -------------------------------- UI Specific ----------------------------- */ - - /** - * The master template to use when rendering the GridView. Has a default template - * @property Ext.Template - * @type masterTpl - */ - masterTpl: new Ext.Template( - '
        ', - '
        ', - '
        ', - '
        ', - '
        {header}
        ', - '
        ', - '
        ', - '
        ', - '
        ', - '
        {body}
        ', - '', - '
        ', - '
        ', - '
         
        ', - '
         
        ', - '
        ' - ), - - /** - * The template to use when rendering headers. Has a default template - * @property headerTpl - * @type Ext.Template - */ - headerTpl: new Ext.Template( - '', - '', - '{cells}', - '', - '
        ' - ), - - /** - * The template to use when rendering the body. Has a default template - * @property bodyTpl - * @type Ext.Template - */ - bodyTpl: new Ext.Template('{rows}'), - - /** - * The template to use to render each cell. Has a default template - * @property cellTpl - * @type Ext.Template - */ - cellTpl: new Ext.Template( - '', - '
        {value}
        ', - '' - ), - - /** - * @private - * Provides default templates if they are not given for this particular instance. Most of the templates are defined on - * the prototype, the ones defined inside this function are done so because they are based on Grid or GridView configuration - */ - initTemplates : function() { - var templates = this.templates || {}, - template, name, - - headerCellTpl = new Ext.Template( - '', - '
        ', - this.grid.enableHdMenu ? '' : '', - '{value}', - '', - '
        ', - '' - ), - - rowBodyText = [ - '', - '', - '
        {body}
        ', - '', - '' - ].join(""), - - innerText = [ - '', - '', - '{cells}', - this.enableRowBody ? rowBodyText : '', - '', - '
        ' - ].join(""); - - Ext.applyIf(templates, { - hcell : headerCellTpl, - cell : this.cellTpl, - body : this.bodyTpl, - header : this.headerTpl, - master : this.masterTpl, - row : new Ext.Template('
        ' + innerText + '
        '), - rowInner: new Ext.Template(innerText) - }); - - for (name in templates) { - template = templates[name]; - - if (template && Ext.isFunction(template.compile) && !template.compiled) { - template.disableFormats = true; - template.compile(); - } - } - - this.templates = templates; - this.colRe = new RegExp('x-grid3-td-([^\\s]+)', ''); - }, - - /** - * @private - * Each GridView has its own private flyweight, accessed through this method - */ - fly : function(el) { - if (!this._flyweight) { - this._flyweight = new Ext.Element.Flyweight(document.body); - } - this._flyweight.dom = el; - return this._flyweight; - }, - - // private - getEditorParent : function() { - return this.scroller.dom; - }, - - /** - * @private - * Finds and stores references to important elements - */ - initElements : function() { - var Element = Ext.Element, - el = Ext.get(this.grid.getGridEl().dom.firstChild), - mainWrap = new Element(el.child('div.x-grid3-viewport')), - mainHd = new Element(mainWrap.child('div.x-grid3-header')), - scroller = new Element(mainWrap.child('div.x-grid3-scroller')); - - if (this.grid.hideHeaders) { - mainHd.setDisplayed(false); - } - - if (this.forceFit) { - scroller.setStyle('overflow-x', 'hidden'); - } - - /** - * Read-only. The GridView's body Element which encapsulates all rows in the Grid. - * This {@link Ext.Element Element} is only available after the GridPanel has been rendered. - * @type Ext.Element - * @property mainBody - */ - - Ext.apply(this, { - el : el, - mainWrap: mainWrap, - scroller: scroller, - mainHd : mainHd, - innerHd : mainHd.child('div.x-grid3-header-inner').dom, - mainBody: new Element(Element.fly(scroller).child('div.x-grid3-body')), - focusEl : new Element(Element.fly(scroller).child('a')), - - resizeMarker: new Element(el.child('div.x-grid3-resize-marker')), - resizeProxy : new Element(el.child('div.x-grid3-resize-proxy')) - }); - - this.focusEl.swallowEvent('click', true); - }, - - // private - getRows : function() { - return this.hasRows() ? this.mainBody.dom.childNodes : []; - }, - - // finder methods, used with delegation - - // private - findCell : function(el) { - if (!el) { - return false; - } - return this.fly(el).findParent(this.cellSelector, this.cellSelectorDepth); - }, - - /** - *

        Return the index of the grid column which contains the passed HTMLElement.

        - * See also {@link #findRowIndex} - * @param {HTMLElement} el The target element - * @return {Number} The column index, or false if the target element is not within a row of this GridView. - */ - findCellIndex : function(el, requiredCls) { - var cell = this.findCell(el), - hasCls; - - if (cell) { - hasCls = this.fly(cell).hasClass(requiredCls); - if (!requiredCls || hasCls) { - return this.getCellIndex(cell); - } - } - return false; - }, - - // private - getCellIndex : function(el) { - if (el) { - var match = el.className.match(this.colRe); - - if (match && match[1]) { - return this.cm.getIndexById(match[1]); - } - } - return false; - }, - - // private - findHeaderCell : function(el) { - var cell = this.findCell(el); - return cell && this.fly(cell).hasClass(this.hdCls) ? cell : null; - }, - - // private - findHeaderIndex : function(el){ - return this.findCellIndex(el, this.hdCls); - }, - - /** - * Return the HtmlElement representing the grid row which contains the passed element. - * @param {HTMLElement} el The target HTMLElement - * @return {HTMLElement} The row element, or null if the target element is not within a row of this GridView. - */ - findRow : function(el) { - if (!el) { - return false; - } - return this.fly(el).findParent(this.rowSelector, this.rowSelectorDepth); - }, - - /** - * Return the index of the grid row which contains the passed HTMLElement. - * See also {@link #findCellIndex} - * @param {HTMLElement} el The target HTMLElement - * @return {Number} The row index, or false if the target element is not within a row of this GridView. - */ - findRowIndex : function(el) { - var row = this.findRow(el); - return row ? row.rowIndex : false; - }, - - /** - * Return the HtmlElement representing the grid row body which contains the passed element. - * @param {HTMLElement} el The target HTMLElement - * @return {HTMLElement} The row body element, or null if the target element is not within a row body of this GridView. - */ - findRowBody : function(el) { - if (!el) { - return false; - } - - return this.fly(el).findParent(this.rowBodySelector, this.rowBodySelectorDepth); - }, - - // getter methods for fetching elements dynamically in the grid - - /** - * Return the <div> HtmlElement which represents a Grid row for the specified index. - * @param {Number} index The row index - * @return {HtmlElement} The div element. - */ - getRow : function(row) { - return this.getRows()[row]; - }, - - /** - * Returns the grid's <td> HtmlElement at the specified coordinates. - * @param {Number} row The row index in which to find the cell. - * @param {Number} col The column index of the cell. - * @return {HtmlElement} The td at the specified coordinates. - */ - getCell : function(row, col) { - return Ext.fly(this.getRow(row)).query(this.cellSelector)[col]; - }, - - /** - * Return the <td> HtmlElement which represents the Grid's header cell for the specified column index. - * @param {Number} index The column index - * @return {HtmlElement} The td element. - */ - getHeaderCell : function(index) { - return this.mainHd.dom.getElementsByTagName('td')[index]; - }, - - // manipulating elements - - // private - use getRowClass to apply custom row classes - addRowClass : function(rowId, cls) { - var row = this.getRow(rowId); - if (row) { - this.fly(row).addClass(cls); - } - }, - - // private - removeRowClass : function(row, cls) { - var r = this.getRow(row); - if(r){ - this.fly(r).removeClass(cls); - } - }, - - // private - removeRow : function(row) { - Ext.removeNode(this.getRow(row)); - this.syncFocusEl(row); - }, - - // private - removeRows : function(firstRow, lastRow) { - var bd = this.mainBody.dom, - rowIndex; - - for (rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ - Ext.removeNode(bd.childNodes[firstRow]); - } - - this.syncFocusEl(firstRow); - }, - - /* ----------------------------------- Scrolling functions -------------------------------------------*/ - - // private - getScrollState : function() { - var sb = this.scroller.dom; - - return { - left: sb.scrollLeft, - top : sb.scrollTop - }; - }, - - // private - restoreScroll : function(state) { - var sb = this.scroller.dom; - sb.scrollLeft = state.left; - sb.scrollTop = state.top; - }, - - /** - * Scrolls the grid to the top - */ - scrollToTop : function() { - var dom = this.scroller.dom; - - dom.scrollTop = 0; - dom.scrollLeft = 0; - }, - - // private - syncScroll : function() { - this.syncHeaderScroll(); - var mb = this.scroller.dom; - this.grid.fireEvent('bodyscroll', mb.scrollLeft, mb.scrollTop); - }, - - // private - syncHeaderScroll : function() { - var innerHd = this.innerHd, - scrollLeft = this.scroller.dom.scrollLeft; - - innerHd.scrollLeft = scrollLeft; - innerHd.scrollLeft = scrollLeft; // second time for IE (1/2 time first fails, other browsers ignore) - }, - - /** - * @private - * Ensures the given column has the given icon class - */ - updateSortIcon : function(col, dir) { - var sortClasses = this.sortClasses, - sortClass = sortClasses[dir == "DESC" ? 1 : 0], - headers = this.mainHd.select('td').removeClass(sortClasses); - - headers.item(col).addClass(sortClass); - }, - - /** - * @private - * Updates the size of every column and cell in the grid - */ - updateAllColumnWidths : function() { - var totalWidth = this.getTotalWidth(), - colCount = this.cm.getColumnCount(), - rows = this.getRows(), - rowCount = rows.length, - widths = [], - row, rowFirstChild, trow, i, j; - - for (i = 0; i < colCount; i++) { - widths[i] = this.getColumnWidth(i); - this.getHeaderCell(i).style.width = widths[i]; - } - - this.updateHeaderWidth(); - - for (i = 0; i < rowCount; i++) { - row = rows[i]; - row.style.width = totalWidth; - rowFirstChild = row.firstChild; - - if (rowFirstChild) { - rowFirstChild.style.width = totalWidth; - trow = rowFirstChild.rows[0]; - - for (j = 0; j < colCount; j++) { - trow.childNodes[j].style.width = widths[j]; - } - } - } - - this.onAllColumnWidthsUpdated(widths, totalWidth); - }, - - /** - * @private - * Called after a column's width has been updated, this resizes all of the cells for that column in each row - * @param {Number} column The column index - */ - updateColumnWidth : function(column, width) { - var columnWidth = this.getColumnWidth(column), - totalWidth = this.getTotalWidth(), - headerCell = this.getHeaderCell(column), - nodes = this.getRows(), - nodeCount = nodes.length, - row, i, firstChild; - - this.updateHeaderWidth(); - headerCell.style.width = columnWidth; - - for (i = 0; i < nodeCount; i++) { - row = nodes[i]; - firstChild = row.firstChild; - - row.style.width = totalWidth; - if (firstChild) { - firstChild.style.width = totalWidth; - firstChild.rows[0].childNodes[column].style.width = columnWidth; - } - } - - this.onColumnWidthUpdated(column, columnWidth, totalWidth); - }, - - /** - * @private - * Sets the hidden status of a given column. - * @param {Number} col The column index - * @param {Boolean} hidden True to make the column hidden - */ - updateColumnHidden : function(col, hidden) { - var totalWidth = this.getTotalWidth(), - display = hidden ? 'none' : '', - headerCell = this.getHeaderCell(col), - nodes = this.getRows(), - nodeCount = nodes.length, - row, rowFirstChild, i; - - this.updateHeaderWidth(); - headerCell.style.display = display; - - for (i = 0; i < nodeCount; i++) { - row = nodes[i]; - row.style.width = totalWidth; - rowFirstChild = row.firstChild; - - if (rowFirstChild) { - rowFirstChild.style.width = totalWidth; - rowFirstChild.rows[0].childNodes[col].style.display = display; - } - } - - this.onColumnHiddenUpdated(col, hidden, totalWidth); - delete this.lastViewWidth; //recalc - this.layout(); - }, - - /** - * @private - * Renders all of the rows to a string buffer and returns the string. This is called internally - * by renderRows and performs the actual string building for the rows - it does not inject HTML into the DOM. - * @param {Array} columns The column data acquired from getColumnData. - * @param {Array} records The array of records to render - * @param {Ext.data.Store} store The store to render the rows from - * @param {Number} startRow The index of the first row being rendered. Sometimes we only render a subset of - * the rows so this is used to maintain logic for striping etc - * @param {Number} colCount The total number of columns in the column model - * @param {Boolean} stripe True to stripe the rows - * @return {String} A string containing the HTML for the rendered rows - */ - doRender : function(columns, records, store, startRow, colCount, stripe) { - var templates = this.templates, - cellTemplate = templates.cell, - rowTemplate = templates.row, - last = colCount - 1, - tstyle = 'width:' + this.getTotalWidth() + ';', - // buffers - rowBuffer = [], - colBuffer = [], - rowParams = {tstyle: tstyle}, - meta = {}, - len = records.length, - alt, - column, - record, i, j, rowIndex; - - //build up each row's HTML - for (j = 0; j < len; j++) { - record = records[j]; - colBuffer = []; - - rowIndex = j + startRow; - - //build up each column's HTML - for (i = 0; i < colCount; i++) { - column = columns[i]; - - meta.id = column.id; - meta.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : ''); - meta.attr = meta.cellAttr = ''; - meta.style = column.style; - meta.value = column.renderer.call(column.scope, record.data[column.name], meta, record, rowIndex, i, store); - - if (Ext.isEmpty(meta.value)) { - meta.value = ' '; - } - - if (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') { - meta.css += ' x-grid3-dirty-cell'; - } - - colBuffer[colBuffer.length] = cellTemplate.apply(meta); - } - - alt = []; - //set up row striping and row dirtiness CSS classes - if (stripe && ((rowIndex + 1) % 2 === 0)) { - alt[0] = 'x-grid3-row-alt'; - } - - if (record.dirty) { - alt[1] = ' x-grid3-dirty-row'; - } - - rowParams.cols = colCount; - - if (this.getRowClass) { - alt[2] = this.getRowClass(record, rowIndex, rowParams, store); - } - - rowParams.alt = alt.join(' '); - rowParams.cells = colBuffer.join(''); - - rowBuffer[rowBuffer.length] = rowTemplate.apply(rowParams); - } - - return rowBuffer.join(''); - }, - - /** - * @private - * Adds CSS classes and rowIndex to each row - * @param {Number} startRow The row to start from (defaults to 0) - */ - processRows : function(startRow, skipStripe) { - if (!this.ds || this.ds.getCount() < 1) { - return; - } - - var rows = this.getRows(), - length = rows.length, - row, i; - - skipStripe = skipStripe || !this.grid.stripeRows; - startRow = startRow || 0; - - for (i = 0; i < length; i++) { - row = rows[i]; - if (row) { - row.rowIndex = i; - if (!skipStripe) { - row.className = row.className.replace(this.rowClsRe, ' '); - if ((i + 1) % 2 === 0){ - row.className += ' x-grid3-row-alt'; - } - } - } - } - - // add first/last-row classes - if (startRow === 0) { - Ext.fly(rows[0]).addClass(this.firstRowCls); - } - - Ext.fly(rows[length - 1]).addClass(this.lastRowCls); - }, - - /** - * @private - */ - afterRender : function() { - if (!this.ds || !this.cm) { - return; - } - - this.mainBody.dom.innerHTML = this.renderBody() || ' '; - this.processRows(0, true); - - if (this.deferEmptyText !== true) { - this.applyEmptyText(); - } - - this.grid.fireEvent('viewready', this.grid); - }, - - /** - * @private - * This is always intended to be called after renderUI. Sets up listeners on the UI elements - * and sets up options like column menus, moving and resizing. - */ - afterRenderUI: function() { - var grid = this.grid; - - this.initElements(); - - // get mousedowns early - Ext.fly(this.innerHd).on('click', this.handleHdDown, this); - - this.mainHd.on({ - scope : this, - mouseover: this.handleHdOver, - mouseout : this.handleHdOut, - mousemove: this.handleHdMove - }); - - this.scroller.on('scroll', this.syncScroll, this); - - if (grid.enableColumnResize !== false) { - this.splitZone = new Ext.grid.GridView.SplitDragZone(grid, this.mainHd.dom); - } - - if (grid.enableColumnMove) { - this.columnDrag = new Ext.grid.GridView.ColumnDragZone(grid, this.innerHd); - this.columnDrop = new Ext.grid.HeaderDropZone(grid, this.mainHd.dom); - } - - if (grid.enableHdMenu !== false) { - this.hmenu = new Ext.menu.Menu({id: grid.id + '-hctx'}); - this.hmenu.add( - {itemId:'asc', text: this.sortAscText, cls: 'xg-hmenu-sort-asc'}, - {itemId:'desc', text: this.sortDescText, cls: 'xg-hmenu-sort-desc'} - ); - - if (grid.enableColumnHide !== false) { - this.colMenu = new Ext.menu.Menu({id:grid.id + '-hcols-menu'}); - this.colMenu.on({ - scope : this, - beforeshow: this.beforeColMenuShow, - itemclick : this.handleHdMenuClick - }); - this.hmenu.add('-', { - itemId:'columns', - hideOnClick: false, - text: this.columnsText, - menu: this.colMenu, - iconCls: 'x-cols-icon' - }); - } - - this.hmenu.on('itemclick', this.handleHdMenuClick, this); - } - - if (grid.trackMouseOver) { - this.mainBody.on({ - scope : this, - mouseover: this.onRowOver, - mouseout : this.onRowOut - }); - } - - if (grid.enableDragDrop || grid.enableDrag) { - this.dragZone = new Ext.grid.GridDragZone(grid, { - ddGroup : grid.ddGroup || 'GridDD' - }); - } - - this.updateHeaderSortState(); - }, - - /** - * @private - * Renders each of the UI elements in turn. This is called internally, once, by this.render. It does not - * render rows from the store, just the surrounding UI elements. - */ - renderUI : function() { - var templates = this.templates; - - return templates.master.apply({ - body : templates.body.apply({rows:' '}), - header: this.renderHeaders(), - ostyle: 'width:' + this.getOffsetWidth() + ';', - bstyle: 'width:' + this.getTotalWidth() + ';' - }); - }, - - // private - processEvent : function(name, e) { - var target = e.getTarget(), - grid = this.grid, - header = this.findHeaderIndex(target), - row, cell, col, body; - - grid.fireEvent(name, e); - - if (header !== false) { - grid.fireEvent('header' + name, grid, header, e); - } else { - row = this.findRowIndex(target); - -// Grid's value-added events must bubble correctly to allow cancelling via returning false: cell->column->row -// We must allow a return of false at any of these levels to cancel the event processing. -// Particularly allowing rowmousedown to be cancellable by prior handlers which need to prevent selection. - if (row !== false) { - cell = this.findCellIndex(target); - if (cell !== false) { - col = grid.colModel.getColumnAt(cell); - if (grid.fireEvent('cell' + name, grid, row, cell, e) !== false) { - if (!col || (col.processEvent && (col.processEvent(name, e, grid, row, cell) !== false))) { - grid.fireEvent('row' + name, grid, row, e); - } - } - } else { - if (grid.fireEvent('row' + name, grid, row, e) !== false) { - (body = this.findRowBody(target)) && grid.fireEvent('rowbody' + name, grid, row, e); - } - } - } else { - grid.fireEvent('container' + name, grid, e); - } - } - }, - - /** - * @private - * Sizes the grid's header and body elements - */ - layout : function(initial) { - if (!this.mainBody) { - return; // not rendered - } - - var grid = this.grid, - gridEl = grid.getGridEl(), - gridSize = gridEl.getSize(true), - gridWidth = gridSize.width, - gridHeight = gridSize.height, - scroller = this.scroller, - scrollStyle, headerHeight, scrollHeight; - - if (gridWidth < 20 || gridHeight < 20) { - return; - } - - if (grid.autoHeight) { - scrollStyle = scroller.dom.style; - scrollStyle.overflow = 'visible'; - - if (Ext.isWebKit) { - scrollStyle.position = 'static'; - } - } else { - this.el.setSize(gridWidth, gridHeight); - - headerHeight = this.mainHd.getHeight(); - scrollHeight = gridHeight - headerHeight; - - scroller.setSize(gridWidth, scrollHeight); - - if (this.innerHd) { - this.innerHd.style.width = (gridWidth) + "px"; - } - } - - if (this.forceFit || (initial === true && this.autoFill)) { - if (this.lastViewWidth != gridWidth) { - this.fitColumns(false, false); - this.lastViewWidth = gridWidth; - } - } else { - this.autoExpand(); - this.syncHeaderScroll(); - } - - this.onLayout(gridWidth, scrollHeight); - }, - - // template functions for subclasses and plugins - // these functions include precalculated values - onLayout : function(vw, vh) { - // do nothing - }, - - onColumnWidthUpdated : function(col, w, tw) { - //template method - }, - - onAllColumnWidthsUpdated : function(ws, tw) { - //template method - }, - - onColumnHiddenUpdated : function(col, hidden, tw) { - // template method - }, - - updateColumnText : function(col, text) { - // template method - }, - - afterMove : function(colIndex) { - // template method - }, - - /* ----------------------------------- Core Specific -------------------------------------------*/ - // private - init : function(grid) { - this.grid = grid; - - this.initTemplates(); - this.initData(grid.store, grid.colModel); - this.initUI(grid); - }, - - // private - getColumnId : function(index){ - return this.cm.getColumnId(index); - }, - - // private - getOffsetWidth : function() { - return (this.cm.getTotalWidth() + this.getScrollOffset()) + 'px'; - }, - - // private - getScrollOffset: function() { - return Ext.num(this.scrollOffset, Ext.getScrollBarWidth()); - }, - - /** - * @private - * Renders the header row using the 'header' template. Does not inject the HTML into the DOM, just - * returns a string. - * @return {String} Rendered header row - */ - renderHeaders : function() { - var colModel = this.cm, - templates = this.templates, - headerTpl = templates.hcell, - properties = {}, - colCount = colModel.getColumnCount(), - last = colCount - 1, - cells = [], - i, cssCls; - - for (i = 0; i < colCount; i++) { - if (i == 0) { - cssCls = 'x-grid3-cell-first '; - } else { - cssCls = i == last ? 'x-grid3-cell-last ' : ''; - } - - properties = { - id : colModel.getColumnId(i), - value : colModel.getColumnHeader(i) || '', - style : this.getColumnStyle(i, true), - css : cssCls, - tooltip: this.getColumnTooltip(i) - }; - - if (colModel.config[i].align == 'right') { - properties.istyle = 'padding-right: 16px;'; - } else { - delete properties.istyle; - } - - cells[i] = headerTpl.apply(properties); - } - - return templates.header.apply({ - cells : cells.join(""), - tstyle: String.format("width: {0};", this.getTotalWidth()) - }); - }, - - /** - * @private - */ - getColumnTooltip : function(i) { - var tooltip = this.cm.getColumnTooltip(i); - if (tooltip) { - if (Ext.QuickTips.isEnabled()) { - return 'ext:qtip="' + tooltip + '"'; - } else { - return 'title="' + tooltip + '"'; - } - } - - return ''; - }, - - // private - beforeUpdate : function() { - this.grid.stopEditing(true); - }, - - /** - * @private - * Re-renders the headers and ensures they are sized correctly - */ - updateHeaders : function() { - this.innerHd.firstChild.innerHTML = this.renderHeaders(); - - this.updateHeaderWidth(false); - }, - - /** - * @private - * Ensures that the header is sized to the total width available to it - * @param {Boolean} updateMain True to update the mainBody's width also (defaults to true) - */ - updateHeaderWidth: function(updateMain) { - var innerHdChild = this.innerHd.firstChild, - totalWidth = this.getTotalWidth(); - - innerHdChild.style.width = this.getOffsetWidth(); - innerHdChild.firstChild.style.width = totalWidth; - - if (updateMain !== false) { - this.mainBody.dom.style.width = totalWidth; - } - }, - - /** - * Focuses the specified row. - * @param {Number} row The row index - */ - focusRow : function(row) { - this.focusCell(row, 0, false); - }, - - /** - * Focuses the specified cell. - * @param {Number} row The row index - * @param {Number} col The column index - */ - focusCell : function(row, col, hscroll) { - this.syncFocusEl(this.ensureVisible(row, col, hscroll)); - - var focusEl = this.focusEl; - - if (Ext.isGecko) { - focusEl.focus(); - } else { - focusEl.focus.defer(1, focusEl); - } - }, - - /** - * @private - * Finds the Elements corresponding to the given row and column indexes - */ - resolveCell : function(row, col, hscroll) { - if (!Ext.isNumber(row)) { - row = row.rowIndex; - } - - if (!this.ds) { - return null; - } - - if (row < 0 || row >= this.ds.getCount()) { - return null; - } - col = (col !== undefined ? col : 0); - - var rowEl = this.getRow(row), - colModel = this.cm, - colCount = colModel.getColumnCount(), - cellEl; - - if (!(hscroll === false && col === 0)) { - while (col < colCount && colModel.isHidden(col)) { - col++; - } - - cellEl = this.getCell(row, col); - } - - return {row: rowEl, cell: cellEl}; - }, - - /** - * @private - * Returns the XY co-ordinates of a given row/cell resolution (see {@link #resolveCell}) - * @return {Array} X and Y coords - */ - getResolvedXY : function(resolved) { - if (!resolved) { - return null; - } - - var cell = resolved.cell, - row = resolved.row; - - if (cell) { - return Ext.fly(cell).getXY(); - } else { - return [this.el.getX(), Ext.fly(row).getY()]; - } - }, - - /** - * @private - * Moves the focus element to the x and y co-ordinates of the given row and column - */ - syncFocusEl : function(row, col, hscroll) { - var xy = row; - - if (!Ext.isArray(xy)) { - row = Math.min(row, Math.max(0, this.getRows().length-1)); - - if (isNaN(row)) { - return; - } - - xy = this.getResolvedXY(this.resolveCell(row, col, hscroll)); - } - - this.focusEl.setXY(xy || this.scroller.getXY()); - }, - - /** - * @private - */ - ensureVisible : function(row, col, hscroll) { - var resolved = this.resolveCell(row, col, hscroll); - - if (!resolved || !resolved.row) { - return null; - } - - var rowEl = resolved.row, - cellEl = resolved.cell, - c = this.scroller.dom, - p = rowEl, - ctop = 0, - stop = this.el.dom; - - while (p && p != stop) { - ctop += p.offsetTop; - p = p.offsetParent; - } - - ctop -= this.mainHd.dom.offsetHeight; - stop = parseInt(c.scrollTop, 10); - - var cbot = ctop + rowEl.offsetHeight, - ch = c.clientHeight, - sbot = stop + ch; - - - if (ctop < stop) { - c.scrollTop = ctop; - } else if(cbot > sbot) { - c.scrollTop = cbot-ch; - } - - if (hscroll !== false) { - var cleft = parseInt(cellEl.offsetLeft, 10), - cright = cleft + cellEl.offsetWidth, - sleft = parseInt(c.scrollLeft, 10), - sright = sleft + c.clientWidth; - - if (cleft < sleft) { - c.scrollLeft = cleft; - } else if(cright > sright) { - c.scrollLeft = cright-c.clientWidth; - } - } - - return this.getResolvedXY(resolved); - }, - - // private - insertRows : function(dm, firstRow, lastRow, isUpdate) { - var last = dm.getCount() - 1; - if( !isUpdate && firstRow === 0 && lastRow >= last) { - this.fireEvent('beforerowsinserted', this, firstRow, lastRow); - this.refresh(); - this.fireEvent('rowsinserted', this, firstRow, lastRow); - } else { - if (!isUpdate) { - this.fireEvent('beforerowsinserted', this, firstRow, lastRow); - } - var html = this.renderRows(firstRow, lastRow), - before = this.getRow(firstRow); - if (before) { - if(firstRow === 0){ - Ext.fly(this.getRow(0)).removeClass(this.firstRowCls); - } - Ext.DomHelper.insertHtml('beforeBegin', before, html); - } else { - var r = this.getRow(last - 1); - if(r){ - Ext.fly(r).removeClass(this.lastRowCls); - } - Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html); - } - if (!isUpdate) { - this.processRows(firstRow); - this.fireEvent('rowsinserted', this, firstRow, lastRow); - } else if (firstRow === 0 || firstRow >= last) { - //ensure first/last row is kept after an update. - Ext.fly(this.getRow(firstRow)).addClass(firstRow === 0 ? this.firstRowCls : this.lastRowCls); - } - } - this.syncFocusEl(firstRow); - }, - - /** - * @private - * DEPRECATED - this doesn't appear to be called anywhere in the library, remove in 4.0. - */ - deleteRows : function(dm, firstRow, lastRow) { - if (dm.getRowCount() < 1) { - this.refresh(); - } else { - this.fireEvent('beforerowsdeleted', this, firstRow, lastRow); - - this.removeRows(firstRow, lastRow); - - this.processRows(firstRow); - this.fireEvent('rowsdeleted', this, firstRow, lastRow); - } - }, - - /** - * @private - * Builds a CSS string for the given column index - * @param {Number} colIndex The column index - * @param {Boolean} isHeader True if getting the style for the column's header - * @return {String} The CSS string - */ - getColumnStyle : function(colIndex, isHeader) { - var colModel = this.cm, - colConfig = colModel.config, - style = isHeader ? '' : colConfig[colIndex].css || '', - align = colConfig[colIndex].align; - - style += String.format("width: {0};", this.getColumnWidth(colIndex)); - - if (colModel.isHidden(colIndex)) { - style += 'display: none; '; - } - - if (align) { - style += String.format("text-align: {0};", align); - } - - return style; - }, - - /** - * @private - * Returns the width of a given column minus its border width - * @return {Number} The column index - * @return {String|Number} The width in pixels - */ - getColumnWidth : function(column) { - var columnWidth = this.cm.getColumnWidth(column), - borderWidth = this.borderWidth; - - if (Ext.isNumber(columnWidth)) { - if (Ext.isBorderBox || (Ext.isWebKit && !Ext.isSafari2)) { - return columnWidth + "px"; - } else { - return Math.max(columnWidth - borderWidth, 0) + "px"; - } - } else { - return columnWidth; - } - }, - - /** - * @private - * Returns the total width of all visible columns - * @return {String} - */ - getTotalWidth : function() { - return this.cm.getTotalWidth() + 'px'; - }, - - /** - * @private - * Resizes each column to fit the available grid width. - * TODO: The second argument isn't even used, remove it in 4.0 - * @param {Boolean} preventRefresh True to prevent resizing of each row to the new column sizes (defaults to false) - * @param {null} onlyExpand NOT USED, will be removed in 4.0 - * @param {Number} omitColumn The index of a column to leave at its current width. Defaults to undefined - * @return {Boolean} True if the operation succeeded, false if not or undefined if the grid view is not yet initialized - */ - fitColumns : function(preventRefresh, onlyExpand, omitColumn) { - var grid = this.grid, - colModel = this.cm, - totalColWidth = colModel.getTotalWidth(false), - gridWidth = this.getGridInnerWidth(), - extraWidth = gridWidth - totalColWidth, - columns = [], - extraCol = 0, - width = 0, - colWidth, fraction, i; - - // not initialized, so don't screw up the default widths - if (gridWidth < 20 || extraWidth === 0) { - return false; - } - - var visibleColCount = colModel.getColumnCount(true), - totalColCount = colModel.getColumnCount(false), - adjCount = visibleColCount - (Ext.isNumber(omitColumn) ? 1 : 0); - - if (adjCount === 0) { - adjCount = 1; - omitColumn = undefined; - } - - //FIXME: the algorithm used here is odd and potentially confusing. Includes this for loop and the while after it. - for (i = 0; i < totalColCount; i++) { - if (!colModel.isFixed(i) && i !== omitColumn) { - colWidth = colModel.getColumnWidth(i); - columns.push(i, colWidth); - - if (!colModel.isHidden(i)) { - extraCol = i; - width += colWidth; - } - } - } - - fraction = (gridWidth - colModel.getTotalWidth()) / width; - - while (columns.length) { - colWidth = columns.pop(); - i = columns.pop(); - - colModel.setColumnWidth(i, Math.max(grid.minColumnWidth, Math.floor(colWidth + colWidth * fraction)), true); - } - - //this has been changed above so remeasure now - totalColWidth = colModel.getTotalWidth(false); - - if (totalColWidth > gridWidth) { - var adjustCol = (adjCount == visibleColCount) ? extraCol : omitColumn, - newWidth = Math.max(1, colModel.getColumnWidth(adjustCol) - (totalColWidth - gridWidth)); - - colModel.setColumnWidth(adjustCol, newWidth, true); - } - - if (preventRefresh !== true) { - this.updateAllColumnWidths(); - } - - return true; - }, - - /** - * @private - * Resizes the configured autoExpandColumn to take the available width after the other columns have - * been accounted for - * @param {Boolean} preventUpdate True to prevent the resizing of all rows (defaults to false) - */ - autoExpand : function(preventUpdate) { - var grid = this.grid, - colModel = this.cm, - gridWidth = this.getGridInnerWidth(), - totalColumnWidth = colModel.getTotalWidth(false), - autoExpandColumn = grid.autoExpandColumn; - - if (!this.userResized && autoExpandColumn) { - if (gridWidth != totalColumnWidth) { - //if we are not already using all available width, resize the autoExpandColumn - var colIndex = colModel.getIndexById(autoExpandColumn), - currentWidth = colModel.getColumnWidth(colIndex), - desiredWidth = gridWidth - totalColumnWidth + currentWidth, - newWidth = Math.min(Math.max(desiredWidth, grid.autoExpandMin), grid.autoExpandMax); - - if (currentWidth != newWidth) { - colModel.setColumnWidth(colIndex, newWidth, true); - - if (preventUpdate !== true) { - this.updateColumnWidth(colIndex, newWidth); - } - } - } - } - }, - - /** - * Returns the total internal width available to the grid, taking the scrollbar into account - * @return {Number} The total width - */ - getGridInnerWidth: function() { - return this.grid.getGridEl().getWidth(true) - this.getScrollOffset(); - }, - - /** - * @private - * Returns an array of column configurations - one for each column - * @return {Array} Array of column config objects. This includes the column name, renderer, id style and renderer - */ - getColumnData : function() { - var columns = [], - colModel = this.cm, - colCount = colModel.getColumnCount(), - fields = this.ds.fields, - i, name; - - for (i = 0; i < colCount; i++) { - name = colModel.getDataIndex(i); - - columns[i] = { - name : Ext.isDefined(name) ? name : (fields.get(i) ? fields.get(i).name : undefined), - renderer: colModel.getRenderer(i), - scope : colModel.getRendererScope(i), - id : colModel.getColumnId(i), - style : this.getColumnStyle(i) - }; - } - - return columns; - }, - - /** - * @private - * Renders rows between start and end indexes - * @param {Number} startRow Index of the first row to render - * @param {Number} endRow Index of the last row to render - */ - renderRows : function(startRow, endRow) { - var grid = this.grid, - store = grid.store, - stripe = grid.stripeRows, - colModel = grid.colModel, - colCount = colModel.getColumnCount(), - rowCount = store.getCount(), - records; - - if (rowCount < 1) { - return ''; - } - - startRow = startRow || 0; - endRow = Ext.isDefined(endRow) ? endRow : rowCount - 1; - records = store.getRange(startRow, endRow); - - return this.doRender(this.getColumnData(), records, store, startRow, colCount, stripe); - }, - - // private - renderBody : function(){ - var markup = this.renderRows() || ' '; - return this.templates.body.apply({rows: markup}); - }, - - /** - * @private - * Refreshes a row by re-rendering it. Fires the rowupdated event when done - */ - refreshRow: function(record) { - var store = this.ds, - colCount = this.cm.getColumnCount(), - columns = this.getColumnData(), - last = colCount - 1, - cls = ['x-grid3-row'], - rowParams = { - tstyle: String.format("width: {0};", this.getTotalWidth()) - }, - colBuffer = [], - cellTpl = this.templates.cell, - rowIndex, row, column, meta, css, i; - - if (Ext.isNumber(record)) { - rowIndex = record; - record = store.getAt(rowIndex); - } else { - rowIndex = store.indexOf(record); - } - - //the record could not be found - if (!record || rowIndex < 0) { - return; - } - - //builds each column in this row - for (i = 0; i < colCount; i++) { - column = columns[i]; - - if (i == 0) { - css = 'x-grid3-cell-first'; - } else { - css = (i == last) ? 'x-grid3-cell-last ' : ''; - } - - meta = { - id : column.id, - style : column.style, - css : css, - attr : "", - cellAttr: "" - }; - // Need to set this after, because we pass meta to the renderer - meta.value = column.renderer.call(column.scope, record.data[column.name], meta, record, rowIndex, i, store); - - if (Ext.isEmpty(meta.value)) { - meta.value = ' '; - } - - if (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') { - meta.css += ' x-grid3-dirty-cell'; - } - - colBuffer[i] = cellTpl.apply(meta); - } - - row = this.getRow(rowIndex); - row.className = ''; - - if (this.grid.stripeRows && ((rowIndex + 1) % 2 === 0)) { - cls.push('x-grid3-row-alt'); - } - - if (this.getRowClass) { - rowParams.cols = colCount; - cls.push(this.getRowClass(record, rowIndex, rowParams, store)); - } - - this.fly(row).addClass(cls).setStyle(rowParams.tstyle); - rowParams.cells = colBuffer.join(""); - row.innerHTML = this.templates.rowInner.apply(rowParams); - - this.fireEvent('rowupdated', this, rowIndex, record); - }, - - /** - * Refreshs the grid UI - * @param {Boolean} headersToo (optional) True to also refresh the headers - */ - refresh : function(headersToo) { - this.fireEvent('beforerefresh', this); - this.grid.stopEditing(true); - - var result = this.renderBody(); - this.mainBody.update(result).setWidth(this.getTotalWidth()); - if (headersToo === true) { - this.updateHeaders(); - this.updateHeaderSortState(); - } - this.processRows(0, true); - this.layout(); - this.applyEmptyText(); - this.fireEvent('refresh', this); - }, - - /** - * @private - * Displays the configured emptyText if there are currently no rows to display - */ - applyEmptyText : function() { - if (this.emptyText && !this.hasRows()) { - this.mainBody.update('
        ' + this.emptyText + '
        '); - } - }, - - /** - * @private - * Adds sorting classes to the column headers based on the bound store's sortInfo. Fires the 'sortchange' event - * if the sorting has changed since this function was last run. - */ - updateHeaderSortState : function() { - var state = this.ds.getSortState(); - if (!state) { - return; - } - - if (!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)) { - this.grid.fireEvent('sortchange', this.grid, state); - } - - this.sortState = state; - - var sortColumn = this.cm.findColumnIndex(state.field); - if (sortColumn != -1) { - var sortDir = state.direction; - this.updateSortIcon(sortColumn, sortDir); - } - }, - - /** - * @private - * Removes any sorting indicator classes from the column headers - */ - clearHeaderSortState : function() { - if (!this.sortState) { - return; - } - this.grid.fireEvent('sortchange', this.grid, null); - this.mainHd.select('td').removeClass(this.sortClasses); - delete this.sortState; - }, - - /** - * @private - * Destroys all objects associated with the GridView - */ - destroy : function() { - var me = this, - grid = me.grid, - gridEl = grid.getGridEl(), - dragZone = me.dragZone, - splitZone = me.splitZone, - columnDrag = me.columnDrag, - columnDrop = me.columnDrop, - scrollToTopTask = me.scrollToTopTask, - columnDragData, - columnDragProxy; - - if (scrollToTopTask && scrollToTopTask.cancel) { - scrollToTopTask.cancel(); - } - - Ext.destroyMembers(me, 'colMenu', 'hmenu'); - - me.initData(null, null); - me.purgeListeners(); - - Ext.fly(me.innerHd).un("click", me.handleHdDown, me); - - if (grid.enableColumnMove) { - columnDragData = columnDrag.dragData; - columnDragProxy = columnDrag.proxy; - Ext.destroy( - columnDrag.el, - columnDragProxy.ghost, - columnDragProxy.el, - columnDrop.el, - columnDrop.proxyTop, - columnDrop.proxyBottom, - columnDragData.ddel, - columnDragData.header - ); - - if (columnDragProxy.anim) { - Ext.destroy(columnDragProxy.anim); - } - - delete columnDragProxy.ghost; - delete columnDragData.ddel; - delete columnDragData.header; - columnDrag.destroy(); - - delete Ext.dd.DDM.locationCache[columnDrag.id]; - delete columnDrag._domRef; - - delete columnDrop.proxyTop; - delete columnDrop.proxyBottom; - columnDrop.destroy(); - delete Ext.dd.DDM.locationCache["gridHeader" + gridEl.id]; - delete columnDrop._domRef; - delete Ext.dd.DDM.ids[columnDrop.ddGroup]; - } - - if (splitZone) { // enableColumnResize - splitZone.destroy(); - delete splitZone._domRef; - delete Ext.dd.DDM.ids["gridSplitters" + gridEl.id]; - } - - Ext.fly(me.innerHd).removeAllListeners(); - Ext.removeNode(me.innerHd); - delete me.innerHd; - - Ext.destroy( - me.el, - me.mainWrap, - me.mainHd, - me.scroller, - me.mainBody, - me.focusEl, - me.resizeMarker, - me.resizeProxy, - me.activeHdBtn, - me._flyweight, - dragZone, - splitZone - ); - - delete grid.container; - - if (dragZone) { - dragZone.destroy(); - } - - Ext.dd.DDM.currentTarget = null; - delete Ext.dd.DDM.locationCache[gridEl.id]; - - Ext.EventManager.removeResizeListener(me.onWindowResize, me); - }, - - // private - onDenyColumnHide : function() { - - }, - - // private - render : function() { - if (this.autoFill) { - var ct = this.grid.ownerCt; - - if (ct && ct.getLayout()) { - ct.on('afterlayout', function() { - this.fitColumns(true, true); - this.updateHeaders(); - this.updateHeaderSortState(); - }, this, {single: true}); - } - } else if (this.forceFit) { - this.fitColumns(true, false); - } else if (this.grid.autoExpandColumn) { - this.autoExpand(true); - } - - this.grid.getGridEl().dom.innerHTML = this.renderUI(); - - this.afterRenderUI(); - }, - - /* --------------------------------- Model Events and Handlers --------------------------------*/ - - /** - * @private - * Binds a new Store and ColumnModel to this GridView. Removes any listeners from the old objects (if present) - * and adds listeners to the new ones - * @param {Ext.data.Store} newStore The new Store instance - * @param {Ext.grid.ColumnModel} newColModel The new ColumnModel instance - */ - initData : function(newStore, newColModel) { - var me = this; - - if (me.ds) { - var oldStore = me.ds; - - oldStore.un('add', me.onAdd, me); - oldStore.un('load', me.onLoad, me); - oldStore.un('clear', me.onClear, me); - oldStore.un('remove', me.onRemove, me); - oldStore.un('update', me.onUpdate, me); - oldStore.un('datachanged', me.onDataChange, me); - - if (oldStore !== newStore && oldStore.autoDestroy) { - oldStore.destroy(); - } - } - - if (newStore) { - newStore.on({ - scope : me, - load : me.onLoad, - add : me.onAdd, - remove : me.onRemove, - update : me.onUpdate, - clear : me.onClear, - datachanged: me.onDataChange - }); - } - - if (me.cm) { - var oldColModel = me.cm; - - oldColModel.un('configchange', me.onColConfigChange, me); - oldColModel.un('widthchange', me.onColWidthChange, me); - oldColModel.un('headerchange', me.onHeaderChange, me); - oldColModel.un('hiddenchange', me.onHiddenChange, me); - oldColModel.un('columnmoved', me.onColumnMove, me); - } - - if (newColModel) { - delete me.lastViewWidth; - - newColModel.on({ - scope : me, - configchange: me.onColConfigChange, - widthchange : me.onColWidthChange, - headerchange: me.onHeaderChange, - hiddenchange: me.onHiddenChange, - columnmoved : me.onColumnMove - }); - } - - me.ds = newStore; - me.cm = newColModel; - }, - - // private - onDataChange : function(){ - this.refresh(true); - this.updateHeaderSortState(); - this.syncFocusEl(0); - }, - - // private - onClear : function() { - this.refresh(); - this.syncFocusEl(0); - }, - - // private - onUpdate : function(store, record) { - this.refreshRow(record); - }, - - // private - onAdd : function(store, records, index) { - this.insertRows(store, index, index + (records.length-1)); - }, - - // private - onRemove : function(store, record, index, isUpdate) { - if (isUpdate !== true) { - this.fireEvent('beforerowremoved', this, index, record); - } - - this.removeRow(index); - - if (isUpdate !== true) { - this.processRows(index); - this.applyEmptyText(); - this.fireEvent('rowremoved', this, index, record); - } - }, - - /** - * @private - * Called when a store is loaded, scrolls to the top row - */ - onLoad : function() { - if (Ext.isGecko) { - if (!this.scrollToTopTask) { - this.scrollToTopTask = new Ext.util.DelayedTask(this.scrollToTop, this); - } - this.scrollToTopTask.delay(1); - } else { - this.scrollToTop(); - } - }, - - // private - onColWidthChange : function(cm, col, width) { - this.updateColumnWidth(col, width); - }, - - // private - onHeaderChange : function(cm, col, text) { - this.updateHeaders(); - }, - - // private - onHiddenChange : function(cm, col, hidden) { - this.updateColumnHidden(col, hidden); - }, - - // private - onColumnMove : function(cm, oldIndex, newIndex) { - this.indexMap = null; - this.refresh(true); - this.restoreScroll(this.getScrollState()); - - this.afterMove(newIndex); - this.grid.fireEvent('columnmove', oldIndex, newIndex); - }, - - // private - onColConfigChange : function() { - delete this.lastViewWidth; - this.indexMap = null; - this.refresh(true); - }, - - /* -------------------- UI Events and Handlers ------------------------------ */ - // private - initUI : function(grid) { - grid.on('headerclick', this.onHeaderClick, this); - }, - - // private - initEvents : Ext.emptyFn, - - // private - onHeaderClick : function(g, index) { - if (this.headersDisabled || !this.cm.isSortable(index)) { - return; - } - g.stopEditing(true); - g.store.sort(this.cm.getDataIndex(index)); - }, - - /** - * @private - * Adds the hover class to a row when hovered over - */ - onRowOver : function(e, target) { - var row = this.findRowIndex(target); - - if (row !== false) { - this.addRowClass(row, this.rowOverCls); - } - }, - - /** - * @private - * Removes the hover class from a row on mouseout - */ - onRowOut : function(e, target) { - var row = this.findRowIndex(target); - - if (row !== false && !e.within(this.getRow(row), true)) { - this.removeRowClass(row, this.rowOverCls); - } - }, - - // private - onRowSelect : function(row) { - this.addRowClass(row, this.selectedRowClass); - }, - - // private - onRowDeselect : function(row) { - this.removeRowClass(row, this.selectedRowClass); - }, - - // private - onCellSelect : function(row, col) { - var cell = this.getCell(row, col); - if (cell) { - this.fly(cell).addClass('x-grid3-cell-selected'); - } - }, - - // private - onCellDeselect : function(row, col) { - var cell = this.getCell(row, col); - if (cell) { - this.fly(cell).removeClass('x-grid3-cell-selected'); - } - }, - - // private - handleWheel : function(e) { - e.stopPropagation(); - }, - - /** - * @private - * Called by the SplitDragZone when a drag has been completed. Resizes the columns - */ - onColumnSplitterMoved : function(cellIndex, width) { - this.userResized = true; - this.grid.colModel.setColumnWidth(cellIndex, width, true); - - if (this.forceFit) { - this.fitColumns(true, false, cellIndex); - this.updateAllColumnWidths(); - } else { - this.updateColumnWidth(cellIndex, width); - this.syncHeaderScroll(); - } - - this.grid.fireEvent('columnresize', cellIndex, width); - }, - - /** - * @private - * Click handler for the shared column dropdown menu, called on beforeshow. Builds the menu - * which displays the list of columns for the user to show or hide. - */ - beforeColMenuShow : function() { - var colModel = this.cm, - colCount = colModel.getColumnCount(), - colMenu = this.colMenu, - i; - - colMenu.removeAll(); - - for (i = 0; i < colCount; i++) { - if (colModel.config[i].hideable !== false) { - colMenu.add(new Ext.menu.CheckItem({ - text : colModel.getColumnHeader(i), - itemId : 'col-' + colModel.getColumnId(i), - checked : !colModel.isHidden(i), - disabled : colModel.config[i].hideable === false, - hideOnClick: false - })); - } - } - }, - - /** - * @private - * Attached as the 'itemclick' handler to the header menu and the column show/hide submenu (if available). - * Performs sorting if the sorter buttons were clicked, otherwise hides/shows the column that was clicked. - */ - handleHdMenuClick : function(item) { - var store = this.ds, - dataIndex = this.cm.getDataIndex(this.hdCtxIndex); - - switch (item.getItemId()) { - case 'asc': - store.sort(dataIndex, 'ASC'); - break; - case 'desc': - store.sort(dataIndex, 'DESC'); - break; - default: - this.handleHdMenuClickDefault(item); - } - return true; - }, - - /** - * Called by handleHdMenuClick if any button except a sort ASC/DESC button was clicked. The default implementation provides - * the column hide/show functionality based on the check state of the menu item. A different implementation can be provided - * if needed. - * @param {Ext.menu.BaseItem} item The menu item that was clicked - */ - handleHdMenuClickDefault: function(item) { - var colModel = this.cm, - itemId = item.getItemId(), - index = colModel.getIndexById(itemId.substr(4)); - - if (index != -1) { - if (item.checked && colModel.getColumnsBy(this.isHideableColumn, this).length <= 1) { - this.onDenyColumnHide(); - return; - } - colModel.setHidden(index, item.checked); - } - }, - - /** - * @private - * Called when a header cell is clicked - shows the menu if the click happened over a trigger button - */ - handleHdDown : function(e, target) { - if (Ext.fly(target).hasClass('x-grid3-hd-btn')) { - e.stopEvent(); - - var colModel = this.cm, - header = this.findHeaderCell(target), - index = this.getCellIndex(header), - sortable = colModel.isSortable(index), - menu = this.hmenu, - menuItems = menu.items, - menuCls = this.headerMenuOpenCls; - - this.hdCtxIndex = index; - - Ext.fly(header).addClass(menuCls); - menuItems.get('asc').setDisabled(!sortable); - menuItems.get('desc').setDisabled(!sortable); - - menu.on('hide', function() { - Ext.fly(header).removeClass(menuCls); - }, this, {single:true}); - - menu.show(target, 'tl-bl?'); - } - }, - - /** - * @private - * Attached to the headers' mousemove event. This figures out the CSS cursor to use based on where the mouse is currently - * pointed. If the mouse is currently hovered over the extreme left or extreme right of any header cell and the cell next - * to it is resizable it is given the resize cursor, otherwise the cursor is set to an empty string. - */ - handleHdMove : function(e) { - var header = this.findHeaderCell(this.activeHdRef); - - if (header && !this.headersDisabled) { - var handleWidth = this.splitHandleWidth || 5, - activeRegion = this.activeHdRegion, - headerStyle = header.style, - colModel = this.cm, - cursor = '', - pageX = e.getPageX(); - - if (this.grid.enableColumnResize !== false) { - var activeHeaderIndex = this.activeHdIndex, - previousVisible = this.getPreviousVisible(activeHeaderIndex), - currentResizable = colModel.isResizable(activeHeaderIndex), - previousResizable = previousVisible && colModel.isResizable(previousVisible), - inLeftResizer = pageX - activeRegion.left <= handleWidth, - inRightResizer = activeRegion.right - pageX <= (!this.activeHdBtn ? handleWidth : 2); - - if (inLeftResizer && previousResizable) { - cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize'; // col-resize not always supported - } else if (inRightResizer && currentResizable) { - cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'w-resize' : 'col-resize'; - } - } - - headerStyle.cursor = cursor; - } - }, - - /** - * @private - * Returns the index of the nearest currently visible header to the left of the given index. - * @param {Number} index The header index - * @return {Number/undefined} The index of the nearest visible header - */ - getPreviousVisible: function(index) { - while (index > 0) { - if (!this.cm.isHidden(index - 1)) { - return index; - } - index--; - } - return undefined; - }, - - /** - * @private - * Tied to the header element's mouseover event - adds the over class to the header cell if the menu is not disabled - * for that cell - */ - handleHdOver : function(e, target) { - var header = this.findHeaderCell(target); - - if (header && !this.headersDisabled) { - var fly = this.fly(header); - - this.activeHdRef = target; - this.activeHdIndex = this.getCellIndex(header); - this.activeHdRegion = fly.getRegion(); - - if (!this.isMenuDisabled(this.activeHdIndex, fly)) { - fly.addClass('x-grid3-hd-over'); - this.activeHdBtn = fly.child('.x-grid3-hd-btn'); - - if (this.activeHdBtn) { - this.activeHdBtn.dom.style.height = (header.firstChild.offsetHeight - 1) + 'px'; - } - } - } - }, - - /** - * @private - * Tied to the header element's mouseout event. Removes the hover class from the header cell - */ - handleHdOut : function(e, target) { - var header = this.findHeaderCell(target); - - if (header && (!Ext.isIE || !e.within(header, true))) { - this.activeHdRef = null; - this.fly(header).removeClass('x-grid3-hd-over'); - header.style.cursor = ''; - } - }, - - /** - * @private - * Used by {@link #handleHdOver} to determine whether or not to show the header menu class on cell hover - * @param {Number} cellIndex The header cell index - * @param {Ext.Element} el The cell element currently being hovered over - */ - isMenuDisabled: function(cellIndex, el) { - return this.cm.isMenuDisabled(cellIndex); - }, - - /** - * @private - * Returns true if there are any rows rendered into the GridView - * @return {Boolean} True if any rows have been rendered - */ - hasRows : function() { - var fc = this.mainBody.dom.firstChild; - return fc && fc.nodeType == 1 && fc.className != 'x-grid-empty'; - }, - - /** - * @private - */ - isHideableColumn : function(c) { - return !c.hidden; - }, - - /** - * @private - * DEPRECATED - will be removed in Ext JS 5.0 - */ - bind : function(d, c) { - this.initData(d, c); - } -}); - - -// private -// This is a support class used internally by the Grid components -Ext.grid.GridView.SplitDragZone = Ext.extend(Ext.dd.DDProxy, { - - constructor: function(grid, hd){ - this.grid = grid; - this.view = grid.getView(); - this.marker = this.view.resizeMarker; - this.proxy = this.view.resizeProxy; - Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd, - 'gridSplitters' + this.grid.getGridEl().id, { - dragElId : Ext.id(this.proxy.dom), resizeFrame:false - }); - this.scroll = false; - this.hw = this.view.splitHandleWidth || 5; - }, - - b4StartDrag : function(x, y){ - this.dragHeadersDisabled = this.view.headersDisabled; - this.view.headersDisabled = true; - var h = this.view.mainWrap.getHeight(); - this.marker.setHeight(h); - this.marker.show(); - this.marker.alignTo(this.view.getHeaderCell(this.cellIndex), 'tl-tl', [-2, 0]); - this.proxy.setHeight(h); - var w = this.cm.getColumnWidth(this.cellIndex), - minw = Math.max(w-this.grid.minColumnWidth, 0); - this.resetConstraints(); - this.setXConstraint(minw, 1000); - this.setYConstraint(0, 0); - this.minX = x - minw; - this.maxX = x + 1000; - this.startPos = x; - Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y); - }, - - allowHeaderDrag : function(e){ - return true; - }, - - handleMouseDown : function(e){ - var t = this.view.findHeaderCell(e.getTarget()); - if(t && this.allowHeaderDrag(e)){ - var xy = this.view.fly(t).getXY(), - x = xy[0], - exy = e.getXY(), - ex = exy[0], - w = t.offsetWidth, - adjust = false; - - if((ex - x) <= this.hw){ - adjust = -1; - }else if((x+w) - ex <= this.hw){ - adjust = 0; - } - if(adjust !== false){ - this.cm = this.grid.colModel; - var ci = this.view.getCellIndex(t); - if(adjust == -1){ - if (ci + adjust < 0) { - return; - } - while(this.cm.isHidden(ci+adjust)){ - --adjust; - if(ci+adjust < 0){ - return; - } - } - } - this.cellIndex = ci+adjust; - this.split = t.dom; - if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){ - Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this, arguments); - } - }else if(this.view.columnDrag){ - this.view.columnDrag.callHandleMouseDown(e); - } - } - }, - - endDrag : function(e){ - this.marker.hide(); - var v = this.view, - endX = Math.max(this.minX, e.getPageX()), - diff = endX - this.startPos, - disabled = this.dragHeadersDisabled; - - v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff); - setTimeout(function(){ - v.headersDisabled = disabled; - }, 50); - }, - - autoOffset : function(){ - this.setDelta(0,0); - } -}); -/** - * @class Ext.grid.PivotGridView - * @extends Ext.grid.GridView - * Specialised GridView for rendering Pivot Grid components. Config can be passed to the PivotGridView via the PivotGrid constructor's - * viewConfig option: -
        
        -new Ext.grid.PivotGrid({
        -    viewConfig: {
        -        title: 'My Pivot Grid',
        -        getCellCls: function(value) {
        -            return value > 10 'red' : 'green';
        -        }
        -    }
        -});
        -
        - *

        Currently {@link #title} and {@link #getCellCls} are the only configuration options accepted by PivotGridView. All other - * interaction is performed via the {@link Ext.grid.PivotGrid PivotGrid} class.

        - */ -Ext.grid.PivotGridView = Ext.extend(Ext.grid.GridView, { - - /** - * The CSS class added to all group header cells. Defaults to 'grid-hd-group-cell' - * @property colHeaderCellCls - * @type String - */ - colHeaderCellCls: 'grid-hd-group-cell', - - /** - * @cfg {String} title Optional title to be placed in the top left corner of the PivotGrid. Defaults to an empty string. - */ - title: '', - - /** - * @cfg {Function} getCellCls Optional function which should return a CSS class name for each cell value. This is useful when - * color coding cells based on their value. Defaults to undefined. - */ - - /** - * Returns the headers to be rendered at the top of the grid. Should be a 2-dimensional array, where each item specifies the number - * of columns it groups (column in this case refers to normal grid columns). In the example below we have 5 city groups, which are - * each part of a continent supergroup. The colspan for each city group refers to the number of normal grid columns that group spans, - * so in this case the grid would be expected to have a total of 12 columns: -
        
        -[
        -    {
        -        items: [
        -            {header: 'England',   colspan: 5},
        -            {header: 'USA',       colspan: 3}
        -        ]
        -    },
        -    {
        -        items: [
        -            {header: 'London',    colspan: 2},
        -            {header: 'Cambridge', colspan: 3},
        -            {header: 'Palo Alto', colspan: 3}
        -        ]
        -    }
        -]
        -
        - * In the example above we have cities nested under countries. The nesting could be deeper if desired - e.g. Continent -> Country -> - * State -> City, or any other structure. The only constaint is that the same depth must be used throughout the structure. - * @return {Array} A tree structure containing the headers to be rendered. Must include the colspan property at each level, which should - * be the sum of all child nodes beneath this node. - */ - getColumnHeaders: function() { - return this.grid.topAxis.buildHeaders();; - }, - - /** - * Returns the headers to be rendered on the left of the grid. Should be a 2-dimensional array, where each item specifies the number - * of rows it groups. In the example below we have 5 city groups, which are each part of a continent supergroup. The rowspan for each - * city group refers to the number of normal grid columns that group spans, so in this case the grid would be expected to have a - * total of 12 rows: -
        
        -[
        -    {
        -        width: 90,
        -        items: [
        -            {header: 'England',   rowspan: 5},
        -            {header: 'USA',       rowspan: 3}
        -        ]
        -    },
        -    {
        -        width: 50,
        -        items: [
        -            {header: 'London',    rowspan: 2},
        -            {header: 'Cambridge', rowspan: 3},
        -            {header: 'Palo Alto', rowspan: 3}
        -        ]
        -    }
        -]
        -
        - * In the example above we have cities nested under countries. The nesting could be deeper if desired - e.g. Continent -> Country -> - * State -> City, or any other structure. The only constaint is that the same depth must be used throughout the structure. - * @return {Array} A tree structure containing the headers to be rendered. Must include the colspan property at each level, which should - * be the sum of all child nodes beneath this node. - * Each group may specify the width it should be rendered with. - * @return {Array} The row groups - */ - getRowHeaders: function() { - return this.grid.leftAxis.buildHeaders(); - }, - - /** - * @private - * Renders rows between start and end indexes - * @param {Number} startRow Index of the first row to render - * @param {Number} endRow Index of the last row to render - */ - renderRows : function(startRow, endRow) { - var grid = this.grid, - rows = grid.extractData(), - rowCount = rows.length, - templates = this.templates, - renderer = grid.renderer, - hasRenderer = typeof renderer == 'function', - getCellCls = this.getCellCls, - hasGetCellCls = typeof getCellCls == 'function', - cellTemplate = templates.cell, - rowTemplate = templates.row, - rowBuffer = [], - meta = {}, - tstyle = 'width:' + this.getGridInnerWidth() + 'px;', - colBuffer, colCount, column, i, row; - - startRow = startRow || 0; - endRow = Ext.isDefined(endRow) ? endRow : rowCount - 1; - - for (i = 0; i < rowCount; i++) { - row = rows[i]; - colCount = row.length; - colBuffer = []; - - //build up each column's HTML - for (var j = 0; j < colCount; j++) { - - meta.id = i + '-' + j; - meta.css = j === 0 ? 'x-grid3-cell-first ' : (j == (colCount - 1) ? 'x-grid3-cell-last ' : ''); - meta.attr = meta.cellAttr = ''; - meta.value = row[j]; - - if (Ext.isEmpty(meta.value)) { - meta.value = ' '; - } - - if (hasRenderer) { - meta.value = renderer(meta.value); - } - - if (hasGetCellCls) { - meta.css += getCellCls(meta.value) + ' '; - } - - colBuffer[colBuffer.length] = cellTemplate.apply(meta); - } - - rowBuffer[rowBuffer.length] = rowTemplate.apply({ - tstyle: tstyle, - cols : colCount, - cells : colBuffer.join(""), - alt : '' - }); - } - - return rowBuffer.join(""); - }, - - /** - * The master template to use when rendering the GridView. Has a default template - * @property Ext.Template - * @type masterTpl - */ - masterTpl: new Ext.Template( - '
        ', - '
        ', - '
        ', - '
        {title}
        ', - '
        ', - '
        ', - '
        ', - '
        ', - '
        ', - '
        ', - '
        ', - '
        {body}
        ', - '', - '
        ', - '
        ', - '
         
        ', - '
         
        ', - '
        ' - ), - - /** - * @private - * Adds a gcell template to the internal templates object. This is used to render the headers in a multi-level column header. - */ - initTemplates: function() { - Ext.grid.PivotGridView.superclass.initTemplates.apply(this, arguments); - - var templates = this.templates || {}; - if (!templates.gcell) { - templates.gcell = new Ext.XTemplate( - '', - '
        ', - this.grid.enableHdMenu ? '' : '', '{value}', - '
        ', - '' - ); - } - - this.templates = templates; - this.hrowRe = new RegExp("ux-grid-hd-group-row-(\\d+)", ""); - }, - - /** - * @private - * Sets up the reference to the row headers element - */ - initElements: function() { - Ext.grid.PivotGridView.superclass.initElements.apply(this, arguments); - - /** - * @property rowHeadersEl - * @type Ext.Element - * The element containing all row headers - */ - this.rowHeadersEl = new Ext.Element(this.scroller.child('div.x-grid3-row-headers')); - - /** - * @property headerTitleEl - * @type Ext.Element - * The element that contains the optional title (top left section of the pivot grid) - */ - this.headerTitleEl = new Ext.Element(this.mainHd.child('div.x-grid3-header-title')); - }, - - /** - * @private - * Takes row headers into account when calculating total available width - */ - getGridInnerWidth: function() { - var previousWidth = Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this, arguments); - - return previousWidth - this.getTotalRowHeaderWidth(); - }, - - /** - * Returns the total width of all row headers as specified by {@link #getRowHeaders} - * @return {Number} The total width - */ - getTotalRowHeaderWidth: function() { - var headers = this.getRowHeaders(), - length = headers.length, - total = 0, - i; - - for (i = 0; i< length; i++) { - total += headers[i].width; - } - - return total; - }, - - /** - * @private - * Returns the total height of all column headers - * @return {Number} The total height - */ - getTotalColumnHeaderHeight: function() { - return this.getColumnHeaders().length * 21; - }, - - /** - * Inherit docs - * @private - * @param {HTMLElement} el - */ - getCellIndex : function(el) { - if (el) { - var match = el.className.match(this.colRe), - data; - - if (match && (data = match[1])) { - return parseInt(data.split('-')[1], 10); - } - } - return false; - }, - - - /** - * @private - * Slight specialisation of the GridView renderUI - just adds the row headers - */ - renderUI : function() { - var templates = this.templates, - innerWidth = this.getGridInnerWidth(); - - return templates.master.apply({ - body : templates.body.apply({rows:' '}), - ostyle: 'width:' + innerWidth + 'px', - bstyle: 'width:' + innerWidth + 'px' - }); - }, - - /** - * @private - * Make sure that the headers and rows are all sized correctly during layout - */ - onLayout: function(width, height) { - Ext.grid.PivotGridView.superclass.onLayout.apply(this, arguments); - - var width = this.getGridInnerWidth(); - - this.resizeColumnHeaders(width); - this.resizeAllRows(width); - }, - - /** - * Refreshs the grid UI - * @param {Boolean} headersToo (optional) True to also refresh the headers - */ - refresh : function(headersToo) { - this.fireEvent('beforerefresh', this); - this.grid.stopEditing(true); - - var result = this.renderBody(); - this.mainBody.update(result).setWidth(this.getGridInnerWidth()); - if (headersToo === true) { - this.updateHeaders(); - this.updateHeaderSortState(); - } - this.processRows(0, true); - this.layout(); - this.applyEmptyText(); - this.fireEvent('refresh', this); - }, - - /** - * @private - * Bypasses GridView's renderHeaders as they are taken care of separately by the PivotAxis instances - */ - renderHeaders: Ext.emptyFn, - - /** - * @private - * Taken care of by PivotAxis - */ - fitColumns: Ext.emptyFn, - - /** - * @private - * Called on layout, ensures that the width of each column header is correct. Omitting this can lead to faulty - * layouts when nested in a container. - * @param {Number} width The new width - */ - resizeColumnHeaders: function(width) { - var topAxis = this.grid.topAxis; - - if (topAxis.rendered) { - topAxis.el.setWidth(width); - } - }, - - /** - * @private - * Sets the row header div to the correct width. Should be called after rendering and reconfiguration of headers - */ - resizeRowHeaders: function() { - var rowHeaderWidth = this.getTotalRowHeaderWidth(), - marginStyle = String.format("margin-left: {0}px;", rowHeaderWidth); - - this.rowHeadersEl.setWidth(rowHeaderWidth); - this.mainBody.applyStyles(marginStyle); - Ext.fly(this.innerHd).applyStyles(marginStyle); - - this.headerTitleEl.setWidth(rowHeaderWidth); - this.headerTitleEl.setHeight(this.getTotalColumnHeaderHeight()); - }, - - /** - * @private - * Resizes all rendered rows to the given width. Usually called by onLayout - * @param {Number} width The new width - */ - resizeAllRows: function(width) { - var rows = this.getRows(), - length = rows.length, - i; - - for (i = 0; i < length; i++) { - Ext.fly(rows[i]).setWidth(width); - Ext.fly(rows[i]).child('table').setWidth(width); - } - }, - - /** - * @private - * Updates the Row Headers, deferring the updating of Column Headers to GridView - */ - updateHeaders: function() { - this.renderGroupRowHeaders(); - this.renderGroupColumnHeaders(); - }, - - /** - * @private - * Renders all row header groups at all levels based on the structure fetched from {@link #getGroupRowHeaders} - */ - renderGroupRowHeaders: function() { - var leftAxis = this.grid.leftAxis; - - this.resizeRowHeaders(); - leftAxis.rendered = false; - leftAxis.render(this.rowHeadersEl); - - this.setTitle(this.title); - }, - - /** - * Sets the title text in the top left segment of the PivotGridView - * @param {String} title The title - */ - setTitle: function(title) { - this.headerTitleEl.child('span').dom.innerHTML = title; - }, - - /** - * @private - * Renders all column header groups at all levels based on the structure fetched from {@link #getColumnHeaders} - */ - renderGroupColumnHeaders: function() { - var topAxis = this.grid.topAxis; - - topAxis.rendered = false; - topAxis.render(this.innerHd.firstChild); - }, - - /** - * @private - * Overridden to test whether the user is hovering over a group cell, in which case we don't show the menu - */ - isMenuDisabled: function(cellIndex, el) { - return true; - } -});/** - * @class Ext.grid.PivotAxis - * @extends Ext.Component - *

        PivotAxis is a class that supports a {@link Ext.grid.PivotGrid}. Each PivotGrid contains two PivotAxis instances - the left - * axis and the top axis. Each PivotAxis defines an ordered set of dimensions, each of which should correspond to a field in a - * Store's Record (see {@link Ext.grid.PivotGrid} documentation for further explanation).

        - *

        Developers should have little interaction with the PivotAxis instances directly as most of their management is performed by - * the PivotGrid. An exception is the dynamic reconfiguration of axes at run time - to achieve this we use PivotAxis's - * {@link #setDimensions} function and refresh the grid:

        -
        
        -var pivotGrid = new Ext.grid.PivotGrid({
        -    //some PivotGrid config here
        -});
        -
        -//change the left axis dimensions
        -pivotGrid.leftAxis.setDimensions([
        -    {
        -        dataIndex: 'person',
        -        direction: 'DESC',
        -        width    : 100
        -    },
        -    {
        -        dataIndex: 'product',
        -        direction: 'ASC',
        -        width    : 80
        -    }
        -]);
        -
        -pivotGrid.view.refresh(true);
        -
        - * This clears the previous dimensions on the axis and redraws the grid with the new dimensions. - */ -Ext.grid.PivotAxis = Ext.extend(Ext.Component, { - /** - * @cfg {String} orientation One of 'vertical' or 'horizontal'. Defaults to horizontal - */ - orientation: 'horizontal', - - /** - * @cfg {Number} defaultHeaderWidth The width to render each row header that does not have a width specified via - {@link #getRowGroupHeaders}. Defaults to 80. - */ - defaultHeaderWidth: 80, - - /** - * @private - * @cfg {Number} paddingWidth The amount of padding used by each cell. - * TODO: From 4.x onwards this can be removed as it won't be needed. For now it is used to account for the differences between - * the content box and border box measurement models - */ - paddingWidth: 7, - - /** - * Updates the dimensions used by this axis - * @param {Array} dimensions The new dimensions - */ - setDimensions: function(dimensions) { - this.dimensions = dimensions; - }, - - /** - * @private - * Builds the html table that contains the dimensions for this axis. This branches internally between vertical - * and horizontal orientations because the table structure is slightly different in each case - */ - onRender: function(ct, position) { - var rows = this.orientation == 'horizontal' - ? this.renderHorizontalRows() - : this.renderVerticalRows(); - - this.el = Ext.DomHelper.overwrite(ct.dom, {tag: 'table', cn: rows}, true); - }, - - /** - * @private - * Specialised renderer for horizontal oriented axes - * @return {Object} The HTML Domspec for a horizontal oriented axis - */ - renderHorizontalRows: function() { - var headers = this.buildHeaders(), - rowCount = headers.length, - rows = [], - cells, cols, colCount, i, j; - - for (i = 0; i < rowCount; i++) { - cells = []; - cols = headers[i].items; - colCount = cols.length; - - for (j = 0; j < colCount; j++) { - cells.push({ - tag: 'td', - html: cols[j].header, - colspan: cols[j].span - }); - } - - rows[i] = { - tag: 'tr', - cn: cells - }; - } - - return rows; - }, - - /** - * @private - * Specialised renderer for vertical oriented axes - * @return {Object} The HTML Domspec for a vertical oriented axis - */ - renderVerticalRows: function() { - var headers = this.buildHeaders(), - colCount = headers.length, - rowCells = [], - rows = [], - rowCount, col, row, colWidth, i, j; - - for (i = 0; i < colCount; i++) { - col = headers[i]; - colWidth = col.width || 80; - rowCount = col.items.length; - - for (j = 0; j < rowCount; j++) { - row = col.items[j]; - - rowCells[row.start] = rowCells[row.start] || []; - rowCells[row.start].push({ - tag : 'td', - html : row.header, - rowspan: row.span, - width : Ext.isBorderBox ? colWidth : colWidth - this.paddingWidth - }); - } - } - - rowCount = rowCells.length; - for (i = 0; i < rowCount; i++) { - rows[i] = { - tag: 'tr', - cn : rowCells[i] - }; - } - - return rows; - }, - - /** - * @private - * Returns the set of all unique tuples based on the bound store and dimension definitions. - * Internally we construct a new, temporary store to make use of the multi-sort capabilities of Store. In - * 4.x this functionality should have been moved to MixedCollection so this step should not be needed. - * @return {Array} All unique tuples - */ - getTuples: function() { - var newStore = new Ext.data.Store({}); - - newStore.data = this.store.data.clone(); - newStore.fields = this.store.fields; - - var sorters = [], - dimensions = this.dimensions, - length = dimensions.length, - i; - - for (i = 0; i < length; i++) { - sorters.push({ - field : dimensions[i].dataIndex, - direction: dimensions[i].direction || 'ASC' - }); - } - - newStore.sort(sorters); - - var records = newStore.data.items, - hashes = [], - tuples = [], - recData, hash, info, data, key; - - length = records.length; - - for (i = 0; i < length; i++) { - info = this.getRecordInfo(records[i]); - data = info.data; - hash = ""; - - for (key in data) { - hash += data[key] + '---'; - } - - if (hashes.indexOf(hash) == -1) { - hashes.push(hash); - tuples.push(info); - } - } - - newStore.destroy(); - - return tuples; - }, - - /** - * @private - */ - getRecordInfo: function(record) { - var dimensions = this.dimensions, - length = dimensions.length, - data = {}, - dimension, dataIndex, i; - - //get an object containing just the data we are interested in based on the configured dimensions - for (i = 0; i < length; i++) { - dimension = dimensions[i]; - dataIndex = dimension.dataIndex; - - data[dataIndex] = record.get(dataIndex); - } - - //creates a specialised matcher function for a given tuple. The returned function will return - //true if the record passed to it matches the dataIndex values of each dimension in this axis - var createMatcherFunction = function(data) { - return function(record) { - for (var dataIndex in data) { - if (record.get(dataIndex) != data[dataIndex]) { - return false; - } - } - - return true; - }; - }; - - return { - data: data, - matcher: createMatcherFunction(data) - }; - }, - - /** - * @private - * Uses the calculated set of tuples to build an array of headers that can be rendered into a table using rowspan or - * colspan. Basically this takes the set of tuples and spans any cells that run into one another, so if we had dimensions - * of Person and Product and several tuples containing different Products for the same Person, those Products would be - * spanned. - * @return {Array} The headers - */ - buildHeaders: function() { - var tuples = this.getTuples(), - rowCount = tuples.length, - dimensions = this.dimensions, - dimension, - colCount = dimensions.length, - headers = [], - tuple, rows, currentHeader, previousHeader, span, start, isLast, changed, i, j; - - for (i = 0; i < colCount; i++) { - dimension = dimensions[i]; - rows = []; - span = 0; - start = 0; - - for (j = 0; j < rowCount; j++) { - tuple = tuples[j]; - isLast = j == (rowCount - 1); - currentHeader = tuple.data[dimension.dataIndex]; - - /* - * 'changed' indicates that we need to create a new cell. This should be true whenever the cell - * above (previousHeader) is different from this cell, or when the cell on the previous dimension - * changed (e.g. if the current dimension is Product and the previous was Person, we need to start - * a new cell if Product is the same but Person changed, so we check the previous dimension and tuple) - */ - changed = previousHeader != undefined && previousHeader != currentHeader; - if (i > 0 && j > 0) { - changed = changed || tuple.data[dimensions[i-1].dataIndex] != tuples[j-1].data[dimensions[i-1].dataIndex]; - } - - if (changed) { - rows.push({ - header: previousHeader, - span : span, - start : start - }); - - start += span; - span = 0; - } - - if (isLast) { - rows.push({ - header: currentHeader, - span : span + 1, - start : start - }); - - start += span; - span = 0; - } - - previousHeader = currentHeader; - span++; - } - - headers.push({ - items: rows, - width: dimension.width || this.defaultHeaderWidth - }); - - previousHeader = undefined; - } - - return headers; - } -}); -// private -// This is a support class used internally by the Grid components -Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, { - maxDragWidth: 120, - - constructor : function(grid, hd, hd2){ - this.grid = grid; - this.view = grid.getView(); - this.ddGroup = "gridHeader" + this.grid.getGridEl().id; - Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd); - if(hd2){ - this.setHandleElId(Ext.id(hd)); - this.setOuterHandleElId(Ext.id(hd2)); - } - this.scroll = false; - }, - - getDragData : function(e){ - var t = Ext.lib.Event.getTarget(e), - h = this.view.findHeaderCell(t); - if(h){ - return {ddel: h.firstChild, header:h}; - } - return false; - }, - - onInitDrag : function(e){ - // keep the value here so we can restore it; - this.dragHeadersDisabled = this.view.headersDisabled; - this.view.headersDisabled = true; - var clone = this.dragData.ddel.cloneNode(true); - clone.id = Ext.id(); - clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px"; - this.proxy.update(clone); - return true; - }, - - afterValidDrop : function(){ - this.completeDrop(); - }, - - afterInvalidDrop : function(){ - this.completeDrop(); - }, - - completeDrop: function(){ - var v = this.view, - disabled = this.dragHeadersDisabled; - setTimeout(function(){ - v.headersDisabled = disabled; - }, 50); - } -}); - -// private -// This is a support class used internally by the Grid components -Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, { - proxyOffsets : [-4, -9], - fly: Ext.Element.fly, - - constructor : function(grid, hd, hd2){ - this.grid = grid; - this.view = grid.getView(); - // split the proxies so they don't interfere with mouse events - this.proxyTop = Ext.DomHelper.append(document.body, { - cls:"col-move-top", html:" " - }, true); - this.proxyBottom = Ext.DomHelper.append(document.body, { - cls:"col-move-bottom", html:" " - }, true); - this.proxyTop.hide = this.proxyBottom.hide = function(){ - this.setLeftTop(-100,-100); - this.setStyle("visibility", "hidden"); - }; - this.ddGroup = "gridHeader" + this.grid.getGridEl().id; - // temporarily disabled - //Ext.dd.ScrollManager.register(this.view.scroller.dom); - Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom); - }, - - getTargetFromEvent : function(e){ - var t = Ext.lib.Event.getTarget(e), - cindex = this.view.findCellIndex(t); - if(cindex !== false){ - return this.view.getHeaderCell(cindex); - } - }, - - nextVisible : function(h){ - var v = this.view, cm = this.grid.colModel; - h = h.nextSibling; - while(h){ - if(!cm.isHidden(v.getCellIndex(h))){ - return h; - } - h = h.nextSibling; - } - return null; - }, - - prevVisible : function(h){ - var v = this.view, cm = this.grid.colModel; - h = h.prevSibling; - while(h){ - if(!cm.isHidden(v.getCellIndex(h))){ - return h; - } - h = h.prevSibling; - } - return null; - }, - - positionIndicator : function(h, n, e){ - var x = Ext.lib.Event.getPageX(e), - r = Ext.lib.Dom.getRegion(n.firstChild), - px, - pt, - py = r.top + this.proxyOffsets[1]; - if((r.right - x) <= (r.right-r.left)/2){ - px = r.right+this.view.borderWidth; - pt = "after"; - }else{ - px = r.left; - pt = "before"; - } - - if(this.grid.colModel.isFixed(this.view.getCellIndex(n))){ - return false; - } - - px += this.proxyOffsets[0]; - this.proxyTop.setLeftTop(px, py); - this.proxyTop.show(); - if(!this.bottomOffset){ - this.bottomOffset = this.view.mainHd.getHeight(); - } - this.proxyBottom.setLeftTop(px, py+this.proxyTop.dom.offsetHeight+this.bottomOffset); - this.proxyBottom.show(); - return pt; - }, - - onNodeEnter : function(n, dd, e, data){ - if(data.header != n){ - this.positionIndicator(data.header, n, e); - } - }, - - onNodeOver : function(n, dd, e, data){ - var result = false; - if(data.header != n){ - result = this.positionIndicator(data.header, n, e); - } - if(!result){ - this.proxyTop.hide(); - this.proxyBottom.hide(); - } - return result ? this.dropAllowed : this.dropNotAllowed; - }, - - onNodeOut : function(n, dd, e, data){ - this.proxyTop.hide(); - this.proxyBottom.hide(); - }, - - onNodeDrop : function(n, dd, e, data){ - var h = data.header; - if(h != n){ - var cm = this.grid.colModel, - x = Ext.lib.Event.getPageX(e), - r = Ext.lib.Dom.getRegion(n.firstChild), - pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before", - oldIndex = this.view.getCellIndex(h), - newIndex = this.view.getCellIndex(n); - if(pt == "after"){ - newIndex++; - } - if(oldIndex < newIndex){ - newIndex--; - } - cm.moveColumn(oldIndex, newIndex); - return true; - } - return false; - } -}); - -Ext.grid.GridView.ColumnDragZone = Ext.extend(Ext.grid.HeaderDragZone, { - - constructor : function(grid, hd){ - Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null); - this.proxy.el.addClass('x-grid3-col-dd'); - }, - - handleMouseDown : function(e){ - }, - - callHandleMouseDown : function(e){ - Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e); - } -});// private -// This is a support class used internally by the Grid components -Ext.grid.SplitDragZone = Ext.extend(Ext.dd.DDProxy, { - fly: Ext.Element.fly, - - constructor : function(grid, hd, hd2){ - this.grid = grid; - this.view = grid.getView(); - this.proxy = this.view.resizeProxy; - Ext.grid.SplitDragZone.superclass.constructor.call(this, hd, - "gridSplitters" + this.grid.getGridEl().id, { - dragElId : Ext.id(this.proxy.dom), resizeFrame:false - }); - this.setHandleElId(Ext.id(hd)); - this.setOuterHandleElId(Ext.id(hd2)); - this.scroll = false; - }, - - b4StartDrag : function(x, y){ - this.view.headersDisabled = true; - this.proxy.setHeight(this.view.mainWrap.getHeight()); - var w = this.cm.getColumnWidth(this.cellIndex); - var minw = Math.max(w-this.grid.minColumnWidth, 0); - this.resetConstraints(); - this.setXConstraint(minw, 1000); - this.setYConstraint(0, 0); - this.minX = x - minw; - this.maxX = x + 1000; - this.startPos = x; - Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y); - }, - - - handleMouseDown : function(e){ - var ev = Ext.EventObject.setEvent(e); - var t = this.fly(ev.getTarget()); - if(t.hasClass("x-grid-split")){ - this.cellIndex = this.view.getCellIndex(t.dom); - this.split = t.dom; - this.cm = this.grid.colModel; - if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){ - Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this, arguments); - } - } - }, - - endDrag : function(e){ - this.view.headersDisabled = false; - var endX = Math.max(this.minX, Ext.lib.Event.getPageX(e)); - var diff = endX - this.startPos; - this.view.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff); - }, - - autoOffset : function(){ - this.setDelta(0,0); - } -});/** - * @class Ext.grid.GridDragZone - * @extends Ext.dd.DragZone - *

        A customized implementation of a {@link Ext.dd.DragZone DragZone} which provides default implementations of two of the - * template methods of DragZone to enable dragging of the selected rows of a GridPanel.

        - *

        A cooperating {@link Ext.dd.DropZone DropZone} must be created who's template method implementations of - * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver}, - * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop}

        are able - * to process the {@link #getDragData data} which is provided. - */ -Ext.grid.GridDragZone = function(grid, config){ - this.view = grid.getView(); - Ext.grid.GridDragZone.superclass.constructor.call(this, this.view.mainBody.dom, config); - this.scroll = false; - this.grid = grid; - this.ddel = document.createElement('div'); - this.ddel.className = 'x-grid-dd-wrap'; -}; - -Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, { - ddGroup : "GridDD", - - /** - *

        The provided implementation of the getDragData method which collects the data to be dragged from the GridPanel on mousedown.

        - *

        This data is available for processing in the {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver}, - * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop} methods of a cooperating {@link Ext.dd.DropZone DropZone}.

        - *

        The data object contains the following properties:

          - *
        • grid : Ext.Grid.GridPanel
          The GridPanel from which the data is being dragged.
        • - *
        • ddel : htmlElement
          An htmlElement which provides the "picture" of the data being dragged.
        • - *
        • rowIndex : Number
          The index of the row which receieved the mousedown gesture which triggered the drag.
        • - *
        • selections : Array
          An Array of the selected Records which are being dragged from the GridPanel.
        • - *

        - */ - getDragData : function(e){ - var t = Ext.lib.Event.getTarget(e); - var rowIndex = this.view.findRowIndex(t); - if(rowIndex !== false){ - var sm = this.grid.selModel; - if(!sm.isSelected(rowIndex) || e.hasModifier()){ - sm.handleMouseDown(this.grid, rowIndex, e); - } - return {grid: this.grid, ddel: this.ddel, rowIndex: rowIndex, selections:sm.getSelections()}; - } - return false; - }, - - /** - *

        The provided implementation of the onInitDrag method. Sets the innerHTML of the drag proxy which provides the "picture" - * of the data being dragged.

        - *

        The innerHTML data is found by calling the owning GridPanel's {@link Ext.grid.GridPanel#getDragDropText getDragDropText}.

        - */ - onInitDrag : function(e){ - var data = this.dragData; - this.ddel.innerHTML = this.grid.getDragDropText(); - this.proxy.update(this.ddel); - // fire start drag? - }, - - /** - * An empty immplementation. Implement this to provide behaviour after a repair of an invalid drop. An implementation might highlight - * the selected rows to show that they have not been dragged. - */ - afterRepair : function(){ - this.dragging = false; - }, - - /** - *

        An empty implementation. Implement this to provide coordinates for the drag proxy to slide back to after an invalid drop.

        - *

        Called before a repair of an invalid drop to get the XY to animate to.

        - * @param {EventObject} e The mouse up event - * @return {Array} The xy location (e.g. [100, 200]) - */ - getRepairXY : function(e, data){ - return false; - }, - - onEndDrag : function(data, e){ - // fire end drag? - }, - - onValidDrop : function(dd, e, id){ - // fire drag drop? - this.hideProxy(); - }, - - beforeInvalidDrop : function(e, id){ - - } -}); -/** - * @class Ext.grid.ColumnModel - * @extends Ext.util.Observable - *

        After the data has been read into the client side cache ({@link Ext.data.Store Store}), - * the ColumnModel is used to configure how and what parts of that data will be displayed in the - * vertical slices (columns) of the grid. The Ext.grid.ColumnModel Class is the default implementation - * of a ColumnModel used by implentations of {@link Ext.grid.GridPanel GridPanel}.

        - *

        Data is mapped into the store's records and then indexed into the ColumnModel using the - * {@link Ext.grid.Column#dataIndex dataIndex}:

        - *
        
        -{data source} == mapping ==> {data store} == {@link Ext.grid.Column#dataIndex dataIndex} ==> {ColumnModel}
        - * 
        - *

        Each {@link Ext.grid.Column Column} in the grid's ColumnModel is configured with a - * {@link Ext.grid.Column#dataIndex dataIndex} to specify how the data within - * each record in the store is indexed into the ColumnModel.

        - *

        There are two ways to initialize the ColumnModel class:

        - *

        Initialization Method 1: an Array

        -
        
        - var colModel = new Ext.grid.ColumnModel([
        -    { header: "Ticker", width: 60, sortable: true},
        -    { header: "Company Name", width: 150, sortable: true, id: 'company'},
        -    { header: "Market Cap.", width: 100, sortable: true},
        -    { header: "$ Sales", width: 100, sortable: true, renderer: money},
        -    { header: "Employees", width: 100, sortable: true, resizable: false}
        - ]);
        - 
        - *

        The ColumnModel may be initialized with an Array of {@link Ext.grid.Column} column configuration - * objects to define the initial layout / display of the columns in the Grid. The order of each - * {@link Ext.grid.Column} column configuration object within the specified Array defines the initial - * order of the column display. A Column's display may be initially hidden using the - * {@link Ext.grid.Column#hidden hidden} config property (and then shown using the column - * header menu). Fields that are not included in the ColumnModel will not be displayable at all.

        - *

        How each column in the grid correlates (maps) to the {@link Ext.data.Record} field in the - * {@link Ext.data.Store Store} the column draws its data from is configured through the - * {@link Ext.grid.Column#dataIndex dataIndex}. If the - * {@link Ext.grid.Column#dataIndex dataIndex} is not explicitly defined (as shown in the - * example above) it will use the column configuration's index in the Array as the index.

        - *

        See {@link Ext.grid.Column} for additional configuration options for each column.

        - *

        Initialization Method 2: an Object

        - *

        In order to use configuration options from Ext.grid.ColumnModel, an Object may be used to - * initialize the ColumnModel. The column configuration Array will be specified in the {@link #columns} - * config property. The {@link #defaults} config property can be used to apply defaults - * for all columns, e.g.:

        
        - var colModel = new Ext.grid.ColumnModel({
        -    columns: [
        -        { header: "Ticker", width: 60, menuDisabled: false},
        -        { header: "Company Name", width: 150, id: 'company'},
        -        { header: "Market Cap."},
        -        { header: "$ Sales", renderer: money},
        -        { header: "Employees", resizable: false}
        -    ],
        -    defaults: {
        -        sortable: true,
        -        menuDisabled: true,
        -        width: 100
        -    },
        -    listeners: {
        -        {@link #hiddenchange}: function(cm, colIndex, hidden) {
        -            saveConfig(colIndex, hidden);
        -        }
        -    }
        -});
        - 
        - *

        In both examples above, the ability to apply a CSS class to all cells in a column (including the - * header) is demonstrated through the use of the {@link Ext.grid.Column#id id} config - * option. This column could be styled by including the following css:

        
        - //add this css *after* the core css is loaded
        -.x-grid3-td-company {
        -    color: red; // entire column will have red font
        -}
        -// modify the header row only, adding an icon to the column header
        -.x-grid3-hd-company {
        -    background: transparent
        -        url(../../resources/images/icons/silk/building.png)
        -        no-repeat 3px 3px ! important;
        -        padding-left:20px;
        -}
        - 
        - * Note that the "Company Name" column could be specified as the - * {@link Ext.grid.GridPanel}.{@link Ext.grid.GridPanel#autoExpandColumn autoExpandColumn}. - * @constructor - * @param {Mixed} config Specify either an Array of {@link Ext.grid.Column} configuration objects or specify - * a configuration Object (see introductory section discussion utilizing Initialization Method 2 above). - */ -Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { - /** - * @cfg {Number} defaultWidth (optional) The width of columns which have no {@link #width} - * specified (defaults to 100). This property shall preferably be configured through the - * {@link #defaults} config property. - */ - defaultWidth: 100, - - /** - * @cfg {Boolean} defaultSortable (optional) Default sortable of columns which have no - * sortable specified (defaults to false). This property shall preferably be configured - * through the {@link #defaults} config property. - */ - defaultSortable: false, - - /** - * @cfg {Array} columns An Array of object literals. The config options defined by - * {@link Ext.grid.Column} are the options which may appear in the object literal for each - * individual column definition. - */ - - /** - * @cfg {Object} defaults Object literal which will be used to apply {@link Ext.grid.Column} - * configuration options to all {@link #columns}. Configuration options specified with - * individual {@link Ext.grid.Column column} configs will supersede these {@link #defaults}. - */ - - constructor : function(config) { - /** - * An Array of {@link Ext.grid.Column Column definition} objects representing the configuration - * of this ColumnModel. See {@link Ext.grid.Column} for the configuration properties that may - * be specified. - * @property config - * @type Array - */ - if (config.columns) { - Ext.apply(this, config); - this.setConfig(config.columns, true); - } else { - this.setConfig(config, true); - } - - this.addEvents( - /** - * @event widthchange - * Fires when the width of a column is programmaticially changed using - * {@link #setColumnWidth}. - * Note internal resizing suppresses the event from firing. See also - * {@link Ext.grid.GridPanel}.{@link #columnresize}. - * @param {ColumnModel} this - * @param {Number} columnIndex The column index - * @param {Number} newWidth The new width - */ - "widthchange", - - /** - * @event headerchange - * Fires when the text of a header changes. - * @param {ColumnModel} this - * @param {Number} columnIndex The column index - * @param {String} newText The new header text - */ - "headerchange", - - /** - * @event hiddenchange - * Fires when a column is hidden or "unhidden". - * @param {ColumnModel} this - * @param {Number} columnIndex The column index - * @param {Boolean} hidden true if hidden, false otherwise - */ - "hiddenchange", - - /** - * @event columnmoved - * Fires when a column is moved. - * @param {ColumnModel} this - * @param {Number} oldIndex - * @param {Number} newIndex - */ - "columnmoved", - - /** - * @event configchange - * Fires when the configuration is changed - * @param {ColumnModel} this - */ - "configchange" - ); - - Ext.grid.ColumnModel.superclass.constructor.call(this); - }, - - /** - * Returns the id of the column at the specified index. - * @param {Number} index The column index - * @return {String} the id - */ - getColumnId : function(index) { - return this.config[index].id; - }, - - getColumnAt : function(index) { - return this.config[index]; - }, - - /** - *

        Reconfigures this column model according to the passed Array of column definition objects. - * For a description of the individual properties of a column definition object, see the - * Config Options.

        - *

        Causes the {@link #configchange} event to be fired. A {@link Ext.grid.GridPanel GridPanel} - * using this ColumnModel will listen for this event and refresh its UI automatically.

        - * @param {Array} config Array of Column definition objects. - * @param {Boolean} initial Specify true to bypass cleanup which deletes the totalWidth - * and destroys existing editors. - */ - setConfig : function(config, initial) { - var i, c, len; - - if (!initial) { // cleanup - delete this.totalWidth; - - for (i = 0, len = this.config.length; i < len; i++) { - c = this.config[i]; - - if (c.setEditor) { - //check here, in case we have a special column like a CheckboxSelectionModel - c.setEditor(null); - } - } - } - - // backward compatibility - this.defaults = Ext.apply({ - width: this.defaultWidth, - sortable: this.defaultSortable - }, this.defaults); - - this.config = config; - this.lookup = {}; - - for (i = 0, len = config.length; i < len; i++) { - c = Ext.applyIf(config[i], this.defaults); - - // if no id, create one using column's ordinal position - if (Ext.isEmpty(c.id)) { - c.id = i; - } - - if (!c.isColumn) { - var Cls = Ext.grid.Column.types[c.xtype || 'gridcolumn']; - c = new Cls(c); - config[i] = c; - } - - this.lookup[c.id] = c; - } - - if (!initial) { - this.fireEvent('configchange', this); - } - }, - - /** - * Returns the column for a specified id. - * @param {String} id The column id - * @return {Object} the column - */ - getColumnById : function(id) { - return this.lookup[id]; - }, - - /** - * Returns the index for a specified column id. - * @param {String} id The column id - * @return {Number} the index, or -1 if not found - */ - getIndexById : function(id) { - for (var i = 0, len = this.config.length; i < len; i++) { - if (this.config[i].id == id) { - return i; - } - } - return -1; - }, - - /** - * Moves a column from one position to another. - * @param {Number} oldIndex The index of the column to move. - * @param {Number} newIndex The position at which to reinsert the coolumn. - */ - moveColumn : function(oldIndex, newIndex) { - var config = this.config, - c = config[oldIndex]; - - config.splice(oldIndex, 1); - config.splice(newIndex, 0, c); - this.dataMap = null; - this.fireEvent("columnmoved", this, oldIndex, newIndex); - }, - - /** - * Returns the number of columns. - * @param {Boolean} visibleOnly Optional. Pass as true to only include visible columns. - * @return {Number} - */ - getColumnCount : function(visibleOnly) { - var length = this.config.length, - c = 0, - i; - - if (visibleOnly === true) { - for (i = 0; i < length; i++) { - if (!this.isHidden(i)) { - c++; - } - } - - return c; - } - - return length; - }, - - /** - * Returns the column configs that return true by the passed function that is called - * with (columnConfig, index) -
        
        -// returns an array of column config objects for all hidden columns
        -var columns = grid.getColumnModel().getColumnsBy(function(c){
        -  return c.hidden;
        -});
        -
        - * @param {Function} fn A function which, when passed a {@link Ext.grid.Column Column} object, must - * return true if the column is to be included in the returned Array. - * @param {Object} scope (optional) The scope (this reference) in which the function - * is executed. Defaults to this ColumnModel. - * @return {Array} result - */ - getColumnsBy : function(fn, scope) { - var config = this.config, - length = config.length, - result = [], - i, c; - - for (i = 0; i < length; i++){ - c = config[i]; - - if (fn.call(scope || this, c, i) === true) { - result[result.length] = c; - } - } - - return result; - }, - - /** - * Returns true if the specified column is sortable. - * @param {Number} col The column index - * @return {Boolean} - */ - isSortable : function(col) { - return !!this.config[col].sortable; - }, - - /** - * Returns true if the specified column menu is disabled. - * @param {Number} col The column index - * @return {Boolean} - */ - isMenuDisabled : function(col) { - return !!this.config[col].menuDisabled; - }, - - /** - * Returns the rendering (formatting) function defined for the column. - * @param {Number} col The column index. - * @return {Function} The function used to render the cell. See {@link #setRenderer}. - */ - getRenderer : function(col) { - return this.config[col].renderer || Ext.grid.ColumnModel.defaultRenderer; - }, - - getRendererScope : function(col) { - return this.config[col].scope; - }, - - /** - * Sets the rendering (formatting) function for a column. See {@link Ext.util.Format} for some - * default formatting functions. - * @param {Number} col The column index - * @param {Function} fn The function to use to process the cell's raw data - * to return HTML markup for the grid view. The render function is called with - * the following parameters:
          - *
        • value : Object

          The data value for the cell.

        • - *
        • metadata : Object

          An object in which you may set the following attributes:

            - *
          • css : String

            A CSS class name to add to the cell's TD element.

          • - *
          • attr : String

            An HTML attribute definition string to apply to the data container element within the table cell - * (e.g. 'style="color:red;"').

        • - *
        • record : Ext.data.record

          The {@link Ext.data.Record} from which the data was extracted.

        • - *
        • rowIndex : Number

          Row index

        • - *
        • colIndex : Number

          Column index

        • - *
        • store : Ext.data.Store

          The {@link Ext.data.Store} object from which the Record was extracted.

        - */ - setRenderer : function(col, fn) { - this.config[col].renderer = fn; - }, - - /** - * Returns the width for the specified column. - * @param {Number} col The column index - * @return {Number} - */ - getColumnWidth : function(col) { - var width = this.config[col].width; - if(typeof width != 'number'){ - width = this.defaultWidth; - } - return width; - }, - - /** - * Sets the width for a column. - * @param {Number} col The column index - * @param {Number} width The new width - * @param {Boolean} suppressEvent True to suppress firing the {@link #widthchange} - * event. Defaults to false. - */ - setColumnWidth : function(col, width, suppressEvent) { - this.config[col].width = width; - this.totalWidth = null; - - if (!suppressEvent) { - this.fireEvent("widthchange", this, col, width); - } - }, - - /** - * Returns the total width of all columns. - * @param {Boolean} includeHidden True to include hidden column widths - * @return {Number} - */ - getTotalWidth : function(includeHidden) { - if (!this.totalWidth) { - this.totalWidth = 0; - for (var i = 0, len = this.config.length; i < len; i++) { - if (includeHidden || !this.isHidden(i)) { - this.totalWidth += this.getColumnWidth(i); - } - } - } - return this.totalWidth; - }, - - /** - * Returns the header for the specified column. - * @param {Number} col The column index - * @return {String} - */ - getColumnHeader : function(col) { - return this.config[col].header; - }, - - /** - * Sets the header for a column. - * @param {Number} col The column index - * @param {String} header The new header - */ - setColumnHeader : function(col, header) { - this.config[col].header = header; - this.fireEvent("headerchange", this, col, header); - }, - - /** - * Returns the tooltip for the specified column. - * @param {Number} col The column index - * @return {String} - */ - getColumnTooltip : function(col) { - return this.config[col].tooltip; - }, - /** - * Sets the tooltip for a column. - * @param {Number} col The column index - * @param {String} tooltip The new tooltip - */ - setColumnTooltip : function(col, tooltip) { - this.config[col].tooltip = tooltip; - }, - - /** - * Returns the dataIndex for the specified column. -
        
        -// Get field name for the column
        -var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
        -
        - * @param {Number} col The column index - * @return {String} The column's dataIndex - */ - getDataIndex : function(col) { - return this.config[col].dataIndex; - }, - - /** - * Sets the dataIndex for a column. - * @param {Number} col The column index - * @param {String} dataIndex The new dataIndex - */ - setDataIndex : function(col, dataIndex) { - this.config[col].dataIndex = dataIndex; - }, - - /** - * Finds the index of the first matching column for the given dataIndex. - * @param {String} col The dataIndex to find - * @return {Number} The column index, or -1 if no match was found - */ - findColumnIndex : function(dataIndex) { - var c = this.config; - for(var i = 0, len = c.length; i < len; i++){ - if(c[i].dataIndex == dataIndex){ - return i; - } - } - return -1; - }, - - /** - * Returns true if the cell is editable. -
        
        -var store = new Ext.data.Store({...});
        -var colModel = new Ext.grid.ColumnModel({
        -  columns: [...],
        -  isCellEditable: function(col, row) {
        -    var record = store.getAt(row);
        -    if (record.get('readonly')) { // replace with your condition
        -      return false;
        -    }
        -    return Ext.grid.ColumnModel.prototype.isCellEditable.call(this, col, row);
        -  }
        -});
        -var grid = new Ext.grid.GridPanel({
        -  store: store,
        -  colModel: colModel,
        -  ...
        -});
        -
        - * @param {Number} colIndex The column index - * @param {Number} rowIndex The row index - * @return {Boolean} - */ - isCellEditable : function(colIndex, rowIndex) { - var c = this.config[colIndex], - ed = c.editable; - - //force boolean - return !!(ed || (!Ext.isDefined(ed) && c.editor)); - }, - - /** - * Returns the editor defined for the cell/column. - * @param {Number} colIndex The column index - * @param {Number} rowIndex The row index - * @return {Ext.Editor} The {@link Ext.Editor Editor} that was created to wrap - * the {@link Ext.form.Field Field} used to edit the cell. - */ - getCellEditor : function(colIndex, rowIndex) { - return this.config[colIndex].getCellEditor(rowIndex); - }, - - /** - * Sets if a column is editable. - * @param {Number} col The column index - * @param {Boolean} editable True if the column is editable - */ - setEditable : function(col, editable) { - this.config[col].editable = editable; - }, - - /** - * Returns true if the column is {@link Ext.grid.Column#hidden hidden}, - * false otherwise. - * @param {Number} colIndex The column index - * @return {Boolean} - */ - isHidden : function(colIndex) { - return !!this.config[colIndex].hidden; // ensure returns boolean - }, - - /** - * Returns true if the column is {@link Ext.grid.Column#fixed fixed}, - * false otherwise. - * @param {Number} colIndex The column index - * @return {Boolean} - */ - isFixed : function(colIndex) { - return !!this.config[colIndex].fixed; - }, - - /** - * Returns true if the column can be resized - * @return {Boolean} - */ - isResizable : function(colIndex) { - return colIndex >= 0 && this.config[colIndex].resizable !== false && this.config[colIndex].fixed !== true; - }, - - /** - * Sets if a column is hidden. -
        
        -myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first column).
        -
        - * @param {Number} colIndex The column index - * @param {Boolean} hidden True if the column is hidden - */ - setHidden : function(colIndex, hidden) { - var c = this.config[colIndex]; - if(c.hidden !== hidden){ - c.hidden = hidden; - this.totalWidth = null; - this.fireEvent("hiddenchange", this, colIndex, hidden); - } - }, - - /** - * Sets the editor for a column and destroys the prior editor. - * @param {Number} col The column index - * @param {Object} editor The editor object - */ - setEditor : function(col, editor) { - this.config[col].setEditor(editor); - }, - - /** - * Destroys this column model by purging any event listeners. Destroys and dereferences all Columns. - */ - destroy : function() { - var length = this.config.length, - i = 0; - - for (; i < length; i++){ - this.config[i].destroy(); // Column's destroy encapsulates all cleanup. - } - delete this.config; - delete this.lookup; - this.purgeListeners(); - }, - - /** - * @private - * Setup any saved state for the column, ensures that defaults are applied. - */ - setState : function(col, state) { - state = Ext.applyIf(state, this.defaults); - Ext.apply(this.config[col], state); - } -}); - -// private -Ext.grid.ColumnModel.defaultRenderer = function(value) { - if (typeof value == "string" && value.length < 1) { - return " "; - } - return value; -};/** - * @class Ext.grid.AbstractSelectionModel - * @extends Ext.util.Observable - * Abstract base class for grid SelectionModels. It provides the interface that should be - * implemented by descendant classes. This class should not be directly instantiated. - * @constructor - */ -Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable, { - /** - * The GridPanel for which this SelectionModel is handling selection. Read-only. - * @type Object - * @property grid - */ - - constructor : function(){ - this.locked = false; - Ext.grid.AbstractSelectionModel.superclass.constructor.call(this); - }, - - /** @ignore Called by the grid automatically. Do not call directly. */ - init : function(grid){ - this.grid = grid; - if(this.lockOnInit){ - delete this.lockOnInit; - this.locked = false; - this.lock(); - } - this.initEvents(); - }, - - /** - * Locks the selections. - */ - lock : function(){ - if(!this.locked){ - this.locked = true; - // If the grid has been set, then the view is already initialized. - var g = this.grid; - if(g){ - g.getView().on({ - scope: this, - beforerefresh: this.sortUnLock, - refresh: this.sortLock - }); - }else{ - this.lockOnInit = true; - } - } - }, - - // set the lock states before and after a view refresh - sortLock : function() { - this.locked = true; - }, - - // set the lock states before and after a view refresh - sortUnLock : function() { - this.locked = false; - }, - - /** - * Unlocks the selections. - */ - unlock : function(){ - if(this.locked){ - this.locked = false; - var g = this.grid, - gv; - - // If the grid has been set, then the view is already initialized. - if(g){ - gv = g.getView(); - gv.un('beforerefresh', this.sortUnLock, this); - gv.un('refresh', this.sortLock, this); - }else{ - delete this.lockOnInit; - } - } - }, - - /** - * Returns true if the selections are locked. - * @return {Boolean} - */ - isLocked : function(){ - return this.locked; - }, - - destroy: function(){ - this.unlock(); - this.purgeListeners(); - } -});/** - * @class Ext.grid.RowSelectionModel - * @extends Ext.grid.AbstractSelectionModel - * The default SelectionModel used by {@link Ext.grid.GridPanel}. - * It supports multiple selections and keyboard selection/navigation. The objects stored - * as selections and returned by {@link #getSelected}, and {@link #getSelections} are - * the {@link Ext.data.Record Record}s which provide the data for the selected rows. - * @constructor - * @param {Object} config - */ -Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { - /** - * @cfg {Boolean} singleSelect - * true to allow selection of only one row at a time (defaults to false - * allowing multiple selections) - */ - singleSelect : false, - - constructor : function(config){ - Ext.apply(this, config); - this.selections = new Ext.util.MixedCollection(false, function(o){ - return o.id; - }); - - this.last = false; - this.lastActive = false; - - this.addEvents( - /** - * @event selectionchange - * Fires when the selection changes - * @param {SelectionModel} this - */ - 'selectionchange', - /** - * @event beforerowselect - * Fires before a row is selected, return false to cancel the selection. - * @param {SelectionModel} this - * @param {Number} rowIndex The index to be selected - * @param {Boolean} keepExisting False if other selections will be cleared - * @param {Record} record The record to be selected - */ - 'beforerowselect', - /** - * @event rowselect - * Fires when a row is selected. - * @param {SelectionModel} this - * @param {Number} rowIndex The selected index - * @param {Ext.data.Record} r The selected record - */ - 'rowselect', - /** - * @event rowdeselect - * Fires when a row is deselected. To prevent deselection - * {@link Ext.grid.AbstractSelectionModel#lock lock the selections}. - * @param {SelectionModel} this - * @param {Number} rowIndex - * @param {Record} record - */ - 'rowdeselect' - ); - Ext.grid.RowSelectionModel.superclass.constructor.call(this); - }, - - /** - * @cfg {Boolean} moveEditorOnEnter - * false to turn off moving the editor to the next row down when the enter key is pressed - * or the next row up when shift + enter keys are pressed. - */ - // private - initEvents : function(){ - - if(!this.grid.enableDragDrop && !this.grid.enableDrag){ - this.grid.on('rowmousedown', this.handleMouseDown, this); - } - - this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), { - up: this.onKeyPress, - down: this.onKeyPress, - scope: this - }); - - this.grid.getView().on({ - scope: this, - refresh: this.onRefresh, - rowupdated: this.onRowUpdated, - rowremoved: this.onRemove - }); - }, - - onKeyPress : function(e, name){ - var up = name == 'up', - method = up ? 'selectPrevious' : 'selectNext', - add = up ? -1 : 1, - last; - if(!e.shiftKey || this.singleSelect){ - this[method](false); - }else if(this.last !== false && this.lastActive !== false){ - last = this.last; - this.selectRange(this.last, this.lastActive + add); - this.grid.getView().focusRow(this.lastActive); - if(last !== false){ - this.last = last; - } - }else{ - this.selectFirstRow(); - } - }, - - // private - onRefresh : function(){ - var ds = this.grid.store, - s = this.getSelections(), - i = 0, - len = s.length, - index, r; - - this.silent = true; - this.clearSelections(true); - for(; i < len; i++){ - r = s[i]; - if((index = ds.indexOfId(r.id)) != -1){ - this.selectRow(index, true); - } - } - if(s.length != this.selections.getCount()){ - this.fireEvent('selectionchange', this); - } - this.silent = false; - }, - - // private - onRemove : function(v, index, r){ - if(this.selections.remove(r) !== false){ - this.fireEvent('selectionchange', this); - } - }, - - // private - onRowUpdated : function(v, index, r){ - if(this.isSelected(r)){ - v.onRowSelect(index); - } - }, - - /** - * Select records. - * @param {Array} records The records to select - * @param {Boolean} keepExisting (optional) true to keep existing selections - */ - selectRecords : function(records, keepExisting){ - if(!keepExisting){ - this.clearSelections(); - } - var ds = this.grid.store, - i = 0, - len = records.length; - for(; i < len; i++){ - this.selectRow(ds.indexOf(records[i]), true); - } - }, - - /** - * Gets the number of selected rows. - * @return {Number} - */ - getCount : function(){ - return this.selections.length; - }, - - /** - * Selects the first row in the grid. - */ - selectFirstRow : function(){ - this.selectRow(0); - }, - - /** - * Select the last row. - * @param {Boolean} keepExisting (optional) true to keep existing selections - */ - selectLastRow : function(keepExisting){ - this.selectRow(this.grid.store.getCount() - 1, keepExisting); - }, - - /** - * Selects the row immediately following the last selected row. - * @param {Boolean} keepExisting (optional) true to keep existing selections - * @return {Boolean} true if there is a next row, else false - */ - selectNext : function(keepExisting){ - if(this.hasNext()){ - this.selectRow(this.last+1, keepExisting); - this.grid.getView().focusRow(this.last); - return true; - } - return false; - }, - - /** - * Selects the row that precedes the last selected row. - * @param {Boolean} keepExisting (optional) true to keep existing selections - * @return {Boolean} true if there is a previous row, else false - */ - selectPrevious : function(keepExisting){ - if(this.hasPrevious()){ - this.selectRow(this.last-1, keepExisting); - this.grid.getView().focusRow(this.last); - return true; - } - return false; - }, - - /** - * Returns true if there is a next record to select - * @return {Boolean} - */ - hasNext : function(){ - return this.last !== false && (this.last+1) < this.grid.store.getCount(); - }, - - /** - * Returns true if there is a previous record to select - * @return {Boolean} - */ - hasPrevious : function(){ - return !!this.last; - }, - - - /** - * Returns the selected records - * @return {Array} Array of selected records - */ - getSelections : function(){ - return [].concat(this.selections.items); - }, - - /** - * Returns the first selected record. - * @return {Record} - */ - getSelected : function(){ - return this.selections.itemAt(0); - }, - - /** - * Calls the passed function with each selection. If the function returns - * false, iteration is stopped and this function returns - * false. Otherwise it returns true. - * @param {Function} fn The function to call upon each iteration. It is passed the selected {@link Ext.data.Record Record}. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to this RowSelectionModel. - * @return {Boolean} true if all selections were iterated - */ - each : function(fn, scope){ - var s = this.getSelections(), - i = 0, - len = s.length; - - for(; i < len; i++){ - if(fn.call(scope || this, s[i], i) === false){ - return false; - } - } - return true; - }, - - /** - * Clears all selections if the selection model - * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}. - * @param {Boolean} fast (optional) true to bypass the - * conditional checks and events described in {@link #deselectRow}. - */ - clearSelections : function(fast){ - if(this.isLocked()){ - return; - } - if(fast !== true){ - var ds = this.grid.store, - s = this.selections; - s.each(function(r){ - this.deselectRow(ds.indexOfId(r.id)); - }, this); - s.clear(); - }else{ - this.selections.clear(); - } - this.last = false; - }, - - - /** - * Selects all rows if the selection model - * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}. - */ - selectAll : function(){ - if(this.isLocked()){ - return; - } - this.selections.clear(); - for(var i = 0, len = this.grid.store.getCount(); i < len; i++){ - this.selectRow(i, true); - } - }, - - /** - * Returns true if there is a selection. - * @return {Boolean} - */ - hasSelection : function(){ - return this.selections.length > 0; - }, - - /** - * Returns true if the specified row is selected. - * @param {Number/Record} index The record or index of the record to check - * @return {Boolean} - */ - isSelected : function(index){ - var r = Ext.isNumber(index) ? this.grid.store.getAt(index) : index; - return (r && this.selections.key(r.id) ? true : false); - }, - - /** - * Returns true if the specified record id is selected. - * @param {String} id The id of record to check - * @return {Boolean} - */ - isIdSelected : function(id){ - return (this.selections.key(id) ? true : false); - }, - - // private - handleMouseDown : function(g, rowIndex, e){ - if(e.button !== 0 || this.isLocked()){ - return; - } - var view = this.grid.getView(); - if(e.shiftKey && !this.singleSelect && this.last !== false){ - var last = this.last; - this.selectRange(last, rowIndex, e.ctrlKey); - this.last = last; // reset the last - view.focusRow(rowIndex); - }else{ - var isSelected = this.isSelected(rowIndex); - if(e.ctrlKey && isSelected){ - this.deselectRow(rowIndex); - }else if(!isSelected || this.getCount() > 1){ - this.selectRow(rowIndex, e.ctrlKey || e.shiftKey); - view.focusRow(rowIndex); - } - } - }, - - /** - * Selects multiple rows. - * @param {Array} rows Array of the indexes of the row to select - * @param {Boolean} keepExisting (optional) true to keep - * existing selections (defaults to false) - */ - selectRows : function(rows, keepExisting){ - if(!keepExisting){ - this.clearSelections(); - } - for(var i = 0, len = rows.length; i < len; i++){ - this.selectRow(rows[i], true); - } - }, - - /** - * Selects a range of rows if the selection model - * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}. - * All rows in between startRow and endRow are also selected. - * @param {Number} startRow The index of the first row in the range - * @param {Number} endRow The index of the last row in the range - * @param {Boolean} keepExisting (optional) True to retain existing selections - */ - selectRange : function(startRow, endRow, keepExisting){ - var i; - if(this.isLocked()){ - return; - } - if(!keepExisting){ - this.clearSelections(); - } - if(startRow <= endRow){ - for(i = startRow; i <= endRow; i++){ - this.selectRow(i, true); - } - }else{ - for(i = startRow; i >= endRow; i--){ - this.selectRow(i, true); - } - } - }, - - /** - * Deselects a range of rows if the selection model - * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}. - * All rows in between startRow and endRow are also deselected. - * @param {Number} startRow The index of the first row in the range - * @param {Number} endRow The index of the last row in the range - */ - deselectRange : function(startRow, endRow, preventViewNotify){ - if(this.isLocked()){ - return; - } - for(var i = startRow; i <= endRow; i++){ - this.deselectRow(i, preventViewNotify); - } - }, - - /** - * Selects a row. Before selecting a row, checks if the selection model - * {@link Ext.grid.AbstractSelectionModel#isLocked is locked} and fires the - * {@link #beforerowselect} event. If these checks are satisfied the row - * will be selected and followed up by firing the {@link #rowselect} and - * {@link #selectionchange} events. - * @param {Number} row The index of the row to select - * @param {Boolean} keepExisting (optional) true to keep existing selections - * @param {Boolean} preventViewNotify (optional) Specify true to - * prevent notifying the view (disables updating the selected appearance) - */ - selectRow : function(index, keepExisting, preventViewNotify){ - if(this.isLocked() || (index < 0 || index >= this.grid.store.getCount()) || (keepExisting && this.isSelected(index))){ - return; - } - var r = this.grid.store.getAt(index); - if(r && this.fireEvent('beforerowselect', this, index, keepExisting, r) !== false){ - if(!keepExisting || this.singleSelect){ - this.clearSelections(); - } - this.selections.add(r); - this.last = this.lastActive = index; - if(!preventViewNotify){ - this.grid.getView().onRowSelect(index); - } - if(!this.silent){ - this.fireEvent('rowselect', this, index, r); - this.fireEvent('selectionchange', this); - } - } - }, - - /** - * Deselects a row. Before deselecting a row, checks if the selection model - * {@link Ext.grid.AbstractSelectionModel#isLocked is locked}. - * If this check is satisfied the row will be deselected and followed up by - * firing the {@link #rowdeselect} and {@link #selectionchange} events. - * @param {Number} row The index of the row to deselect - * @param {Boolean} preventViewNotify (optional) Specify true to - * prevent notifying the view (disables updating the selected appearance) - */ - deselectRow : function(index, preventViewNotify){ - if(this.isLocked()){ - return; - } - if(this.last == index){ - this.last = false; - } - if(this.lastActive == index){ - this.lastActive = false; - } - var r = this.grid.store.getAt(index); - if(r){ - this.selections.remove(r); - if(!preventViewNotify){ - this.grid.getView().onRowDeselect(index); - } - this.fireEvent('rowdeselect', this, index, r); - this.fireEvent('selectionchange', this); - } - }, - - // private - acceptsNav : function(row, col, cm){ - return !cm.isHidden(col) && cm.isCellEditable(col, row); - }, - - // private - onEditorKey : function(field, e){ - var k = e.getKey(), - newCell, - g = this.grid, - last = g.lastEdit, - ed = g.activeEditor, - shift = e.shiftKey, - ae, last, r, c; - - if(k == e.TAB){ - e.stopEvent(); - ed.completeEdit(); - if(shift){ - newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this); - }else{ - newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this); - } - }else if(k == e.ENTER){ - if(this.moveEditorOnEnter !== false){ - if(shift){ - newCell = g.walkCells(last.row - 1, last.col, -1, this.acceptsNav, this); - }else{ - newCell = g.walkCells(last.row + 1, last.col, 1, this.acceptsNav, this); - } - } - } - if(newCell){ - r = newCell[0]; - c = newCell[1]; - - this.onEditorSelect(r, last.row); - - if(g.isEditor && g.editing){ // *** handle tabbing while editorgrid is in edit mode - ae = g.activeEditor; - if(ae && ae.field.triggerBlur){ - // *** if activeEditor is a TriggerField, explicitly call its triggerBlur() method - ae.field.triggerBlur(); - } - } - g.startEditing(r, c); - } - }, - - onEditorSelect: function(row, lastRow){ - if(lastRow != row){ - this.selectRow(row); // *** highlight newly-selected cell and update selection - } - }, - - destroy : function(){ - Ext.destroy(this.rowNav); - this.rowNav = null; - Ext.grid.RowSelectionModel.superclass.destroy.call(this); - } -}); -/** - * @class Ext.grid.Column - *

        This class encapsulates column configuration data to be used in the initialization of a - * {@link Ext.grid.ColumnModel ColumnModel}.

        - *

        While subclasses are provided to render data in different ways, this class renders a passed - * data field unchanged and is usually used for textual columns.

        - */ -Ext.grid.Column = Ext.extend(Ext.util.Observable, { - /** - * @cfg {Boolean} editable Optional. Defaults to true, enabling the configured - * {@link #editor}. Set to false to initially disable editing on this column. - * The initial configuration may be dynamically altered using - * {@link Ext.grid.ColumnModel}.{@link Ext.grid.ColumnModel#setEditable setEditable()}. - */ - /** - * @cfg {String} id Optional. A name which identifies this column (defaults to the column's initial - * ordinal position.) The id is used to create a CSS class name which is applied to all - * table cells (including headers) in that column (in this context the id does not need to be - * unique). The class name takes the form of
        x-grid3-td-id
        - * Header cells will also receive this class name, but will also have the class
        x-grid3-hd
        - * So, to target header cells, use CSS selectors such as:
        .x-grid3-hd-row .x-grid3-td-id
        - * The {@link Ext.grid.GridPanel#autoExpandColumn} grid config option references the column via this - * unique identifier. - */ - /** - * @cfg {String} header Optional. The header text to be used as innerHTML - * (html tags are accepted) to display in the Grid view. Note: to - * have a clickable header with no text displayed use '&#160;'. - */ - /** - * @cfg {Boolean} groupable Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option - * may be used to disable the header menu item to group by the column selected. Defaults to true, - * which enables the header menu group option. Set to false to disable (but still show) the - * group option in the header menu for the column. See also {@link #groupName}. - */ - /** - * @cfg {String} groupName Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option - * may be used to specify the text with which to prefix the group field value in the group header line. - * See also {@link #groupRenderer} and - * {@link Ext.grid.GroupingView}.{@link Ext.grid.GroupingView#showGroupName showGroupName}. - */ - /** - * @cfg {Function} groupRenderer

        Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option - * may be used to specify the function used to format the grouping field value for display in the group - * {@link #groupName header}. If a groupRenderer is not specified, the configured - * {@link #renderer} will be called; if a {@link #renderer} is also not specified - * the new value of the group field will be used.

        - *

        The called function (either the groupRenderer or {@link #renderer}) will be - * passed the following parameters: - *

          - *
        • v : Object

          The new value of the group field.

        • - *
        • unused : undefined

          Unused parameter.

        • - *
        • r : Ext.data.Record

          The Record providing the data - * for the row which caused group change.

        • - *
        • rowIndex : Number

          The row index of the Record which caused group change.

        • - *
        • colIndex : Number

          The column index of the group field.

        • - *
        • ds : Ext.data.Store

          The Store which is providing the data Model.

        • - *

        - *

        The function should return a string value.

        - */ - /** - * @cfg {String} emptyGroupText Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option - * may be used to specify the text to display when there is an empty group value. Defaults to the - * {@link Ext.grid.GroupingView}.{@link Ext.grid.GroupingView#emptyGroupText emptyGroupText}. - */ - /** - * @cfg {String} dataIndex

        Required. The name of the field in the - * grid's {@link Ext.data.Store}'s {@link Ext.data.Record} definition from - * which to draw the column's value.

        - */ - /** - * @cfg {Number} width - * Optional. The initial width in pixels of the column. - * The width of each column can also be affected if any of the following are configured: - *
          - *
        • {@link Ext.grid.GridPanel}.{@link Ext.grid.GridPanel#autoExpandColumn autoExpandColumn}
        • - *
        • {@link Ext.grid.GridView}.{@link Ext.grid.GridView#forceFit forceFit} - *
          - *

          By specifying forceFit:true, {@link #fixed non-fixed width} columns will be - * re-proportioned (based on the relative initial widths) to fill the width of the grid so - * that no horizontal scrollbar is shown.

          - *
        • - *
        • {@link Ext.grid.GridView}.{@link Ext.grid.GridView#autoFill autoFill}
        • - *
        • {@link Ext.grid.GridPanel}.{@link Ext.grid.GridPanel#minColumnWidth minColumnWidth}
        • - *

          Note: when the width of each column is determined, a space on the right side - * is reserved for the vertical scrollbar. The - * {@link Ext.grid.GridView}.{@link Ext.grid.GridView#scrollOffset scrollOffset} - * can be modified to reduce or eliminate the reserved offset.

          - */ - /** - * @cfg {Boolean} sortable Optional. true if sorting is to be allowed on this column. - * Defaults to the value of the {@link Ext.grid.ColumnModel#defaultSortable} property. - * Whether local/remote sorting is used is specified in {@link Ext.data.Store#remoteSort}. - */ - /** - * @cfg {Boolean} fixed Optional. true if the column width cannot be changed. Defaults to false. - */ - /** - * @cfg {Boolean} resizable Optional. false to disable column resizing. Defaults to true. - */ - /** - * @cfg {Boolean} menuDisabled Optional. true to disable the column menu. Defaults to false. - */ - /** - * @cfg {Boolean} hidden - * Optional. true to initially hide this column. Defaults to false. - * A hidden column {@link Ext.grid.GridPanel#enableColumnHide may be shown via the header row menu}. - * If a column is never to be shown, simply do not include this column in the Column Model at all. - */ - /** - * @cfg {String} tooltip Optional. A text string to use as the column header's tooltip. If Quicktips - * are enabled, this value will be used as the text of the quick tip, otherwise it will be set as the - * header's HTML title attribute. Defaults to ''. - */ - /** - * @cfg {Mixed} renderer - *

          For an alternative to specifying a renderer see {@link #xtype}

          - *

          Optional. A renderer is an 'interceptor' method which can be used transform data (value, - * appearance, etc.) before it is rendered). This may be specified in either of three ways: - *

            - *
          • A renderer function used to return HTML markup for a cell given the cell's data value.
          • - *
          • A string which references a property name of the {@link Ext.util.Format} class which - * provides a renderer function.
          • - *
          • An object specifying both the renderer function, and its execution scope (this - * reference) e.g.:
            
            -{
            -    fn: this.gridRenderer,
            -    scope: this
            -}
            -
          - * If not specified, the default renderer uses the raw data value.

          - *

          For information about the renderer function (passed parameters, etc.), see - * {@link Ext.grid.ColumnModel#setRenderer}. An example of specifying renderer function inline:

          
          -var companyColumn = {
          -   header: 'Company Name',
          -   dataIndex: 'company',
          -   renderer: function(value, metaData, record, rowIndex, colIndex, store) {
          -      // provide the logic depending on business rules
          -      // name of your own choosing to manipulate the cell depending upon
          -      // the data in the underlying Record object.
          -      if (value == 'whatever') {
          -          //metaData.css : String : A CSS class name to add to the TD element of the cell.
          -          //metaData.attr : String : An html attribute definition string to apply to
          -          //                         the data container element within the table
          -          //                         cell (e.g. 'style="color:red;"').
          -          metaData.css = 'name-of-css-class-you-will-define';
          -      }
          -      return value;
          -   }
          -}
          -     * 
          - * See also {@link #scope}. - */ - /** - * @cfg {String} xtype Optional. A String which references a predefined {@link Ext.grid.Column} subclass - * type which is preconfigured with an appropriate {@link #renderer} to be easily - * configured into a ColumnModel. The predefined {@link Ext.grid.Column} subclass types are: - *
            - *
          • gridcolumn : {@link Ext.grid.Column} (Default)

          • - *
          • booleancolumn : {@link Ext.grid.BooleanColumn}

          • - *
          • numbercolumn : {@link Ext.grid.NumberColumn}

          • - *
          • datecolumn : {@link Ext.grid.DateColumn}

          • - *
          • templatecolumn : {@link Ext.grid.TemplateColumn}

          • - *
          - *

          Configuration properties for the specified xtype may be specified with - * the Column configuration properties, for example:

          - *
          
          -var grid = new Ext.grid.GridPanel({
          -    ...
          -    columns: [{
          -        header: 'Last Updated',
          -        dataIndex: 'lastChange',
          -        width: 85,
          -        sortable: true,
          -        //renderer: Ext.util.Format.dateRenderer('m/d/Y'),
          -        xtype: 'datecolumn', // use xtype instead of renderer
          -        format: 'M/d/Y' // configuration property for {@link Ext.grid.DateColumn}
          -    }, {
          -        ...
          -    }]
          -});
          -     * 
          - */ - /** - * @cfg {Object} scope Optional. The scope (this reference) in which to execute the - * renderer. Defaults to the Column configuration object. - */ - /** - * @cfg {String} align Optional. Set the CSS text-align property of the column. Defaults to undefined. - */ - /** - * @cfg {String} css Optional. An inline style definition string which is applied to all table cells in the column - * (excluding headers). Defaults to undefined. - */ - /** - * @cfg {Boolean} hideable Optional. Specify as false to prevent the user from hiding this column - * (defaults to true). To disallow column hiding globally for all columns in the grid, use - * {@link Ext.grid.GridPanel#enableColumnHide} instead. - */ - /** - * @cfg {Ext.form.Field} editor Optional. The {@link Ext.form.Field} to use when editing values in this column - * if editing is supported by the grid. See {@link #editable} also. - */ - - /** - * @private - * @cfg {Boolean} isColumn - * Used by ColumnModel setConfig method to avoid reprocessing a Column - * if isColumn is not set ColumnModel will recreate a new Ext.grid.Column - * Defaults to true. - */ - isColumn : true, - - constructor : function(config){ - Ext.apply(this, config); - - if(Ext.isString(this.renderer)){ - this.renderer = Ext.util.Format[this.renderer]; - }else if(Ext.isObject(this.renderer)){ - this.scope = this.renderer.scope; - this.renderer = this.renderer.fn; - } - if(!this.scope){ - this.scope = this; - } - - var ed = this.editor; - delete this.editor; - this.setEditor(ed); - this.addEvents( - /** - * @event click - * Fires when this Column is clicked. - * @param {Column} this - * @param {Grid} The owning GridPanel - * @param {Number} rowIndex - * @param {Ext.EventObject} e - */ - 'click', - /** - * @event contextmenu - * Fires when this Column is right clicked. - * @param {Column} this - * @param {Grid} The owning GridPanel - * @param {Number} rowIndex - * @param {Ext.EventObject} e - */ - 'contextmenu', - /** - * @event dblclick - * Fires when this Column is double clicked. - * @param {Column} this - * @param {Grid} The owning GridPanel - * @param {Number} rowIndex - * @param {Ext.EventObject} e - */ - 'dblclick', - /** - * @event mousedown - * Fires when this Column receives a mousedown event. - * @param {Column} this - * @param {Grid} The owning GridPanel - * @param {Number} rowIndex - * @param {Ext.EventObject} e - */ - 'mousedown' - ); - Ext.grid.Column.superclass.constructor.call(this); - }, - - /** - * @private - * Process and refire events routed from the GridView's processEvent method. - * Returns the event handler's status to allow cancelling of GridView's bubbling process. - */ - processEvent : function(name, e, grid, rowIndex, colIndex){ - return this.fireEvent(name, this, grid, rowIndex, e); - }, - - /** - * @private - * Clean up. Remove any Editor. Remove any listeners. - */ - destroy: function() { - if(this.setEditor){ - this.setEditor(null); - } - this.purgeListeners(); - }, - - /** - * Optional. A function which returns displayable data when passed the following parameters: - *
            - *
          • value : Object

            The data value for the cell.

          • - *
          • metadata : Object

            An object in which you may set the following attributes:

              - *
            • css : String

              A CSS class name to add to the cell's TD element.

            • - *
            • attr : String

              An HTML attribute definition string to apply to the data container - * element within the table cell (e.g. 'style="color:red;"').

          • - *
          • record : Ext.data.record

            The {@link Ext.data.Record} from which the data was - * extracted.

          • - *
          • rowIndex : Number

            Row index

          • - *
          • colIndex : Number

            Column index

          • - *
          • store : Ext.data.Store

            The {@link Ext.data.Store} object from which the Record - * was extracted.

          • - *
          - * @property renderer - * @type Function - */ - renderer : function(value){ - return value; - }, - - // private - getEditor: function(rowIndex){ - return this.editable !== false ? this.editor : null; - }, - - /** - * Sets a new editor for this column. - * @param {Ext.Editor/Ext.form.Field} editor The editor to set - */ - setEditor : function(editor){ - var ed = this.editor; - if(ed){ - if(ed.gridEditor){ - ed.gridEditor.destroy(); - delete ed.gridEditor; - }else{ - ed.destroy(); - } - } - this.editor = null; - if(editor){ - //not an instance, create it - if(!editor.isXType){ - editor = Ext.create(editor, 'textfield'); - } - this.editor = editor; - } - }, - - /** - * Returns the {@link Ext.Editor editor} defined for this column that was created to wrap the {@link Ext.form.Field Field} - * used to edit the cell. - * @param {Number} rowIndex The row index - * @return {Ext.Editor} - */ - getCellEditor: function(rowIndex){ - var ed = this.getEditor(rowIndex); - if(ed){ - if(!ed.startEdit){ - if(!ed.gridEditor){ - ed.gridEditor = new Ext.grid.GridEditor(ed); - } - ed = ed.gridEditor; - } - } - return ed; - } -}); - -/** - * @class Ext.grid.BooleanColumn - * @extends Ext.grid.Column - *

          A Column definition class which renders boolean data fields. See the {@link Ext.grid.Column#xtype xtype} - * config option of {@link Ext.grid.Column} for more details.

          - */ -Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, { - /** - * @cfg {String} trueText - * The string returned by the renderer when the column value is not falsy (defaults to 'true'). - */ - trueText: 'true', - /** - * @cfg {String} falseText - * The string returned by the renderer when the column value is falsy (but not undefined) (defaults to - * 'false'). - */ - falseText: 'false', - /** - * @cfg {String} undefinedText - * The string returned by the renderer when the column value is undefined (defaults to '&#160;'). - */ - undefinedText: ' ', - - constructor: function(cfg){ - Ext.grid.BooleanColumn.superclass.constructor.call(this, cfg); - var t = this.trueText, f = this.falseText, u = this.undefinedText; - this.renderer = function(v){ - if(v === undefined){ - return u; - } - if(!v || v === 'false'){ - return f; - } - return t; - }; - } -}); - -/** - * @class Ext.grid.NumberColumn - * @extends Ext.grid.Column - *

          A Column definition class which renders a numeric data field according to a {@link #format} string. See the - * {@link Ext.grid.Column#xtype xtype} config option of {@link Ext.grid.Column} for more details.

          - */ -Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, { - /** - * @cfg {String} format - * A formatting string as used by {@link Ext.util.Format#number} to format a numeric value for this Column - * (defaults to '0,000.00'). - */ - format : '0,000.00', - constructor: function(cfg){ - Ext.grid.NumberColumn.superclass.constructor.call(this, cfg); - this.renderer = Ext.util.Format.numberRenderer(this.format); - } -}); - -/** - * @class Ext.grid.DateColumn - * @extends Ext.grid.Column - *

          A Column definition class which renders a passed date according to the default locale, or a configured - * {@link #format}. See the {@link Ext.grid.Column#xtype xtype} config option of {@link Ext.grid.Column} - * for more details.

          - */ -Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, { - /** - * @cfg {String} format - * A formatting string as used by {@link Date#format} to format a Date for this Column - * (defaults to 'm/d/Y'). - */ - format : 'm/d/Y', - constructor: function(cfg){ - Ext.grid.DateColumn.superclass.constructor.call(this, cfg); - this.renderer = Ext.util.Format.dateRenderer(this.format); - } -}); - -/** - * @class Ext.grid.TemplateColumn - * @extends Ext.grid.Column - *

          A Column definition class which renders a value by processing a {@link Ext.data.Record Record}'s - * {@link Ext.data.Record#data data} using a {@link #tpl configured} {@link Ext.XTemplate XTemplate}. - * See the {@link Ext.grid.Column#xtype xtype} config option of {@link Ext.grid.Column} for more - * details.

          - */ -Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, { - /** - * @cfg {String/XTemplate} tpl - * An {@link Ext.XTemplate XTemplate}, or an XTemplate definition string to use to process a - * {@link Ext.data.Record Record}'s {@link Ext.data.Record#data data} to produce a column's rendered value. - */ - constructor: function(cfg){ - Ext.grid.TemplateColumn.superclass.constructor.call(this, cfg); - var tpl = (!Ext.isPrimitive(this.tpl) && this.tpl.compile) ? this.tpl : new Ext.XTemplate(this.tpl); - this.renderer = function(value, p, r){ - return tpl.apply(r.data); - }; - this.tpl = tpl; - } -}); - -/** - * @class Ext.grid.ActionColumn - * @extends Ext.grid.Column - *

          A Grid column type which renders an icon, or a series of icons in a grid cell, and offers a scoped click - * handler for each icon. Example usage:

          -
          
          -new Ext.grid.GridPanel({
          -    store: myStore,
          -    columns: [
          -        {
          -            xtype: 'actioncolumn',
          -            width: 50,
          -            items: [
          -                {
          -                    icon   : 'sell.gif',                // Use a URL in the icon config
          -                    tooltip: 'Sell stock',
          -                    handler: function(grid, rowIndex, colIndex) {
          -                        var rec = store.getAt(rowIndex);
          -                        alert("Sell " + rec.get('company'));
          -                    }
          -                },
          -                {
          -                    getClass: function(v, meta, rec) {  // Or return a class from a function
          -                        if (rec.get('change') < 0) {
          -                            this.items[1].tooltip = 'Do not buy!';
          -                            return 'alert-col';
          -                        } else {
          -                            this.items[1].tooltip = 'Buy stock';
          -                            return 'buy-col';
          -                        }
          -                    },
          -                    handler: function(grid, rowIndex, colIndex) {
          -                        var rec = store.getAt(rowIndex);
          -                        alert("Buy " + rec.get('company'));
          -                    }
          -                }
          -            ]
          -        }
          -        //any other columns here
          -    ]
          -});
          -
          - *

          The action column can be at any index in the columns array, and a grid can have any number of - * action columns.

          - */ -Ext.grid.ActionColumn = Ext.extend(Ext.grid.Column, { - /** - * @cfg {String} icon - * The URL of an image to display as the clickable element in the column. - * Optional - defaults to {@link Ext#BLANK_IMAGE_URL Ext.BLANK_IMAGE_URL}. - */ - /** - * @cfg {String} iconCls - * A CSS class to apply to the icon image. To determine the class dynamically, configure the Column with a {@link #getClass} function. - */ - /** - * @cfg {Function} handler A function called when the icon is clicked. - * The handler is passed the following parameters:
            - *
          • grid : GridPanel
            The owning GridPanel.
          • - *
          • rowIndex : Number
            The row index clicked on.
          • - *
          • colIndex : Number
            The column index clicked on.
          • - *
          • item : Object
            The clicked item (or this Column if multiple - * {@link #items} were not configured).
          • - *
          • e : Event
            The click event.
          • - *
          - */ - /** - * @cfg {Object} scope The scope (this reference) in which the {@link #handler} - * and {@link #getClass} fuctions are executed. Defaults to this Column. - */ - /** - * @cfg {String} tooltip A tooltip message to be displayed on hover. {@link Ext.QuickTips#init Ext.QuickTips} must have - * been initialized. - */ - /** - * @cfg {Boolean} stopSelection Defaults to true. Prevent grid row selection upon mousedown. - */ - /** - * @cfg {Function} getClass A function which returns the CSS class to apply to the icon image. - * The function is passed the following parameters:
            - *
          • v : Object

            The value of the column's configured field (if any).

          • - *
          • metadata : Object

            An object in which you may set the following attributes:

              - *
            • css : String

              A CSS class name to add to the cell's TD element.

            • - *
            • attr : String

              An HTML attribute definition string to apply to the data container element within the table cell - * (e.g. 'style="color:red;"').

            • - *

          • - *
          • r : Ext.data.Record

            The Record providing the data.

          • - *
          • rowIndex : Number

            The row index..

          • - *
          • colIndex : Number

            The column index.

          • - *
          • store : Ext.data.Store

            The Store which is providing the data Model.

          • - *
          - */ - /** - * @cfg {Array} items An Array which may contain multiple icon definitions, each element of which may contain: - *
            - *
          • icon : String
            The url of an image to display as the clickable element - * in the column.
          • - *
          • iconCls : String
            A CSS class to apply to the icon image. - * To determine the class dynamically, configure the item with a getClass function.
          • - *
          • getClass : Function
            A function which returns the CSS class to apply to the icon image. - * The function is passed the following parameters:
              - *
            • v : Object

              The value of the column's configured field (if any).

            • - *
            • metadata : Object

              An object in which you may set the following attributes:

                - *
              • css : String

                A CSS class name to add to the cell's TD element.

              • - *
              • attr : String

                An HTML attribute definition string to apply to the data container element within the table cell - * (e.g. 'style="color:red;"').

              • - *

            • - *
            • r : Ext.data.Record

              The Record providing the data.

            • - *
            • rowIndex : Number

              The row index..

            • - *
            • colIndex : Number

              The column index.

            • - *
            • store : Ext.data.Store

              The Store which is providing the data Model.

            • - *
          • - *
          • handler : Function
            A function called when the icon is clicked.
          • - *
          • scope : Scope
            The scope (this reference) in which the - * handler and getClass functions are executed. Fallback defaults are this Column's - * configured scope, then this Column.
          • - *
          • tooltip : String
            A tooltip message to be displayed on hover. - * {@link Ext.QuickTips#init Ext.QuickTips} must have been initialized.
          • - *
          - */ - header: ' ', - - actionIdRe: /x-action-col-(\d+)/, - - /** - * @cfg {String} altText The alt text to use for the image element. Defaults to ''. - */ - altText: '', - - constructor: function(cfg) { - var me = this, - items = cfg.items || (me.items = [me]), - l = items.length, - i, - item; - - Ext.grid.ActionColumn.superclass.constructor.call(me, cfg); - -// Renderer closure iterates through items creating an element for each and tagging with an identifying -// class name x-action-col-{n} - me.renderer = function(v, meta) { -// Allow a configured renderer to create initial value (And set the other values in the "metadata" argument!) - v = Ext.isFunction(cfg.renderer) ? cfg.renderer.apply(this, arguments)||'' : ''; - - meta.css += ' x-action-col-cell'; - for (i = 0; i < l; i++) { - item = items[i]; - v += '' + (item.altText || me.altText) + ''; - } - return v; - }; - }, - - destroy: function() { - delete this.items; - delete this.renderer; - return Ext.grid.ActionColumn.superclass.destroy.apply(this, arguments); - }, - - /** - * @private - * Process and refire events routed from the GridView's processEvent method. - * Also fires any configured click handlers. By default, cancels the mousedown event to prevent selection. - * Returns the event handler's status to allow cancelling of GridView's bubbling process. - */ - processEvent : function(name, e, grid, rowIndex, colIndex){ - var m = e.getTarget().className.match(this.actionIdRe), - item, fn; - if (m && (item = this.items[parseInt(m[1], 10)])) { - if (name == 'click') { - (fn = item.handler || this.handler) && fn.call(item.scope||this.scope||this, grid, rowIndex, colIndex, item, e); - } else if ((name == 'mousedown') && (item.stopSelection !== false)) { - return false; - } - } - return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments); - } -}); - -/* - * @property types - * @type Object - * @member Ext.grid.Column - * @static - *

          An object containing predefined Column classes keyed by a mnemonic code which may be referenced - * by the {@link Ext.grid.ColumnModel#xtype xtype} config option of ColumnModel.

          - *

          This contains the following properties

            - *
          • gridcolumn : {@link Ext.grid.Column Column constructor}
          • - *
          • booleancolumn : {@link Ext.grid.BooleanColumn BooleanColumn constructor}
          • - *
          • numbercolumn : {@link Ext.grid.NumberColumn NumberColumn constructor}
          • - *
          • datecolumn : {@link Ext.grid.DateColumn DateColumn constructor}
          • - *
          • templatecolumn : {@link Ext.grid.TemplateColumn TemplateColumn constructor}
          • - *
          - */ -Ext.grid.Column.types = { - gridcolumn : Ext.grid.Column, - booleancolumn: Ext.grid.BooleanColumn, - numbercolumn: Ext.grid.NumberColumn, - datecolumn: Ext.grid.DateColumn, - templatecolumn: Ext.grid.TemplateColumn, - actioncolumn: Ext.grid.ActionColumn -};/** - * @class Ext.grid.RowNumberer - * This is a utility class that can be passed into a {@link Ext.grid.ColumnModel} as a column config that provides - * an automatic row numbering column. - *
          Usage:
          -
          
          - // This is a typical column config with the first column providing row numbers
          - var colModel = new Ext.grid.ColumnModel([
          -    new Ext.grid.RowNumberer(),
          -    {header: "Name", width: 80, sortable: true},
          -    {header: "Code", width: 50, sortable: true},
          -    {header: "Description", width: 200, sortable: true}
          - ]);
          - 
          - * @constructor - * @param {Object} config The configuration options - */ -Ext.grid.RowNumberer = Ext.extend(Object, { - /** - * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the row - * number column (defaults to ''). - */ - header: "", - /** - * @cfg {Number} width The default width in pixels of the row number column (defaults to 23). - */ - width: 23, - /** - * @cfg {Boolean} sortable True if the row number column is sortable (defaults to false). - * @hide - */ - sortable: false, - - constructor : function(config){ - Ext.apply(this, config); - if(this.rowspan){ - this.renderer = this.renderer.createDelegate(this); - } - }, - - // private - fixed:true, - hideable: false, - menuDisabled:true, - dataIndex: '', - id: 'numberer', - rowspan: undefined, - - // private - renderer : function(v, p, record, rowIndex){ - if(this.rowspan){ - p.cellAttr = 'rowspan="'+this.rowspan+'"'; - } - return rowIndex+1; - } -});/** - * @class Ext.grid.CheckboxSelectionModel - * @extends Ext.grid.RowSelectionModel - * A custom selection model that renders a column of checkboxes that can be toggled to select or deselect rows. - * @constructor - * @param {Object} config The configuration options - */ -Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { - - /** - * @cfg {Boolean} checkOnly true if rows can only be selected by clicking on the - * checkbox column (defaults to false). - */ - /** - * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the - * checkbox column. Defaults to:
          
          -     * '<div class="x-grid3-hd-checker">&#160;</div>'
          -     * 
          - * The default CSS class of 'x-grid3-hd-checker' displays a checkbox in the header - * and provides support for automatic check all/none behavior on header click. This string - * can be replaced by any valid HTML fragment, including a simple text string (e.g., - * 'Select Rows'), but the automatic check all/none behavior will only work if the - * 'x-grid3-hd-checker' class is supplied. - */ - header : '
           
          ', - /** - * @cfg {Number} width The default width in pixels of the checkbox column (defaults to 20). - */ - width : 20, - /** - * @cfg {Boolean} sortable true if the checkbox column is sortable (defaults to - * false). - */ - sortable : false, - - // private - menuDisabled : true, - fixed : true, - hideable: false, - dataIndex : '', - id : 'checker', - isColumn: true, // So that ColumnModel doesn't feed this through the Column constructor - - constructor : function(){ - Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this, arguments); - if(this.checkOnly){ - this.handleMouseDown = Ext.emptyFn; - } - }, - - // private - initEvents : function(){ - Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this); - this.grid.on('render', function(){ - Ext.fly(this.grid.getView().innerHd).on('mousedown', this.onHdMouseDown, this); - }, this); - }, - - /** - * @private - * Process and refire events routed from the GridView's processEvent method. - */ - processEvent : function(name, e, grid, rowIndex, colIndex){ - if (name == 'mousedown') { - this.onMouseDown(e, e.getTarget()); - return false; - } else { - return Ext.grid.Column.prototype.processEvent.apply(this, arguments); - } - }, - - // private - onMouseDown : function(e, t){ - if(e.button === 0 && t.className == 'x-grid3-row-checker'){ // Only fire if left-click - e.stopEvent(); - var row = e.getTarget('.x-grid3-row'); - if(row){ - var index = row.rowIndex; - if(this.isSelected(index)){ - this.deselectRow(index); - }else{ - this.selectRow(index, true); - this.grid.getView().focusRow(index); - } - } - } - }, - - // private - onHdMouseDown : function(e, t) { - if(t.className == 'x-grid3-hd-checker'){ - e.stopEvent(); - var hd = Ext.fly(t.parentNode); - var isChecked = hd.hasClass('x-grid3-hd-checker-on'); - if(isChecked){ - hd.removeClass('x-grid3-hd-checker-on'); - this.clearSelections(); - }else{ - hd.addClass('x-grid3-hd-checker-on'); - this.selectAll(); - } - } - }, - - // private - renderer : function(v, p, record){ - return '
           
          '; - }, - - onEditorSelect: function(row, lastRow){ - if(lastRow != row && !this.checkOnly){ - this.selectRow(row); // *** highlight newly-selected cell and update selection - } - } -}); \ No newline at end of file diff --git a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-foundation.js b/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-foundation.js deleted file mode 100644 index d4b3aa3d859..00000000000 --- a/web-client/src/main/resources/apps/js/ext/pkgs/pkg-grid-foundation.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.4.0 - * Copyright(c) 2006-2011 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -Ext.grid.GridPanel=Ext.extend(Ext.Panel,{autoExpandColumn:false,autoExpandMax:1000,autoExpandMin:50,columnLines:false,ddText:"{0} selected row{1}",deferRowRender:true,enableColumnHide:true,enableColumnMove:true,enableDragDrop:false,enableHdMenu:true,loadMask:false,minColumnWidth:25,stripeRows:false,trackMouseOver:true,stateEvents:["columnmove","columnresize","sortchange","groupchange"],view:null,bubbleEvents:[],rendered:false,viewReady:false,initComponent:function(){Ext.grid.GridPanel.superclass.initComponent.call(this);if(this.columnLines){this.cls=(this.cls||"")+" x-grid-with-col-lines"}this.autoScroll=false;this.autoWidth=false;if(Ext.isArray(this.columns)){this.colModel=new Ext.grid.ColumnModel(this.columns);delete this.columns}if(this.ds){this.store=this.ds;delete this.ds}if(this.cm){this.colModel=this.cm;delete this.cm}if(this.sm){this.selModel=this.sm;delete this.sm}this.store=Ext.StoreMgr.lookup(this.store);this.addEvents("click","dblclick","contextmenu","mousedown","mouseup","mouseover","mouseout","keypress","keydown","cellmousedown","rowmousedown","headermousedown","groupmousedown","rowbodymousedown","containermousedown","cellclick","celldblclick","rowclick","rowdblclick","headerclick","headerdblclick","groupclick","groupdblclick","containerclick","containerdblclick","rowbodyclick","rowbodydblclick","rowcontextmenu","cellcontextmenu","headercontextmenu","groupcontextmenu","containercontextmenu","rowbodycontextmenu","bodyscroll","columnresize","columnmove","sortchange","groupchange","reconfigure","viewready")},onRender:function(d,a){Ext.grid.GridPanel.superclass.onRender.apply(this,arguments);var e=this.getGridEl();this.el.addClass("x-grid-panel");this.mon(e,{scope:this,mousedown:this.onMouseDown,click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu});this.relayEvents(e,["mousedown","mouseup","mouseover","mouseout","keypress","keydown"]);var b=this.getView();b.init(this);b.render();this.getSelectionModel().init(this)},initEvents:function(){Ext.grid.GridPanel.superclass.initEvents.call(this);if(this.loadMask){this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({store:this.store},this.loadMask))}},initStateEvents:function(){Ext.grid.GridPanel.superclass.initStateEvents.call(this);this.mon(this.colModel,"hiddenchange",this.saveState,this,{delay:100})},applyState:function(a){var j=this.colModel,f=a.columns,h=this.store,l,g,k;if(f){for(var d=0,e=f.length;d=0){if(!d){c=f-1}d=false;while(c>=0){if(e.call(i||this,j,c,h)===true){return[j,c]}c--}j--}}else{if(c>=f){j++;d=false}while(j','
          ','
          ','
          ','
          {header}
          ',"
          ",'
          ',"
          ",'
          ','
          {body}
          ','',"
          ","
          ",'
           
          ','
           
          ',"
        "),headerTpl:new Ext.Template('',"",'{cells}',"","
        "),bodyTpl:new Ext.Template("{rows}"),cellTpl:new Ext.Template('','
        {value}
        ',""),initTemplates:function(){var c=this.templates||{},d,b,f=new Ext.Template('','
        ',this.grid.enableHdMenu?'':"","{value}",'',"
        ",""),a=['','','
        {body}
        ',"",""].join(""),e=['',"","{cells}",this.enableRowBody?a:"","","
        "].join("");Ext.applyIf(c,{hcell:f,cell:this.cellTpl,body:this.bodyTpl,header:this.headerTpl,master:this.masterTpl,row:new Ext.Template('
        '+e+"
        "),rowInner:new Ext.Template(e)});for(b in c){d=c[b];if(d&&Ext.isFunction(d.compile)&&!d.compiled){d.disableFormats=true;d.compile()}}this.templates=c;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(a){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=a;return this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var b=Ext.Element,d=Ext.get(this.grid.getGridEl().dom.firstChild),e=new b(d.child("div.x-grid3-viewport")),c=new b(e.child("div.x-grid3-header")),a=new b(e.child("div.x-grid3-scroller"));if(this.grid.hideHeaders){c.setDisplayed(false)}if(this.forceFit){a.setStyle("overflow-x","hidden")}Ext.apply(this,{el:d,mainWrap:e,scroller:a,mainHd:c,innerHd:c.child("div.x-grid3-header-inner").dom,mainBody:new b(b.fly(a).child("div.x-grid3-body")),focusEl:new b(b.fly(a).child("a")),resizeMarker:new b(d.child("div.x-grid3-resize-marker")),resizeProxy:new b(d.child("div.x-grid3-resize-proxy"))});this.focusEl.swallowEvent("click",true)},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(a){if(!a){return false}return this.fly(a).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(d,c){var b=this.findCell(d),a;if(b){a=this.fly(b).hasClass(c);if(!c||a){return this.getCellIndex(b)}}return false},getCellIndex:function(b){if(b){var a=b.className.match(this.colRe);if(a&&a[1]){return this.cm.getIndexById(a[1])}}return false},findHeaderCell:function(b){var a=this.findCell(b);return a&&this.fly(a).hasClass(this.hdCls)?a:null},findHeaderIndex:function(a){return this.findCellIndex(a,this.hdCls)},findRow:function(a){if(!a){return false}return this.fly(a).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(a){var b=this.findRow(a);return b?b.rowIndex:false},findRowBody:function(a){if(!a){return false}return this.fly(a).findParent(this.rowBodySelector,this.rowBodySelectorDepth)},getRow:function(a){return this.getRows()[a]},getCell:function(b,a){return Ext.fly(this.getRow(b)).query(this.cellSelector)[a]},getHeaderCell:function(a){return this.mainHd.dom.getElementsByTagName("td")[a]},addRowClass:function(b,a){var c=this.getRow(b);if(c){this.fly(c).addClass(a)}},removeRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).removeClass(a)}},removeRow:function(a){Ext.removeNode(this.getRow(a));this.syncFocusEl(a)},removeRows:function(c,a){var b=this.mainBody.dom,d;for(d=c;d<=a;d++){Ext.removeNode(b.childNodes[c])}this.syncFocusEl(c)},getScrollState:function(){var a=this.scroller.dom;return{left:a.scrollLeft,top:a.scrollTop}},restoreScroll:function(a){var b=this.scroller.dom;b.scrollLeft=a.left;b.scrollTop=a.top},scrollToTop:function(){var a=this.scroller.dom;a.scrollTop=0;a.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var a=this.scroller.dom;this.grid.fireEvent("bodyscroll",a.scrollLeft,a.scrollTop)},syncHeaderScroll:function(){var a=this.innerHd,b=this.scroller.dom.scrollLeft;a.scrollLeft=b;a.scrollLeft=b},updateSortIcon:function(d,c){var a=this.sortClasses,b=a[c=="DESC"?1:0],e=this.mainHd.select("td").removeClass(a);e.item(d).addClass(b)},updateAllColumnWidths:function(){var e=this.getTotalWidth(),h=this.cm.getColumnCount(),l=this.getRows(),f=l.length,b=[],k,a,g,d,c;for(d=0;d=this.ds.getCount()){return null}d=(d!==undefined?d:0);var c=this.getRow(g),b=this.cm,e=b.getColumnCount(),a;if(!(f===false&&d===0)){while(dl){m.scrollTop=o-a}}if(e!==false){var k=parseInt(g.offsetLeft,10),i=k+g.offsetWidth,h=parseInt(m.scrollLeft,10),b=h+m.clientWidth;if(kb){m.scrollLeft=i-m.clientWidth}}}return this.getResolvedXY(q)},insertRows:function(a,h,e,g){var d=a.getCount()-1;if(!g&&h===0&&e>=d){this.fireEvent("beforerowsinserted",this,h,e);this.refresh();this.fireEvent("rowsinserted",this,h,e)}else{if(!g){this.fireEvent("beforerowsinserted",this,h,e)}var b=this.renderRows(h,e),f=this.getRow(h);if(f){if(h===0){Ext.fly(this.getRow(0)).removeClass(this.firstRowCls)}Ext.DomHelper.insertHtml("beforeBegin",f,b)}else{var c=this.getRow(d-1);if(c){Ext.fly(c).removeClass(this.lastRowCls)}Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,b)}if(!g){this.processRows(h);this.fireEvent("rowsinserted",this,h,e)}else{if(h===0||h>=d){Ext.fly(this.getRow(h)).addClass(h===0?this.firstRowCls:this.lastRowCls)}}}this.syncFocusEl(h)},deleteRows:function(a,c,b){if(a.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,c,b);this.removeRows(c,b);this.processRows(c);this.fireEvent("rowsdeleted",this,c,b)}},getColumnStyle:function(b,d){var a=this.cm,f=a.config,c=d?"":f[b].css||"",e=f[b].align;c+=String.format("width: {0};",this.getColumnWidth(b));if(a.isHidden(b)){c+="display: none; "}if(e){c+=String.format("text-align: {0};",e)}return c},getColumnWidth:function(b){var c=this.cm.getColumnWidth(b),a=this.borderWidth;if(Ext.isNumber(c)){if(Ext.isBorderBox||(Ext.isWebKit&&!Ext.isSafari2)){return c+"px"}else{return Math.max(c-a,0)+"px"}}else{return c}},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(f,h,g){var a=this.grid,k=this.cm,r=k.getTotalWidth(false),p=this.getGridInnerWidth(),q=p-r,c=[],n=0,m=0,t,d,o;if(p<20||q===0){return false}var e=k.getColumnCount(true),l=k.getColumnCount(false),b=e-(Ext.isNumber(g)?1:0);if(b===0){b=1;g=undefined}for(o=0;op){var s=(b==e)?n:g,j=Math.max(1,k.getColumnWidth(s)-(r-p));k.setColumnWidth(s,j,true)}if(f!==true){this.updateAllColumnWidths()}return true},autoExpand:function(j){var a=this.grid,h=this.cm,e=this.getGridInnerWidth(),c=h.getTotalWidth(false),f=a.autoExpandColumn;if(!this.userResized&&f){if(e!=c){var i=h.getIndexById(f),b=h.getColumnWidth(i),g=e-c+b,d=Math.min(Math.max(g,a.autoExpandMin),a.autoExpandMax);if(b!=d){h.setColumnWidth(i,d,true);if(j!==true){this.updateColumnWidth(i,d)}}}}},getGridInnerWidth:function(){return this.grid.getGridEl().getWidth(true)-this.getScrollOffset()},getColumnData:function(){var e=[],c=this.cm,f=c.getColumnCount(),a=this.ds.fields,d,b;for(d=0;d'+this.emptyText+"