001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (C) Alkacon Software (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.gwt.shared;
029
030/**
031 * Common constants needed for client side code.<p>
032 */
033public final class CmsGwtConstants {
034
035    /** Parameters for favorite dialog. */
036    public static final class Favorites {
037
038        /** Request parameter. */
039        public static final String PARAM_SITE = "site";
040
041        /** Request parameter. */
042        public static final String PARAM_PROJECT = "project";
043
044        /** Request parameter. */
045        public static final String PARAM_PAGE = "page";
046
047        /** Request parameter. */
048        public static final String PARAM_DETAIL = "detail";
049    }
050
051    /**
052     * Quick launcher constants.<p>
053     */
054    public static final class QuickLaunch {
055
056        /** Context string. */
057        public static final String CONTEXT_PAGE = "page";
058
059        /** Context string. */
060        public static final String CONTEXT_SITEMAP = "sitemap";
061
062        /** Quick launch id. */
063        public static final String Q_ACCOUNTMANAGER = "accountmanager";
064
065        /** Quick launch id. */
066        public static final String Q_EXPLORER = "explorer";
067
068        /** Quick launch id. */
069        public static final String Q_LAUNCHPAD = "launchpad";
070
071        /** Quick launch id. */
072        public static final String Q_PAGEEDITOR = "pageeditor";
073
074        /** Quick launch id. */
075        public static final String Q_SITEMAP = "sitemap";
076
077        /** Quick launch id. */
078        public static final String Q_WORKPLACETOOLS = "workplacetools";
079
080    }
081
082    /** Context menu action id. */
083    public static final String ACTION_EDITSMALLELEMENTS = "editsmallelements";
084
085    /** Context menu action parameter dialog id. */
086    public static final String ACTION_PARAM_DIALOG_ID = "dialogId";
087
088    /** Context menu action id. */
089    public static final String ACTION_SELECTELEMENTVIEW = "selectelementview";
090
091    /** Context menu action id. */
092    public static final String ACTION_SHOWLOCALE = "showlocale";
093
094    /** Context menu action id. */
095    public static final String ACTION_TEMPLATECONTEXTS = "templatecontexts";
096
097    /** Context menu action id. */
098    public static final String ACTION_VIEW_ONLINE = "viewonline";
099
100    /** Attribute for container id. */
101    public static final String ATTR_CONTAINER_ID = "ATTR_CONTAINER_ID";
102
103    /** Collector data attribute name. */
104    public static final String ATTR_DATA_COLLECTOR = "data-oc-collector";
105
106    /** Container data attribute name. */
107    public static final String ATTR_DATA_CONTAINER = "data-oc-container";
108
109    /** Editable data attribute name. */
110    public static final String ATTR_DATA_EDITABLE = "data-oc-editable";
111
112    /** Element data attribute name. */
113    public static final String ATTR_DATA_ELEMENT = "data-oc-element";
114
115    /** Content field data attribute name. */
116    public static final String ATTR_DATA_FIELD = "data-oc-field";
117
118    /** Entity id data attribute name. */
119    public static final String ATTR_DATA_ID = "data-oc-id";
120
121    /** Key for the element id attribute. */
122    public static final String ATTR_ELEMENT_ID = "ATTR_ELEMENT_ID";
123
124    /** Key for the page root path attribute. */
125    public static final String ATTR_PAGE_ROOT_PATH = "ATTR_PAGE_ROOT_PATH";
126
127    /** Name of the Javascript callback used to handle property changes triggered from the locale compare view. */
128    public static final String CALLBACK_HANDLE_CHANGED_PROPERTIES = "cmsHandleChangedProperties";
129
130    /** Javascript function name for showing the locale compare view. */
131    public static final String CALLBACK_REFRESH_LOCALE_COMPARISON = "cmsRefreshLocaleComparison";
132
133    /** The CSS class name used for the DOM elements containing collector information. */
134    public static final String CLASS_COLLECTOR_INFO = "oc-collector-info";
135
136    /** The CSS class name for data elements which precede the direct editable elements. */
137    public static final String CLASS_EDITABLE = "oc-editable";
138
139    /** The CSS class name for elements which end the direct editable elements. */
140    public static final String CLASS_EDITABLE_END = CLASS_EDITABLE + "-end";
141
142    /** The CSS class name for elements which mark elements to be skipped during direct edit. */
143    public static final String CLASS_EDITABLE_SKIP = CLASS_EDITABLE + "-skip";
144
145    /** Name for configuration  setting to limit collector results while computing publish lists for collectors. */
146    public static final String COLLECTOR_PUBLISH_LIST_LIMIT = "collectorPublishListLimit";
147
148    /** The context type sitemap toolbar. */
149    public static final String CONTEXT_TYPE_APP_TOOLBAR = "appToolbar";
150
151    /** The context type containerpage toolbar. */
152    public static final String CONTEXT_TYPE_CONTAINERPAGE_TOOLBAR = "containerpageToolbar";
153
154    /** The context type file table. */
155    public static final String CONTEXT_TYPE_FILE_TABLE = "fileTable";
156
157    /** The context type sitemap toolbar. */
158    public static final String CONTEXT_TYPE_SITEMAP_TOOLBAR = "sitemapToolbar";
159
160    /** A HTML comment that will cause the container page editor to reload the page if it is contained in HTML which is reloaded after the element or its settings have been edited. */
161    public static final String FORMATTER_RELOAD_MARKER = "<!--FORMATTER_RELOAD_g3jf9o0n-->";
162
163    /** Element id for locale comparison view. */
164    public static final String ID_LOCALE_COMPARISON = "cmsLocaleComparison";
165
166    /** Id of the element ussed to  display the sitemap header from Vaadin code. */
167    public static final String ID_LOCALE_HEADER_CONTAINER = "locale-header-container";
168
169    /** Name of the Javascript callback used to open the locale comparison view. */
170    public static final String LOCALECOMPARE_EDIT_PROPERTIES = "cmsLocaleCompareEditProperties";
171
172    /** Parameter for the button left position. */
173    public static final String PARAM_BUTTON_LEFT = "__buttonLeft";
174
175    /** Parameter to disable direct edit. */
176    public static final String PARAM_DISABLE_DIRECT_EDIT = "__disableDirectEdit";
177
178    /** Name of the request parameter used to store the redirect target after login. */
179    public static final String PARAM_LOGIN_REDIRECT = "loginRedirect";
180
181    /** Parameter to force a specific template context. */
182    public static final String PARAM_TEMPLATE_CONTEXT = "__templateContext";
183
184    /** Name of property containing focal point for images. */
185    public static final String PROPERTY_IMAGE_FOCALPOINT = "image.focalpoint";
186
187    /** Tab id for the preference dialog. */
188    public static final String TAB_BASIC = "basic";
189
190    /** Tab id for the preference dialog. */
191    public static final String TAB_EXTENDED = "extended";
192
193    /** Tab id for the preference dialog. */
194    public static final String TAB_HIDDEN = "hidden";
195
196    /** Type name for container pages. */
197    public static final String TYPE_CONTAINERPAGE = "containerpage";
198
199    /** The resource icon CSS class prefix. */
200    public static final String TYPE_ICON_CLASS = "cms_type_icon";
201
202    /** The image resource type name. */
203    public static final String TYPE_IMAGE = "image";
204
205    /** Name for the pseudo-type 'modelgroup'. */
206    public static final String TYPE_MODELGROUP = "modelgroup";
207
208    /** Name for the pseudo-type 'modelgroupreuse'. */
209    public static final String TYPE_MODELGROUP_COPY = "modelgroupcopy";
210
211    /** Name for the pseudo-type 'modelgrouppage'. */
212    public static final String TYPE_MODELGROUP_PAGE = "modelgrouppage";
213
214    /** Name for the type 'modelpage'. */
215    public static final String TYPE_MODELPAGE = "modelpage";
216
217    /** Name for the pseudo-type 'navlevel'. */
218    public static final String TYPE_NAVLEVEL = "navlevel";
219
220    /** Name of Javascript variable used to hold the structure id of the currently selected locale's root folder in the sitemap editor's locale comparison mode. */
221    public static final String VAR_LOCALE_ROOT = "cmsLocaleCompareRoot";
222
223    /**
224     * Hide constructor.<p>
225     */
226    private CmsGwtConstants() {
227
228        // nop
229
230    }
231}