You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by pa...@apache.org on 2016/02/26 12:54:46 UTC
ambari git commit: AMBARI-15198. Close icons on modal top right do
not honor the underlying logic associated with the close/cancel buttons
(pallavkul)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 76789aae4 -> 42a3e69c5
AMBARI-15198. Close icons on modal top right do not honor the underlying logic associated with the close/cancel buttons (pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/42a3e69c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/42a3e69c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/42a3e69c
Branch: refs/heads/branch-2.2
Commit: 42a3e69c530578d9bd71acd5c448ce0ec66f1787
Parents: 76789aa
Author: Pallav Kulshreshtha <pa...@gmail.com>
Authored: Fri Feb 26 17:23:41 2016 +0530
Committer: Pallav Kulshreshtha <pa...@gmail.com>
Committed: Fri Feb 26 17:23:41 2016 +0530
----------------------------------------------------------------------
.../main/resources/ui/app/services/file-copy.js | 48 --------------------
.../main/resources/ui/app/services/file-move.js | 47 -------------------
.../ui/app/templates/components/copy-modal.hbs | 2 +-
.../app/templates/components/delete-modal.hbs | 2 +-
.../ui/app/templates/components/move-modal.hbs | 2 +-
.../app/templates/components/new-directory.hbs | 2 +-
.../templates/components/open-preview-modal.hbs | 2 +-
.../templates/components/permission-modal.hbs | 2 +-
.../app/templates/components/rename-modal.hbs | 2 +-
.../ui/app/templates/components/upload-file.hbs | 2 +-
10 files changed, 8 insertions(+), 103 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/services/file-copy.js
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/services/file-copy.js b/contrib/views/files/src/main/resources/ui/app/services/file-copy.js
deleted file mode 100644
index 7193177..0000000
--- a/contrib/views/files/src/main/resources/ui/app/services/file-copy.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Ember from 'ember';
-import FileOperationMixin from '../mixins/file-operation';
-
-export default Ember.Service.extend(FileOperationMixin, {
- logger: Ember.inject.service('alert-messages'),
-
- // Returns a promise for the operation. Upon sucess or error, this also
- // appropriately sends error messages.
-
- copy: function (srcPath, destName) {
- return new Ember.RSVP.Promise((resolve, reject) => {
- var adapter = this.get('store').adapterFor('file');
- var baseURL = adapter.buildURL('file');
- var moveUrl = baseURL.substring(0, baseURL.lastIndexOf('/')) + "/copy";
- var data = {sourcePaths: srcPath, destinationPath: destName};
- adapter.ajax(moveUrl, "POST", {data: data}).then((response) => {
- this.get('logger').success(`Successfully copied to ${destName}.`, {}, {flashOnly: true});
- resolve(response);
- }, (responseError) => {
- var error = this.extractError(responseError);
- this.get('logger').danger(`Failed to copy to ${destName}`, error);
- reject(error);
- });
- });
- },
-
- _isDestinationPathExists(destinationPath) {
- return this.get('store').peekAll('file').isAny('path', destinationPath);
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/services/file-move.js
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/services/file-move.js b/contrib/views/files/src/main/resources/ui/app/services/file-move.js
deleted file mode 100644
index 859f04c..0000000
--- a/contrib/views/files/src/main/resources/ui/app/services/file-move.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Ember from 'ember';
-import FileOperationMixin from '../mixins/file-operation';
-
-export default Ember.Service.extend(FileOperationMixin, {
- logger: Ember.inject.service('alert-messages'),
-
- // Returns a promise for the operation. Upon sucess or error, this also
- // appropriately sends error messages.
- move: function(srcPath, destName ) {
- return new Ember.RSVP.Promise((resolve, reject) => {
- var adapter = this.get('store').adapterFor('file');
- var baseURL = adapter.buildURL('file');
- var moveUrl = baseURL.substring(0, baseURL.lastIndexOf('/')) + "/move";
- var data = {sourcePaths: srcPath, destinationPath: destName};
- adapter.ajax(moveUrl, "POST", {data: data}).then((response) => {
- this.get('logger').success(`Successfully moved to ${destName}.`, {}, {flashOnly: true});
- resolve(response);
- }, (responseError) => {
- var error = this.extractError(responseError);
- this.get('logger').danger(`Failed to move to ${destName}`, error);
- reject(error);
- });
- });
- },
-
- _isDestinationPathExists(destinationPath) {
- return this.get('store').peekAll('file').isAny('path', destinationPath);
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/templates/components/copy-modal.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/copy-modal.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/copy-modal.hbs
index 3e561e5..25267b4 100644
--- a/contrib/views/files/src/main/resources/ui/app/templates/components/copy-modal.hbs
+++ b/contrib/views/files/src/main/resources/ui/app/templates/components/copy-modal.hbs
@@ -21,7 +21,7 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
+ <button type="button" class="fa fa-times pull-right" {{action 'close'}}></button>
<h3 class="modal-title">Copy to <span style="font-weight: normal; font-size: 14px;">{{selectionName}}</span>
</h3>
<div class="text-danger">
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/templates/components/delete-modal.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/delete-modal.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/delete-modal.hbs
index 207a2a8..965ce19 100644
--- a/contrib/views/files/src/main/resources/ui/app/templates/components/delete-modal.hbs
+++ b/contrib/views/files/src/main/resources/ui/app/templates/components/delete-modal.hbs
@@ -21,7 +21,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
+ <button type="button" class="fa fa-times pull-right" {{action 'close'}}></button>
<h4 class="modal-title">{{fa-icon icon="trash"}} Delete</h4>
</div>
<div class="modal-body">
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/templates/components/move-modal.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/move-modal.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/move-modal.hbs
index 1655930..1eafe42 100644
--- a/contrib/views/files/src/main/resources/ui/app/templates/components/move-modal.hbs
+++ b/contrib/views/files/src/main/resources/ui/app/templates/components/move-modal.hbs
@@ -21,7 +21,7 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
+ <button type="button" class="fa fa-times pull-right" {{action 'close'}}></button>
<h3 class="modal-title">Move to <span style="font-weight: normal; font-size: 14px;">{{selectionName}}</span>
</h3>
<div class="text-danger">
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/templates/components/new-directory.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/new-directory.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/new-directory.hbs
index bc21f31..71212f1 100644
--- a/contrib/views/files/src/main/resources/ui/app/templates/components/new-directory.hbs
+++ b/contrib/views/files/src/main/resources/ui/app/templates/components/new-directory.hbs
@@ -25,7 +25,7 @@
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
+ <button type="button" class="fa fa-times pull-right" {{action 'close'}}></button>
<h4 class="modal-title">{{fa-icon "folder-o"}} Add new folder</h4>
</div>
<form role="form">
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/templates/components/open-preview-modal.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/open-preview-modal.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/open-preview-modal.hbs
index 98a5459..7c4b0a8 100644
--- a/contrib/views/files/src/main/resources/ui/app/templates/components/open-preview-modal.hbs
+++ b/contrib/views/files/src/main/resources/ui/app/templates/components/open-preview-modal.hbs
@@ -21,7 +21,7 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
+ <button type="button" class="fa fa-times pull-right" {{action 'close'}}></button>
<h3 class="modal-title">File Preview</h3>
<div>{{ selectedFilePath }}</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/templates/components/permission-modal.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/permission-modal.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/permission-modal.hbs
index e6dee66..22a4694 100644
--- a/contrib/views/files/src/main/resources/ui/app/templates/components/permission-modal.hbs
+++ b/contrib/views/files/src/main/resources/ui/app/templates/components/permission-modal.hbs
@@ -21,7 +21,7 @@
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
+ <button type="button" class="fa fa-times pull-right" {{action 'close'}}></button>
<h4 class="modal-title">{{fa-icon icon="edit"}} Edit Permissions for {{#if selected.isDirectory}}folder{{else}}file{{/if}}</h4>
</div>
<form class="form-horizontal">
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/templates/components/rename-modal.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/rename-modal.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/rename-modal.hbs
index 8b1fca7..82ea126 100644
--- a/contrib/views/files/src/main/resources/ui/app/templates/components/rename-modal.hbs
+++ b/contrib/views/files/src/main/resources/ui/app/templates/components/rename-modal.hbs
@@ -21,7 +21,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
+ <button type="button" class="fa fa-times pull-right" {{action 'close'}}></button>
<h4 class="modal-title">{{fa-icon icon="edit"}} Rename {{#if selected.isDirectory}}Folder{{else}}File{{/if}}</h4>
</div>
<form>
http://git-wip-us.apache.org/repos/asf/ambari/blob/42a3e69c/contrib/views/files/src/main/resources/ui/app/templates/components/upload-file.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/upload-file.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/upload-file.hbs
index c1352dd..c9b5f1c 100644
--- a/contrib/views/files/src/main/resources/ui/app/templates/components/upload-file.hbs
+++ b/contrib/views/files/src/main/resources/ui/app/templates/components/upload-file.hbs
@@ -25,7 +25,7 @@
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
+ <button type="button" class="fa fa-times pull-right" {{action 'close'}}></button>
<h4>{{fa-icon "upload"}} Upload file to {{path}}</h4>
</div>
<div class="modal-body">