X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=ang%2FcrmUi.js;h=a900f45a3ae71661dfea7498c0be4dcb0dd46781;hb=89d193fdbff63a326df5ed7f013208fdad4c4dba;hp=b01e897d3fde78b17f01281fef5f3e254784d9ab;hpb=85ab24c688987f3a1c7c708dc552e3ffb3289bb4;p=civicrm-core.git diff --git a/ang/crmUi.js b/ang/crmUi.js index b01e897d3f..a900f45a3a 100644 --- a/ang/crmUi.js +++ b/ang/crmUi.js @@ -1,7 +1,9 @@ /// crmUi: Sundry UI helpers (function (angular, $, _) { - var uidCount = 0; + var uidCount = 0, + pageTitle = 'CiviCRM', + documentTitle = 'CiviCRM'; angular.module('crmUi', []) @@ -395,7 +397,7 @@ ngModel.$render = function(value) { editor.done(function() { - CRM.wysiwyg.setVal(elm, ngModel.$viewValue); + CRM.wysiwyg.setVal(elm, ngModel.$viewValue || ''); }); }; } @@ -586,7 +588,7 @@ $timeout(function () { // ex: msg_template_id adds new item then selects it; use $timeout to ensure that // new item is added before selection is made - element.select2('val', ngModel.$viewValue); + element.select2('val', ngModel.$modelValue); }); }; } @@ -629,7 +631,7 @@ $timeout(function () { // ex: msg_template_id adds new item then selects it; use $timeout to ensure that // new item is added before selection is made - element.select2('val', ngModel.$viewValue); + element.select2('val', ngModel.$modelValue); }); }; function refreshModel() { @@ -975,6 +977,39 @@ } }; }) + + // Sets document title & page title; attempts to override CMS title markup for the latter + // WARNING: Use only once per route! + // Example (same title for both):