source: main/waeup.plonetheme.ngren3/trunk/waeup/plonetheme/ngren3/skins/plonetheme_bootstrap_custom/plone.kss.dtml @ 10084

Last change on this file since 10084 was 10084, checked in by Henrik Bettermann, 11 years ago

Fill trunk.

File size: 8.1 KB
Line 
1
2/* - plone.kss - */
3/* <dtml-call expr="RESPONSE.setHeader('pragma','no-cache')"> */
4
5/*
6    The above trick to let this file not be cached does not work, unless this file is renamed to have
7    a kss.dtml extension.
8*/
9
10
11/* General stylesheet for Plone AJAX */
12
13/* Add class to body to allow conditional styling when kss is available */
14
15body:load {
16  action-client: addClass;
17  addClass-value: kssActive;
18}
19
20ul.contentViews li a:plone-formProtectionChecked {
21    action-server: replaceContentRegion;
22    replaceContentRegion-tabid: nodeAttr(id, true);
23    replaceContentRegion-url: nodeAttr(href);
24    replaceContentRegion-error: plone-followLink;
25    action-client: plone-removeLockProtection;
26}
27
28/*
29Load the kupu editor.
30
31The editor is also loaded from the page, so
32we give the initial=false, otherwise that
33should be left out if we do that too.
34*/
35
36iframe.kupu-editor-iframe:load {
37    action-client: plone-initKupu;
38}
39
40#content:load {
41    evt-load-initial: false;
42    action-client: initializeCollapsible;
43}
44
45/*
46This loads the external links markers each time an element marked inlineEditable
47is reloaded (needed to make it work with inlineEditable). However, this isn't the best,
48client-performance wise.
49TODO: Find a better way to "bind just once" or just bind the effectively reloaded links,
50and not rebind everything
51*/
52#content .inlineEditable:load {
53    evt-load-initial: false;
54    action-client: bindExternalLinks;
55}
56
57/*
58Portlet refreshing. The refreshing portlets
59must have the kssPortletRefresh class for selection.
60You can also select per portlet, however this shows
61how to handle them all in one rule.
62*/
63/*
64dl.kssPortletRefresh:timeout {
65    evt-timeout-delay: 60000;
66    action-server: refreshPortlet;
67    refreshPortlet-portlethash: kssAttr("portlethash", True);
68    refreshPortlet-name: nodeAttr(id);
69}
70*/
71
72/* Deferred portlets */
73div.portlet-deferred:load {
74    action-server: refreshPortlet;
75    refreshPortlet-portlethash: kssAttr(portlethash, True);
76}
77
78/*
79Content Menu Sections: General
80*/
81
82#contentActionMenus:load {
83    evt-load-initial: false;
84    action-client: bindActionMenus;
85}
86
87/*
88Content Menu Sections: Change View
89*/
90
91/*
92#plone-contentmenu-display dd.actionMenuContent a:click {
93    evt-click-preventdefault: True;
94    action-server: changeViewTemplate;
95    evt-click-allowbubbling: True;
96    changeViewTemplate-url: nodeAttr(href);
97}
98*/
99
100/* This rule is needed for keeping the default behavior for menu elements that */
101/* are supposed to send user to another page */
102#contextSetDefaultPage:click {
103    evt-click-preventdefault: False;
104    action-cancel: changeViewTemplate;
105}
106#folderChangeDefaultPage:click {
107    evt-click-preventdefault: False;
108    action-cancel: changeViewTemplate;
109}
110
111/*
112Content Menu Sections: Cut and Paste
113*/
114 /* Needed allowbubbling, because the menu-item is inside a span an the event selector is on the enclosing a-tag */
115
116/*
117a.actionicon-object_buttons-cut:click {
118    evt-click-preventdefault: True;
119    evt-click-allowbubbling: True;
120    action-server: cutObject;
121}
122
123a.actionicon-object_buttons-copy:click {
124    evt-click-preventdefault: True;
125    evt-click-allowbubbling: True;
126    action-server: copyObject;
127}
128*/
129/*
130Content Menu Sections: Workflow State
131*/
132#plone-contentmenu-workflow dd.actionMenuContent a:click {
133    evt-click-preventdefault: True;
134    evt-click-allowbubbling: True;
135    action-server: changeWorkflowState;
136    changeWorkflowState-url: nodeAttr(href);
137}
138
139
140#plone-contentmenu-workflow dd.actionMenuContent a.kssIgnore:click {
141    evt-click-preventdefault: False;
142    action-cancel: changeWorkflowState;
143}
144
145/*
146In-place calendar changing
147*/
148a.kssCalendarChange:click {
149    evt-click-preventdefault:      true;
150    action-server:                 refreshCalendar;
151    refreshCalendar-portlethash:   kssAttr(portlethash, True);
152    refreshCalendar-year:          kssAttr(year);
153    refreshCalendar-month:         kssAttr(month);
154}
155
156/* Spinner */
157
158
159/* effects do not seem to like animated gifs
160#kss-spinner:spinneron {
161    evt-spinneron-laziness: 1000;
162    action-client: effect;
163    effect-type: appear;
164}
165
166#kss-spinner:spinneroff {
167    action-client: effect;
168    effect-type: fade;
169}
170*/
171
172#kss-spinner:spinneron {
173    action-client: setStyle;
174    setStyle-name: display;
175    setStyle-value: block;
176}
177
178#kss-spinner:spinneroff {
179    action-client: setStyle;
180    setStyle-name: display;
181    setStyle-value: none;
182}
183
184
185/*
186** Form tabs
187*/
188
189form.enableFormTabbing:load {
190    evt-load-initial: false;
191    action-client: plone-initFormTabs;
192}
193
194form.enableUnloadProtection:load {
195    evt-load-initial: false;
196    action-client: plone-initFormProtection;
197}
198
199form.enableUnlockProtection:load {
200    evt-load-initial: false;
201    action-client: plone-initLockingProtection;
202}
203
204/* disable lock refreshing when an inlineEditable field is reloaded
205   in view mode via AJAX (e.g. when Cancel is pressed) */
206div.inlineEditable:load {
207    evt-load-initial: false;
208    action-client: plone-removeLockProtection;
209}
210
211/*  Selector for the sharing page in plone.app.workflow.
212    the search_term parameters, puts the needed info into the request
213 */
214
215#sharing-save-button:click {
216  evt-click-preventdefault: true;
217  action-server: updateSharingInfo;
218  updateSharingInfo-kssSubmitForm: currentForm();
219  updateSharingInfo-error: plone-submitCurrentForm;
220}
221
222#sharing-user-group-search:keyup {
223  evt-keyup-preventdefault: true;
224  evt-keyup-keycodes: 13;
225  action-server: updateSharingInfo;
226  updateSharingInfo-kssSubmitForm: currentForm();
227}
228
229
230/* kupu stuff */
231#kupu-save-button:load {
232   action-client: setStyle;
233   setStyle-name: display;
234   setStyle-value: inline;
235}
236
237button.kupu-save:click {
238   action-server: savekupu;
239   savekupu-text: currentFormVarFromKssAttr("atfieldname", true);
240   savekupu-fieldname: kssAttr("atfieldname", true);
241}
242
243/* Folder contents stuff */
244
245body:load {
246    action-client: plone-initShiftDetection;
247}
248
249#folderlisting-main-table input[type="checkbox"]:change {
250    action-client: plone-createCheckBoxSelection;
251    plone-createCheckBoxSelection-group: 'table.listing input[type="checkbox"]';
252}
253
254
255#folderlisting-main-table input[type="checkbox"]:change {
256    action-client: toggleClass;
257    toggleClass-kssSelector: parentnode("table.listing tbody tr");
258    toggleClass-classname: "selected";
259}
260
261/* Generic setup which (made more specific by other rules) */
262.update-selection:click, #listing-table .column:click {
263    action-server: update_table url(kssAttr("serveraction", true));
264    evt-click-preventdefault: True;
265    update_table-pagenumber: currentFormVar('pagenumber');
266    update_table-show_all: currentFormVar('show_all');
267    update_table-sort_on: currentFormVar('sort_on');
268}
269
270#foldercontents-show-batched:click {
271    update_table-show_all: "false";
272}
273
274#foldercontents-show-all:click {
275    update_table-show_all: "true";
276        update_table-pagenumber: "1";
277}
278
279#foldercontents-title-column:click {
280    update_table-sort_on: "sortable_title";
281}
282
283#foldercontents-modified-column:click {
284    update_table-sort_on: "modified";
285}
286
287#foldercontents-status-column:click {
288    update_table-sort_on: "review_state";
289}
290
291#foldercontents-selectall:click {
292    update_table-select: 'screen';
293}
294
295#foldercontents-selectall-completebatch:click {
296    update_table-select: 'all';
297}
298
299#foldercontents-clearselection:click {
300    update_table-select: 'none';
301}
302
303#folderlisting-main-table:load {
304    action-client: plone-initDragAndDrop;
305    plone-initDragAndDrop-table: '#listing-table';
306}
307
308#folderlisting-main-table:load {
309    action-client: plone-initCheckBoxSelection;
310}
311
312/* kupu stuff */
313#kupu-save-button:load {
314   action-client: setStyle;
315   setStyle-name: display;
316   setStyle-value: inline;
317}
318
319div.kupu-save-message:timeout {
320   evt-timeout-delay: 2000;
321   evt-timeout-repeat: '';
322   action-client: deleteNode;
323}
324
325#portal-message:timeout {
326   evt-timeout-delay: 2000;
327   evt-timeout-repeat: '';
328   action-client: deleteNode;
329}
330
331/* check if the object if really locked before showing the icon */
332/* an xmlhttprequest might have just been sent on the object to */
333/* unlock just a few moment ago. So we need to be really sure   */
334/* that the object wasn't locked, to be sure, we do one more    */
335/* xmlhttprequest */
336#lock-icon:load{
337    action-server: updateLockInfo;
338}
339
340
Note: See TracBrowser for help on using the repository browser.