+XOSTenantApp.editUsers = function(model) {\r
+ var app=this;\r
+ var detailView = new XOSEditUsersView({model: model, collection: xos.slicesPlus});\r
+ detailView.dialog = $("#tenant-edit-users-dialog");\r
+ app.tenantEditUsersInterior.show(detailView);\r
+ $("#tenant-edit-users-dialog").dialog({\r
+ autoOpen: false,
+ modal: true,
+ width: 640,
+ buttons : {
+ "Save" : function() {
+ var editDialog = this;
+ user_ids = all_options($("#tenant-edit-users-dialog").find(".select-picker-to"));
+ user_ids = user_ids.map( function(x) { return parseInt(x,10); } );
+ model.attributes.users = user_ids;
+ $(editDialog).dialog("close");
+ },
+ "Cancel" : function() {
+ $(this).dialog("close");
+ }
+ }
+ });
+ $("#tenant-edit-users-dialog").dialog("open");\r
+};\r
+\r