Commit 5e494786 authored by Nigel McNie's avatar Nigel McNie
Browse files

Fixed adding and removing columns in ie7. IE doesn't like negative numbers in...

Fixed adding and removing columns in ie7. IE doesn't like negative numbers in substr() (possibly a mozilla extension)
parent 1d5295f1
...@@ -321,7 +321,7 @@ function ViewManager() { ...@@ -321,7 +321,7 @@ function ViewManager() {
connect(i, 'onclick', function(e) { connect(i, 'onclick', function(e) {
setNodeAttribute(i, 'disabled', 'disabled'); setNodeAttribute(i, 'disabled', 'disabled');
var name = getNodeAttribute(e.src(), 'name'); var name = getNodeAttribute(e.src(), 'name');
var id = parseInt(name.substr(-1)); var id = parseInt(name.substr(name.length - 1, 1));
var pd = {'id': $('viewid').value, 'change': 1} var pd = {'id': $('viewid').value, 'change': 1}
pd['action_addcolumn_before_' + id] = 1; pd['action_addcolumn_before_' + id] = 1;
sendjsonrequest(config['wwwroot'] + 'view/blocks.json.php', pd, 'POST', function(data) { sendjsonrequest(config['wwwroot'] + 'view/blocks.json.php', pd, 'POST', function(data) {
...@@ -354,7 +354,7 @@ function ViewManager() { ...@@ -354,7 +354,7 @@ function ViewManager() {
connect(i, 'onclick', function(e) { connect(i, 'onclick', function(e) {
setNodeAttribute(i, 'disabled', 'disabled'); setNodeAttribute(i, 'disabled', 'disabled');
var name = getNodeAttribute(e.src(), 'name'); var name = getNodeAttribute(e.src(), 'name');
var id = parseInt(name.substr(-1)); var id = parseInt(name.substr(name.length - 1, 1));
var pd = {'id': $('viewid').value, 'change': 1} var pd = {'id': $('viewid').value, 'change': 1}
pd['action_removecolumn_column_' + id] = 1; pd['action_removecolumn_column_' + id] = 1;
sendjsonrequest(config['wwwroot'] + 'view/blocks.json.php', pd, 'POST', function(data) { sendjsonrequest(config['wwwroot'] + 'view/blocks.json.php', pd, 'POST', function(data) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment