From 395e022057cbcd5313983d97b4f78ab550b437a7 Mon Sep 17 00:00:00 2001 From: daeks Date: Sun, 13 Jul 2014 13:07:15 +0200 Subject: [PATCH] add old projectname to rename project --- components/filemanager/context_menu.json | 2 +- components/filemanager/init.js | 9 +++++---- components/project/dialog.php | 2 +- components/project/init.js | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/filemanager/context_menu.json b/components/filemanager/context_menu.json index 644533b..90d94b8 100755 --- a/components/filemanager/context_menu.json +++ b/components/filemanager/context_menu.json @@ -81,7 +81,7 @@ "title": "Rename Project", "icon": "icon-pencil", "applies-to" : "root-only", - "onclick": "codiad.project.rename($('#context-menu').attr('data-path'));" + "onclick": "codiad.project.rename($('#context-menu').attr('data-path'),$('#context-menu').attr('data-name'));" }, { "title": "Break", diff --git a/components/filemanager/init.js b/components/filemanager/init.js index 3469727..9defc53 100755 --- a/components/filemanager/init.js +++ b/components/filemanager/init.js @@ -108,7 +108,8 @@ e.preventDefault(); _this.contextMenuShow(e, $(this) .attr('data-path'), $(this) - .attr('data-type')); + .attr('data-type'), $(this) + .html()); $(this) .addClass('context-menu-active'); }); @@ -118,8 +119,7 @@ // Context Menu ////////////////////////////////////////////////////////////////// - contextMenuShow: function(e, path, type) { - + contextMenuShow: function(e, path, type, name) { var _this = this; // Selective options @@ -162,7 +162,8 @@ }) .fadeIn(200) .attr('data-path', path) - .attr('data-type', type); + .attr('data-type', type) + .attr('data-name', name); // Show faded 'paste' if nothing in clipboard if (this.clipboard === '') { $('#context-menu a[content="Paste"]') diff --git a/components/project/dialog.php b/components/project/dialog.php index ca65470..d9761e0 100755 --- a/components/project/dialog.php +++ b/components/project/dialog.php @@ -185,7 +185,7 @@
- +