databaseformalizer 0.3.0
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/.project +18 -0
- data/README +256 -0
- data/README.md +2 -0
- data/Rakefile +21 -0
- data/app/controllers/databaseformalizer/attr_defs_controller.rb +98 -0
- data/app/controllers/databaseformalizer/attr_vals_controller.rb +85 -0
- data/app/controllers/databaseformalizer/dbformahome_controller.rb +7 -0
- data/app/controllers/databaseformalizer/entities_controller.rb +105 -0
- data/app/controllers/databaseformalizer/entity_defs_controller.rb +90 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/databaseformalizer/application_helper.rb +4 -0
- data/app/helpers/databaseformalizer/attr_defs_helper.rb +4 -0
- data/app/helpers/databaseformalizer/attr_vals_helper.rb +4 -0
- data/app/helpers/databaseformalizer/dbformahome_helper.rb +4 -0
- data/app/helpers/databaseformalizer/entities_helper.rb +160 -0
- data/app/helpers/databaseformalizer/entity_defs_helper.rb +68 -0
- data/app/models/databaseformalizer/attr_def.rb +48 -0
- data/app/models/databaseformalizer/attr_list_join_def.rb +17 -0
- data/app/models/databaseformalizer/attr_list_join_val.rb +18 -0
- data/app/models/databaseformalizer/attr_val.rb +36 -0
- data/app/models/databaseformalizer/attr_vals_entity.rb +18 -0
- data/app/models/databaseformalizer/entity.rb +27 -0
- data/app/models/databaseformalizer/entity_def.rb +24 -0
- data/app/models/databaseformalizer/entity_def_attr_def.rb +18 -0
- data/app/views/databaseformalizer/attr_defs/_form.html.erb +74 -0
- data/app/views/databaseformalizer/attr_defs/edit.html.erb +7 -0
- data/app/views/databaseformalizer/attr_defs/index.html.erb +38 -0
- data/app/views/databaseformalizer/attr_defs/new.html.erb +6 -0
- data/app/views/databaseformalizer/attr_defs/show.html.erb +50 -0
- data/app/views/databaseformalizer/attr_vals/_form.html.erb +29 -0
- data/app/views/databaseformalizer/attr_vals/edit.html.erb +7 -0
- data/app/views/databaseformalizer/attr_vals/index.html.erb +28 -0
- data/app/views/databaseformalizer/attr_vals/new.html.erb +6 -0
- data/app/views/databaseformalizer/attr_vals/show.html.erb +20 -0
- data/app/views/databaseformalizer/dbformahome/index.html.erb +19 -0
- data/app/views/databaseformalizer/entities/_attr_val_boolean_form.html.erb +7 -0
- data/app/views/databaseformalizer/entities/_attr_val_checkList_form.html.erb +22 -0
- data/app/views/databaseformalizer/entities/_attr_val_datetime_form.html.erb +15 -0
- data/app/views/databaseformalizer/entities/_attr_val_entityDef_form.html.erb +14 -0
- data/app/views/databaseformalizer/entities/_attr_val_form_all.html.erb +4 -0
- data/app/views/databaseformalizer/entities/_attr_val_form_one.html.erb +6 -0
- data/app/views/databaseformalizer/entities/_attr_val_integer_form.html.erb +10 -0
- data/app/views/databaseformalizer/entities/_attr_val_openList_element_form.html.erb +16 -0
- data/app/views/databaseformalizer/entities/_attr_val_openList_form.html.erb +12 -0
- data/app/views/databaseformalizer/entities/_attr_val_selectOneInList_form.html.erb +20 -0
- data/app/views/databaseformalizer/entities/_attr_val_string_form.html.erb +10 -0
- data/app/views/databaseformalizer/entities/_attr_val_text_form.html.erb +10 -0
- data/app/views/databaseformalizer/entities/_form.html.erb +54 -0
- data/app/views/databaseformalizer/entities/edit.html.erb +8 -0
- data/app/views/databaseformalizer/entities/index.html.erb +45 -0
- data/app/views/databaseformalizer/entities/new.html.erb +10 -0
- data/app/views/databaseformalizer/entities/new.js.erb +1 -0
- data/app/views/databaseformalizer/entities/show.html.erb +50 -0
- data/app/views/databaseformalizer/entity_defs/_form.html.erb +51 -0
- data/app/views/databaseformalizer/entity_defs/edit.html.erb +7 -0
- data/app/views/databaseformalizer/entity_defs/index.html.erb +57 -0
- data/app/views/databaseformalizer/entity_defs/new.html.erb +6 -0
- data/app/views/databaseformalizer/entity_defs/show.html.erb +30 -0
- data/app/views/databaseformalizer/layouts/application.html.erb +134 -0
- data/databaseformalizer.gemspec +34 -0
- data/lib/acts_as_entity/base.rb +101 -0
- data/lib/application_controller.rb +21 -0
- data/lib/application_helper.rb +3 -0
- data/lib/databaseformalizer.rb +27 -0
- data/lib/engine.rb +23 -0
- data/lib/generators/entity_def/USAGE +8 -0
- data/lib/generators/entity_def/entity_def_generator.rb +39 -0
- data/lib/generators/entity_def/templates/controller.rb +98 -0
- data/lib/generators/entity_def/templates/helper.rb +2 -0
- data/lib/generators/entity_def/templates/model.rb +3 -0
- data/lib/generators/entity_def/templates/view/_form.html.erb +35 -0
- data/lib/generators/entity_def/templates/view/edit.html.erb +6 -0
- data/lib/generators/entity_def/templates/view/index.html.erb +27 -0
- data/lib/generators/entity_def/templates/view/new.html.erb +5 -0
- data/lib/generators/entity_def/templates/view/show.html.erb +3 -0
- data/lib/rails/generators/databaseformalizer/databaseformalizer_generator.rb +52 -0
- data/lib/rails/generators/databaseformalizer/templates/initializer.rb +8 -0
- data/lib/rails/generators/databaseformalizer/templates/migration.rb +9 -0
- data/lib/rails/generators/databaseformalizer/templates/migration.rb.bak +9 -0
- data/lib/rails/generators/databaseformalizer/templates/schema.rb +84 -0
- data/lib/rails/railties/tasks.rake +8 -0
- data/public/bootstrap/css/bootstrap-fixed-header.css +15 -0
- data/public/bootstrap/css/bootstrap-responsive.css +808 -0
- data/public/bootstrap/css/bootstrap-responsive.min.css +9 -0
- data/public/bootstrap/css/bootstrap-toggle.css +242 -0
- data/public/bootstrap/css/cerulean/bootstrap.min.css +740 -0
- data/public/bootstrap/css/img/glyphicons-halflings-white.png +0 -0
- data/public/bootstrap/css/img/glyphicons-halflings.png +0 -0
- data/public/bootstrap/js/bootstrap-alert.js +90 -0
- data/public/bootstrap/js/bootstrap-collapse.js +157 -0
- data/public/bootstrap/js/bootstrap-dropdown.js +100 -0
- data/public/bootstrap/js/bootstrap-fixed-header.js +54 -0
- data/public/bootstrap/js/bootstrap-modal.js +218 -0
- data/public/bootstrap/js/bootstrap-popover.js +98 -0
- data/public/bootstrap/js/bootstrap-tab.js +135 -0
- data/public/bootstrap/js/bootstrap-toggle.js +104 -0
- data/public/bootstrap/js/bootstrap-tooltip.js +275 -0
- data/public/bootstrap/js/bootstrap-transition.js +61 -0
- data/public/bootstrap/js/bootstrap.js +1824 -0
- data/public/bootstrap/js/bootstrap.min.js +6 -0
- data/public/images/Thumbs.db +0 -0
- data/public/images/bootstrap/Thumbs.db +0 -0
- data/public/images/bootstrap/glyphicons-halflings.png +0 -0
- data/public/images/databaseformalizer.jpg +0 -0
- data/public/images/metamodel.png +0 -0
- data/public/images/model.png +0 -0
- data/public/javascripts/databaseformalizer.js +13 -0
- data/public/javascripts/jquery.js +9252 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/jquery-ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/jquery-ui/css/ui-lightness/jquery-ui-1.8.21.custom.css +565 -0
- data/public/jquery-ui/js/jquery-1.7.2.min.js +4 -0
- data/public/jquery-ui/js/jquery-ui-1.8.21.custom.min.js +125 -0
- data/public/jquery-validation/README.md +8 -0
- data/public/jquery-validation/additional-methods.js +300 -0
- data/public/jquery-validation/additional-methods.min.js +29 -0
- data/public/jquery-validation/changelog.txt +277 -0
- data/public/jquery-validation/jquery.validate.js +1188 -0
- data/public/jquery-validation/jquery.validate.min.js +51 -0
- data/public/jquery-validation/lib/jquery-1.3.2.js +4376 -0
- data/public/jquery-validation/lib/jquery-1.4.2.js +6240 -0
- data/public/jquery-validation/lib/jquery-1.4.4.js +7179 -0
- data/public/jquery-validation/lib/jquery-1.5.2.js +8374 -0
- data/public/jquery-validation/lib/jquery-1.6.1.js +8936 -0
- data/public/jquery-validation/lib/jquery.form.js +660 -0
- data/public/jquery-validation/lib/jquery.js +4376 -0
- data/public/jquery-validation/lib/jquery.metadata.js +122 -0
- data/public/jquery-validation/lib/jquery.mockjax.js +382 -0
- data/public/jquery-validation/localization/messages_ar.js +24 -0
- data/public/jquery-validation/localization/messages_bg.js +23 -0
- data/public/jquery-validation/localization/messages_ca.js +23 -0
- data/public/jquery-validation/localization/messages_cn.js +23 -0
- data/public/jquery-validation/localization/messages_cs.js +23 -0
- data/public/jquery-validation/localization/messages_da.js +20 -0
- data/public/jquery-validation/localization/messages_de.js +20 -0
- data/public/jquery-validation/localization/messages_el.js +24 -0
- data/public/jquery-validation/localization/messages_es.js +23 -0
- data/public/jquery-validation/localization/messages_eu.js +23 -0
- data/public/jquery-validation/localization/messages_fa.js +23 -0
- data/public/jquery-validation/localization/messages_fi.js +21 -0
- data/public/jquery-validation/localization/messages_fr.js +23 -0
- data/public/jquery-validation/localization/messages_ge.js +23 -0
- data/public/jquery-validation/localization/messages_he.js +23 -0
- data/public/jquery-validation/localization/messages_hu.js +20 -0
- data/public/jquery-validation/localization/messages_it.js +23 -0
- data/public/jquery-validation/localization/messages_ja.js +23 -0
- data/public/jquery-validation/localization/messages_kk.js +23 -0
- data/public/jquery-validation/localization/messages_lt.js +23 -0
- data/public/jquery-validation/localization/messages_lv.js +23 -0
- data/public/jquery-validation/localization/messages_nl.js +23 -0
- data/public/jquery-validation/localization/messages_no.js +23 -0
- data/public/jquery-validation/localization/messages_pl.js +23 -0
- data/public/jquery-validation/localization/messages_ptbr.js +23 -0
- data/public/jquery-validation/localization/messages_ptpt.js +23 -0
- data/public/jquery-validation/localization/messages_ro.js +23 -0
- data/public/jquery-validation/localization/messages_ru.js +23 -0
- data/public/jquery-validation/localization/messages_se.js +21 -0
- data/public/jquery-validation/localization/messages_si.js +23 -0
- data/public/jquery-validation/localization/messages_sk.js +20 -0
- data/public/jquery-validation/localization/messages_sl.js +23 -0
- data/public/jquery-validation/localization/messages_sr.js +23 -0
- data/public/jquery-validation/localization/messages_th.js +23 -0
- data/public/jquery-validation/localization/messages_tr.js +23 -0
- data/public/jquery-validation/localization/messages_tw.js +23 -0
- data/public/jquery-validation/localization/messages_ua.js +23 -0
- data/public/jquery-validation/localization/messages_vi.js +23 -0
- data/public/jquery-validation/localization/methods_de.js +12 -0
- data/public/jquery-validation/localization/methods_nl.js +9 -0
- data/public/jquery-validation/localization/methods_pt.js +9 -0
- data/public/jquery-validation/todo +172 -0
- data/public/jquery-validation/version.txt +1 -0
- data/public/stylesheets/databaseformalizer.css +64 -0
- data/public/stylesheets/scaffold.css +56 -0
- data/public/tablesorter/addons/.svn/all-wcprops +5 -0
- data/public/tablesorter/addons/.svn/entries +31 -0
- data/public/tablesorter/addons/pager/.svn/all-wcprops +17 -0
- data/public/tablesorter/addons/pager/.svn/entries +96 -0
- data/public/tablesorter/addons/pager/.svn/prop-base/jquery.tablesorter.pager.css.svn-base +5 -0
- data/public/tablesorter/addons/pager/.svn/prop-base/jquery.tablesorter.pager.js.svn-base +5 -0
- data/public/tablesorter/addons/pager/.svn/text-base/jquery.tablesorter.pager.css.svn-base +25 -0
- data/public/tablesorter/addons/pager/.svn/text-base/jquery.tablesorter.pager.js.svn-base +184 -0
- data/public/tablesorter/addons/pager/jquery.tablesorter.pager.css +25 -0
- data/public/tablesorter/addons/pager/jquery.tablesorter.pager.js +184 -0
- data/public/tablesorter/build/.svn/all-wcprops +47 -0
- data/public/tablesorter/build/.svn/entries +266 -0
- data/public/tablesorter/build/.svn/prop-base/ParseMaster.js.svn-base +5 -0
- data/public/tablesorter/build/.svn/prop-base/js.jar.svn-base +5 -0
- data/public/tablesorter/build/.svn/prop-base/jsmin.js.svn-base +5 -0
- data/public/tablesorter/build/.svn/prop-base/min.js.svn-base +5 -0
- data/public/tablesorter/build/.svn/prop-base/pack.js.svn-base +5 -0
- data/public/tablesorter/build/.svn/prop-base/packer.js.svn-base +5 -0
- data/public/tablesorter/build/.svn/prop-base/writeFile.js.svn-base +5 -0
- data/public/tablesorter/build/.svn/text-base/ParseMaster.js.svn-base +106 -0
- data/public/tablesorter/build/.svn/text-base/js.jar.svn-base +0 -0
- data/public/tablesorter/build/.svn/text-base/jsmin.js.svn-base +316 -0
- data/public/tablesorter/build/.svn/text-base/min.js.svn-base +5 -0
- data/public/tablesorter/build/.svn/text-base/pack.js.svn-base +5 -0
- data/public/tablesorter/build/.svn/text-base/packer.js.svn-base +316 -0
- data/public/tablesorter/build/.svn/text-base/writeFile.js.svn-base +19 -0
- data/public/tablesorter/build/ParseMaster.js +106 -0
- data/public/tablesorter/build/js.jar +0 -0
- data/public/tablesorter/build/jsmin.js +316 -0
- data/public/tablesorter/build/min.js +5 -0
- data/public/tablesorter/build/pack.js +5 -0
- data/public/tablesorter/build/packer.js +316 -0
- data/public/tablesorter/build/writeFile.js +19 -0
- data/public/tablesorter/build.xml +26 -0
- data/public/tablesorter/changelog +41 -0
- data/public/tablesorter/jquery-latest.js +154 -0
- data/public/tablesorter/jquery.metadata.js +122 -0
- data/public/tablesorter/jquery.tablesorter.js +1031 -0
- data/public/tablesorter/jquery.tablesorter.min.js +4 -0
- data/public/tablesorter/jquery.tablesorter.widgets.js +433 -0
- data/public/tablesorter/jquery.ui.datepicker.js +1727 -0
- data/public/tablesorter/style.css +110 -0
- data/public/tablesorter/themes/.svn/all-wcprops +5 -0
- data/public/tablesorter/themes/.svn/entries +34 -0
- data/public/tablesorter/themes/blue/.svn/all-wcprops +35 -0
- data/public/tablesorter/themes/blue/.svn/entries +198 -0
- data/public/tablesorter/themes/blue/.svn/prop-base/asc.gif.svn-base +5 -0
- data/public/tablesorter/themes/blue/.svn/prop-base/bg.gif.svn-base +5 -0
- data/public/tablesorter/themes/blue/.svn/prop-base/blue.zip.svn-base +5 -0
- data/public/tablesorter/themes/blue/.svn/prop-base/desc.gif.svn-base +5 -0
- data/public/tablesorter/themes/blue/.svn/prop-base/style.css.svn-base +5 -0
- data/public/tablesorter/themes/blue/.svn/text-base/asc.gif.svn-base +0 -0
- data/public/tablesorter/themes/blue/.svn/text-base/bg.gif.svn-base +0 -0
- data/public/tablesorter/themes/blue/.svn/text-base/blue.zip.svn-base +0 -0
- data/public/tablesorter/themes/blue/.svn/text-base/desc.gif.svn-base +0 -0
- data/public/tablesorter/themes/blue/.svn/text-base/style.css.svn-base +39 -0
- data/public/tablesorter/themes/blue/asc.gif +0 -0
- data/public/tablesorter/themes/blue/bg.gif +0 -0
- data/public/tablesorter/themes/blue/blue.zip +0 -0
- data/public/tablesorter/themes/blue/desc.gif +0 -0
- data/public/tablesorter/themes/blue/style.css +39 -0
- data/public/tablesorter/themes/green/.svn/all-wcprops +35 -0
- data/public/tablesorter/themes/green/.svn/entries +198 -0
- data/public/tablesorter/themes/green/.svn/prop-base/asc.png.svn-base +5 -0
- data/public/tablesorter/themes/green/.svn/prop-base/bg.png.svn-base +5 -0
- data/public/tablesorter/themes/green/.svn/prop-base/desc.png.svn-base +5 -0
- data/public/tablesorter/themes/green/.svn/prop-base/green.zip.svn-base +5 -0
- data/public/tablesorter/themes/green/.svn/prop-base/style.css.svn-base +5 -0
- data/public/tablesorter/themes/green/.svn/text-base/asc.png.svn-base +0 -0
- data/public/tablesorter/themes/green/.svn/text-base/bg.png.svn-base +0 -0
- data/public/tablesorter/themes/green/.svn/text-base/desc.png.svn-base +0 -0
- data/public/tablesorter/themes/green/.svn/text-base/green.zip.svn-base +0 -0
- data/public/tablesorter/themes/green/.svn/text-base/style.css.svn-base +39 -0
- data/public/tablesorter/themes/green/asc.png +0 -0
- data/public/tablesorter/themes/green/bg.png +0 -0
- data/public/tablesorter/themes/green/desc.png +0 -0
- data/public/tablesorter/themes/green/green.zip +0 -0
- data/public/tablesorter/themes/green/style.css +39 -0
- data/test/database.yml +5 -0
- data/test/test_helper.rb +56 -0
- data/test/unit/databaseformalizer_test.rb +11 -0
- metadata +332 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Metadata - jQuery plugin for parsing metadata from elements
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
|
|
5
|
+
*
|
|
6
|
+
* Dual licensed under the MIT and GPL licenses:
|
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
|
8
|
+
* http://www.gnu.org/licenses/gpl.html
|
|
9
|
+
*
|
|
10
|
+
* Revision: $Id: jquery.metadata.js 4187 2007-12-16 17:15:27Z joern.zaefferer $
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Sets the type of metadata to use. Metadata is encoded in JSON, and each property
|
|
16
|
+
* in the JSON will become a property of the element itself.
|
|
17
|
+
*
|
|
18
|
+
* There are three supported types of metadata storage:
|
|
19
|
+
*
|
|
20
|
+
* attr: Inside an attribute. The name parameter indicates *which* attribute.
|
|
21
|
+
*
|
|
22
|
+
* class: Inside the class attribute, wrapped in curly braces: { }
|
|
23
|
+
*
|
|
24
|
+
* elem: Inside a child element (e.g. a script tag). The
|
|
25
|
+
* name parameter indicates *which* element.
|
|
26
|
+
*
|
|
27
|
+
* The metadata for an element is loaded the first time the element is accessed via jQuery.
|
|
28
|
+
*
|
|
29
|
+
* As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
|
|
30
|
+
* matched by expr, then redefine the metadata type and run another $(expr) for other elements.
|
|
31
|
+
*
|
|
32
|
+
* @name $.metadata.setType
|
|
33
|
+
*
|
|
34
|
+
* @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
|
|
35
|
+
* @before $.metadata.setType("class")
|
|
36
|
+
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
|
|
37
|
+
* @desc Reads metadata from the class attribute
|
|
38
|
+
*
|
|
39
|
+
* @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
|
|
40
|
+
* @before $.metadata.setType("attr", "data")
|
|
41
|
+
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
|
|
42
|
+
* @desc Reads metadata from a "data" attribute
|
|
43
|
+
*
|
|
44
|
+
* @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
|
|
45
|
+
* @before $.metadata.setType("elem", "script")
|
|
46
|
+
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
|
|
47
|
+
* @desc Reads metadata from a nested script element
|
|
48
|
+
*
|
|
49
|
+
* @param String type The encoding type
|
|
50
|
+
* @param String name The name of the attribute to be used to get metadata (optional)
|
|
51
|
+
* @cat Plugins/Metadata
|
|
52
|
+
* @descr Sets the type of encoding to be used when loading metadata for the first time
|
|
53
|
+
* @type undefined
|
|
54
|
+
* @see metadata()
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
(function($) {
|
|
58
|
+
|
|
59
|
+
$.extend({
|
|
60
|
+
metadata : {
|
|
61
|
+
defaults : {
|
|
62
|
+
type: 'class',
|
|
63
|
+
name: 'metadata',
|
|
64
|
+
cre: /({.*})/,
|
|
65
|
+
single: 'metadata'
|
|
66
|
+
},
|
|
67
|
+
setType: function( type, name ){
|
|
68
|
+
this.defaults.type = type;
|
|
69
|
+
this.defaults.name = name;
|
|
70
|
+
},
|
|
71
|
+
get: function( elem, opts ){
|
|
72
|
+
var settings = $.extend({},this.defaults,opts);
|
|
73
|
+
// check for empty string in single property
|
|
74
|
+
if ( !settings.single.length ) settings.single = 'metadata';
|
|
75
|
+
|
|
76
|
+
var data = $.data(elem, settings.single);
|
|
77
|
+
// returned cached data if it already exists
|
|
78
|
+
if ( data ) return data;
|
|
79
|
+
|
|
80
|
+
data = "{}";
|
|
81
|
+
|
|
82
|
+
if ( settings.type == "class" ) {
|
|
83
|
+
var m = settings.cre.exec( elem.className );
|
|
84
|
+
if ( m )
|
|
85
|
+
data = m[1];
|
|
86
|
+
} else if ( settings.type == "elem" ) {
|
|
87
|
+
if( !elem.getElementsByTagName )
|
|
88
|
+
return undefined;
|
|
89
|
+
var e = elem.getElementsByTagName(settings.name);
|
|
90
|
+
if ( e.length )
|
|
91
|
+
data = $.trim(e[0].innerHTML);
|
|
92
|
+
} else if ( elem.getAttribute != undefined ) {
|
|
93
|
+
var attr = elem.getAttribute( settings.name );
|
|
94
|
+
if ( attr )
|
|
95
|
+
data = attr;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if ( data.indexOf( '{' ) <0 )
|
|
99
|
+
data = "{" + data + "}";
|
|
100
|
+
|
|
101
|
+
data = eval("(" + data + ")");
|
|
102
|
+
|
|
103
|
+
$.data( elem, settings.single, data );
|
|
104
|
+
return data;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Returns the metadata object for the first member of the jQuery object.
|
|
111
|
+
*
|
|
112
|
+
* @name metadata
|
|
113
|
+
* @descr Returns element's metadata object
|
|
114
|
+
* @param Object opts An object contianing settings to override the defaults
|
|
115
|
+
* @type jQuery
|
|
116
|
+
* @cat Plugins/Metadata
|
|
117
|
+
*/
|
|
118
|
+
$.fn.metadata = function( opts ){
|
|
119
|
+
return $.metadata.get( this[0], opts );
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
})(jQuery);
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* MockJax - jQuery Plugin to Mock Ajax requests
|
|
3
|
+
*
|
|
4
|
+
* Version: 1.4.0
|
|
5
|
+
* Released: 2011-02-04
|
|
6
|
+
* Source: http://github.com/appendto/jquery-mockjax
|
|
7
|
+
* Docs: http://enterprisejquery.com/2010/07/mock-your-ajax-requests-with-mockjax-for-rapid-development
|
|
8
|
+
* Plugin: mockjax
|
|
9
|
+
* Author: Jonathan Sharp (http://jdsharp.com)
|
|
10
|
+
* License: MIT,GPL
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2010 appendTo LLC.
|
|
13
|
+
* Dual licensed under the MIT or GPL licenses.
|
|
14
|
+
* http://appendto.com/open-source-licenses
|
|
15
|
+
*/
|
|
16
|
+
(function($) {
|
|
17
|
+
var _ajax = $.ajax,
|
|
18
|
+
mockHandlers = [];
|
|
19
|
+
|
|
20
|
+
function parseXML(xml) {
|
|
21
|
+
if ( window['DOMParser'] == undefined && window.ActiveXObject ) {
|
|
22
|
+
DOMParser = function() { };
|
|
23
|
+
DOMParser.prototype.parseFromString = function( xmlString ) {
|
|
24
|
+
var doc = new ActiveXObject('Microsoft.XMLDOM');
|
|
25
|
+
doc.async = 'false';
|
|
26
|
+
doc.loadXML( xmlString );
|
|
27
|
+
return doc;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
var xmlDoc = ( new DOMParser() ).parseFromString( xml, 'text/xml' );
|
|
33
|
+
if ( $.isXMLDoc( xmlDoc ) ) {
|
|
34
|
+
var err = $('parsererror', xmlDoc);
|
|
35
|
+
if ( err.length == 1 ) {
|
|
36
|
+
throw('Error: ' + $(xmlDoc).text() );
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
throw('Unable to parse XML');
|
|
40
|
+
}
|
|
41
|
+
} catch( e ) {
|
|
42
|
+
var msg = ( e.name == undefined ? e : e.name + ': ' + e.message );
|
|
43
|
+
$(document).trigger('xmlParseError', [ msg ]);
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
return xmlDoc;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$.extend({
|
|
50
|
+
ajax: function(origSettings) {
|
|
51
|
+
var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
|
|
52
|
+
mock = false;
|
|
53
|
+
// Iterate over our mock handlers (in registration order) until we find
|
|
54
|
+
// one that is willing to intercept the request
|
|
55
|
+
$.each(mockHandlers, function(k, v) {
|
|
56
|
+
if ( !mockHandlers[k] ) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
var m = null;
|
|
60
|
+
// If the mock was registered with a function, let the function decide if we
|
|
61
|
+
// want to mock this request
|
|
62
|
+
if ( $.isFunction(mockHandlers[k]) ) {
|
|
63
|
+
m = mockHandlers[k](s);
|
|
64
|
+
} else {
|
|
65
|
+
m = mockHandlers[k];
|
|
66
|
+
// Inspect the URL of the request and check if the mock handler's url
|
|
67
|
+
// matches the url for this ajax request
|
|
68
|
+
if ( $.isFunction(m.url.test) ) {
|
|
69
|
+
// The user provided a regex for the url, test it
|
|
70
|
+
if ( !m.url.test( s.url ) ) {
|
|
71
|
+
m = null;
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
// Look for a simple wildcard '*' or a direct URL match
|
|
75
|
+
var star = m.url.indexOf('*');
|
|
76
|
+
if ( ( m.url != '*' && m.url != s.url && star == -1 ) ||
|
|
77
|
+
( star > -1 && m.url.substr(0, star) != s.url.substr(0, star) ) ) {
|
|
78
|
+
// The url we tested did not match the wildcard *
|
|
79
|
+
m = null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if ( m ) {
|
|
83
|
+
// Inspect the data submitted in the request (either POST body or GET query string)
|
|
84
|
+
if ( m.data && s.data ) {
|
|
85
|
+
var identical = false;
|
|
86
|
+
// Deep inspect the identity of the objects
|
|
87
|
+
(function ident(mock, live) {
|
|
88
|
+
// Test for situations where the data is a querystring (not an object)
|
|
89
|
+
if (typeof live === 'string') {
|
|
90
|
+
// Querystring may be a regex
|
|
91
|
+
identical = $.isFunction( mock.test ) ? mock.test(live) : mock == live;
|
|
92
|
+
return identical;
|
|
93
|
+
}
|
|
94
|
+
$.each(mock, function(k, v) {
|
|
95
|
+
if ( live[k] === undefined ) {
|
|
96
|
+
identical = false;
|
|
97
|
+
return false;
|
|
98
|
+
} else {
|
|
99
|
+
identical = true;
|
|
100
|
+
if ( typeof live[k] == 'object' ) {
|
|
101
|
+
return ident(mock[k], live[k]);
|
|
102
|
+
} else {
|
|
103
|
+
if ( $.isFunction( mock[k].test ) ) {
|
|
104
|
+
identical = mock[k].test(live[k]);
|
|
105
|
+
} else {
|
|
106
|
+
identical = ( mock[k] == live[k] );
|
|
107
|
+
}
|
|
108
|
+
return identical;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
})(m.data, s.data);
|
|
113
|
+
// They're not identical, do not mock this request
|
|
114
|
+
if ( identical == false ) {
|
|
115
|
+
m = null;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Inspect the request type
|
|
119
|
+
if ( m && m.type && m.type != s.type ) {
|
|
120
|
+
// The request type doesn't match (GET vs. POST)
|
|
121
|
+
m = null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if ( m ) {
|
|
126
|
+
mock = true;
|
|
127
|
+
|
|
128
|
+
// Handle console logging
|
|
129
|
+
var c = $.extend({}, $.mockjaxSettings, m);
|
|
130
|
+
if ( c.log && $.isFunction(c.log) ) {
|
|
131
|
+
c.log('MOCK ' + s.type.toUpperCase() + ': ' + s.url, $.extend({}, s));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
var jsre = /=\?(&|$)/, jsc = (new Date()).getTime();
|
|
135
|
+
|
|
136
|
+
// Handle JSONP Parameter Callbacks, we need to replicate some of the jQuery core here
|
|
137
|
+
// because there isn't an easy hook for the cross domain script tag of jsonp
|
|
138
|
+
if ( s.dataType === "jsonp" ) {
|
|
139
|
+
if ( s.type.toUpperCase() === "GET" ) {
|
|
140
|
+
if ( !jsre.test( s.url ) ) {
|
|
141
|
+
s.url += (rquery.test( s.url ) ? "&" : "?") + (s.jsonp || "callback") + "=?";
|
|
142
|
+
}
|
|
143
|
+
} else if ( !s.data || !jsre.test(s.data) ) {
|
|
144
|
+
s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
|
|
145
|
+
}
|
|
146
|
+
s.dataType = "json";
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Build temporary JSONP function
|
|
150
|
+
if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
|
|
151
|
+
jsonp = s.jsonpCallback || ("jsonp" + jsc++);
|
|
152
|
+
|
|
153
|
+
// Replace the =? sequence both in the query string and the data
|
|
154
|
+
if ( s.data ) {
|
|
155
|
+
s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
s.url = s.url.replace(jsre, "=" + jsonp + "$1");
|
|
159
|
+
|
|
160
|
+
// We need to make sure
|
|
161
|
+
// that a JSONP style response is executed properly
|
|
162
|
+
s.dataType = "script";
|
|
163
|
+
|
|
164
|
+
// Handle JSONP-style loading
|
|
165
|
+
window[ jsonp ] = window[ jsonp ] || function( tmp ) {
|
|
166
|
+
data = tmp;
|
|
167
|
+
success();
|
|
168
|
+
complete();
|
|
169
|
+
// Garbage collect
|
|
170
|
+
window[ jsonp ] = undefined;
|
|
171
|
+
|
|
172
|
+
try {
|
|
173
|
+
delete window[ jsonp ];
|
|
174
|
+
} catch(e) {}
|
|
175
|
+
|
|
176
|
+
if ( head ) {
|
|
177
|
+
head.removeChild( script );
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
var rurl = /^(\w+:)?\/\/([^\/?#]+)/,
|
|
183
|
+
parts = rurl.exec( s.url ),
|
|
184
|
+
remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);
|
|
185
|
+
|
|
186
|
+
// Test if we are going to create a script tag (if so, intercept & mock)
|
|
187
|
+
if ( s.dataType === "script" && s.type.toUpperCase() === "GET" && remote ) {
|
|
188
|
+
// Synthesize the mock request for adding a script tag
|
|
189
|
+
var callbackContext = origSettings && origSettings.context || s;
|
|
190
|
+
|
|
191
|
+
function success() {
|
|
192
|
+
// If a local callback was specified, fire it and pass it the data
|
|
193
|
+
if ( s.success ) {
|
|
194
|
+
s.success.call( callbackContext, ( m.response ? m.response.toString() : m.responseText || ''), status, {} );
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Fire the global callback
|
|
198
|
+
if ( s.global ) {
|
|
199
|
+
trigger( "ajaxSuccess", [{}, s] );
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function complete() {
|
|
204
|
+
// Process result
|
|
205
|
+
if ( s.complete ) {
|
|
206
|
+
s.complete.call( callbackContext, {} , status );
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// The request was completed
|
|
210
|
+
if ( s.global ) {
|
|
211
|
+
trigger( "ajaxComplete", [{}, s] );
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Handle the global AJAX counter
|
|
215
|
+
if ( s.global && ! --jQuery.active ) {
|
|
216
|
+
jQuery.event.trigger( "ajaxStop" );
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function trigger(type, args) {
|
|
221
|
+
(s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if ( m.response && $.isFunction(m.response) ) {
|
|
225
|
+
m.response(origSettings);
|
|
226
|
+
} else {
|
|
227
|
+
$.globalEval(m.responseText);
|
|
228
|
+
}
|
|
229
|
+
success();
|
|
230
|
+
complete();
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
mock = _ajax.call($, $.extend(true, {}, origSettings, {
|
|
234
|
+
// Mock the XHR object
|
|
235
|
+
xhr: function() {
|
|
236
|
+
// Extend with our default mockjax settings
|
|
237
|
+
m = $.extend({}, $.mockjaxSettings, m);
|
|
238
|
+
|
|
239
|
+
if ( m.contentType ) {
|
|
240
|
+
m.headers['content-type'] = m.contentType;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Return our mock xhr object
|
|
244
|
+
return {
|
|
245
|
+
status: m.status,
|
|
246
|
+
readyState: 1,
|
|
247
|
+
open: function() { },
|
|
248
|
+
send: function() {
|
|
249
|
+
// This is a substitute for < 1.4 which lacks $.proxy
|
|
250
|
+
var process = (function(that) {
|
|
251
|
+
return function() {
|
|
252
|
+
return (function() {
|
|
253
|
+
// The request has returned
|
|
254
|
+
this.status = m.status;
|
|
255
|
+
this.readyState = 4;
|
|
256
|
+
|
|
257
|
+
// We have an executable function, call it to give
|
|
258
|
+
// the mock handler a chance to update it's data
|
|
259
|
+
if ( $.isFunction(m.response) ) {
|
|
260
|
+
m.response(origSettings);
|
|
261
|
+
}
|
|
262
|
+
// Copy over our mock to our xhr object before passing control back to
|
|
263
|
+
// jQuery's onreadystatechange callback
|
|
264
|
+
if ( s.dataType == 'json' && ( typeof m.responseText == 'object' ) ) {
|
|
265
|
+
this.responseText = JSON.stringify(m.responseText);
|
|
266
|
+
} else if ( s.dataType == 'xml' ) {
|
|
267
|
+
if ( typeof m.responseXML == 'string' ) {
|
|
268
|
+
this.responseXML = parseXML(m.responseXML);
|
|
269
|
+
} else {
|
|
270
|
+
this.responseXML = m.responseXML;
|
|
271
|
+
}
|
|
272
|
+
} else {
|
|
273
|
+
this.responseText = m.responseText;
|
|
274
|
+
}
|
|
275
|
+
// jQuery < 1.4 doesn't have onreadystate change for xhr
|
|
276
|
+
if ( $.isFunction(this.onreadystatechange) ) {
|
|
277
|
+
this.onreadystatechange( m.isTimeout ? 'timeout' : undefined );
|
|
278
|
+
}
|
|
279
|
+
}).apply(that);
|
|
280
|
+
};
|
|
281
|
+
})(this);
|
|
282
|
+
|
|
283
|
+
if ( m.proxy ) {
|
|
284
|
+
// We're proxying this request and loading in an external file instead
|
|
285
|
+
_ajax({
|
|
286
|
+
global: false,
|
|
287
|
+
url: m.proxy,
|
|
288
|
+
type: m.proxyType,
|
|
289
|
+
data: m.data,
|
|
290
|
+
dataType: s.dataType,
|
|
291
|
+
complete: function(xhr, txt) {
|
|
292
|
+
m.responseXML = xhr.responseXML;
|
|
293
|
+
m.responseText = xhr.responseText;
|
|
294
|
+
this.responseTimer = setTimeout(process, m.responseTime || 0);
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
} else {
|
|
298
|
+
// type == 'POST' || 'GET' || 'DELETE'
|
|
299
|
+
if ( s.async === false ) {
|
|
300
|
+
// TODO: Blocking delay
|
|
301
|
+
process();
|
|
302
|
+
} else {
|
|
303
|
+
this.responseTimer = setTimeout(process, m.responseTime || 50);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
abort: function() {
|
|
308
|
+
clearTimeout(this.responseTimer);
|
|
309
|
+
},
|
|
310
|
+
setRequestHeader: function() { },
|
|
311
|
+
getResponseHeader: function(header) {
|
|
312
|
+
// 'Last-modified', 'Etag', 'content-type' are all checked by jQuery
|
|
313
|
+
if ( m.headers && m.headers[header] ) {
|
|
314
|
+
// Return arbitrary headers
|
|
315
|
+
return m.headers[header];
|
|
316
|
+
} else if ( header.toLowerCase() == 'last-modified' ) {
|
|
317
|
+
return m.lastModified || (new Date()).toString();
|
|
318
|
+
} else if ( header.toLowerCase() == 'etag' ) {
|
|
319
|
+
return m.etag || '';
|
|
320
|
+
} else if ( header.toLowerCase() == 'content-type' ) {
|
|
321
|
+
return m.contentType || 'text/plain';
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
getAllResponseHeaders: function() {
|
|
325
|
+
var headers = '';
|
|
326
|
+
$.each(m.headers, function(k, v) {
|
|
327
|
+
headers += k + ': ' + v + "\n";
|
|
328
|
+
});
|
|
329
|
+
return headers;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
}));
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
// We don't have a mock request, trigger a normal request
|
|
338
|
+
if ( !mock ) {
|
|
339
|
+
return _ajax.apply($, arguments);
|
|
340
|
+
} else {
|
|
341
|
+
return mock;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
$.mockjaxSettings = {
|
|
347
|
+
//url: null,
|
|
348
|
+
//type: 'GET',
|
|
349
|
+
log: function(msg) {
|
|
350
|
+
window['console'] && window.console.log && window.console.log(msg);
|
|
351
|
+
},
|
|
352
|
+
status: 200,
|
|
353
|
+
responseTime: 500,
|
|
354
|
+
isTimeout: false,
|
|
355
|
+
contentType: 'text/plain',
|
|
356
|
+
response: '',
|
|
357
|
+
responseText: '',
|
|
358
|
+
responseXML: '',
|
|
359
|
+
proxy: '',
|
|
360
|
+
proxyType: 'GET',
|
|
361
|
+
|
|
362
|
+
lastModified: null,
|
|
363
|
+
etag: '',
|
|
364
|
+
headers: {
|
|
365
|
+
etag: 'IJF@H#@923uf8023hFO@I#H#',
|
|
366
|
+
'content-type' : 'text/plain'
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
$.mockjax = function(settings) {
|
|
371
|
+
var i = mockHandlers.length;
|
|
372
|
+
mockHandlers[i] = settings;
|
|
373
|
+
return i;
|
|
374
|
+
};
|
|
375
|
+
$.mockjaxClear = function(i) {
|
|
376
|
+
if ( arguments.length == 1 ) {
|
|
377
|
+
mockHandlers[i] = null;
|
|
378
|
+
} else {
|
|
379
|
+
mockHandlers = [];
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
})(jQuery);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Translated default messages for the jQuery validation plugin into arabic.
|
|
3
|
+
* Locale: AR
|
|
4
|
+
*/
|
|
5
|
+
jQuery.extend(jQuery.validator.messages, {
|
|
6
|
+
required: "هذا الحقل إلزامي",
|
|
7
|
+
remote: "يرجى تصحيح هذا الحقل للمتابعة",
|
|
8
|
+
email: "رجاء إدخال عنوان بريد إلكتروني صحيح",
|
|
9
|
+
url: "رجاء إدخال عنوان موقع إلكتروني صحيح",
|
|
10
|
+
date: "رجاء إدخال تاريخ صحيح",
|
|
11
|
+
dateISO: "رجاء إدخال تاريخ صحيح (ISO)",
|
|
12
|
+
number: "رجاء إدخال عدد بطريقة صحيحة",
|
|
13
|
+
digits: "رجاء إدخال أرقام فقط",
|
|
14
|
+
creditcard: "رجاء إدخال رقم بطاقة ائتمان صحيح",
|
|
15
|
+
equalTo: "رجاء إدخال نفس القيمة",
|
|
16
|
+
accept: "رجاء إدخال ملف بامتداد موافق عليه",
|
|
17
|
+
maxlength: jQuery.validator.format("الحد الأقصى لعدد الحروف هو {0}"),
|
|
18
|
+
minlength: jQuery.validator.format("الحد الأدنى لعدد الحروف هو {0}"),
|
|
19
|
+
rangelength: jQuery.validator.format("عدد الحروف يجب أن يكون بين {0} و {1}"),
|
|
20
|
+
range: jQuery.validator.format("رجاء إدخال عدد قيمته بين {0} و {1}"),
|
|
21
|
+
max: jQuery.validator.format("رجاء إدخال عدد أقل من أو يساوي (0}"),
|
|
22
|
+
min: jQuery.validator.format("رجاء إدخال عدد أكبر من أو يساوي (0}")
|
|
23
|
+
});
|
|
24
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Translated default messages for the jQuery validation plugin.
|
|
3
|
+
* Locale: BG
|
|
4
|
+
*/
|
|
5
|
+
jQuery.extend(jQuery.validator.messages, {
|
|
6
|
+
required: "Полето е задължително.",
|
|
7
|
+
remote: "Моля, въведете правилната стойност.",
|
|
8
|
+
email: "Моля, въведете валиден email.",
|
|
9
|
+
url: "Моля, въведете валидно URL.",
|
|
10
|
+
date: "Моля, въведете валидна дата.",
|
|
11
|
+
dateISO: "Моля, въведете валидна дата (ISO).",
|
|
12
|
+
number: "Моля, въведете валиден номер.",
|
|
13
|
+
digits: "Моля, въведете само цифри",
|
|
14
|
+
creditcard: "Моля, въведете валиден номер на кредитна карта.",
|
|
15
|
+
equalTo: "Моля, въведете същата стойност отново.",
|
|
16
|
+
accept: "Моля, въведете стойност с валидно разширение.",
|
|
17
|
+
maxlength: $.validator.format("Моля, въведете повече от {0} символа."),
|
|
18
|
+
minlength: $.validator.format("Моля, въведете поне {0} символа."),
|
|
19
|
+
rangelength: $.validator.format("Моля, въведете стойност с дължина между {0} и {1} символа."),
|
|
20
|
+
range: $.validator.format("Моля, въведете стойност между {0} и {1}."),
|
|
21
|
+
max: $.validator.format("Моля, въведете стойност по-малка или равна на {0}."),
|
|
22
|
+
min: $.validator.format("Моля, въведете стойност по-голяма или равна на {0}.")
|
|
23
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Translated default messages for the jQuery validation plugin.
|
|
3
|
+
* Locale: CA
|
|
4
|
+
*/
|
|
5
|
+
jQuery.extend(jQuery.validator.messages, {
|
|
6
|
+
required: "Aquest camp és obligatori.",
|
|
7
|
+
remote: "Si us plau, omple aquest camp.",
|
|
8
|
+
email: "Si us plau, escriu una adreça de correu-e vàlida",
|
|
9
|
+
url: "Si us plau, escriu una URL vàlida.",
|
|
10
|
+
date: "Si us plau, escriu una data vàlida.",
|
|
11
|
+
dateISO: "Si us plau, escriu una data (ISO) vàlida.",
|
|
12
|
+
number: "Si us plau, escriu un número enter vàlid.",
|
|
13
|
+
digits: "Si us plau, escriu només dígits.",
|
|
14
|
+
creditcard: "Si us plau, escriu un número de tarjeta vàlid.",
|
|
15
|
+
equalTo: "Si us plau, escriu el maateix valor de nou.",
|
|
16
|
+
accept: "Si us plau, escriu un valor amb una extensió acceptada.",
|
|
17
|
+
maxlength: jQuery.validator.format("Si us plau, no escriguis més de {0} caracters."),
|
|
18
|
+
minlength: jQuery.validator.format("Si us plau, no escriguis menys de {0} caracters."),
|
|
19
|
+
rangelength: jQuery.validator.format("Si us plau, escriu un valor entre {0} i {1} caracters."),
|
|
20
|
+
range: jQuery.validator.format("Si us plau, escriu un valor entre {0} i {1}."),
|
|
21
|
+
max: jQuery.validator.format("Si us plau, escriu un valor menor o igual a {0}."),
|
|
22
|
+
min: jQuery.validator.format("Si us plau, escriu un valor major o igual a {0}.")
|
|
23
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Translated default messages for the jQuery validation plugin.
|
|
3
|
+
* Locale: CN
|
|
4
|
+
*/
|
|
5
|
+
jQuery.extend(jQuery.validator.messages, {
|
|
6
|
+
required: "必选字段",
|
|
7
|
+
remote: "请修正该字段",
|
|
8
|
+
email: "请输入正确格式的电子邮件",
|
|
9
|
+
url: "请输入合法的网址",
|
|
10
|
+
date: "请输入合法的日期",
|
|
11
|
+
dateISO: "请输入合法的日期 (ISO).",
|
|
12
|
+
number: "请输入合法的数字",
|
|
13
|
+
digits: "只能输入整数",
|
|
14
|
+
creditcard: "请输入合法的信用卡号",
|
|
15
|
+
equalTo: "请再次输入相同的值",
|
|
16
|
+
accept: "请输入拥有合法后缀名的字符串",
|
|
17
|
+
maxlength: jQuery.validator.format("请输入一个长度最多是 {0} 的字符串"),
|
|
18
|
+
minlength: jQuery.validator.format("请输入一个长度最少是 {0} 的字符串"),
|
|
19
|
+
rangelength: jQuery.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"),
|
|
20
|
+
range: jQuery.validator.format("请输入一个介于 {0} 和 {1} 之间的值"),
|
|
21
|
+
max: jQuery.validator.format("请输入一个最大为 {0} 的值"),
|
|
22
|
+
min: jQuery.validator.format("请输入一个最小为 {0} 的值")
|
|
23
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Translated default messages for the jQuery validation plugin.
|
|
3
|
+
* Locale: CS
|
|
4
|
+
*/
|
|
5
|
+
jQuery.extend(jQuery.validator.messages, {
|
|
6
|
+
required: "Tento údaj je povinný.",
|
|
7
|
+
remote: "Prosím, opravte tento údaj.",
|
|
8
|
+
email: "Prosím, zadejte platný e-mail.",
|
|
9
|
+
url: "Prosím, zadejte platné URL.",
|
|
10
|
+
date: "Prosím, zadejte platné datum.",
|
|
11
|
+
dateISO: "Prosím, zadejte platné datum (ISO).",
|
|
12
|
+
number: "Prosím, zadejte číslo.",
|
|
13
|
+
digits: "Prosím, zadávejte pouze číslice.",
|
|
14
|
+
creditcard: "Prosím, zadejte číslo kreditní karty.",
|
|
15
|
+
equalTo: "Prosím, zadejte znovu stejnou hodnotu.",
|
|
16
|
+
accept: "Prosím, zadejte soubor se správnou příponou.",
|
|
17
|
+
maxlength: jQuery.validator.format("Prosím, zadejte nejvíce {0} znaků."),
|
|
18
|
+
minlength: jQuery.validator.format("Prosím, zadejte nejméně {0} znaků."),
|
|
19
|
+
rangelength: jQuery.validator.format("Prosím, zadejte od {0} do {1} znaků."),
|
|
20
|
+
range: jQuery.validator.format("Prosím, zadejte hodnotu od {0} do {1}."),
|
|
21
|
+
max: jQuery.validator.format("Prosím, zadejte hodnotu menší nebo rovnu {0}."),
|
|
22
|
+
min: jQuery.validator.format("Prosím, zadejte hodnotu větší nebo rovnu {0}.")
|
|
23
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Translated default messages for the jQuery validation plugin.
|
|
3
|
+
* Locale: DA
|
|
4
|
+
*/
|
|
5
|
+
jQuery.extend(jQuery.validator.messages, {
|
|
6
|
+
required: "Dette felt er påkrævet.",
|
|
7
|
+
maxlength: jQuery.validator.format("Indtast højst {0} tegn."),
|
|
8
|
+
minlength: jQuery.validator.format("Indtast mindst {0} tegn."),
|
|
9
|
+
rangelength: jQuery.validator.format("Indtast mindst {0} og højst {1} tegn."),
|
|
10
|
+
email: "Indtast en gyldig email-adresse.",
|
|
11
|
+
url: "Indtast en gyldig URL.",
|
|
12
|
+
date: "Indtast en gyldig dato.",
|
|
13
|
+
number: "Indtast et tal.",
|
|
14
|
+
digits: "Indtast kun cifre.",
|
|
15
|
+
equalTo: "Indtast den samme værdi igen.",
|
|
16
|
+
range: jQuery.validator.format("Angiv en værdi mellem {0} og {1}."),
|
|
17
|
+
max: jQuery.validator.format("Angiv en værdi der højst er {0}."),
|
|
18
|
+
min: jQuery.validator.format("Angiv en værdi der mindst er {0}."),
|
|
19
|
+
creditcard: "Indtast et gyldigt kreditkortnummer."
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Translated default messages for the jQuery validation plugin.
|
|
3
|
+
* Locale: DE
|
|
4
|
+
*/
|
|
5
|
+
jQuery.extend(jQuery.validator.messages, {
|
|
6
|
+
required: "Dieses Feld ist ein Pflichtfeld.",
|
|
7
|
+
maxlength: jQuery.validator.format("Geben Sie bitte maximal {0} Zeichen ein."),
|
|
8
|
+
minlength: jQuery.validator.format("Geben Sie bitte mindestens {0} Zeichen ein."),
|
|
9
|
+
rangelength: jQuery.validator.format("Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein."),
|
|
10
|
+
email: "Geben Sie bitte eine gültige E-Mail Adresse ein.",
|
|
11
|
+
url: "Geben Sie bitte eine gültige URL ein.",
|
|
12
|
+
date: "Bitte geben Sie ein gültiges Datum ein.",
|
|
13
|
+
number: "Geben Sie bitte eine Nummer ein.",
|
|
14
|
+
digits: "Geben Sie bitte nur Ziffern ein.",
|
|
15
|
+
equalTo: "Bitte denselben Wert wiederholen.",
|
|
16
|
+
range: jQuery.validator.format("Geben Sie bitten einen Wert zwischen {0} und {1}."),
|
|
17
|
+
max: jQuery.validator.format("Geben Sie bitte einen Wert kleiner oder gleich {0} ein."),
|
|
18
|
+
min: jQuery.validator.format("Geben Sie bitte einen Wert größer oder gleich {0} ein."),
|
|
19
|
+
creditcard: "Geben Sie bitte ein gültige Kreditkarten-Nummer ein."
|
|
20
|
+
});
|