From 47d45e16bee15fd9f1f793a0bad3b93ad1b985fc Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 11 Jun 2012 07:19:19 -0700
Subject: Edit View - Add buttons and calls controller (saves bindings)
---
.../edit-binding-view.reel/edit-binding-view.html | 44 ++++++++++--
.../edit-binding-view.reel/edit-binding-view.js | 81 ++++++++++++++++++++--
2 files changed, 115 insertions(+), 10 deletions(-)
(limited to 'js/panels/binding/edit-binding-view.reel')
diff --git a/js/panels/binding/edit-binding-view.reel/edit-binding-view.html b/js/panels/binding/edit-binding-view.reel/edit-binding-view.html
index d07f4445..604d4871 100644
--- a/js/panels/binding/edit-binding-view.reel/edit-binding-view.html
+++ b/js/panels/binding/edit-binding-view.reel/edit-binding-view.html
@@ -18,7 +18,10 @@
"boundObjectField" : {"@": "boundObjectField" },
"sourceObjectPropertyPathField" : {"@": "sourceObjectPropertyPathField" },
"boundObjectPropertyPathField" : {"@": "boundObjectPropertyPathField" },
- "directionCheckbox" : {"@": "directionCheckbox" }
+ "directionCheckbox" : {"@": "directionCheckbox" },
+ "saveButton":{ "@": "saveButton" },
+ "cancelButton":{ "@": "cancelButton" },
+ "deleteButton":{ "@": "deleteButton" }
}
},
"sourceObjectField": {
@@ -96,11 +99,40 @@
"checked": {"<-": "@owner.oneway"}
}
},
- "closeButton" : {
+ "cancelButton" : {
"prototype": "montage/ui/button.reel",
"properties": {
- "element": {"#": "close-button" },
- "identifier": "closeButton"
+ "element": {"#": "cancel-button" },
+ "identifier": "cancelButton"
+ },
+ "listeners": [
+ {
+ "type": "action",
+ "listener": {"@": "owner" }
+ }
+ ]
+ },
+ "deleteButton" : {
+ "prototype": "montage/ui/button.reel",
+ "properties": {
+ "element": {"#": "delete-button" },
+ "identifier": "deleteButton"
+ },
+ "listeners": [
+ {
+ "type": "action",
+ "listener": {"@": "owner" }
+ }
+ ]
+ },
+ "saveButton" : {
+ "prototype": "montage/ui/button.reel",
+ "properties": {
+ "element": {"#": "save-button" },
+ "identifier": "saveButton"
+ },
+ "bindings" : {
+ "enabled": {"<<->": "@owner.dirty"}
},
"listeners": [
{
@@ -139,7 +171,9 @@
-
+
+
+