zena 1.0.0.rc2 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +23 -0
- data/README.rdoc +1 -1
- data/app/controllers/columns_controller.rb +3 -31
- data/app/controllers/comments_controller.rb +8 -3
- data/app/controllers/data_entries_controller.rb +1 -1
- data/app/controllers/documents_controller.rb +2 -2
- data/app/controllers/nodes_controller.rb +29 -12
- data/app/controllers/relations_controller.rb +2 -2
- data/app/controllers/sites_controller.rb +1 -1
- data/app/controllers/user_sessions_controller.rb +6 -3
- data/app/controllers/users_controller.rb +18 -16
- data/app/controllers/versions_controller.rb +20 -18
- data/app/controllers/virtual_classes_controller.rb +103 -17
- data/app/helpers/users_helper.rb +1 -1
- data/app/models/column.rb +19 -50
- data/app/models/comment.rb +2 -1
- data/app/models/node.rb +45 -22
- data/app/models/relation.rb +13 -0
- data/app/models/relation_proxy.rb +3 -2
- data/app/models/role.rb +213 -4
- data/app/models/site.rb +18 -11
- data/app/models/template.rb +37 -35
- data/app/models/version.rb +1 -1
- data/app/models/virtual_class.rb +154 -86
- data/app/views/columns/_li.html.erb +1 -1
- data/app/views/columns/index.html.erb +1 -9
- data/app/views/comments/index.rhtml +10 -8
- data/app/views/documents/_crop.rhtml +5 -6
- data/app/views/documents/crop_form.rjs +3 -2
- data/app/views/groups/index.rhtml +1 -1
- data/app/views/iformats/index.rhtml +1 -1
- data/app/views/nodes/_import_results.rhtml +1 -1
- data/app/views/nodes/_parent.rhtml +1 -2
- data/app/views/nodes/update.rjs +3 -4
- data/app/views/relations/index.erb +1 -1
- data/app/views/sites/index.erb +1 -1
- data/app/views/templates/drive_tabs/_drive.rhtml +0 -2
- data/app/views/templates/edit_tabs/_image.rhtml +1 -1
- data/app/views/templates/edit_tabs/_title.rhtml +0 -6
- data/app/views/users/index.rhtml +1 -1
- data/app/views/users/preferences.html.erb +2 -2
- data/app/views/versions/backup.rjs +1 -1
- data/app/views/versions/custom_tab.rhtml +9 -4
- data/app/views/versions/destroy.rjs +2 -2
- data/app/views/versions/update.rjs +2 -9
- data/app/views/virtual_classes/_form.erb +3 -2
- data/app/views/virtual_classes/import_prepare.html.erb +13 -0
- data/app/views/virtual_classes/index.erb +28 -8
- data/app/views/zafu/default/Node-+adminLayout.zafu +1 -13
- data/app/views/zafu/default/Node-+login.zafu +1 -0
- data/app/views/zafu/default/Node-+notFound.zafu +1 -1
- data/app/views/zafu/default/Node-+popupLayout.zafu +1 -2
- data/app/views/zafu/default/Node-+search.zafu +1 -1
- data/app/views/zafu/default/Node-admin.zafu +205 -0
- data/app/views/zafu/default/Node.zafu +11 -11
- data/bricks/captcha/lib/bricks/captcha.rb +3 -2
- data/bricks/mongrel/zena/init.rb +2 -1
- data/bricks/pdf/README +5 -5
- data/bricks/pdf/lib/bricks/pdf/engine/prince.rb +2 -2
- data/bricks/pdf/lib/bricks/pdf/engine/xhtml2pdf.rb +2 -2
- data/bricks/pdf/lib/bricks/pdf/install.rb +5 -5
- data/bricks/pdf/lib/bricks/pdf.rb +11 -11
- data/bricks/pdf/test/engines/test_prince.rb +4 -4
- data/bricks/pdf/test/engines/test_xhtml2pdf.rb +4 -4
- data/bricks/pdf/test/shoulda_macros/shoulda_pdf.rb +2 -2
- data/bricks/pdf/zena/init.rb +2 -2
- data/bricks/pdf/zena/tasks.rb +2 -2
- data/bricks/sphinx/lib/bricks/sphinx.rb +6 -2
- data/bricks/sphinx/zena/{sphinx.yml → sphinx.yml.erb} +2 -2
- data/bricks/sphinx/zena/tasks.rb +28 -2
- data/bricks/tags/lib/bricks/tags.rb +16 -1
- data/bricks/tags/zena/test/unit/tags_test.rb +15 -0
- data/bricks/tags/zena/test/zafu/tags.yml +5 -1
- data/bricks/worker/lib/bricks/worker.rb +39 -0
- data/bricks/worker/zena/deploy.rb +0 -2
- data/bricks/worker/zena/init.rb +1 -0
- data/bricks/worker/zena/test/sites/zena/delayed_jobs.yml +16 -0
- data/bricks/worker/zena/test/zafu/worker.yml +8 -0
- data/bricks/zena/zena/migrate/01_base.rb +36 -60
- data/bricks/zena/zena/migrate/02_zerox1_schema.rb +388 -0
- data/bricks/zena/zena/migrate/03_zerox1_data.rb +380 -0
- data/bricks/zena/zena/migrate/20110315161158_add_reverse_scope_to_roles.rb +9 -0
- data/config/database_example.yml +1 -1
- data/config/environment.rb +1 -1
- data/config/gems.yml +17 -14
- data/db/init/base/skins/default/Node-+index.zafu +8 -1
- data/db/init/base/skins/default/Node-+login.zafu +1 -0
- data/db/init/base/skins/default/Node-+popupLayout.zafu +1 -2
- data/db/init/base/skins/default/Node-+search.zafu +2 -2
- data/db/init/base/skins/default/Node.zafu +9 -9
- data/db/init/base/skins/default/{favicon.png → img/favicon.png} +0 -0
- data/db/init/base/skins/default/{style.css → img/style.css} +0 -0
- data/db/init/base/skins/default/img/translations.yml +11 -0
- data/db/init/base/skins/default/notes.zafu +7 -9
- data/doc/zafu_changes.yml +12 -0
- data/lib/bricks/loader.rb +38 -15
- data/lib/tasks/zena.rake +74 -24
- data/lib/zena/acts/enrollable.rb +4 -1
- data/lib/zena/acts/secure.rb +2 -48
- data/lib/zena/acts/serializable.rb +13 -1
- data/lib/zena/app.rb +9 -0
- data/lib/zena/code_syntax.rb +154 -151
- data/lib/zena/console.rb +141 -0
- data/lib/zena/controller/test_case.rb +1 -1
- data/lib/zena/db_helper/abstract_db.rb +17 -5
- data/lib/zena/db_helper/mysql.rb +14 -12
- data/lib/zena/db_helper/postgresql.rb +1 -2
- data/lib/zena/db_helper/sqlite3.rb +6 -6
- data/lib/zena/deploy/awstats.conf.rhtml +1 -1
- data/lib/zena/deploy/httpd.rhtml +6 -1
- data/lib/zena/deploy/vhost.rhtml +9 -1
- data/lib/zena/deploy.rb +12 -7
- data/lib/zena/foxy_parser.rb +3 -1
- data/lib/zena/info.rb +1 -1
- data/lib/zena/parser/zafu_tags.rb +1 -0
- data/lib/zena/parser/zazen_rules.rb +1 -1
- data/lib/zena/remote/node.rb +15 -3
- data/lib/zena/remote/serializable_array.rb +19 -0
- data/lib/zena/remote.rb +1 -0
- data/lib/zena/routes.rb +7 -2
- data/lib/zena/site_worker.rb +11 -1
- data/lib/zena/unit/test_case.rb +68 -0
- data/lib/zena/use/action.rb +6 -2
- data/lib/zena/use/ajax.rb +127 -53
- data/lib/zena/use/ancestry.rb +11 -8
- data/lib/zena/use/calendar.rb +265 -129
- data/lib/zena/use/conditional.rb +1 -1
- data/lib/zena/use/context.rb +5 -5
- data/lib/zena/use/dates.rb +172 -60
- data/lib/zena/use/display.rb +70 -39
- data/lib/zena/use/error_rendering.rb +1 -3
- data/lib/zena/use/field_index.rb +4 -1
- data/lib/zena/use/forms.rb +94 -72
- data/lib/zena/use/fulltext.rb +16 -24
- data/lib/zena/use/html_tags.rb +20 -12
- data/lib/zena/use/i18n.rb +37 -37
- data/lib/zena/use/image_builder.rb +8 -1
- data/lib/zena/use/ml_index.rb +16 -16
- data/lib/zena/use/prop_eval.rb +10 -5
- data/lib/zena/use/query_builder.rb +55 -23
- data/lib/zena/use/query_node.rb +51 -25
- data/lib/zena/use/refactor.rb +2 -28
- data/lib/zena/use/relations.rb +1 -1
- data/lib/zena/use/rendering.rb +29 -0
- data/lib/zena/use/scope_index.rb +75 -14
- data/lib/zena/use/search.rb +5 -10
- data/lib/zena/use/test_helper.rb +2 -2
- data/lib/zena/use/urls.rb +125 -104
- data/lib/zena/use/workflow.rb +2 -1
- data/lib/zena/use/zafu_attributes.rb +2 -2
- data/lib/zena/use/zafu_safe_definitions.rb +20 -0
- data/lib/zena/use/zafu_templates.rb +20 -6
- data/lib/zena/use/zazen.rb +31 -20
- data/lib/zena/view/test_case.rb +5 -0
- data/lib/zena/zafu_compiler.rb +24 -2
- data/lib/zena.rb +12 -6
- data/locale/de/LC_MESSAGES/zena.mo +0 -0
- data/locale/de/zena.po +1345 -1164
- data/locale/en/LC_MESSAGES/zena.mo +0 -0
- data/locale/en/zena.po +1275 -1129
- data/locale/fr/LC_MESSAGES/zena.mo +0 -0
- data/locale/fr/zena.mo +0 -0
- data/locale/fr/zena.po +1617 -1441
- data/locale/log.txt +9 -0
- data/locale/zena.pot +957 -748
- data/public/javascripts/prototype.js +1 -1
- data/public/javascripts/zena.js +99 -44
- data/public/stylesheets/admin.css +6 -4
- data/public/stylesheets/backend.css +71 -0
- data/public/stylesheets/calendar.css +24 -25
- data/public/stylesheets/code.css +11 -6
- data/public/stylesheets/comment.css +2 -1
- data/public/stylesheets/popup.css +7 -8
- data/test/custom_queries/complex.host.yml +15 -1
- data/test/fixtures/files/Node-test.zafu +29 -28
- data/test/fixtures/files/translations_de.yml +12 -1
- data/test/fixtures/files/translations_fr.yml +12 -1
- data/test/functional/comments_controller_test.rb +9 -0
- data/test/functional/iformats_controller_test.rb +1 -1
- data/test/functional/nodes_controller_test.rb +124 -35
- data/test/functional/users_controller_test.rb +132 -3
- data/test/functional/virtual_classes_controller_test.rb +75 -4
- data/test/integration/navigation_test.rb +51 -9
- data/test/integration/query_node/basic.yml +19 -7
- data/test/integration/query_node/complex.yml +1 -1
- data/test/integration/query_node/dates.yml +27 -1
- data/test/integration/query_node/filters.yml +1 -1
- data/test/integration/query_node/relations.yml +13 -4
- data/test/integration/query_node_test.rb +4 -0
- data/test/integration/xml_api_test.rb +6 -1
- data/test/integration/zafu_compiler/action.yml +3 -3
- data/test/integration/zafu_compiler/ajax.yml +103 -22
- data/test/integration/zafu_compiler/basic.yml +0 -52
- data/test/integration/zafu_compiler/calendar.yml +44 -20
- data/test/integration/zafu_compiler/comments.yml +53 -0
- data/test/integration/zafu_compiler/complex.yml +11 -11
- data/test/integration/zafu_compiler/complex_ok.yml +16 -3
- data/test/integration/zafu_compiler/conditional.yml +15 -5
- data/test/integration/zafu_compiler/context.yml +9 -0
- data/test/integration/zafu_compiler/dates.yml +43 -15
- data/test/integration/zafu_compiler/display.yml +60 -6
- data/test/integration/zafu_compiler/errors.yml +6 -2
- data/test/integration/zafu_compiler/forms.yml +45 -6
- data/test/integration/zafu_compiler/i18n.yml +8 -1
- data/test/integration/zafu_compiler/meta.yml +38 -0
- data/test/integration/zafu_compiler/query.yml +43 -4
- data/test/integration/zafu_compiler/relations.yml +26 -33
- data/test/integration/zafu_compiler/rubyless.yml +10 -0
- data/test/integration/zafu_compiler/safe_definitions.yml +21 -1
- data/test/integration/zafu_compiler/urls.yml +75 -5
- data/test/integration/zafu_compiler/version.yml +2 -2
- data/test/integration/zafu_compiler/zafu_attributes.yml +5 -1
- data/test/integration/zafu_compiler/zazen.yml +14 -6
- data/test/integration/zafu_compiler_test.rb +5 -1
- data/test/sites/complex/columns.yml +5 -0
- data/test/sites/complex/roles.yml +4 -0
- data/test/sites/zena/nodes.yml +13 -2
- data/test/sites/zena/roles.yml +13 -5
- data/test/sites/zena/versions.yml +27 -9
- data/test/unit/column_test.rb +51 -5
- data/test/unit/iformat_test.rb +2 -2
- data/test/unit/node_test.rb +29 -17
- data/test/unit/note_test.rb +1 -1
- data/test/unit/relation_proxy_test.rb +4 -5
- data/test/unit/relation_test.rb +16 -0
- data/test/unit/remote_test.rb +2 -2
- data/test/unit/role_test.rb +292 -4
- data/test/unit/site_test.rb +12 -0
- data/test/unit/template_test.rb +1 -1
- data/test/unit/text_document_test.rb +1 -1
- data/test/unit/virtual_class_test.rb +200 -83
- data/test/unit/zena/acts/enrollable_test.rb +26 -31
- data/test/unit/zena/use/calendar_test.rb +90 -37
- data/test/unit/zena/use/field_index_test.rb +28 -0
- data/test/unit/zena/use/html_tags_test.rb +7 -3
- data/test/unit/zena/use/ml_index_test.rb +2 -16
- data/test/unit/zena/use/nested_attributes_alias_view_test.rb +2 -2
- data/test/unit/zena/use/prop_eval_test.rb +50 -8
- data/test/unit/zena/use/query_node_test.rb +11 -0
- data/test/unit/zena/use/rendering_test.rb +72 -0
- data/test/unit/zena/use/scope_index_test.rb +37 -2
- data/test/unit/zena/use/urls_test.rb +10 -0
- data/test/unit/zena/use/zazen_test.rb +3 -3
- data/vendor/plugins/gettext_i18n_rails/Gemfile +11 -0
- data/vendor/plugins/gettext_i18n_rails/Gemfile.lock +92 -0
- data/vendor/plugins/gettext_i18n_rails/Rakefile +12 -17
- data/vendor/plugins/gettext_i18n_rails/Readme.md +215 -0
- data/vendor/plugins/gettext_i18n_rails/VERSION +1 -1
- data/vendor/plugins/gettext_i18n_rails/gettext_i18n_rails.gemspec +38 -34
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/active_record.rb +1 -1
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/backend.rb +30 -14
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/haml_parser.rb +1 -1
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/html_safe_translations.rb +29 -0
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/i18n_hacks.rb +29 -1
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/model_attributes_finder.rb +7 -1
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/railtie.rb +10 -0
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/ruby_gettext_extractor.rb +6 -2
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/string_interpolate_fix.rb +20 -0
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails/tasks.rb +120 -0
- data/vendor/plugins/gettext_i18n_rails/lib/gettext_i18n_rails.rb +10 -3
- data/vendor/plugins/gettext_i18n_rails/lib/tasks/gettext_rails_i18n.rake +1 -74
- data/vendor/plugins/gettext_i18n_rails/spec/gettext_i18n_rails/active_record_spec.rb +51 -20
- data/vendor/plugins/gettext_i18n_rails/spec/gettext_i18n_rails/backend_spec.rb +12 -7
- data/vendor/plugins/gettext_i18n_rails/spec/gettext_i18n_rails/string_interpolate_fix_spec.rb +32 -0
- data/vendor/plugins/gettext_i18n_rails/spec/gettext_i18n_rails_spec.rb +38 -1
- data/vendor/plugins/gettext_i18n_rails/spec/rails2/Gemfile +11 -0
- data/vendor/plugins/gettext_i18n_rails/spec/spec_helper.rb +1 -8
- data/zena.gemspec +2241 -2217
- metadata +123 -83
- data/.gitignore +0 -36
- data/app/views/nodes/_dates.rhtml +0 -13
- data/db/init/base/skins/default/Node-+adminLayout.zafu +0 -46
- data/db/init/base/skins/default/Node-tree.zafu +0 -19
- data/vendor/plugins/gettext_i18n_rails/README.markdown +0 -143
@@ -4871,4 +4871,4 @@ Element.ClassNames.prototype = {
|
|
4871
4871
|
|
4872
4872
|
Object.extend(Element.ClassNames.prototype, Enumerable);
|
4873
4873
|
|
4874
|
-
/*--------------------------------------------------------------------------*/
|
4874
|
+
/*--------------------------------------------------------------------------*/
|
data/public/javascripts/zena.js
CHANGED
@@ -77,6 +77,7 @@ Zena.open_window = function(url, id, event, pos_x, pos_y) {
|
|
77
77
|
top:pos_y,
|
78
78
|
width: 300,
|
79
79
|
height:400,
|
80
|
+
zIndex:100 + Zena.window_offset,
|
80
81
|
showEffect: Element.show, hideEffect: Element.hide,
|
81
82
|
destroyOnClose: true
|
82
83
|
});
|
@@ -312,7 +313,7 @@ Zena.update_rwp = function(inherit_val,r_index,w_index,p_index,s_index) {
|
|
312
313
|
|
313
314
|
/* fade flashes automatically */
|
314
315
|
Event.observe(window, 'load', function() {
|
315
|
-
$A(document.getElementsByClassName('
|
316
|
+
$A(document.getElementsByClassName('auto_fade')).each(function(o) {
|
316
317
|
o.opacity = 100.0;
|
317
318
|
Effect.Fade(o, {duration: 8.0});
|
318
319
|
});
|
@@ -360,8 +361,6 @@ Zena.Div_editor.prototype = {
|
|
360
361
|
y : 0,
|
361
362
|
w : 0,
|
362
363
|
h : 0,
|
363
|
-
offsetx : 0,
|
364
|
-
offsety : 0,
|
365
364
|
startx: 0,
|
366
365
|
starty: 0,
|
367
366
|
fullw : 0,
|
@@ -376,18 +375,16 @@ Zena.Div_editor.prototype = {
|
|
376
375
|
zoom : 1.0,
|
377
376
|
BORDER_WIDTH : 10,
|
378
377
|
BORDER_COLOR : 'black',
|
379
|
-
MARGIN:
|
380
|
-
initialize: function(img_name, x_name, y_name, w_name, h_name, azoom
|
378
|
+
MARGIN: 20,
|
379
|
+
initialize: function(img_name, x_name, y_name, w_name, h_name, azoom) {
|
381
380
|
var img = $(img_name);
|
382
|
-
var img_pos = Position.positionedOffset(img);
|
383
381
|
this.flds.x = $(x_name);
|
384
382
|
this.flds.y = $(y_name);
|
385
383
|
this.flds.w = $(w_name);
|
386
384
|
this.flds.h = $(h_name);
|
387
385
|
this.zoom = azoom;
|
388
386
|
|
389
|
-
this.pos.
|
390
|
-
this.pos.offsety = top_pos + this.MARGIN;
|
387
|
+
this.pos.img_name = img_name;
|
391
388
|
this.pos.fullw = img.width;
|
392
389
|
this.pos.fullh = img.height;
|
393
390
|
|
@@ -396,11 +393,10 @@ Zena.Div_editor.prototype = {
|
|
396
393
|
Element.setStyle(this.clone, {
|
397
394
|
width: (2 * this.MARGIN + this.pos.fullw) + 'px',
|
398
395
|
height: (2 * this.MARGIN + this.pos.fullh) + 'px',
|
399
|
-
background: '
|
400
|
-
position: '
|
401
|
-
left: this.pos.offsetx - this.MARGIN + 'px',
|
402
|
-
top: this.pos.offsety - this.MARGIN + 'px'
|
396
|
+
background: '#777 url(' + img.src + ') no-repeat ' + this.MARGIN + 'px ' + this.MARGIN + 'px',
|
397
|
+
position: 'relative',
|
403
398
|
});
|
399
|
+
this.clone.id = img_name;
|
404
400
|
// register callbacks
|
405
401
|
this.clone.onmousedown = this.update_position.bindAsEventListener(this);
|
406
402
|
this.clone.onmouseup = this.end_move.bindAsEventListener(this);
|
@@ -422,8 +418,9 @@ Zena.Div_editor.prototype = {
|
|
422
418
|
this.pos.w = img.width;
|
423
419
|
this.pos.h = img.height;
|
424
420
|
this.update_sizes();
|
425
|
-
img.parentNode
|
426
|
-
|
421
|
+
var parent = img.parentNode;
|
422
|
+
parent.removeChild(img);
|
423
|
+
parent.appendChild(this.clone);
|
427
424
|
this.clone.appendChild(this.mark);
|
428
425
|
},
|
429
426
|
update_from_inputs : function(event) {
|
@@ -448,6 +445,11 @@ Zena.Div_editor.prototype = {
|
|
448
445
|
});
|
449
446
|
},
|
450
447
|
update_position: function(event) {
|
448
|
+
if (this.pos.offsetx == undefined) {
|
449
|
+
var img_pos = Element.viewportOffset($(this.pos.img_name));
|
450
|
+
this.pos.offsetx = img_pos.left + this.MARGIN;
|
451
|
+
this.pos.offsety = img_pos.top + this.MARGIN;
|
452
|
+
}
|
451
453
|
var posx = Math.max(0,Event.pointerX(event) - this.pos.offsetx);
|
452
454
|
var posy = Math.max(0,Event.pointerY(event) - this.pos.offsety);
|
453
455
|
if (!this.moving) {
|
@@ -638,6 +640,35 @@ Zena.reloadAndClose = function() {
|
|
638
640
|
// POPUP GALLERY
|
639
641
|
Zena.popup_gallery = null;
|
640
642
|
|
643
|
+
Zena.popup_keydown = function(evt) {
|
644
|
+
var gallery = Zena.popup_gallery;
|
645
|
+
|
646
|
+
var code = evt.keyCode;
|
647
|
+
//if (!e) var e = window.event;
|
648
|
+
//if (e.keyCode) code = e.keyCode;
|
649
|
+
//else if (e.which) code = e.which;
|
650
|
+
var character = String.fromCharCode(code);
|
651
|
+
alert('Character was ' + character);
|
652
|
+
|
653
|
+
if (code == Event.KEY_LEFT) {
|
654
|
+
if (gallery.prev) {
|
655
|
+
Zena.popup(gallery.prev);
|
656
|
+
} else {
|
657
|
+
Zena.popup(gallery.list[gallery.list.size()-1]);
|
658
|
+
}
|
659
|
+
} else if (code == Event.KEY_RIGHT) {
|
660
|
+
if (gallery.next) {
|
661
|
+
Zena.popup(gallery.next);
|
662
|
+
} else {
|
663
|
+
Zena.popup(gallery.list[0]);
|
664
|
+
}
|
665
|
+
} else {
|
666
|
+
e.stop();
|
667
|
+
this.popup_gallery = null;
|
668
|
+
Zena.popup_close();
|
669
|
+
}
|
670
|
+
}
|
671
|
+
|
641
672
|
Zena.popup = function(elem) {
|
642
673
|
var offsets = elem.positionedOffset();
|
643
674
|
var e_left = offsets[0];
|
@@ -675,29 +706,11 @@ Zena.popup = function(elem) {
|
|
675
706
|
|
676
707
|
// get next/previous elements
|
677
708
|
if (config.navigation) {
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
this.popup_gallery = null;
|
684
|
-
} else if (e.keyCode == 37) {
|
685
|
-
if (gallery.prev) {
|
686
|
-
Zena.popup(gallery.prev);
|
687
|
-
} else {
|
688
|
-
Zena.popup(gallery.list[gallery.list.size()-1]);
|
689
|
-
}
|
690
|
-
} else if (e.keyCode == 39) {
|
691
|
-
if (gallery.next) {
|
692
|
-
Zena.popup(gallery.next);
|
693
|
-
} else {
|
694
|
-
Zena.popup(gallery.list[0]);
|
695
|
-
}
|
696
|
-
} else {
|
697
|
-
e.stop();
|
698
|
-
this.popup_gallery = null;
|
699
|
-
Zena.popup_close();
|
700
|
-
}
|
709
|
+
if (!this.popup_gallery) {
|
710
|
+
Event.observe(document.body, 'keydown', function(e) {
|
711
|
+
var evt = e || window.event;
|
712
|
+
$('pg_info').innerHTML = evt.keyCode;
|
713
|
+
//alert('key :' + evt.keyCode);
|
701
714
|
});
|
702
715
|
}
|
703
716
|
if (!this.popup_gallery || this.popup_gallery.klass != config.klass) {
|
@@ -706,9 +719,9 @@ Zena.popup = function(elem) {
|
|
706
719
|
list: elem.up('div').select('img.' + config.klass)
|
707
720
|
};
|
708
721
|
}
|
722
|
+
|
709
723
|
this.popup_gallery.current = elem;
|
710
724
|
this.popup_gallery.index = this.popup_gallery.list.indexOf(elem);
|
711
|
-
gallery = this.popup_gallery;
|
712
725
|
}
|
713
726
|
|
714
727
|
if (!config.pg_info_style) {
|
@@ -741,10 +754,10 @@ Zena.popup = function(elem) {
|
|
741
754
|
}
|
742
755
|
|
743
756
|
Zena.popup_wrap = function(img, config) {
|
744
|
-
cont = $('pg_cont');
|
757
|
+
var cont = $('pg_cont');
|
745
758
|
var content = '';
|
746
759
|
var border_width = 1;
|
747
|
-
gallery = this.popup_gallery;
|
760
|
+
var gallery = this.popup_gallery;
|
748
761
|
|
749
762
|
config.keys.each(function(key, index) {
|
750
763
|
if (key == 'navigation') {
|
@@ -773,6 +786,7 @@ Zena.popup_wrap = function(img, config) {
|
|
773
786
|
Zena.popup_close = function() {
|
774
787
|
var cont = $('pg_cont');
|
775
788
|
if (cont) {
|
789
|
+
document.stopObserving('keydown', Zena.popup_keydown);
|
776
790
|
var img = $('pg_img');
|
777
791
|
var pg_info = $('pg_info');
|
778
792
|
if (pg_info) pg_info.remove();
|
@@ -786,8 +800,15 @@ Zena.popup_close = function() {
|
|
786
800
|
}
|
787
801
|
}
|
788
802
|
|
789
|
-
// Lighter 'put' options for the page.
|
790
|
-
Zena.
|
803
|
+
// Lighter 'put/delete' options for the page.
|
804
|
+
Zena.m = function(tag, met) {
|
805
|
+
var msg = tag.getAttribute('data-confirm');
|
806
|
+
if (msg && !confirm(msg)) {
|
807
|
+
return false;
|
808
|
+
}
|
809
|
+
if (met == 'get') {
|
810
|
+
return true;
|
811
|
+
}
|
791
812
|
var f = document.createElement('form');
|
792
813
|
f.style.display = 'none';
|
793
814
|
tag.parentNode.appendChild(f);
|
@@ -796,9 +817,10 @@ Zena.put = function(tag) {
|
|
796
817
|
var m = document.createElement('input');
|
797
818
|
m.setAttribute('type', 'hidden');
|
798
819
|
m.setAttribute('name', '_method');
|
799
|
-
m.setAttribute('value',
|
820
|
+
m.setAttribute('value', met);
|
800
821
|
f.appendChild(m);
|
801
822
|
f.submit();
|
823
|
+
return false;
|
802
824
|
}
|
803
825
|
|
804
826
|
Zena.set_toggle = function(dom_id, definition) {
|
@@ -868,7 +890,6 @@ Zena.m_toggle = function(id) {
|
|
868
890
|
s.src = s.src;
|
869
891
|
});
|
870
892
|
}
|
871
|
-
fleXenv.updateScrollBars();
|
872
893
|
}
|
873
894
|
|
874
895
|
var pm_counter = 1;
|
@@ -889,4 +910,38 @@ Zena.plus_minus = function(elem, start, plus, minus) {
|
|
889
910
|
Element.insert(elem.previous(), {bottom:trigger_tag});
|
890
911
|
Element.replace(elem, new_tag);
|
891
912
|
}
|
913
|
+
}
|
914
|
+
|
915
|
+
Zena.read_cookie = function(name, def) {
|
916
|
+
var nameEQ = name + "=";
|
917
|
+
var ca = document.cookie.split(';');
|
918
|
+
for(var i=0;i < ca.length;i++) {
|
919
|
+
var c = ca[i];
|
920
|
+
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
921
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
922
|
+
}
|
923
|
+
return def;
|
924
|
+
}
|
925
|
+
|
926
|
+
Zena.write_cookie = function(name,value,days) {
|
927
|
+
if (days) {
|
928
|
+
var date = new Date();
|
929
|
+
date.setTime(date.getTime()+(days*24*60*60*1000));
|
930
|
+
var expires = "; expires="+date.toGMTString();
|
931
|
+
}
|
932
|
+
else var expires = "";
|
933
|
+
document.cookie = name+"="+value+expires+"; path=/";
|
934
|
+
}
|
935
|
+
|
936
|
+
Zena.delete_cookie = function(name) {
|
937
|
+
Zena.write_cookie(name,"",-1);
|
938
|
+
}
|
939
|
+
|
940
|
+
// Append innerHTML from content inside element
|
941
|
+
Zena.insert_inner = function(dom, position, content) {
|
942
|
+
var d = document.createElement('div');
|
943
|
+
d.innerHTML = content;
|
944
|
+
var insertions = {};
|
945
|
+
insertions[position] = d.childElements()[0].innerHTML;
|
946
|
+
Element.insert(dom, insertions);
|
892
947
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
.label { color:#560B0A;}
|
2
2
|
|
3
|
-
|
4
3
|
/* rubish bin */
|
5
4
|
#bin { margin-top:5px; float:left; padding:3px; position:relative; }
|
6
5
|
#bin span { position:absolute; top:2px; left:30px; }
|
@@ -27,8 +26,6 @@ table.admin td:first-child { border-left: 1px solid #999; }
|
|
27
26
|
#admin_groups table.admin {background:#91B9AE}
|
28
27
|
#add_user td { border: 0;}
|
29
28
|
#add_group td { border: 0;}
|
30
|
-
#add_user td { background: white;}
|
31
|
-
#add_group td { background: white;}
|
32
29
|
#virtual_class_list td, #virtual_class_list, #virtual_class_list th {border-color:#ccc;}
|
33
30
|
.admin td { padding: 3px; height:18px; border-right:1px solid #999; border-bottom:1px solid #999; }
|
34
31
|
.admin th { border-bottom:1px solid #999; padding:4px;}
|
@@ -58,6 +55,11 @@ table.admin td:first-child { border-left: 1px solid #999; }
|
|
58
55
|
.nav td { border:0;}
|
59
56
|
.prev_page, .next_page { margin:0; }
|
60
57
|
.next_page { float:right; }
|
58
|
+
.role_diff { font-size:12px; line-height:18px; background:#ddd; font-family:Monaco,Fixed,monospace; padding:1em;}
|
59
|
+
.role_diff del.differ { display:block;}
|
60
|
+
.role_diff ins.differ { display:block;}
|
61
|
+
|
62
|
+
#flash_messages .error { background:#DDC8C8; padding:1.5em;}
|
61
63
|
|
62
64
|
/* status */
|
63
65
|
.u40 { background:#B7CC87;}
|
@@ -84,4 +86,4 @@ ul.actions select { width:186px; }
|
|
84
86
|
.actions .errors li { margin-left:0.4em; background:inherit; line-height:1.2em;}
|
85
87
|
|
86
88
|
/* forms */
|
87
|
-
label { font-size:0.9em; font-weight:bold; display:block; color:#5C1515; margin:10px 0 5px; clear:
|
89
|
+
label { font-size:0.9em; font-weight:bold; display:block; color:#5C1515; margin:10px 0 5px; clear:left;}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
/* backend */
|
2
|
+
|
3
|
+
|
4
|
+
body {font-family:Verdana, sans-serif; font-size:12px; line-height:18px; background:#555}
|
5
|
+
a {text-decoration:none; color:inherit; }
|
6
|
+
|
7
|
+
#logo {font-size:21px; font-weight:bold; color:#333; text-shadow: 0 1px 0 #777;}
|
8
|
+
#container { border:1px solid black; background:#eee; margin:3em auto;}
|
9
|
+
#logo, #container {width:900px; display:table; margin:1em auto;}
|
10
|
+
|
11
|
+
#menu li {float:left;}
|
12
|
+
#menu li a { padding:4px; border:1px solid #333; border-width:0 1px 1px 0; display:block;}
|
13
|
+
#menu li a.on { background:#f7d493;}
|
14
|
+
|
15
|
+
#content {clear:both; padding-top:1px;}
|
16
|
+
#content h2.title {margin:20px; color:black; font-weight:bold; font-size:18px;}
|
17
|
+
#content table.admin {margin-bottom:2em;}
|
18
|
+
|
19
|
+
#browser {background:#333; padding:4em 0 2em; clear:both;}
|
20
|
+
#browser .wrap {display:table; margin:0 auto;}
|
21
|
+
#browser .wrap>div {float:left; border:1px solid #444; width:200px; background:#444;}
|
22
|
+
#browser div ul {height:200px; overflow:auto;}
|
23
|
+
#browser li, #browser div .pages {border-bottom:1px solid #444; background:#eee}
|
24
|
+
#browser li img {float:left; margin:3px;}
|
25
|
+
#browser div .pages a { color:#7cf; padding:0 3px;}
|
26
|
+
#browser div .pages { background:#777; color:#bbb;}
|
27
|
+
#browser li.on { background:#aaa;}
|
28
|
+
#browser a:hover { background:#f4ecc1; color:black;}
|
29
|
+
#browser .pages, #browser li a {display:block; height:22px; padding:2px;}
|
30
|
+
#query {margin-right:3em;}
|
31
|
+
#query .search input {width:186px;}
|
32
|
+
#query .pages.error {background:#644; height:auto;}
|
33
|
+
#query .error span {display:block; padding:2px; border-top:1px dashed #888;}
|
34
|
+
#query .error .query {border-top:0; font-style:italic;}
|
35
|
+
#siblings li.on {background:#f7d493;}
|
36
|
+
#children .btn_add a { visibility:visible;}
|
37
|
+
#children .add { background:#82a0ae; color:#eee;}
|
38
|
+
#children .add_doc { background:#aea782; color:#eee;}
|
39
|
+
#browser .wrap>div {position:relative;}
|
40
|
+
#browser .search {position:absolute; top:-27px; background:#ddd; padding:2px;}
|
41
|
+
.search input, .search select {float:left; width:45%; margin-right:4px;}
|
42
|
+
#browser .id {float:right; color:#999; font-size:9px;}
|
43
|
+
|
44
|
+
#preview {border:4px dashed #ccc; width:450px; margin:1em; float:right; position:relative;}
|
45
|
+
#preview .zazen {height:220px; overflow:auto; padding:10px; }
|
46
|
+
h2.preview {position:absolute; top:7px; right:-4px;}
|
47
|
+
h2.preview a { background:#ccc; padding:0.5em; font-size:18px; font-weight:bold;}
|
48
|
+
h2.preview:hover a {background:#fbeab6;}
|
49
|
+
#preview .med_prev {background:#444; width:100%;}
|
50
|
+
#preview .crop { position:absolute; bottom:10px; right:10px; visibility:hidden; display:block;}
|
51
|
+
#preview:hover .crop { visibility:visible;}
|
52
|
+
|
53
|
+
.med_prev td {vertical-align:middle; text-align:center; height:240px;}
|
54
|
+
.med_prev .img {border:1px solid black;}
|
55
|
+
#title { font-size:21px; font-weight:bold; margin:18px; float:left;}
|
56
|
+
#title a, #form a {visibility:visible}
|
57
|
+
#title span {font-size:55%; color:#888;}
|
58
|
+
|
59
|
+
#actions {margin:18px;}
|
60
|
+
#actions a { visibility:visible;}
|
61
|
+
#form {clear:both; margin:18px; position:relative;}
|
62
|
+
#form label, #actions label { font-weight:bold; margin-top:1em; display:block; color:#999}
|
63
|
+
#form textarea { height:1.5em;}
|
64
|
+
fieldset {float:left; border:1px solid #777; padding:3px; margin:5px;}
|
65
|
+
#form legend {font-weight:bold; color:#666; padding:0 8px;}
|
66
|
+
#form input[type='submit'] {clear:both; float:none;display:block;}
|
67
|
+
#crop .mask { position:fixed; top:0; left:0; width:100%; height:100%; background:black; opacity:0.8;}
|
68
|
+
#crop .wrap { position:absolute; top:-200px; left:180px; width:100%; height:100%;}
|
69
|
+
#crop .win { display:table; margin:80px auto; background:#999; padding:20px;}
|
70
|
+
#crop .crop_options {display:none;}
|
71
|
+
#crop .btn input {float:right}
|
@@ -16,36 +16,35 @@
|
|
16
16
|
.tinycal .body td.sun, .tinycal .body td.sun a { color:#35950B; }
|
17
17
|
.tinycal .body td.sunother, .tinycal .body td.sunother a { color:#C8DEC1; }
|
18
18
|
|
19
|
+
|
19
20
|
/* LARGE CALENDAR */
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
.largecal
|
24
|
-
.largecal
|
25
|
-
.largecal
|
26
|
-
.largecal .
|
27
|
-
|
28
|
-
|
29
|
-
.largecal
|
30
|
-
.largecal .body td:first-child {border-left-width:0;}
|
21
|
+
#cal h3 { display:table; margin:auto; font-size:1.3em; }
|
22
|
+
#cal h3 p { color:#655; font-family: Georgia, Times, serif; margin-bottom:0.5em; display:table; float:left; width:20em; text-align:center;}
|
23
|
+
#cal h3 a { padding:0 6px; display:block; float:left;}
|
24
|
+
.largecal { border:1px solid #655; margin:auto; border-collapse:separate; line-height:1em; clear:left;}
|
25
|
+
.largecal th { border-left:1px solid #836C6C; background: #655; color: #fff; width:14%; height:0.8em; text-align:center; padding:0.4em 3px; }
|
26
|
+
.largecal th:first-child {border-left-width:0;}
|
27
|
+
.largecal td { background: #ffd; width:14%; min-height:3.4em; padding:3px; vertical-align:top; font-style:italic; text-align:left; color:#999;
|
28
|
+
border:1px solid #DDDBC1; border-width:1px 0 0 1px; font-size:10px;}
|
29
|
+
.largecal a { font-weight:normal; font-style:normal;}
|
30
|
+
.largecal td:first-child {border-left-width:0;}
|
31
31
|
|
32
|
-
.largecal .
|
33
|
-
.largecal .
|
34
|
-
.largecal .
|
35
|
-
.largecal .
|
36
|
-
.largecal .
|
37
|
-
.largecal .
|
38
|
-
.largecal .
|
32
|
+
.largecal .other { background:#DDDBC1;}
|
33
|
+
.largecal .today { font-weight:bold; color:black; background:#DCF6FF; margin:0;}
|
34
|
+
.largecal .sun, .largecal .sat { background:#E6FFDC;}
|
35
|
+
.largecal th.sun, .largecal th.sat { background:#636D5E;}
|
36
|
+
.largecal .ref { background:white;}
|
37
|
+
.largecal .sunother, .largecal .satother { background:#C8DEC1;}
|
38
|
+
.largecal .suntoday, .largecal .sattoday { font-weight:bold; color:black; background:#C7FFC3;}
|
39
39
|
|
40
|
-
.largecal
|
41
|
-
.largecal
|
42
|
-
.largecal
|
43
|
-
.largecal
|
44
|
-
.largecal
|
45
|
-
.largecal .body li { margin:0;}
|
40
|
+
.largecal p { margin:0;}
|
41
|
+
.largecal ol { margin:0; list-style:none;}
|
42
|
+
.largecal li { margin:0; line-height:12px}
|
43
|
+
.largecal li:first-child { border-top:0;}
|
44
|
+
.largecal li { border-top:1px solid #aaa;}
|
46
45
|
|
47
46
|
.assign .body td { padding:0;}
|
48
|
-
.assign .body
|
47
|
+
.assign .body ol { border-left:1px solid #ddd;}
|
49
48
|
.assign .body li { margin-top:0; margin-bottom:0; min-height:1.5em; border-top:1px solid #ddd; padding:2px;}
|
50
49
|
.assign .body li:first-child { border-top:0;}
|
51
50
|
|
data/public/stylesheets/code.css
CHANGED
@@ -42,6 +42,11 @@
|
|
42
42
|
.sh .variable { color:#33a;}
|
43
43
|
.sh .method { color: #944; }
|
44
44
|
|
45
|
+
.yaml .p { color:#686;}
|
46
|
+
.yaml .document, .yaml .key { color:#099;}
|
47
|
+
.yaml .string { color:#449;}
|
48
|
+
.yaml .comment { color: #005; font-style: italic; }
|
49
|
+
|
45
50
|
.css .comment { color: #005; font-style: italic; }
|
46
51
|
.css .p { color:#686;}
|
47
52
|
.css .variable { color:#33a;}
|
@@ -50,12 +55,12 @@
|
|
50
55
|
.css .id { color:#73302F; font-weight:bold;}
|
51
56
|
.css .class { color:orange;}
|
52
57
|
|
53
|
-
.
|
54
|
-
.
|
55
|
-
.
|
56
|
-
.
|
57
|
-
.
|
58
|
-
.
|
58
|
+
.sqliss .string { color: #361; }
|
59
|
+
.sqliss .keyword { color: #622;}
|
60
|
+
.sqliss .sub { color:#622; font-weight:bold;}
|
61
|
+
.sqliss .punct {color: #622;}
|
62
|
+
.sqliss .method {color: #944;}
|
63
|
+
.sqliss .context {color: #07b;}
|
59
64
|
|
60
65
|
.zazen pre {
|
61
66
|
overflow:auto; /* Safari */
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
#comments { border-top:1px solid grey; clear:both; padding-top:5px;margin:13px auto; width:80%; font-size:90%; line-height:1.5em;}
|
2
3
|
.comments ul { margin-left:25px;}
|
3
4
|
.comments { width:95%; }
|
4
5
|
.comments li { margin-top:12px; }
|
@@ -19,16 +19,15 @@ form .infos li { clear:none;}
|
|
19
19
|
#search { z-index:999; position:absolute; top:1px; right:1px; padding-right:1px; font-size:0.8em; display:table;}
|
20
20
|
|
21
21
|
/* messages and ajax-loader */
|
22
|
-
#
|
22
|
+
#flash_messages { position:absolute; top:0; line-height:1.4em; width:70%; font-size:0.9em; }
|
23
23
|
#form_errors ul { position:absolute; border:2px solid #B57B7C; top:50px; left:10px; width:400px; line-height:1.4em; width:70%; font-size:0.9em; padding:3px 5px;}
|
24
24
|
#form_errors li { padding-left:1em; line-height:1em; list-style:none;}
|
25
25
|
#number { position:absolute; top:20px; right:0; padding:5px; font-size:18px; font-weight:bold; color:#ccc;}
|
26
26
|
|
27
27
|
#loader { visibility:hidden; position:absolute;}
|
28
28
|
#loader img {float:left;}
|
29
|
-
#notice
|
30
|
-
#error
|
31
|
-
#notice { background:#D8E0C7;border: 1px dotted #A8BA6E;}
|
29
|
+
#flash_messages .notice {padding:2px 8px; background:#D8E0C7;border: 1px dotted #A8BA6E;}
|
30
|
+
#flash_messages .error {padding:2px 8px; background:#DDC8C8;border: 1px dotted #B57B7C;}
|
32
31
|
|
33
32
|
/* tab selector */
|
34
33
|
.selector { width:100%; height:46px; font-size:0.9em; background:#A0A6AB; border-bottom:1px solid #333;}
|
@@ -73,10 +72,10 @@ ul.link_box { float:left; display:block; margin:2px; padding:2px;}
|
|
73
72
|
#image_tab .edit_info {font-size:0.8em; color:#333; margin-top:0.4em;}
|
74
73
|
#original_caution { color:red; font-variant:small-caps; font-size:1.5em; position: absolute; top:70px;}
|
75
74
|
|
76
|
-
ul.
|
77
|
-
|
78
|
-
|
79
|
-
|
75
|
+
ul.crop_options li { padding:0.4em 0.4em; list-style:none; display:block; }
|
76
|
+
.crop_options li b { display:block; float:left; width:7em;}
|
77
|
+
.crop_options { font-size:80%; position:absolute; top:95px; right:10px; border:1px solid grey; background-color:#9CA3AA; padding:5px;}
|
78
|
+
.crop_options input { font:inherit; }
|
80
79
|
#crop img { margin-right:5px; }
|
81
80
|
/* new document */
|
82
81
|
#new_document .btn_validate { float:right; padding:1em; }
|
@@ -52,8 +52,9 @@
|
|
52
52
|
# roger 5 tinformation[~12] / 2002-05-05
|
53
53
|
# roger 1 radio[~24]
|
54
54
|
|
55
|
+
# FIXME: replace all these with simpler tests.
|
55
56
|
Node:
|
56
|
-
#
|
57
|
+
# Used to test custom select types (repeat_every, last_date)
|
57
58
|
emp_form_date:
|
58
59
|
# find courses assigned_to pages in job assigned_to CURRENT_NODE (employee)
|
59
60
|
main_table: courses
|
@@ -91,6 +92,19 @@ Node:
|
|
91
92
|
group: courses.id
|
92
93
|
order: priority DESC, last_date ASC, _ml1.value ASC
|
93
94
|
|
95
|
+
secure_table:
|
96
|
+
# Stupid query to test SECURE_TABLE
|
97
|
+
main_table: emp
|
98
|
+
select:
|
99
|
+
- other.*
|
100
|
+
tables:
|
101
|
+
- nodes AS emp
|
102
|
+
- nodes AS other
|
103
|
+
where:
|
104
|
+
- SECURE_TABLE(other)
|
105
|
+
group: other.id
|
106
|
+
order: other.zip ASC
|
107
|
+
|
94
108
|
course_emp_date:
|
95
109
|
main_table: employees
|
96
110
|
select:
|