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