2015-01-22 17:15:17 +08:00
|
|
|
define([
|
|
|
|
'jquery',
|
2015-03-01 20:28:25 +08:00
|
|
|
'simplemodal',
|
2015-01-22 17:15:17 +08:00
|
|
|
'underscore',
|
|
|
|
'backbone',
|
|
|
|
'common',
|
2015-04-03 12:15:41 +08:00
|
|
|
'app/views/add-repo'
|
|
|
|
], function($, simplemodal, _, Backbone, Common, AddRepoView) {
|
2015-01-22 17:15:17 +08:00
|
|
|
'use strict';
|
|
|
|
|
2015-03-19 16:06:20 +08:00
|
|
|
var AddGroupRepoView = AddRepoView.extend({
|
|
|
|
templateData: function() {
|
2015-01-22 17:15:17 +08:00
|
|
|
return {
|
2015-09-24 17:20:45 +08:00
|
|
|
showSharePerm: true,
|
2016-09-18 11:58:14 +08:00
|
|
|
enable_encrypted_library: app.pageOptions.enable_encrypted_library,
|
|
|
|
library_templates: app.pageOptions.library_templates
|
2015-01-22 17:15:17 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2015-03-19 16:06:20 +08:00
|
|
|
newAttributes: function() {
|
|
|
|
var baseAttrs = AddRepoView.prototype.newAttributes.apply(this);
|
2015-01-22 17:15:17 +08:00
|
|
|
|
2015-04-02 18:51:48 +08:00
|
|
|
return _.extend(baseAttrs, {'permission': $('select[name=permission]', this.$el).val()});
|
2015-06-10 13:43:41 +08:00
|
|
|
}
|
2015-01-22 17:15:17 +08:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return AddGroupRepoView;
|
|
|
|
});
|