lipsiadmin 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +8 -1
- data/Rakefile +1 -1
- data/lib/version.rb +1 -1
- data/lipsiadmin_generators/backend/templates/javascripts/ext.js +20 -99
- data/lipsiadmin_generators/backend/templates/stylesheets/ext.css +223 -108
- data/lipsiadmin_generators/backend/templates/stylesheets/standard.css +0 -1
- data/lipsiadmin_generators/backend/templates/views/javascripts/backend.js.erb +48 -51
- data/resources/pd4ml/ruby/Pd4Ruby.java +1 -2
- metadata +3 -3
@@ -19,7 +19,6 @@ a:hover.black { text-decoration:none; color:#663900; }
|
|
19
19
|
a.white { text-decoration:none; color:#FFF; }
|
20
20
|
a:hover.white { text-decoration:none; color:#663900; }
|
21
21
|
img { border:none; }
|
22
|
-
form { display: inline; }
|
23
22
|
.fixed { width:150px; line-height:25px; }
|
24
23
|
.full { width:100%; }
|
25
24
|
.half { width:50%; }
|
@@ -57,10 +57,10 @@ Backend.app = function(){
|
|
57
57
|
// Used for history the browsing
|
58
58
|
Ext.History.init();
|
59
59
|
Ext.History.on('change', function(token){ if(token != Backend.app.oldUrl) { Backend.app.load(token) } });
|
60
|
-
|
60
|
+
|
61
61
|
this.cache = {};
|
62
62
|
var header;
|
63
|
-
|
63
|
+
|
64
64
|
<% if params[:small] != "1" %>
|
65
65
|
var header = new Ext.Panel({
|
66
66
|
contentEl: 'header',
|
@@ -69,7 +69,7 @@ Backend.app = function(){
|
|
69
69
|
bbar: <%= backend_menu %>
|
70
70
|
});
|
71
71
|
<% end %>
|
72
|
-
|
72
|
+
|
73
73
|
this.contentDynamic = new Ext.Panel({
|
74
74
|
id:'dynamic',
|
75
75
|
region:'center',
|
@@ -78,7 +78,7 @@ Backend.app = function(){
|
|
78
78
|
title: this.title() ? ' ' : '',
|
79
79
|
layout:'fit'
|
80
80
|
});
|
81
|
-
|
81
|
+
|
82
82
|
this.viewport = new Ext.Viewport({
|
83
83
|
layout:'border',
|
84
84
|
items: header ? [header, this.contentDynamic] : [this.contentDynamic]
|
@@ -90,19 +90,19 @@ Backend.app = function(){
|
|
90
90
|
Ext.get('loading-mask').fadeOut({remove:true});
|
91
91
|
}, 250);
|
92
92
|
}, // init
|
93
|
-
|
93
|
+
|
94
94
|
smallView : function(){
|
95
95
|
return window.location.search ? Ext.urlDecode(window.location.search.substring(1)).small : false;
|
96
96
|
}, // smalloallProductsGroupingStore
|
97
|
-
|
97
|
+
|
98
98
|
toolbar: function(){
|
99
99
|
return window.location.search ? Ext.urlDecode(window.location.search.substring(1)).toolbar!="0" : true;
|
100
100
|
}, // hideToolbar
|
101
|
-
|
101
|
+
|
102
102
|
title: function(){
|
103
103
|
return window.location.search ? Ext.urlDecode(window.location.search.substring(1)).title!="0" : true;
|
104
104
|
}, // hideTite
|
105
|
-
|
105
|
+
|
106
106
|
load : function(url){
|
107
107
|
var ext = (/[.]/.exec(url)) ? /[^.]+$/.exec(url) : 'html';
|
108
108
|
|
@@ -125,6 +125,7 @@ Backend.app = function(){
|
|
125
125
|
hd.appendChild(s);
|
126
126
|
} else if (ext == 'html'){
|
127
127
|
// Clean the html and scripts if requested
|
128
|
+
this.mask();
|
128
129
|
Ext.Ajax.request({
|
129
130
|
url: url,
|
130
131
|
headers: { 'Accept': 'text/html' },
|
@@ -134,7 +135,7 @@ Backend.app = function(){
|
|
134
135
|
Ext.Msg.alert(Backend.locale.messages.alert.title, Backend.locale.messages.alert.message);
|
135
136
|
}
|
136
137
|
}, // load
|
137
|
-
|
138
|
+
|
138
139
|
back: function(){
|
139
140
|
if (Backend.app.smallView()){
|
140
141
|
window.location.reload(true);
|
@@ -142,18 +143,18 @@ Backend.app = function(){
|
|
142
143
|
Ext.History.back();
|
143
144
|
}
|
144
145
|
},// back
|
145
|
-
|
146
|
+
|
146
147
|
update : function(html){
|
147
148
|
this.cleanScripts();
|
148
149
|
this.clean();
|
149
150
|
var el = this.contentDynamic.body.update(html);
|
150
151
|
this.inspectContent(el, html);
|
151
152
|
}, // update
|
152
|
-
|
153
|
+
|
153
154
|
cleanScripts: function(){
|
154
155
|
Ext.select('head > script').each(function(el){ el.remove(); });
|
155
156
|
}, // cleanScripts
|
156
|
-
|
157
|
+
|
157
158
|
clean : function(){
|
158
159
|
this.mask();
|
159
160
|
this.contentDynamic.items.each(function(i){ i.destroy(); });
|
@@ -161,12 +162,12 @@ Backend.app = function(){
|
|
161
162
|
this.contentDynamic.body.update(''); // Another check ;)
|
162
163
|
this.contentDynamic.doLayout();
|
163
164
|
}, // clean
|
164
|
-
|
165
|
+
|
165
166
|
addItem : function(item){
|
166
167
|
this.contentDynamic.add(item);
|
167
168
|
this.contentDynamic.doLayout();
|
168
169
|
}, // addItem
|
169
|
-
|
170
|
+
|
170
171
|
submitForm : function(){
|
171
172
|
Backend.app.mask(Backend.locale.messages.wait.message);
|
172
173
|
Backend.app.contentDynamic.findByType('tabpanel').each(function(tabpanel){
|
@@ -174,18 +175,16 @@ Backend.app = function(){
|
|
174
175
|
});
|
175
176
|
Ext.select('form[target=ajax-iframe]').each(function(form){ form.dom.submit(); });
|
176
177
|
}, // submitForms
|
177
|
-
|
178
|
+
|
178
179
|
setTitle: function(title){
|
179
180
|
this.contentDynamic.setTitle(title);
|
180
181
|
}, // SetTitle
|
181
|
-
|
182
|
+
|
182
183
|
inspectContent: function(el, originalHtml){
|
183
184
|
try {
|
184
185
|
// Search for forms (except ajax-frame) in the page, usually only one.
|
185
|
-
el.select('form').each(function(form){
|
186
|
-
|
187
|
-
form.dom.target = 'ajax-iframe';
|
188
|
-
}
|
186
|
+
el.select('form[id!=ajax-iframe]').each(function(form){
|
187
|
+
form.dom.target = 'ajax-iframe';
|
189
188
|
});
|
190
189
|
|
191
190
|
// Search for tabs in the page
|
@@ -194,36 +193,31 @@ Backend.app = function(){
|
|
194
193
|
if (tabs.elements.length > 0){
|
195
194
|
// Build Tabs
|
196
195
|
var items = tabs.elements.collect(function(tab){
|
197
|
-
return { id: tab.id, contentEl: tab.id, title: tab.title };
|
196
|
+
return { id: tab.id+'-tabbed', contentEl: tab.id, title: tab.title };
|
198
197
|
});
|
199
198
|
|
200
199
|
// Get ActiveTab
|
201
200
|
var activeTab = (cache.activeTab || 0);
|
202
201
|
|
202
|
+
// We select the first form in the dom
|
203
203
|
var form = el.select('form[target=ajax-iframe]').first();
|
204
|
-
|
205
|
-
this
|
206
|
-
|
207
|
-
|
204
|
+
|
205
|
+
// We need this for IE8
|
206
|
+
var formId = Ext.id(form, 'ajax-form-');
|
207
|
+
|
208
|
+
var tabConfig = {
|
209
|
+
applyTo: formId,
|
208
210
|
activeTab: activeTab,
|
209
211
|
border:false,
|
210
212
|
items: items,
|
211
|
-
deferredRender:
|
213
|
+
deferredRender: false,
|
212
214
|
layoutOnTabChange: true,
|
213
215
|
enableTabScroll: true,
|
214
216
|
defaults: { autoScroll:true, layout:'fit' }
|
215
|
-
});
|
216
|
-
|
217
|
-
// We need to add an extra container for maximize compatibility with
|
218
|
-
// lastest safari builds.
|
219
|
-
var panelConfig = {
|
220
|
-
border:false,
|
221
|
-
layout:'fit',
|
222
|
-
items: this.tabPanel
|
223
217
|
};
|
224
218
|
|
225
219
|
if (this.toolbar()){
|
226
|
-
Ext.apply(
|
220
|
+
Ext.apply(tabConfig, {
|
227
221
|
bbar: [{
|
228
222
|
text: Backend.locale.buttons.back,
|
229
223
|
cls: 'x-btn-text-icon back',
|
@@ -236,14 +230,16 @@ Backend.app = function(){
|
|
236
230
|
});
|
237
231
|
}
|
238
232
|
|
239
|
-
//
|
240
|
-
|
241
|
-
|
242
|
-
|
233
|
+
// We can build the tabPanel
|
234
|
+
this.tabPanel = new Ext.TabPanel(tabConfig);
|
235
|
+
|
236
|
+
// Now we add the tab panel to our main container
|
237
|
+
this.addItem(this.tabPanel);
|
238
|
+
|
243
239
|
// Need to use this because some times we add tabs from inline scripts
|
244
240
|
this.tabPanel.on('add', function(container, tab){ if (tab.id == activeTab) { Backend.app.tabPanel.setActiveTab(activeTab); } });
|
245
241
|
}
|
246
|
-
|
242
|
+
|
247
243
|
// Now we can load scripts an eval scripts from the original html
|
248
244
|
var re = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;
|
249
245
|
var srcRe = /\ssrc=([\'\"])(.*?)\1/i;
|
@@ -277,7 +273,7 @@ Backend.app = function(){
|
|
277
273
|
throw this.error(e)
|
278
274
|
}
|
279
275
|
},//inspectContent
|
280
|
-
|
276
|
+
|
281
277
|
error: function(e){
|
282
278
|
if (typeof console != 'undefined') {
|
283
279
|
console.error(e);
|
@@ -285,7 +281,7 @@ Backend.app = function(){
|
|
285
281
|
Ext.Msg.alert(Backend.locale.messages.alert.title, e);
|
286
282
|
}
|
287
283
|
}, // error
|
288
|
-
|
284
|
+
|
289
285
|
openHelp: function(){
|
290
286
|
var form = new Ext.FormPanel({
|
291
287
|
baseCls: 'x-plain',
|
@@ -300,7 +296,8 @@ Backend.app = function(){
|
|
300
296
|
});
|
301
297
|
|
302
298
|
var formDialog = new Ext.Window({
|
303
|
-
|
299
|
+
id: 'help-window',
|
300
|
+
title: Backend.locale.help.title,
|
304
301
|
items: form,
|
305
302
|
width: 500,
|
306
303
|
height: 300,
|
@@ -330,11 +327,11 @@ Backend.app = function(){
|
|
330
327
|
}
|
331
328
|
});
|
332
329
|
}, this);
|
333
|
-
|
330
|
+
|
334
331
|
formDialog.addButton(Backend.locale.buttons.close, formDialog.close, formDialog);
|
335
332
|
formDialog.show();
|
336
333
|
}, // openHelp
|
337
|
-
|
334
|
+
|
338
335
|
doLayout : function(){
|
339
336
|
this.contentDynamic.doLayout();
|
340
337
|
}, //doLayout
|
@@ -345,13 +342,13 @@ Backend.app = function(){
|
|
345
342
|
this.contentDynamic.el.mask(text);
|
346
343
|
}
|
347
344
|
}, // mask
|
348
|
-
|
345
|
+
|
349
346
|
unmask : function(){
|
350
347
|
if (this.contentDynamic){
|
351
348
|
this.contentDynamic.el.unmask();
|
352
349
|
}
|
353
350
|
}, // unmask
|
354
|
-
|
351
|
+
|
355
352
|
collapseBoxes : function(current){
|
356
353
|
var el = current.up().down('div.x-box-collapsible');
|
357
354
|
var currentEl = Ext.get(el);
|
@@ -397,16 +394,16 @@ Backend.window = Ext.extend(Ext.Window, {
|
|
397
394
|
}
|
398
395
|
this.html = '<iframe id="'+this.iframeId+'" class="windowed" src="/backend/base/?small=1&toolbar='+(this.form?0:1)+'&load='+this.url+'" frameBorder="0" width="100%" height="100%" />';
|
399
396
|
}, // initComponent
|
400
|
-
|
397
|
+
|
401
398
|
afterShow : function(afterShow){
|
402
399
|
Backend.window.superclass.afterShow.call(this);
|
403
400
|
this.contentWindow = Ext.fly(this.iframeId).dom.contentWindow;
|
404
401
|
}, // onRender
|
405
|
-
|
402
|
+
|
406
403
|
getSelections: function(){
|
407
404
|
return this.contentWindow[this.grid].getSelectionModel().getSelections();
|
408
405
|
}, // getSelections
|
409
|
-
|
406
|
+
|
410
407
|
closeWithSelections: function(){
|
411
408
|
if (this.getSelections().length > 0){
|
412
409
|
this.fireEvent('selected', this, this.getSelections());
|
@@ -415,7 +412,7 @@ Backend.window = Ext.extend(Ext.Window, {
|
|
415
412
|
Ext.Msg.alert(Backend.locale.messages.alert.title, Backend.locale.messages.alert.notSelected);
|
416
413
|
}
|
417
414
|
}, // closeWithSelections
|
418
|
-
|
415
|
+
|
419
416
|
saveForm: function(){
|
420
417
|
this.contentWindow.Backend.app.submitForm();
|
421
418
|
this.fireEvent('saved', this);
|
@@ -211,8 +211,7 @@ public class Pd4Ruby {
|
|
211
211
|
converter.generatePDF( url, file, width, pagesize, permissions, password, bookmarks, orientation, insets, ttf, header, footer, debug );
|
212
212
|
}
|
213
213
|
|
214
|
-
private void generatePDF(String inputUrl, String inputFile, int htmlWidth, String pageFormat, int permissions, String password, String bookmarks, String orientation, String insets, String fontsDir, String headerBody, String footerBody, int debug)
|
215
|
-
throws Exception {
|
214
|
+
private void generatePDF(String inputUrl, String inputFile, int htmlWidth, String pageFormat, int permissions, String password, String bookmarks, String orientation, String insets, String fontsDir, String headerBody, String footerBody, int debug) throws Exception {
|
216
215
|
|
217
216
|
PD4ML pd4ml = new PD4ML();
|
218
217
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lipsiadmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davide D'Agostino
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-18 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -450,7 +450,7 @@ files:
|
|
450
450
|
- resources/rdoc/horo.rb
|
451
451
|
- tasks/lipsiadmin_tasks.rake
|
452
452
|
has_rdoc: true
|
453
|
-
homepage: http://
|
453
|
+
homepage: http://www.lipsiadmin.com
|
454
454
|
licenses: []
|
455
455
|
|
456
456
|
post_install_message:
|