Skip to content

Commit

Permalink
many, many things
Browse files Browse the repository at this point in the history
  • Loading branch information
nconrad committed May 28, 2015
1 parent 6634ed0 commit 14ae1e2
Show file tree
Hide file tree
Showing 19 changed files with 450 additions and 202 deletions.
Empty file.
57 changes: 52 additions & 5 deletions app/components/browser/browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,23 @@ <h4>
</span>

<span class="ws-opt" ng-click="showMeta($event, selected)">
<i class="fa fa-eye"></i> View Meta
<i class="icon-info"></i> Meta
</span>

<span class="ws-opt" ng-click="deleteObj(selected)">
<i class="fa fa-trash-o"></i> Delete
<i class="icon-trash"></i> Delete
</span>

<!--<span class="ws-opt">
<i class="fa fa-edit"></i> Rename...
</span>-->
<span class="ws-opt" ng-if="selected.type != 'folder'">
<a class="browser-download" href="{{selected.downloadURL}}">
<i class="fa fa-cloud-download"></i> Download...
<i class="icon-file-download"></i> Download...
</a>
</span>

<span ng-if="path.length && selected.type == 'genome'"
<!--<span ng-if="path.length && selected.type == 'genome'"
class="ws-opt"
ng-click="reconstruct($event, folder+'/'+selected.name)">
<i class="icon-tools"></i>
Expand All @@ -149,7 +149,7 @@ <h4>
ng-click="runFBA($event, folder+'/'+selected.name)">
<i class="fa fa-bar-chart"></i>
Run FBA
</span>
</span>-->

</div>

Expand Down Expand Up @@ -268,3 +268,50 @@ <h4>
<md-progress-circular ng-if="loading" md-mode="indeterminate">
</md-progress-circular>
</div>


<section ng-controller="SideNav">
<md-sidenav class="md-sidenav-right md-whiteframe-z2" md-component-id="modelOpts">
<md-toolbar class="md-theme-light">
<h1 class="md-toolbar-tools">Model Options</h1>
</md-toolbar>
<md-content layout-padding>

<md-button class="md-grid-item-content" ng-click="gapfill($event, folder+'/'+selected.name)">
<i class="fa fa-2x fa-circle"></i>
<div class=""> Gapfill </div>
</md-button>

<md-button class="md-grid-item-content" ng-click="runFBA($event, folder+'/'+selected.name)">
<i class="fa fa-2x fa-bar-chart"></i>
<div class=""> Run FBA </div>
</md-button>

<md-button ng-click="close()" class="md-primary">
Close
</md-button>
</md-content>
</md-sidenav>

<md-sidenav class="md-sidenav-right md-whiteframe-z2" md-component-id="genomeOpts">
<md-toolbar class="md-theme-light">
<h1 class="md-toolbar-tools">Model Options</h1>
</md-toolbar>
<md-content layout-padding>

<md-button class="md-grid-item-content" ng-click="gapfill($event, folder+'/'+selected.name)">
<i class="fa fa-2x fa-circle"></i>
<div class=""> Gapfill </div>
</md-button>

<md-button class="md-grid-item-content" ng-click="runFBA($event, folder+'/'+selected.name)">
<i class="fa fa-2x fa-bar-chart"></i>
<div class=""> Run FBA </div>
</md-button>

