Commit d46f31848ac5eea6c6947a1a5a78c0463c946e6f
Committed by
Igor Kulikov
1 parent
4255bf48
Fix fullscreen mode for HTML/CSS editors, highlight dividing comments for parts of the sample
Showing
2 changed files
with
41 additions
and
26 deletions
@@ -73,8 +73,11 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | @@ -73,8 +73,11 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | ||
73 | scope.removeResource = removeResource; | 73 | scope.removeResource = removeResource; |
74 | scope.toggleFullscreen = toggleFullscreen; | 74 | scope.toggleFullscreen = toggleFullscreen; |
75 | 75 | ||
76 | - var sampleJsFunction = "/* There are three examples: for delete, edit and add entity */\n" + | ||
77 | - "/* Delete entity example */\n" + | 76 | + var sampleJsFunction = "/*=======================================================================*/\n" + |
77 | + "/*===== There are three examples: for delete, edit and add entity =====*/\n" + | ||
78 | + "/*=======================================================================*/\n" + | ||
79 | + "/*======================= Delete entity example =======================*/\n" + | ||
80 | + "/*=======================================================================*/\n" + | ||
78 | "//\n" + | 81 | "//\n" + |
79 | "//var $injector = widgetContext.$scope.$injector;\n" + | 82 | "//var $injector = widgetContext.$scope.$injector;\n" + |
80 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + | 83 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + |
@@ -155,7 +158,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | @@ -155,7 +158,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | ||
155 | "// $mdDialog.show(alert);\n" + | 158 | "// $mdDialog.show(alert);\n" + |
156 | "//}\n" + | 159 | "//}\n" + |
157 | "//\n" + | 160 | "//\n" + |
158 | - "/* Edit entity example */\n" + | 161 | + "/*=======================================================================*/\n" + |
162 | + "/*======================== Edit entity example ========================*/\n" + | ||
163 | + "/*=======================================================================*/\n" + | ||
159 | "//\n" + | 164 | "//\n" + |
160 | "//var $injector = widgetContext.$scope.$injector;\n" + | 165 | "//var $injector = widgetContext.$scope.$injector;\n" + |
161 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + | 166 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + |
@@ -340,7 +345,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | @@ -340,7 +345,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | ||
340 | "// }\n" + | 345 | "// }\n" + |
341 | "//}\n" + | 346 | "//}\n" + |
342 | "//\n" + | 347 | "//\n" + |
343 | - "/* Add entity example */\n" + | 348 | + "/*========================================================================*/\n" + |
349 | + "/*========================= Add entity example =========================*/\n" + | ||
350 | + "/*========================================================================*/\n" + | ||
344 | "//\n" + | 351 | "//\n" + |
345 | "//var $injector = widgetContext.$scope.$injector;\n" + | 352 | "//var $injector = widgetContext.$scope.$injector;\n" + |
346 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + | 353 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + |
@@ -462,12 +469,13 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | @@ -462,12 +469,13 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | ||
462 | "// $rootScope.$broadcast('entityAliasesChanged', aliasIds);\n" + | 469 | "// $rootScope.$broadcast('entityAliasesChanged', aliasIds);\n" + |
463 | "// });\n" + | 470 | "// });\n" + |
464 | "// }\n" + | 471 | "// }\n" + |
465 | - "//}\n" + | ||
466 | - "\n" + | ||
467 | - "\n"; | 472 | + "//}\n"; |
468 | 473 | ||
469 | - var sampleHtmlTemplate = '<!-- There are two example templates: for edit and add entity -->\n' + | ||
470 | - '<!-- Edit entity example -->\n' + | 474 | + var sampleHtmlTemplate = '<!--=======================================================================-->\n' + |
475 | + '<!--===== There are two example templates: for edit and add entity =====-->\n' + | ||
476 | + '<!--=======================================================================-->\n' + | ||
477 | + '<!--======================== Edit entity example ========================-->\n' + | ||
478 | + '<!--=======================================================================-->\n' + | ||
471 | '<!-- -->\n' + | 479 | '<!-- -->\n' + |
472 | '<!--<md-dialog aria-label="Edit entity">-->\n' + | 480 | '<!--<md-dialog aria-label="Edit entity">-->\n' + |
473 | '<!-- <form name="editEntityForm" class="edit-entity-form" ng-submit="vm.save()">-->\n' + | 481 | '<!-- <form name="editEntityForm" class="edit-entity-form" ng-submit="vm.save()">-->\n' + |
@@ -633,9 +641,11 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | @@ -633,9 +641,11 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | ||
633 | '<!-- </md-dialog-actions>-->\n' + | 641 | '<!-- </md-dialog-actions>-->\n' + |
634 | '<!-- </form>-->\n' + | 642 | '<!-- </form>-->\n' + |
635 | '<!--</md-dialog>-->\n' + | 643 | '<!--</md-dialog>-->\n' + |
636 | - '<!-- -->\n' + | ||
637 | - '<!-- Add entity example -->\n' + | ||
638 | - '<!-- -->\n' + | 644 | + '<!---->\n' + |
645 | + '<!--========================================================================-->\n' + | ||
646 | + '<!--========================= Add entity example =========================-->\n' + | ||
647 | + '<!--========================================================================-->\n' + | ||
648 | + '<!---->\n' + | ||
639 | '<!--<md-dialog aria-label="Add entity">-->\n' + | 649 | '<!--<md-dialog aria-label="Add entity">-->\n' + |
640 | '<!-- <form name="addEntityForm" class="add-entity-form" ng-submit="vm.save()">-->\n' + | 650 | '<!-- <form name="addEntityForm" class="add-entity-form" ng-submit="vm.save()">-->\n' + |
641 | '<!-- <md-toolbar>-->\n' + | 651 | '<!-- <md-toolbar>-->\n' + |
@@ -766,8 +776,11 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | @@ -766,8 +776,11 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | ||
766 | '<!-- </form>-->\n' + | 776 | '<!-- </form>-->\n' + |
767 | '<!--</md-dialog>-->\n'; | 777 | '<!--</md-dialog>-->\n'; |
768 | 778 | ||
769 | - var sampleCss = '/* There are two examples: for edit and add entity */\n' + | ||
770 | - '/* Edit entity example */\n' + | 779 | + var sampleCss = '/*=======================================================================*/\n' + |
780 | + '/*========== There are two examples: for edit and add entity ==========*/\n' + | ||
781 | + '/*=======================================================================*/\n' + | ||
782 | + '/*======================== Edit entity example ========================*/\n' + | ||
783 | + '/*=======================================================================*/\n' + | ||
771 | '/*\n' + | 784 | '/*\n' + |
772 | '.edit-entity-form md-input-container {\n' + | 785 | '.edit-entity-form md-input-container {\n' + |
773 | ' padding-right: 10px;\n' + | 786 | ' padding-right: 10px;\n' + |
@@ -825,7 +838,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | @@ -825,7 +838,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | ||
825 | ' display: none;\n' + | 838 | ' display: none;\n' + |
826 | '} \n' + | 839 | '} \n' + |
827 | '*/\n' + | 840 | '*/\n' + |
828 | - '/* Add entity example */\n' + | 841 | + '/*========================================================================*/\n' + |
842 | + '/*========================= Add entity example =========================*/\n' + | ||
843 | + '/*========================================================================*/\n' + | ||
829 | '/*\n' + | 844 | '/*\n' + |
830 | '.add-entity-form md-input-container {\n' + | 845 | '.add-entity-form md-input-container {\n' + |
831 | ' padding-right: 10px;\n' + | 846 | ' padding-right: 10px;\n' + |
@@ -878,9 +893,7 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | @@ -878,9 +893,7 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { | ||
878 | '.relations-list .body .md-button {\n' + | 893 | '.relations-list .body .md-button {\n' + |
879 | ' margin: 0;\n' + | 894 | ' margin: 0;\n' + |
880 | '}\n' + | 895 | '}\n' + |
881 | - '*/\n' + | ||
882 | - '\n' + | ||
883 | - '\n'; | 896 | + '*/\n'; |
884 | 897 | ||
885 | scope.$watch('action', function () { | 898 | scope.$watch('action', function () { |
886 | ngModelCtrl.$setViewValue(scope.action); | 899 | ngModelCtrl.$setViewValue(scope.action); |
@@ -38,14 +38,6 @@ | @@ -38,14 +38,6 @@ | ||
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||
41 | - .html-panel, | ||
42 | - .css-panel { | ||
43 | - width: 100%; | ||
44 | - min-width: 200px; | ||
45 | - height: 100%; | ||
46 | - min-height: 200px; | ||
47 | - } | ||
48 | - | ||
49 | .tb-split { | 41 | .tb-split { |
50 | box-sizing: border-box; | 42 | box-sizing: border-box; |
51 | overflow-x: hidden; | 43 | overflow-x: hidden; |
@@ -94,3 +86,13 @@ | @@ -94,3 +86,13 @@ | ||
94 | } | 86 | } |
95 | } | 87 | } |
96 | } | 88 | } |
89 | + | ||
90 | +.tb-custom-action-editor-container { | ||
91 | + .html-panel, | ||
92 | + .css-panel { | ||
93 | + width: 100%; | ||
94 | + min-width: 200px; | ||
95 | + height: 100%; | ||
96 | + min-height: 200px; | ||
97 | + } | ||
98 | +} |