Skip to content

Commit

Permalink
Merge pull request #1 from TrefilovaNS/master
Browse files Browse the repository at this point in the history
test
  • Loading branch information
altsoft authored Jul 6, 2016
2 parents d6335e7 + 401578c commit 839544a
Show file tree
Hide file tree
Showing 28 changed files with 10,941 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>
28 changes: 28 additions & 0 deletions app/CustomWidgets/Button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
*
* @author ромашка
*/
define('Button', ['orm', 'forms', 'ui'], function (Orm, Forms, Ui, ModuleName) {
function module_constructor() {
var self = this
, model = Orm.loadModel(ModuleName)
, form = Forms.loadForm(ModuleName, model);

self.show = function () {
form.show();
};

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

// TODO : place your code here


model.requery(function () {
// TODO : place your code here
});
form.htmlArea.element.innerHTML = '<button class="btn btn-primary" href="#">Основная</button>';
}
return module_constructor;
});
6 changes: 6 additions & 0 deletions app/CustomWidgets/Button.layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><layout title="" view="view">
<AnchorsPane background="#ffffff" cursor="0" name="view" prefHeight="106px" prefWidth="400px"/>
<HtmlArea name="htmlArea" parent="view" prefHeight="80px" prefWidth="320px" text="htmlArea">
<AnchorsPaneConstraints height="80px" left="40px" top="10px" width="320px"/>
</HtmlArea>
</layout>
3 changes: 3 additions & 0 deletions app/CustomWidgets/Button.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<datamodel>
</datamodel>
1 change: 1 addition & 0 deletions application-start.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<link rel="stylesheet" type="text/css" href="web/pwc/reset.css" />
<link rel="stylesheet" type="text/css" href="web/pwc/theme.css" />
<link rel="stylesheet" type="text/css" href="web/pwc/flaticon.css" />
<link href="ball/css/bootstrap.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript" src="web/pwc/pwc.nocache.js" source-path="app" entry-point="start"></script>
Expand Down
Loading

0 comments on commit 839544a

Please sign in to comment.