Added 'too few/many' messages to matrix compare box, rfe# 9965
This commit is contained in:
parent
87abb79331
commit
aefb658fd5
6 changed files with 49 additions and 58 deletions
|
|
@ -3,6 +3,7 @@
|
|||
- rfe #9612: Carousel Wobject (was Widget Wobject) (SDH Consulting Group)
|
||||
- Survey summaries now added. In the Survey edit, select quiz mode, and a summary will be shown to the user at the end of the survey.
|
||||
- fixed #10110: Matrix 2.0 - "Data Error" on Pending Product Listing Updates
|
||||
- rfe #9965: matrix/pls reverse dropped event variables
|
||||
|
||||
7.7.2
|
||||
- fixed #10056: YUI javascripts included while adminOff (BNC)
|
||||
|
|
|
|||
Binary file not shown.
BIN
docs/upgrades/packages-7.7.3/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.3/matrix-default-view-template.wgpkg
Normal file
Binary file not shown.
|
|
@ -807,6 +807,17 @@ selectBox.</p>|
|
|||
message => q|Matrix Fieldtype|,
|
||||
},
|
||||
|
||||
'too many message' => {
|
||||
lastUpdated => 0,
|
||||
message => q|You tried to compare more than your maximum number of listings.|,
|
||||
context => q|A message shown to the user when they have selected too many listings to compare.|,
|
||||
},
|
||||
|
||||
'too few message' => {
|
||||
lastUpdated => 0,
|
||||
message => q|You tried to compare only one listing. If you want to view just one listing, click on its name.|,
|
||||
context => q|A message shown to the user when they have selected only one listing to compare.|,
|
||||
}
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
if(typeof(oRecord.getData("checked")) != 'undefined' && oRecord.getData("checked") == 'checked'){
|
||||
innerHTML = innerHTML + " checked='checked'";
|
||||
}
|
||||
innerHTML = innerHTML + " onchange='javascript:compareFormButton()' class='compareCheckBox'>";
|
||||
innerHTML = innerHTML + " class='compareCheckBox'>";
|
||||
elCell.innerHTML = innerHTML;
|
||||
};
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
this.onDataReturnAppendRows.apply(this,arguments);
|
||||
};
|
||||
|
||||
window.compareFormButton = function() {
|
||||
var compareFormButton = function() {
|
||||
var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input');
|
||||
var checked = 0;
|
||||
var checkedCompareBoxes = new Object();
|
||||
|
|
@ -92,12 +92,12 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
checkedCompareBoxes[compareCheckBoxes[i].value] = true;
|
||||
}
|
||||
}
|
||||
if (checked > 1 && checked < maxComparisons){
|
||||
btnCompare.set("disabled",false);
|
||||
btnCompare2.set("disabled",false);
|
||||
if (checked < 2){
|
||||
alert(tooFewMessage);
|
||||
}else if (checked > maxComparisons){
|
||||
alert(tooManyMessage);
|
||||
}else{
|
||||
btnCompare.set("disabled",true);
|
||||
btnCompare2.set("disabled",true);
|
||||
window.document.forms['doCompare'].submit();
|
||||
}
|
||||
var elements = window.compareDataTable.getRecordSet().getRecords();
|
||||
for(j=0; j<elements.length; j++){
|
||||
|
|
@ -109,21 +109,17 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(document.getElementById("compare")){
|
||||
var btnCompare = new YAHOO.widget.Button("compare",{disabled:true,id:"compareButton"});
|
||||
btnCompare.on("click", function(e) {
|
||||
window.document.forms['doCompare'].submit();
|
||||
},this,true);
|
||||
var btnCompare = new YAHOO.widget.Button("compare",{id:"compareButton"});
|
||||
btnCompare.on("click", compareFormButton);
|
||||
}
|
||||
|
||||
if(document.getElementById("compare2")){
|
||||
var btnCompare2 = new YAHOO.widget.Button("compare2",{disabled:true,id:"compareButton2"});
|
||||
btnCompare2.on("click", function(e) {
|
||||
window.document.forms['doCompare'].submit();
|
||||
},this,true);
|
||||
var btnCompare2 = new YAHOO.widget.Button("compare2",{id:"compareButton2"});
|
||||
btnCompare2.on("click", compareFormButton);
|
||||
}
|
||||
|
||||
|
||||
if(document.getElementById("search")){
|
||||
var btnSearch = new YAHOO.widget.Button("search");
|
||||
btnSearch.on("click", function(e) {
|
||||
|
|
|
|||
|
|
@ -104,58 +104,40 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
scope : myDataTable
|
||||
};
|
||||
|
||||
var btnCompare = new YAHOO.widget.Button("compare",{disabled:true,id:"compareButton"});
|
||||
btnCompare.on("click", function(e) {
|
||||
var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input');
|
||||
var uri = "func=getCompareListData";
|
||||
for (var i = compareCheckBoxes.length; i--; ) {
|
||||
if(compareCheckBoxes[i].checked == true){
|
||||
uri = uri+';listingId='+compareCheckBoxes[i].value;
|
||||
}
|
||||
}
|
||||
myDataTable.getRecordSet().reset();
|
||||
myDataTable.refreshView();
|
||||
myDataTable.showTableMessage('Loading...');
|
||||
this.myDataSource.sendRequest(uri,callback2);
|
||||
},this,true);
|
||||
|
||||
var btnCompare2 = new YAHOO.widget.Button("compare2",{disabled:true,id:"compareButton2"});
|
||||
btnCompare2.on("click", function(e) {
|
||||
var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input');
|
||||
var uri = "func=getCompareListData";
|
||||
for (var i = compareCheckBoxes.length; i--; ) {
|
||||
if(compareCheckBoxes[i].checked == true){
|
||||
uri = uri+';listingId='+compareCheckBoxes[i].value;
|
||||
}
|
||||
}
|
||||
myDataTable.getRecordSet().reset();
|
||||
myDataTable.refreshView();
|
||||
myDataTable.showTableMessage('Loading...');
|
||||
this.myDataSource.sendRequest(uri,callback2);
|
||||
},this,true);
|
||||
|
||||
var btnSearch = new YAHOO.widget.Button("search");
|
||||
btnSearch.on("click", function(e) {
|
||||
window.location.href = matrixUrl + '?func=search';
|
||||
},this,true);
|
||||
|
||||
window.compareFormButton = function() {
|
||||
if(document.getElementById("compare3")){
|
||||
var btnCompare3 = new YAHOO.widget.Button("compare3",{id:"compareButton3"});
|
||||
btnCompare3.on("click", function(e) {
|
||||
var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input');
|
||||
var checked = 0;
|
||||
var checkedCompareBoxes = new Object();
|
||||
for (var i = compareCheckBoxes.length; i--; ) {
|
||||
if(compareCheckBoxes[i].checked){
|
||||
checked++;
|
||||
checkedCompareBoxes[compareCheckBoxes[i].value] = true;
|
||||
}
|
||||
}
|
||||
if (checked > 1 && checked < maxComparisons){
|
||||
btnCompare.set("disabled",false);
|
||||
btnCompare2.set("disabled",false);
|
||||
if (checked < 2){
|
||||
alert(tooFewMessage);
|
||||
}else if (checked > maxComparisons){
|
||||
alert(tooManyMessage);
|
||||
}else{
|
||||
btnCompare.set("disabled",true);
|
||||
btnCompare2.set("disabled",true);
|
||||
//window.document.forms['doCompare'].submit();
|
||||
var uri = "func=getCompareListData";
|
||||
for (var i = compareCheckBoxes.length; i--; ) {
|
||||
if(compareCheckBoxes[i].checked == true){
|
||||
uri = uri+';listingId='+compareCheckBoxes[i].value;
|
||||
}
|
||||
}
|
||||
myDataTable.getRecordSet().reset();
|
||||
myDataTable.refreshView();
|
||||
myDataTable.showTableMessage('Loading...');
|
||||
this.myDataSource.sendRequest(uri,callback2);
|
||||
}
|
||||
|
||||
},this,true);
|
||||
}
|
||||
|
||||
if(document.getElementById("stickied")){
|
||||
var btnStickied = new YAHOO.widget.Button("stickied");
|
||||
btnStickied.on("click", function(e) {
|
||||
var elements = myDataTable.getRecordSet().getRecords();
|
||||
|
|
@ -187,6 +169,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
hideStickies = 0;
|
||||
}
|
||||
},this,true);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue