refactored title in settings modal in angular

This commit is contained in:
hamza zia 2013-02-23 09:34:56 +01:00
parent 7d1129275b
commit 67785b2560
3 changed files with 5 additions and 4 deletions

View File

@ -409,12 +409,11 @@ http://ex1.com/f2.mp4 http://ex2.com/f2.mp4
<div class="modal hide" modal="globalSettings.shown">
<div class="modal-header">
<button class="close" ng-click="globalSettings.close()">x</button>
<h3>Global Settings</h3>
<h3>{{globalSettings.title}}</h3>
</div>
<form class="form-horizontal modal-body">
<fieldset>
<legend>Global Settings</legend>
<div class="control-group">
<div ng-repeat="(name, set) in globalSettings.settings">
<label class="control-label">{{name}}</label>

View File

@ -86,9 +86,11 @@ angular
scope.globalSettings = {
shown: false,
settings: [],
init: function(settings, cb) {
title: 'Settings',
init: function(settings, title, cb) {
this.cb = cb;
this.settings = settings;
this.title = title || title;
this.shown = true;
},
success: function() {

View File

@ -49,7 +49,7 @@ angular
}
}
modals.invoke('globalSettings', settings, function(settings) {
modals.invoke('globalSettings', settings, 'Global Settings', function(settings) {
var sets = {};
for (var i in settings) { sets[i] = settings[i].val };