Skip to content
This repository was archived by the owner on Mar 14, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<script src="src/js/views/outline.js"></script>
<script src="src/js/views/property.js"></script>
<script src="src/js/views/palette.js"></script>
<script src="src/js/views/eventHandler.js"></script>
<script src="src/js/views/widget.js"></script>
<script src="src/js/panel.js"></script>
<script src="src/js/main.js"></script>
Expand Down
61 changes: 42 additions & 19 deletions src/css/builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -1563,17 +1563,19 @@ input.screenCoordinate::-webkit-inner-spin-button {
margin: 0 0.6em;
}

#eventHandlerDialog {
.eventHandler {
width: 980px !important; /* Override computed style */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generally a bad idea, hardcoding sizes. If my screen or window is small enough, it's impossible to access the bottom of the dialog as it does not scroll it's contents.

I'd prefer we set max, min widths and heights in hard pixels only if necessary, then use percentages for the default width and heights. Also make sure the contents of the dialog can be scrolled if the dialog it's self is too small.

height: 560px !important; /* Override computed style */
overflow: hidden;
}

#eventHandlerDialog .title {
.eventHandler .title {
position: relative;
height: 52px;
background-color: #E4E5DF;
}

#eventHandlerDialog .title > label {
.eventHandler .title > label {
position: absolute;
left: 10px;
top: 16px;
Expand All @@ -1583,44 +1585,43 @@ input.screenCoordinate::-webkit-inner-spin-button {
font-weight: 600; /* semi-bold */
}


#eventHandlerDialog .wrap_left {
.eventHandler .wrap_left {
position: relative;
width: 230px;
border-right: 1px solid #dededc;
}

#eventHandlerDialog .wrap_left .container {
.eventHandler .wrap_left .container {
position: absolute;
width: 100%;
margin: 10px;
}


#eventHandlerDialog .wrap_left .container * {
.eventHandler .wrap_left .container * {
display: inline-block;
}

#eventHandlerDialog .wrap_left .container select {
.eventHandler .wrap_left .container select {
position: absolute;
top: 10px;
left: 0px;
width: 270px;
}

#eventHandlerDialog .wrap_left .container fieldset {
.eventHandler .wrap_left .container fieldset {
position: absolute;
top: 40px;
width: 244px;
height: 370px;
overflow: auto;
}

#eventHandlerDialog .wrap_left .container fieldset ul {
.eventHandler .wrap_left .container fieldset ul {
margin: 0px;
}

#eventHandlerDialog .wrap_left .container fieldset li {
.eventHandler .wrap_left .container fieldset li {
display: block;
padding: 8px 8px 8px 8px;
margin-left: -36px;
Expand All @@ -1630,36 +1631,40 @@ input.screenCoordinate::-webkit-inner-spin-button {
border-bottom: 1px solid #CCC;
}

#eventHandlerDialog .wrap_left .container fieldset li.ui-selected {
.eventHandler .wrap_left .container fieldset li.ui-selected {
background-color: #4AE57B;
}

#eventHandlerDialog .wrap_left .container fieldset li > a.link {
.eventHandler .wrap_left .container fieldset li > a.link {
padding-top: 8px;
width: 160px;
height: 34px;
}

#eventHandlerDialog .wrap_left .container button.doneButton {
.eventHandler .wrap_left .container fieldset a.ui-button {
margin-top: 0px;
float: right;
}

.eventHandler .wrap_left .container button.doneButton {
position: absolute;
top: 440px;
left: 46px;
width: 180px;
}

#eventHandlerDialog .wrap_right {
.eventHandler .wrap_right {
width: 630px;
}

#eventHandlerDialog .wrap_right .container {
.eventHandler .wrap_right .container {
overflow: auto;
resize: none;
height: 600px;
width: 98%;
margin: 6px;
}

#eventHandlerDialog .wrap_right .container .CodeMirror {
.eventHandler .wrap_right .container .CodeMirror {
margin: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
Expand All @@ -1669,6 +1674,24 @@ input.screenCoordinate::-webkit-inner-spin-button {
height: 470px;
}

#eventHandlerDialog .wrap_right .container .CodeMirror .CodeMirror-scroll {
.eventHandler .wrap_right .container .CodeMirror .CodeMirror-scroll {
height: 464px;
}

.eventHandlerIcon {
display: inline-block;
position: relative;
top: 4px;
left: 4px;
margin-right: 1px;
text-indent: -3000px;
height: 20px;
width: 20px;
background-repeat: no-repeat;
background-position: left top;
background-image: url('images/eventHandlerIcon.png');
}

.eventHandlerIcon:hover {
opacity: 0.8;
}
Binary file added src/css/images/eventHandlerIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
.addClass('view live flex1');
this.ui.liveView.append('<div class="stage flex1 vbox">');

this.ui.eventHandlerView = $('<div/>').appendTo(container)
.attr('id', 'eventHandlerView')
.addClass('view eventHandler');

$('.pageView').each( function () {
$(this).pageView();
$(this).pageView('option', 'model', ADM);
Expand All @@ -330,6 +334,11 @@
$(this).propertyView('option', 'model', ADM);
});

$('.eventHandler').each( function() {
$(this).eventHandlerView();
$(this).eventHandlerView('option', 'model', ADM);
})

$('.paletteView').each( function () {
$(this).paletteView();
widget._bindResizeEvent(this, 'paletteView');
Expand Down Expand Up @@ -431,6 +440,7 @@
this.ui.layoutView = $('.view.layout').eq(0);
this.ui.codeView = $('.view.code').eq(0);
this.ui.liveView = $('.view.live').eq(0);
this.ui.eventHandlerView = $('.view.eventHandler').eq(0);
this.ui.tools = $('.tools-primary').eq(0);
this.ui.extras = $('.tools-secondary').eq(0);
},
Expand Down
Loading