You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2016/01/26 19:38:40 UTC
airavata-php-gateway git commit: Modifying navigation for storage
resources ui
Repository: airavata-php-gateway
Updated Branches:
refs/heads/develop e7eaded52 -> 839fe7895
Modifying navigation for storage resources ui
Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/839fe789
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/839fe789
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/839fe789
Branch: refs/heads/develop
Commit: 839fe7895f5b684318a3716a6ed7260adc969f75
Parents: e7eaded
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Jan 26 13:38:04 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Jan 26 13:38:04 2016 -0500
----------------------------------------------------------------------
app/controllers/StorageResourceController.php | 2 +-
app/routes.php | 2 +-
app/views/resource/edit.blade.php | 17 -----------------
app/views/storage-resource/browse.blade.php | 2 +-
app/views/storage-resource/edit.blade.php | 7 ++++++-
public/js/script.js | 17 +++++++++++++++++
6 files changed, 26 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/839fe789/app/controllers/StorageResourceController.php
----------------------------------------------------------------------
diff --git a/app/controllers/StorageResourceController.php b/app/controllers/StorageResourceController.php
index 0ec4c6e..19189d5 100644
--- a/app/controllers/StorageResourceController.php
+++ b/app/controllers/StorageResourceController.php
@@ -112,7 +112,7 @@ class StorageresourceController extends BaseController
return Redirect::to("sr/edit?srId=" . Input::get("srId") . $tabName);
}
- public function viewView()
+ public function srView()
{
$data = CRUtilities::getEditCRData();
$computeResourceId = "";
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/839fe789/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index faa27c052..7557a42 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -142,7 +142,7 @@ Route::get("sr/edit", "StorageResourceController@editView");
Route::post("sr/edit", "StorageResourceController@editSubmit");
-Route::get("sr/view", "StorageResourceController@viewView");
+Route::get("sr/view", "StorageResourceController@srView");
Route::get("sr/browse", "StorageResourceController@browseView");
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/839fe789/app/views/resource/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/resource/edit.blade.php b/app/views/resource/edit.blade.php
index 709cf86..7ba4705 100644
--- a/app/views/resource/edit.blade.php
+++ b/app/views/resource/edit.blade.php
@@ -843,23 +843,6 @@
@if(! Session::has('super-admin'))
<script>
- function disableInputs( elem){
- elem.find("input").each( function( i,e){
- if( $(e).attr("type")=='submit' || $(e).attr("type")=='button' )
- $(e).attr("disabled", "true");
- else
- $(e).prop("readonly", "true");
- });
- elem.find("textarea").prop("readonly", "true");
- elem.find("select").attr("disabled", "true");
- elem.find(".hide").prop("readonly", "true");
- elem.find("button").attr("disabled", "true");
- //remove previously created input/output blocks
- elem.find(".app-inputs").html("");
- elem.find(".app-outputs").html("");
- $(".glyphicon").hide();
- }
-
disableInputs( $(".compute-resource-properties"));
</script>
@endif
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/839fe789/app/views/storage-resource/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/storage-resource/browse.blade.php b/app/views/storage-resource/browse.blade.php
index f3b534f..41c0c96 100644
--- a/app/views/storage-resource/browse.blade.php
+++ b/app/views/storage-resource/browse.blade.php
@@ -72,7 +72,7 @@
</td>
@endif
<td>
- <a href="{{URL::to('/')}}/sr/view?srId={{ $srId }}" title="Edit">
+ <a href="{{URL::to('/')}}/sr/edit?srId={{ $srId }}" title="Edit">
<span class="glyphicon glyphicon-list"></span>
</a>
</td>
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/839fe789/app/views/storage-resource/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/storage-resource/edit.blade.php b/app/views/storage-resource/edit.blade.php
index 8917fa2..da80867 100644
--- a/app/views/storage-resource/edit.blade.php
+++ b/app/views/storage-resource/edit.blade.php
@@ -14,7 +14,7 @@
<div id="page-wrapper">
<div class="container-fluid">
-<div class="col-md-offset-2 col-md-8">
+<div class="col-md-offset-2 col-md-8 storage-resource-properties">
<input type="hidden" class="base-url" value="{{URL::to('/')}}"/>
@@ -384,5 +384,10 @@
@section('scripts')
@parent
{{ HTML::script('js/script.js') }}
+@if(! Session::has('super-admin'))
+ <script>
+ disableInputs( $(".storage-resource-properties"));
+ </script>
+@endif
@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/839fe789/public/js/script.js
----------------------------------------------------------------------
diff --git a/public/js/script.js b/public/js/script.js
index 1f28e98..6f013df 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -17,6 +17,23 @@ function getAccodrionCode()
</div>';
}
+function disableInputs( elem){
+ elem.find("input").each( function( i,e){
+ if( $(e).attr("type")=='submit' || $(e).attr("type")=='button' )
+ $(e).attr("disabled", "true");
+ else
+ $(e).prop("readonly", "true");
+ });
+ elem.find("textarea").prop("readonly", "true");
+ elem.find("select").attr("disabled", "true");
+ elem.find(".hide").prop("readonly", "true");
+ elem.find("button").attr("disabled", "true");
+ //remove previously created input/output blocks
+ elem.find(".app-inputs").html("");
+ elem.find(".app-outputs").html("");
+ $(".glyphicon").hide();
+}
+
$(document).ready( function(){
//making the previously opened tab open again on page reload/modifications.