Skip to content

Commit

Permalink
Fixed button
Browse files Browse the repository at this point in the history
  • Loading branch information
TrefilovaNS committed Jul 6, 2016
1 parent cf5a845 commit 401578c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
12 changes: 8 additions & 4 deletions app/AppStart/UISample.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* @author jskonst
*/
define('UISample', ['orm', 'forms', 'ui','FancyWidget'], function (Orm, Forms, Ui,FancyWidget, ModuleName) {
define('UISample', ['orm', 'forms', 'ui','FancyWidget', 'Button'], function (Orm, Forms, Ui,FancyWidget, Button, ModuleName) {
function module_constructor() {
var self = this
, model = Orm.loadModel(ModuleName)
Expand All @@ -13,11 +13,15 @@ define('UISample', ['orm', 'forms', 'ui','FancyWidget'], function (Orm, Forms, U
};

var fancyWidget = new FancyWidget();
form.pnlPlaceholder1.height = null;
form.pnlPlaceholder2.height = null;
// form.pnlPlaceholder1.height = null;
// form.pnlPlaceholder2.height = null;
// form.pnlPlaceholder3.height = null;
fancyWidget.showOn(form.pnlPlaceholder1);

form.pnlPlaceholder2.element.innerHTML ='<p> this plcae can be replaced</p>';
var btn = new Button();
btn.showOn(form.pnlPlaceholder3);

// form.pnlPlaceholder2.element.innerHTML ='<p> this plcae can be replaced</p>';

model.requery(function () {
// TODO : place your code here
Expand Down
7 changes: 5 additions & 2 deletions app/AppStart/UISample.layout
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<BoxPane background="#e71414" cursor="0" name="pnlPlaceholder1" parent="view" prefHeight="50px" prefWidth="200px">
<AnchorsPaneConstraints height="50px" left="10px" top="10px" width="200px"/>
</BoxPane>
<BoxPane background="#dfb40f" cursor="0" name="pnlPlaceholder2" orientation="1" parent="view" prefHeight="70px" prefWidth="200px">
<AnchorsPaneConstraints height="70px" left="10px" top="90px" width="200px"/>
<BoxPane background="#ffffff" cursor="0" name="pnlPlaceholder3" orientation="1" parent="view" prefHeight="100px" prefWidth="270px">
<AnchorsPaneConstraints height="100px" left="20px" top="190px" width="270px"/>
</BoxPane>
<BoxPane background="#dfb40f" cursor="0" name="pnlPlaceholder21" orientation="1" parent="view" prefHeight="70px" prefWidth="200px">
<AnchorsPaneConstraints height="70px" left="20px" top="100px" width="200px"/>
</BoxPane>
</layout>
4 changes: 4 additions & 0 deletions app/CustomWidgets/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ define('Button', ['orm', 'forms', 'ui'], function (Orm, Forms, Ui, ModuleName) {
form.show();
};

self.showOn = function (aPanel) {
aPanel.add(form.view);
};

// TODO : place your code here


Expand Down
2 changes: 1 addition & 1 deletion private.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ runUser=
platypus-js-version=5.10.70
browserCacheBusting=false
enableSecurityRealm=false
j2eeServerId=tomcat80:home=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 8.0.30
j2eeServerId=tomcat80:home=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 8.0.30:base=Apache Tomcat 8.0.30_base

0 comments on commit 401578c

Please sign in to comment.