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 | 73 | scope.removeResource = removeResource; |
74 | 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 | 81 | "//\n" + |
79 | 82 | "//var $injector = widgetContext.$scope.$injector;\n" + |
80 | 83 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + |
... | ... | @@ -155,7 +158,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { |
155 | 158 | "// $mdDialog.show(alert);\n" + |
156 | 159 | "//}\n" + |
157 | 160 | "//\n" + |
158 | - "/* Edit entity example */\n" + | |
161 | + "/*=======================================================================*/\n" + | |
162 | + "/*======================== Edit entity example ========================*/\n" + | |
163 | + "/*=======================================================================*/\n" + | |
159 | 164 | "//\n" + |
160 | 165 | "//var $injector = widgetContext.$scope.$injector;\n" + |
161 | 166 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + |
... | ... | @@ -340,7 +345,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { |
340 | 345 | "// }\n" + |
341 | 346 | "//}\n" + |
342 | 347 | "//\n" + |
343 | - "/* Add entity example */\n" + | |
348 | + "/*========================================================================*/\n" + | |
349 | + "/*========================= Add entity example =========================*/\n" + | |
350 | + "/*========================================================================*/\n" + | |
344 | 351 | "//\n" + |
345 | 352 | "//var $injector = widgetContext.$scope.$injector;\n" + |
346 | 353 | "//var $mdDialog = $injector.get('$mdDialog'),\n" + |
... | ... | @@ -462,12 +469,13 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { |
462 | 469 | "// $rootScope.$broadcast('entityAliasesChanged', aliasIds);\n" + |
463 | 470 | "// });\n" + |
464 | 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 | 479 | '<!-- -->\n' + |
472 | 480 | '<!--<md-dialog aria-label="Edit entity">-->\n' + |
473 | 481 | '<!-- <form name="editEntityForm" class="edit-entity-form" ng-submit="vm.save()">-->\n' + |
... | ... | @@ -633,9 +641,11 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { |
633 | 641 | '<!-- </md-dialog-actions>-->\n' + |
634 | 642 | '<!-- </form>-->\n' + |
635 | 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 | 649 | '<!--<md-dialog aria-label="Add entity">-->\n' + |
640 | 650 | '<!-- <form name="addEntityForm" class="add-entity-form" ng-submit="vm.save()">-->\n' + |
641 | 651 | '<!-- <md-toolbar>-->\n' + |
... | ... | @@ -766,8 +776,11 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { |
766 | 776 | '<!-- </form>-->\n' + |
767 | 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 | 784 | '/*\n' + |
772 | 785 | '.edit-entity-form md-input-container {\n' + |
773 | 786 | ' padding-right: 10px;\n' + |
... | ... | @@ -825,7 +838,9 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { |
825 | 838 | ' display: none;\n' + |
826 | 839 | '} \n' + |
827 | 840 | '*/\n' + |
828 | - '/* Add entity example */\n' + | |
841 | + '/*========================================================================*/\n' + | |
842 | + '/*========================= Add entity example =========================*/\n' + | |
843 | + '/*========================================================================*/\n' + | |
829 | 844 | '/*\n' + |
830 | 845 | '.add-entity-form md-input-container {\n' + |
831 | 846 | ' padding-right: 10px;\n' + |
... | ... | @@ -878,9 +893,7 @@ function CustomActionPrettyEditor($compile, $templateCache, $window, $timeout) { |
878 | 893 | '.relations-list .body .md-button {\n' + |
879 | 894 | ' margin: 0;\n' + |
880 | 895 | '}\n' + |
881 | - '*/\n' + | |
882 | - '\n' + | |
883 | - '\n'; | |
896 | + '*/\n'; | |
884 | 897 | |
885 | 898 | scope.$watch('action', function () { |
886 | 899 | ngModelCtrl.$setViewValue(scope.action); | ... | ... |
... | ... | @@ -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 | 41 | .tb-split { |
50 | 42 | box-sizing: border-box; |
51 | 43 | overflow-x: hidden; |
... | ... | @@ -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 | +} | ... | ... |