Repository: ambari Updated Branches: refs/heads/trunk 01a08cfa5 -> 026eef87f
AMBARI-14546. Some elements are overlapping on Script Details UI for Pig View (pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/026eef87 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/026eef87 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/026eef87 Branch: refs/heads/trunk Commit: 026eef87fb4a0ec2130992a6c0f73cdda1244670 Parents: 01a08cf Author: Pallav Kulshreshtha <[email protected]> Authored: Mon Apr 11 14:46:55 2016 +0530 Committer: Pallav Kulshreshtha <[email protected]> Committed: Mon Apr 11 14:46:55 2016 +0530 ---------------------------------------------------------------------- .../main/resources/ui/pig-web/app/components/codeMirror.js | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/026eef87/contrib/views/pig/src/main/resources/ui/pig-web/app/components/codeMirror.js ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/components/codeMirror.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/components/codeMirror.js index d0af842..4f462a1 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/app/components/codeMirror.js +++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/components/codeMirror.js @@ -63,6 +63,7 @@ App.CodeMirrorComponent = Ember.Component.extend({ }.bind(this), "Esc": function(cm) { if (this.get("fullscreen")) this.set("fullscreen", false); + }.bind(this) } }); @@ -71,6 +72,13 @@ App.CodeMirrorComponent = Ember.Component.extend({ var addMargin = $('.CodeMirror-vscrollbar').css('display') === "block"; var margin = $('.CodeMirror-vscrollbar').width(); $('.fullscreen-toggle').css('right',((addMargin)?3+margin:3)); + + $('#scriptDetails pre.CodeMirror-line').each(function( index ) { + $(this).css('margin-left', '30px'); + }); + + $('.CodeMirror-gutters').css('width', '29px'); + }; cm.on('viewportChange',updateToggle); @@ -99,6 +107,7 @@ App.CodeMirrorComponent = Ember.Component.extend({ cm.focus(); cm.on('change', Em.run.bind(this,this.editorDidChange)); } + }, editorDidChange:function () { var pig_script = this.get('content');
