mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Latest tweaks
This commit is contained in:
@ -62,7 +62,7 @@ html(lang="en", ng-app="biomed", ng-controller="PageCtrl")
|
||||
|
||||
li(data-match-route='/deviceTypes.*')
|
||||
a(href='/deviceTypes')
|
||||
| Devices
|
||||
| Global Devices
|
||||
|
||||
li(data-match-route='/checkLists.*')
|
||||
a(href='/checkLists')
|
||||
|
@ -75,7 +75,9 @@ function checkListsControllerFactory(isEdit) {
|
||||
|
||||
function save() {
|
||||
if (isEdit) {
|
||||
CheckLists.update({id: $scope.model._id}, $scope.model);
|
||||
CheckLists.update({id: $scope.model._id}, $scope.model, function() {
|
||||
$location.path("/checkLists/");
|
||||
});
|
||||
} else {
|
||||
CheckLists.create($scope.model, function(result) {
|
||||
$location.path("/checkLists/" + result._id);
|
||||
@ -99,4 +101,4 @@ function checkListsControllerFactory(isEdit) {
|
||||
$scope.model = CheckLists.get($routeParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -152,18 +152,20 @@ angular.module('biomed')
|
||||
.controller("DeviceTypeEditCtrl", function($scope, DeviceTypes, Devices, CheckLists, $location, $filter, $routeParams) {
|
||||
var images = {};
|
||||
|
||||
$scope.model = DeviceTypes.get($routeParams, function() {
|
||||
$scope.loading = false;
|
||||
$scope.checkLists = CheckLists.index(function() {
|
||||
$scope.model = DeviceTypes.get($routeParams, function() {
|
||||
$scope.loading = false;
|
||||
|
||||
$scope.existingImages = $scope.model.images;
|
||||
if ($scope.model.images) {
|
||||
for (var i = 0; i < $scope.model.images.length; i++) {
|
||||
images[$scope.model.images[i]] = 1;
|
||||
$scope.existingImages = $scope.model.images;
|
||||
if ($scope.model.images) {
|
||||
for (var i = 0; i < $scope.model.images.length; i++) {
|
||||
images[$scope.model.images[i]] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$scope.categoryPicker = {id: $scope.model.category, text: $scope.model.category};
|
||||
$scope.makePicker = {id: $scope.model.make, text: $scope.model.make};
|
||||
$scope.categoryPicker = {id: $scope.model.category, text: $scope.model.category};
|
||||
$scope.makePicker = {id: $scope.model.make, text: $scope.model.make};
|
||||
});
|
||||
});
|
||||
|
||||
console.log($routeParams);
|
||||
@ -173,8 +175,6 @@ angular.module('biomed')
|
||||
$scope.categories = DeviceTypes.categories();
|
||||
$scope.deviceMakes = DeviceTypes.makes();
|
||||
|
||||
$scope.checkLists = CheckLists.index();
|
||||
|
||||
|
||||
$scope.categoryOpts = {
|
||||
containerCssClass: 'input-xxlarge',
|
||||
@ -257,4 +257,4 @@ angular.module('biomed')
|
||||
$location.path("/deviceTypes/");
|
||||
});
|
||||
};
|
||||
})
|
||||
})
|
||||
|
@ -94,13 +94,14 @@ function devicesControllerFactory(isEdit) {
|
||||
|
||||
function create() {
|
||||
Devices.create($scope.model, function(result) {
|
||||
console.log('here');
|
||||
$location.path("/devices/" + result._id);
|
||||
$location.path("/clients/" + result.client);
|
||||
});
|
||||
}
|
||||
|
||||
function update() {
|
||||
Devices.update({id: $scope.model._id}, $scope.model);
|
||||
Devices.update({id: $scope.model._id}, $scope.model, function() {
|
||||
$location.path("/clients/" + $scope.model.client);
|
||||
});
|
||||
}
|
||||
|
||||
var hashids = new Hashids("biomed");
|
||||
|
@ -298,7 +298,7 @@
|
||||
<table class="biomed-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 7%">Device ID</th>
|
||||
<th style="width: 7%">Control #</th>
|
||||
<th style="width: 6%">Category</th>
|
||||
<th style="width: 5%">Make</th>
|
||||
<th style="width: 5%">Model</th>
|
||||
|
@ -1,9 +1,8 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/devices"><i class="icon-briefcase"></i> Devices</a><span class="divider"></span><li>
|
||||
<li class="active">New Device<li>
|
||||
<li class="active">New Global Device<li>
|
||||
</ul>
|
||||
<header>
|
||||
<h1>New Device</h1>
|
||||
<h1>New Global Device</h1>
|
||||
</header>
|
||||
|
||||
<form name="form" class="form">
|
||||
@ -49,7 +48,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Recommended Parts</label>
|
||||
<label class="control-label">Recommended PM Parts</label>
|
||||
<div class="controls">
|
||||
<textarea ng-model="model.partsRecommended" type="text" class="input-xxlarge"></textarea>
|
||||
</div>
|
||||
|
@ -1,14 +1,14 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/devices"><i class="icon-briefcase"></i> Devices</a><span class="divider"></span><li>
|
||||
<li class="active">Edit Device<li>
|
||||
<li class="active">Edit Global Device<li>
|
||||
</ul>
|
||||
<header>
|
||||
<h1>Edit Device</h1>
|
||||
<h1>Edit Global Device</h1>
|
||||
</header>
|
||||
|
||||
<div ng-hide="loading" class="tabbable">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active form" title="Details">
|
||||
<div class="tab-pane active form" title="Global Details">
|
||||
|
||||
<form name="form" class="form">
|
||||
<div class="form-section">
|
||||
@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Recommended Parts</label>
|
||||
<label class="control-label">Recommended PM Parts</label>
|
||||
<div class="controls">
|
||||
<textarea ng-model="model.partsRecommended" type="text" class="input-xxlarge"></textarea>
|
||||
</div>
|
||||
@ -111,7 +111,7 @@
|
||||
<table class="biomed-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 7%">Device ID</th>
|
||||
<th style="width: 7%">Control #</th>
|
||||
<th style="width: 6%">Client</th>
|
||||
<th style="width: 5%">Serial No.</th>
|
||||
<th style="width: 8%">Purchase Date</th>
|
||||
|
@ -1,14 +1,14 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/devices"><i class="icon-briefcase"></i> Devices</a><li>
|
||||
<li><a href="/devices"><i class="icon-briefcase"></i> Global Devices</a><li>
|
||||
</ul>
|
||||
<header>
|
||||
<h1>Devices</h1>
|
||||
<h1>Global Devices</h1>
|
||||
</header>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="toolbelt">
|
||||
<a href="/deviceTypes/add" class="btn btn-primary" ng-show="accountHasPermission('system.edit')">Create new Device</a>
|
||||
<a href="/deviceTypes/add" class="btn btn-primary" ng-show="accountHasPermission('system.edit')">Create new Global Device</a>
|
||||
<div class="pull-right">
|
||||
<span class="toolbelt-text">Search:</span>
|
||||
<div class="input-append">
|
||||
|
@ -39,14 +39,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-section">
|
||||
<div class="section-label">Identifier</div>
|
||||
<div class="section-label">Control #</div>
|
||||
<div class="section-container">
|
||||
<div class="form-editor">
|
||||
<div
|
||||
ng-class="{ 'error': form.identifier.$invalid && !form.identifier.$pristine }"
|
||||
class="control-group">
|
||||
|
||||
<label class="control-label">Identifier</label>
|
||||
<label class="control-label">Control #</label>
|
||||
<div class="controls">
|
||||
<input
|
||||
ng-model="model.biomedId"
|
||||
|
@ -42,14 +42,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-section">
|
||||
<div class="section-label">Identifier</div>
|
||||
<div class="section-label">Control #</div>
|
||||
<div class="section-container">
|
||||
<div class="form-editor">
|
||||
<div
|
||||
ng-class="{ 'error': form.identifier.$invalid && !form.identifier.$pristine }"
|
||||
class="control-group">
|
||||
|
||||
<label class="control-label">Identifier</label>
|
||||
<label class="control-label">Control #</label>
|
||||
<div class="controls">
|
||||
<input
|
||||
ng-model="model.biomedId"
|
||||
|
Reference in New Issue
Block a user