<md-button ng-click="close()" class="md-primary">
Close
</md-button>
</md-content>
</md-sidenav>
</section>
49 changes: 39 additions & 10 deletions app/components/browser/browserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
angular.module('Browser', ['uiTools'])
.controller('MyData',
['$scope', '$stateParams', 'MS', '$log',
'uiTools', '$document', '$timeout', '$mdDialog', '$mdToast', 'Upload',
function($scope, $stateParams, MS, $log, uiTools, $document, $timeout, $dialog, $mdToast, Upload) {
'uiTools', '$document', '$timeout', '$mdDialog', '$mdToast', 'Upload', '$mdSidenav',
function($scope, $stateParams, MS, $log, uiTools, $document,
$timeout, $dialog, $mdToast, Upload, $mdSidenav) {

$scope.Upload = Upload;
$scope.MS = MS;
Expand Down Expand Up @@ -152,6 +153,19 @@ angular.module('Browser', ['uiTools'])

$scope.selectRow = function(e, i, item) {
console.log('called select row', e, i, item)

if (item.type === 'model') {
if (!$mdSidenav('modelOpts').isOpen())
$mdSidenav('modelOpts').open();

$document.bind('click', function(e) {
$mdSidenav('modelOpts').close();
$document.unbind(e)
})
} else if ($mdSidenav('modelOpts').isOpen()) {
$mdSidenav('modelOpts').close()
}

$scope.select = true;
$scope.selected = {type: item.type ? item.type : 'Workspace',
name: item.name,
Expand Down Expand Up @@ -335,6 +349,7 @@ angular.module('Browser', ['uiTools'])
$dialog.show({
templateUrl: 'app/views/dialogs/show-meta.html',
targetEvent: ev,
clickOutsideToClose: true,
controller: ['$scope', '$http',
function($scope, $http) {
MS.getObjectMeta(path(item.name))
Expand All @@ -345,7 +360,6 @@ angular.module('Browser', ['uiTools'])
$scope.cancel = function(){
$dialog.hide();
}

}]
})
}
Expand All @@ -355,12 +369,13 @@ angular.module('Browser', ['uiTools'])
$dialog.show({
templateUrl: 'app/views/dialogs/runFBA.html',
targetEvent: ev,
clickOutsideToClose: true,
scope: $scope.$new(),
preserveScope: true,
controller: ['$scope', '$http',
function($scope, $http) {

$scope.reconstruct = function(){
$scope.runFBA = function(){
var name = $scope.selected.name;
showToast('Running Flux Balance Analysis', name)
MS.runFBA(item)
Expand All @@ -381,15 +396,18 @@ angular.module('Browser', ['uiTools'])
}

$scope.gapfill = function(ev, item) {
$mdSidenav('modelOpts').toggle();
ev.stopPropagation();
$dialog.show({
templateUrl: 'app/views/dialogs/gapfill.html',
targetEvent: ev,
scope: $scope.$new(),
clickOutsideToClose: true,
preserveScope: true,
controller: ['$scope', '$http',
function($scope, $http) {


$scope.gapfill = function(){
var name = $scope.selected.name;
showToast('Gapfilling', name)
Expand Down Expand Up @@ -419,9 +437,9 @@ angular.module('Browser', ['uiTools'])
'<span flex style="margin-right: 30px;">'+
'<span class="ms-color">'+title+'</span><br>'+
name.slice(0,20)+'...'+'</span>'+
'<md-button offset="33" ng-click="closeToast()">'+
'Close'+
'</md-button>'+
'<!--<md-button offset="33" ng-click="closeToast()">'+
'Hide'+
'</md-button>-->'+
'</md-toast>',
hideDelay: 0,
});
Expand All @@ -443,9 +461,9 @@ angular.module('Browser', ['uiTools'])
'</md-toast>',
hideDelay: 10000
});
}
}

function showError(msg) {
function showError(msg) {
$mdToast.show({
controller: 'ToastCtrl',
//templateUrl:'app/views/dialogs/notify.html',
Expand All @@ -457,9 +475,20 @@ angular.module('Browser', ['uiTools'])
'</md-toast>',
hideDelay: 10000
});
}
}

}])

.controller('SideNav',
['$scope', '$mdSidenav',
function($scope, $mdSidenav) {

$scope.close = function() {
$mdSidenav('right').toggle();
}


}])

.controller('ToastCtrl', ['$scope', '$mdToast', '$timeout', function($scope, $mdToast, $timeout) {
$scope.closeToast = function() {
Expand Down
1 change: 1 addition & 0 deletions app/ctrls/ms-ctrls.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function($scope, $state, $stateParams, Auth, $window) {
}])



.controller('Run',
['$scope', '$http',
function($scope, $http) {
Expand Down
1 change: 1 addition & 0 deletions app/views/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
</div>
</div>


<!--
<div id="footer">
<span class="pull-right">
Expand Down
3 changes: 1 addition & 2 deletions app/views/biochem/biochem.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<hr class="no-margin">


<md-tabs md-selected="tabs.selectedIndex">
<md-tabs md-selected="tabs.selectedIndex" md-no-ink>
<md-tab>
<md-tab-label>Reactions</md-tab-label>
<md-tab-template>
Expand Down Expand Up @@ -54,4 +54,3 @@
-->

</md-tabs>

1 change: 0 additions & 1 deletion app/views/dialogs/reconstruct.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<h3>Reconstruct Model</h3>
{{folder}} {{selected.name}}


<ng-include src="'app/views/apps/reconstruct.html'"></ng-include>
</md-content>

Expand Down
4 changes: 2 additions & 2 deletions app/views/dialogs/runFBA.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ <h3>Run FBA</h3>
</md-content>

<div class="md-actions">
<md-button ng-click="reconstruct()">
Reconstruct
<md-button ng-click="runFBA()">
Run FBA
</md-button>
</div>
</md-dialog>
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"angular-smoothscroll": "~1.1.1",
"datatables": "~1.10.5",
"datatables-colreorder": "~1.1.2",
"angular-material": "~0.8.3",
"angular-material": "~0.9.4",
"angular-scroll": "~0.6.5",
"angular": "1.4.0-rc.1",
"angular": "~1.4.0",
"angular-animate": "~1.3.15"
},
"resolutions": {
Expand Down
62 changes: 57 additions & 5 deletions css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
color: #DA265D;
}


header .login {
margin: 20px 0 0 0;
}
Expand Down Expand Up @@ -458,6 +459,34 @@ table tr.active {
transition: none !important;
}

md-sidenav {
min-width: 50px;
max-width: 125px;
bottom:inherit;
position: fixed;
}

md-sidenav button div {
line-height: 15px;
margin-bottom: 15px;
}

md-sidenav button i {
margin-top: 10px;

}

.md-sidenav-right {
top:75px;
}

md-backdrop {
visbility: hidden;
display:none;
}



md-input-container {
padding-bottom: 15px;
}
Expand All @@ -474,6 +503,14 @@ md-input-container:not(.md-input-has-value) input:not(:focus) {
text-transform: capitalize;
}

md-tabs md-tab:hover {
color: #444;
}

md-tab.md-tab-themed {
transition: background 0.35s cubic-bezier(0.35, 0, 0.25, 1);
}

md-card {
padding: 0 15px;
margin: 0;
Expand Down Expand Up @@ -544,16 +581,17 @@ md-card {

.ws-opt {
margin: 0 0 0 15px;
color: #333;
}
.ws-opt i {
color: #333;
color: #666;
}

.ws-opt:hover {
opacity: 0.75;
color: #222;
cursor: pointer;
}
.ws-opt a {
text-decoration: none;
}


.ws-opt .fa-folder-o {
font-weight: 700;
Expand Down Expand Up @@ -610,6 +648,20 @@ input[name=upload] {

/* end browser */

/* icon mods */
.icon-info {
line-height: .9em;
}

.icon-file-download {
margin-top: 5px;
font-size: 1.2em;
}


/* end icon mods */


/* override bootstrap */
.form-group {
margin-left: 0 !important;
Expand Down
6 changes: 3 additions & 3 deletions icomoon/demo-files/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ p {
font-size: 16px;
}
.fs1 {
font-size: 24px;
font-size: 32px;
}
.fs2 {
font-size: 28px;
font-size: 32px;
}
.fs3 {
font-size: 24px;
Expand All @@ -158,5 +158,5 @@ p {
font-size: 32px;
}
.fs5 {
font-size: 32px;
font-size: 28px;
}
Loading

0 comments on commit 14ae1e2

Please sign in to comment.