--- /dev/null
+<div class="container-fluid" style="text-align:center">
+ <div class="alert alert-info alert-less-pad strong-text-2">
+ <span>[% l('EDI Attribute Sets') %]</span>
+ </div>
+</div>
+
+<div class="row">
+ <div class="col-md-4">
+ <div class="input-group">
+ <div class="input-group-btn" uib-dropdown>
+ <button type="button" class="btn btn-default" uib-dropdown-toggle>
+ [% l('Attribute Set') %]
+ <span class="caret"></span>
+ </button>
+ <ul uib-dropdown-menu>
+ <li ng-repeat="set in attr_sets">
+ <a href='' ng-click="select_set(set)">{{set.label()}}</a>
+ </li>
+ </ul>
+ </div><!-- /btn-group -->
+ <input type="text" ng-if="!cur_attr_set"
+ class="form-control" disabled="disabled"
+ value="[% l('No Attribute Set Selected') %]"/>
+ <input type="text" ng-if="cur_attr_set"
+ class="form-control" disabled="disabled"
+ value="{{cur_attr_set.label()}}"/>
+ </div>
+ </div>
+ <div class="col-md-4">
+ <button class="btn btn-success"
+ ng-click="apply()">[% l('Apply Changes') %]</button>
+ </div>
+</div>
+
+<div class="pad-vert">
+ <div class="row" ng-repeat="attr in attrs | orderBy:'key()'"
+ ng-class="cur_attr_set._local_map[attr.key()] ? 'selected-row' : ''">
+ <div class="col-md-3">
+ <span class="pad-right-min">
+ <input type="checkbox"
+ ng-model="cur_attr_set._local_map[attr.key()]"/>
+ </span>
+ <span>{{attr.key()}}</span>
+ </div>
+ <div class="col-md-9">{{attr.label()}}</div>
+ </div>
+</div>
+
+
// create service-level pass through functions
// for one-off PCRUDContext actions.
angular.forEach(['connect', 'retrieve', 'retrieveAll',
- 'search', 'create', 'update', 'remove', 'apply'],
+ 'search', 'create', 'update', 'remove', 'auto'],
function(action) {
service[action] = function() {
var ctx = new PCRUDContext();
this.session.disconnect();
};
- this.retrieve = function(fm_class, pkey, pcrud_ops) {
+ this.retrieve = function(fm_class, pkey, pcrud_ops, req_ops) {
+ req_ops = req_ops || {};
+ this.authoritative = req_ops.authoritative;
return this._dispatch(
'open-ils.pcrud.retrieve.' + fm_class,
[egAuth.token(), pkey, pcrud_ops]
this.search = function (fm_class, search, pcrud_ops, req_ops) {
req_ops = req_ops || {};
+ this.authoritative = req_ops.authoritative;
var return_type = req_ops.idlist ? 'id_list' : 'search';
var method = 'open-ils.pcrud.' + return_type + '.' + fm_class;
this.create = function(list) {return this.CUD('create', list)};
this.update = function(list) {return this.CUD('update', list)};
this.remove = function(list) {return this.CUD('delete', list)};
- this.apply = function(list) {return this.CUD('apply', list)};
+ this.auto = function(list) {return this.CUD('auto', list)};
this.xactClose = function() {
return this._send_request(
},
// main body error handler
- function() {},
+ function() {deferred.reject()},
// main body notify() handler
function(data) {deferred.notify(data)}
self.cud_last = data;
self.cud_deferred.notify(data);
self._CUD_next_request();
- }
+ },
+ self.cud_deferred.reject
);
};