Skip to content

Commit

Permalink
Bug fixing: user can create empty sections. Also, in the Protocols ta…
Browse files Browse the repository at this point in the history
…ble we show a little more details about the SSH conection protocol.
  • Loading branch information
Javi Carretero committed Nov 24, 2013
1 parent 9e462eb commit 0c3a5db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
27 changes: 16 additions & 11 deletions actions/addsectionnode/resources/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,37 @@
* @version $Revision$
*/


X.actionLoaded(function(event, fn, params) {

var form = params.actionView.getForm('as_form');
var fm = form.getFormMgr();

var submit = fn('.validate').get(0);

fn('select#type_sec').change(function() {

var urler = fn('#nodeURL').val() + '&type_sec=' + fn('#type_sec option:selected').val();
fn('#as_form').attr('action', urler);

fm.sendForm();
});

if(fn('#type_sec option:selected').text()=="ximNEWS"){{
if(fn('#type_sec option:selected').text()=="ximNEWS"){
$("div.folder-name").removeClass("folder-normal").addClass("folder-news");
}else{
}
else{
$("div.folder-name").removeClass("folder-news").addClass("folder-normal");
}

fn(".subfolder > label.icon").click(
function(){
fn(".subfolder > label.icon").click(function(){
var readonly = $(this).prev().attr("readonly");
if(readonly && readonly.toLowerCase()!=='false') {
return false;
}
});

});

submit.beforeSubmit.add(function(event, button) {
if(!fn("form#as_form input[name='folderlst[]']").is(":checked")){
alert("You cannot create an empty section. Please, click at least one of the allowed subfolders.");
event.preventDefault();
event.stopPropagation();
return true;
}
});
});
2 changes: 1 addition & 1 deletion install/ximdex_data/ximdex.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ CREATE TABLE `Protocols` (

/*!40000 ALTER TABLE `Protocols` DISABLE KEYS */;
LOCK TABLES `Protocols` WRITE;
INSERT INTO `Protocols` VALUES ('SSH',22,'Secure transfer protocol',1);
INSERT INTO `Protocols` VALUES ('SSH',22,'Secure transfer protocol (ssh)',1);
INSERT INTO `Protocols` VALUES ('LOCAL',NULL,'Local synchronization',0);
INSERT INTO `Protocols` VALUES ('FTP',21,'FTP synchronization',1);
UNLOCK TABLES;
Expand Down

0 comments on commit 0c3a5db

Please sign in to comment.