mirror of
https://github.com/Codiad/Codiad.git
synced 2026-03-20 07:56:50 +01:00
Merge pull request #676 from daeks/672.2
add old projectname to rename project
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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"]')
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<form>
|
||||
<input type="hidden" name="project_path" value="<?php echo($_GET['path']); ?>">
|
||||
<label><span class="icon-pencil"></span><?php i18n("Rename Project"); ?></label>
|
||||
<input type="text" name="project_name" autofocus="autofocus" autocomplete="off" value="">
|
||||
<input type="text" name="project_name" autofocus="autofocus" autocomplete="off" value="<?php echo($_GET['name']); ?>">
|
||||
<button class="btn-left"><?php i18n("Rename"); ?></button> <button class="btn-right" onclick="codiad.modal.unload(); return false;"><?php i18n("Cancel"); ?></button>
|
||||
<form>
|
||||
<?php
|
||||
|
||||
@@ -163,9 +163,9 @@
|
||||
// Rename Project
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
rename: function(path) {
|
||||
rename: function(path,name) {
|
||||
var _this = this;
|
||||
codiad.modal.load(500, this.dialog + '?action=rename&path=' + escape(path));
|
||||
codiad.modal.load(500, this.dialog + '?action=rename&path=' + escape(path) + '&name='+name);
|
||||
$('#modal-content form')
|
||||
.live('submit', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user