Skip to content

Commit

Permalink
semantics support for endpoint.template_route.args
Browse files Browse the repository at this point in the history
  • Loading branch information
erichanson committed Jan 28, 2019
1 parent 6039aed commit aed7810
Show file tree
Hide file tree
Showing 6 changed files with 277 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bundles-available/org.aquameta.core.semantics/blob.csv
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
\\x6406a032ce58b9b7ebc632981d04a74d8bc011e52651a700cb6d5cb4a2cb8e37 138b0f75-82c9-4eb5-afbf-c34bcbf0b008
\\x64406c8ff97590ad1226c35ad7e4596ec21afd822eac78df1c26f67f4cf93de9 67f9ea1f-da5e-4bf7-ac01-59de72240047
\\x64b9660c51ba9b5d90226c958cd294c810fb6e56565f54e6b593b25d53f24d23 ("(""(widget)"",widget)",html)
\\x67cc1a01a625e8ef275524a5464c110810ce18d9c84ed0c3579d290590e90563 ("(""(endpoint)"",template_route)",args)
\\x6a4d379530d1e33034c9dbfab49a9c0f5ca4e1850eeb4c31a06daa65b101f673 var w = $('#'+id);\nw.data('field', field);\n\nvar original_value = field.value;\nw.data('revert_field', function() {\n field.value = original_value;\n return field;\n});\n\n// defaults to display and both modes available\nvar mode = starting_mode;\nvar display_available = (available_modes == 'both' || available_modes == 'display');\nvar edit_available = (available_modes == 'both' || available_modes == 'edit');\n\n// defaults\nif (typeof label_widget == 'undefined' || label_widget == false) {\n label_widget = 'sem_form_field_label';\n}\nif (typeof display_widget == 'undefined' || display_widget == false) {\n display_widget = 'field_display';\n}\nif (typeof edit_widget == 'undefined' || edit_widget == false) {\n edit_widget = 'field_edit';\n}\n\n\nw.find('.label').html(widget(label_widget, { field: field, column_id: false }));\n\n\n// starting mode\nif (mode == 'display') {\n w.find('.field_container').html(widget(display_widget, { field: field }));\n}\nelse if (mode == 'edit') {\n \n // if started in edit mode, focus the field and select text (if applicable)\n if (typeof focused != 'undefined') {\n w.find('.field_container').html(\n widget(edit_widget, { field: field, focused: focused })\n );\n }\n else {\n w.find('.field_container').html(\n widget(edit_widget, { field: field, focused: false })\n );\n }\n}\n\n\nw.on('display_clicked', function(e) {\n //console.log('display_clicked and display mode is ', mode == 'display' ? 'on' : 'off');\n e.stopPropagation();\n if (mode == 'display' && edit_available) {\n w.find('.field_container').html(widget(edit_widget, { field: field }));\n mode = 'edit';\n }\n});\n\nw.on('field_changed', function(e) {\n //console.log('field changed and display mode is ', mode == 'display' ? 'on' : 'off');\n e.stopPropagation();\n if (mode == 'edit' && display_available) {\n w.find('.field_container').html(widget(display_widget, { field: field }));\n mode = 'display';\n }\n});\n\n\n\n
\\x6bc6d2e950ff647b21bb6df63efd6ddd6f7dd5aeeda2447670d80a9be48ec42b 8d127696-d3d7-4d7e-8336-0821da3c9a55
\\x6e6716181625c607c66f176696f7eddbc5fb3915a8f14e4ddca7d6a194e0d9fd form_field
Expand Down Expand Up @@ -96,6 +97,7 @@
\\xa7ea5ef51c07e04145d9fefa387310b450c99d6cd01ec3e494efb0d65b9a71b2 endpoint/resource
\\xa8ad16b2bdbce0f7ffac9cbfbef7b174b7f5544441fa7b7f7c280fabcb0f81ba ("(""(widget)"",widget_route)",args)
\\xa8cc5e4f18b3f569cc9a3d13e15b3f7a9d1a84ea2efb9887ba326b681b38fa01 table.{{= name }},\ntable.{{= name }} td,\ntable.{{= name }} th,\ntable.{{= name }} tr {\n border: 1px solid #666;\n border-collapse: collapse;\n padding: 0.5rem;\n}\n\n.{{= name }} .no_border {\n border: none;\n}
\\xb4b611e1db81c856d6139d6297e1f2cc4b0acde91154d69a1a69d48ab539c2fb 5cc67297-5959-4bbd-b113-30ca581c6180
\\xb551d0b29174d8cc68e525c76f3a446938fdb8a8735611b1dcff42552ee3babb new_row
\\xb952ec69aff5cdb1a0fb30e61e6bb48a0e037081b4ee9b8a598091cd5351f887 <table id="{{= id }}" class="{{= name }}">\n <tr>\n <th class='no_border'>\n <button class='delete_row'>Delete</button>\n <button class='save_row'>Save</button>\n </th>\n <th class='no_border'></th>\n </tr>\n <tr>\n <th>Field</th>\n <th>Data</th>\n </tr>\n</table>
\\xb9632eef5a878a53792021f85b348a00465ec6cac72cbe7f4870ba95735e49bf 9ab9441c-b4d5-4ad4-86eb-e0d4048b0195
Expand Down
2 changes: 1 addition & 1 deletion bundles-available/org.aquameta.core.semantics/bundle.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8b6f6555-0da1-4936-a113-87afa2d3a457 org.aquameta.core.semantics 6a54fe52-c9de-43ee-bb11-e94433a05c25
8b6f6555-0da1-4936-a113-87afa2d3a457 org.aquameta.core.semantics d0e1c0d3-9fd5-44b5-81b1-719222b1a777
1 change: 1 addition & 0 deletions bundles-available/org.aquameta.core.semantics/commit.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
7076664a-101b-4a46-a7c4-a8bdb4366696 8b6f6555-0da1-4936-a113-87afa2d3a457 2768eac2-a214-4e01-8ec3-3a3e3727fac8 \N cae82f20-d71d-41bb-8e4e-1c23b2d2f9d0 2019-01-24 20:00:03.879333 semantics.column for widget.server_js
b917c4e2-28bd-41c0-a4fe-39ffc97e55db 8b6f6555-0da1-4936-a113-87afa2d3a457 ce6ec5db-ac9e-4605-aeae-cb5c2b5ec12b \N \N 2017-07-12 16:38:36.661328 initial import
cae82f20-d71d-41bb-8e4e-1c23b2d2f9d0 8b6f6555-0da1-4936-a113-87afa2d3a457 4255cd2a-3712-4e15-9f76-dd1700ccd6fb \N b917c4e2-28bd-41c0-a4fe-39ffc97e55db 2017-08-23 22:08:00.24743 save button in row_detail
d0e1c0d3-9fd5-44b5-81b1-719222b1a777 8b6f6555-0da1-4936-a113-87afa2d3a457 8f74bf64-037d-4363-938d-2b522e53f67d \N 6a54fe52-c9de-43ee-bb11-e94433a05c25 2019-01-28 22:58:39.084911 add column for endpoint.template_route.args
d5f5bcc0-e4f9-4a10-b9e1-dd23f16b5edc 8b6f6555-0da1-4936-a113-87afa2d3a457 d7edc5b4-be19-4b94-b686-c051485c9f6d \N 7076664a-101b-4a46-a7c4-a8bdb4366696 2019-01-24 23:12:01.428563 column for widget.server_js and widget.common_js
1 change: 1 addition & 0 deletions bundles-available/org.aquameta.core.semantics/rowset.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
130ab52f-b76a-4254-a244-a605dc6d6180
2768eac2-a214-4e01-8ec3-3a3e3727fac8
4255cd2a-3712-4e15-9f76-dd1700ccd6fb
8f74bf64-037d-4363-938d-2b522e53f67d
ce6ec5db-ac9e-4605-aeae-cb5c2b5ec12b
d7edc5b4-be19-4b94-b686-c051485c9f6d
Loading

0 comments on commit aed7810

Please sign in to comment.