Skip to content

Commit

Permalink
Updates for advanced patches
Browse files Browse the repository at this point in the history
  • Loading branch information
sconix committed Mar 21, 2011
1 parent e024657 commit c105c06
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 24 deletions.
34 changes: 22 additions & 12 deletions advanced/advanced-system-prefs-msg-prefs-vzw.patch
Expand Up @@ -468,7 +468,7 @@
+ }
+ }
+
+ if(accountsList.length < 2)
+ if(accountsList.length <= 2)
+ this.handleAvailabilityPickerHold(event);
+ else {
+ this.controller.popupSubmenu({
Expand Down Expand Up @@ -578,7 +578,7 @@
handleAvailabilitySelection: function(availabilityString) {
var availabilityInteger;

@@ -1879,15 +2007,118 @@
@@ -1879,15 +2007,128 @@
this.appController.notificationAssistant.clearMessageDashboard();
}
},
Expand Down Expand Up @@ -645,12 +645,12 @@
+
+ customMessageSelect: function(event) {
+ var messagesList = [];
+ this.customMessage = '';
+ this.customMessage = null;
+
+ this.customMessageTextWidgetModel.value = "";
+ this.controller.modelChanged(this.customMessageTextWidgetModel);
+
+ messagesList.push({label: $L("New custom message..."), command: ""});
+ messagesList.push({label: $L("New custom message..."), command: "empty"});
+
+ for(var alias in this.accountsData) {
+ for(var i = 0; i < this.accountsData[alias].length; i++) {
Expand All @@ -675,6 +675,8 @@
+ items: messagesList
+ });
+ }
+ else
+ this.controller.get('commitCustomMessage').show();
+ },
+
+ customMessageCancel: function(event) {
Expand All @@ -688,17 +690,25 @@
+
+ customMessageFill: function(accountId) {
+ if(accountId) {
+ if((this.availabilityData[accountId]) &&
+ (this.availabilityData[accountId].customMessage) &&
+ (this.availabilityData[accountId].customMessage.length > 0))
+ {
+ var msg = this.availabilityData[accountId].customMessage;
+ if(accountId == "empty") {
+ this.controller.get('commitCustomMessage').show();
+ }
+ else {
+ if((this.availabilityData[accountId]) &&
+ (this.availabilityData[accountId].customMessage) &&
+ (this.availabilityData[accountId].customMessage.length > 0))
+ {
+ var msg = this.availabilityData[accountId].customMessage;
+
+ this.customMessageTextWidgetModel.value = msg;
+ this.controller.modelChanged(this.customMessageTextWidgetModel);
+ this.customMessageTextWidgetModel.value = msg;
+ this.controller.modelChanged(this.customMessageTextWidgetModel);
+
+ this.updateCustomMessageCommitIcon();
+ this.updateCustomMessageCommitIcon();
+ }
+ }
+ }
+ else {
+ this.customMessageCancel();
}
},

Expand Down
34 changes: 22 additions & 12 deletions advanced/advanced-system-prefs-msg-prefs.patch
Expand Up @@ -468,7 +468,7 @@
+ }
+ }
+
+ if(accountsList.length < 2)
+ if(accountsList.length <= 2)
+ this.handleAvailabilityPickerHold(event);
+ else {
+ this.controller.popupSubmenu({
Expand Down Expand Up @@ -578,7 +578,7 @@
handleAvailabilitySelection: function(availabilityString) {
var availabilityInteger;

@@ -1879,15 +2007,118 @@
@@ -1879,15 +2007,128 @@
this.appController.notificationAssistant.clearMessageDashboard();
}
},
Expand Down Expand Up @@ -645,12 +645,12 @@
+
+ customMessageSelect: function(event) {
+ var messagesList = [];
+ this.customMessage = '';
+ this.customMessage = null;
+
+ this.customMessageTextWidgetModel.value = "";
+ this.controller.modelChanged(this.customMessageTextWidgetModel);
+
+ messagesList.push({label: $L("New custom message..."), command: ""});
+ messagesList.push({label: $L("New custom message..."), command: "empty"});
+
+ for(var alias in this.accountsData) {
+ for(var i = 0; i < this.accountsData[alias].length; i++) {
Expand All @@ -675,6 +675,8 @@
+ items: messagesList
+ });
+ }
+ else
+ this.controller.get('commitCustomMessage').show();
+ },
+
+ customMessageCancel: function(event) {
Expand All @@ -688,17 +690,25 @@
+
+ customMessageFill: function(accountId) {
+ if(accountId) {
+ if((this.availabilityData[accountId]) &&
+ (this.availabilityData[accountId].customMessage) &&
+ (this.availabilityData[accountId].customMessage.length > 0))
+ {
+ var msg = this.availabilityData[accountId].customMessage;
+ if(accountId == "empty") {
+ this.controller.get('commitCustomMessage').show();
+ }
+ else {
+ if((this.availabilityData[accountId]) &&
+ (this.availabilityData[accountId].customMessage) &&
+ (this.availabilityData[accountId].customMessage.length > 0))
+ {
+ var msg = this.availabilityData[accountId].customMessage;
+
+ this.customMessageTextWidgetModel.value = msg;
+ this.controller.modelChanged(this.customMessageTextWidgetModel);
+ this.customMessageTextWidgetModel.value = msg;
+ this.controller.modelChanged(this.customMessageTextWidgetModel);
+
+ this.updateCustomMessageCommitIcon();
+ this.updateCustomMessageCommitIcon();
+ }
+ }
+ }
+ else {
+ this.customMessageCancel();
}
},

Expand Down

0 comments on commit c105c06

Please sign in to comment.