Merge commit WebGUI_7.6.9-beta into yung-thingy-rfe
* commit 'tags/WebGUI_7.6.9-beta': (223 commits) Release 7.6.9-beta preparing for 7.6.9 release fixed: Exporting to static files can leak large amounts of memory fixed: HTTP Proxy doesn't serve new content to visitors use to_json and from_json in more places instead of encode_json and decode_json Document the heretofore missing date template variable in Qualify a chained method call when getting Workflow instances. If the Attempt to fix IE6 bug fixed: ukplayer example is now loaded with swfobject.js released under the MIT licence, see gotcha's and /extras/ukplayer Added a style for printing Alumni pages Emails sent about low stock should have status unread, not completed. Moved draggable.js to extras/yui-webgui/build/layout since it is now a wrapper around YUI dragdrob Attributions in the changelog for a patch provided to fix a bug. whups, left in console.logs Updated draggable.js to wrap the YUI fixed #4137: Calendar Search page has extra head tags in body Fix a typo typo in the Operation/Workflow POD. Forward port Shelf view fix. Was not displaying child shelves, only self. Forward port the PayDriver bug fixes from 7.5 branch. Labels are always fixed #9264: new slideShow.swf uploaded in extras/ukplayer (United Knowledge/Arjan Widlak) ... Conflicts: lib/WebGUI/Asset/Wobject/Thingy.pm
This commit is contained in:
commit
7e4c6c70b2
696 changed files with 18003 additions and 3585 deletions
|
|
@ -22,13 +22,13 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
];
|
||||
|
||||
var uri = "func=getCompareFormData";
|
||||
if(typeof(listingIds) != 'undefined'){
|
||||
for (var i = 0; i < listingIds.length; i++) {
|
||||
uri = uri+';listingId='+listingIds[i];
|
||||
}
|
||||
if(typeof(listingIds) != 'undefined'){
|
||||
for (var i = 0; i < listingIds.length; i++) {
|
||||
uri = uri+';listingId='+listingIds[i];
|
||||
}
|
||||
}
|
||||
|
||||
this.myDataSource = new YAHOO.util.DataSource("?");
|
||||
this.myDataSource = new YAHOO.util.DataSource(matrixUrl + "?");
|
||||
this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
|
||||
this.myDataSource.connXhrMode = "queueRequests";
|
||||
this.myDataSource.responseSchema = {
|
||||
|
|
@ -47,25 +47,25 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
var btnSortByViews = new YAHOO.widget.Button("sortByViews");
|
||||
btnSortByViews.on("click", function(e) {
|
||||
this.myDataTable.sortColumn(this.myDataTable.getColumn(2));
|
||||
var request = YAHOO.util.Connect.asyncRequest('POST', "?func=setSort;sort=views");
|
||||
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=views");
|
||||
},this,true);
|
||||
|
||||
var btnSortByClicks = new YAHOO.widget.Button("sortByClicks");
|
||||
btnSortByClicks.on("click", function(e) {
|
||||
this.myDataTable.sortColumn(this.myDataTable.getColumn(3));
|
||||
var request = YAHOO.util.Connect.asyncRequest('POST', "?func=setSort;sort=clicks");
|
||||
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=clicks");
|
||||
},this,true);
|
||||
|
||||
var btnSortByCompares = new YAHOO.widget.Button("sortByCompares");
|
||||
btnSortByCompares.on("click", function(e) {
|
||||
this.myDataTable.sortColumn(this.myDataTable.getColumn(4));
|
||||
var request = YAHOO.util.Connect.asyncRequest('POST', "?func=setSort;sort=compares");
|
||||
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=compares");
|
||||
},this,true);
|
||||
|
||||
var btnSortByUpdated = new YAHOO.widget.Button("sortByUpdated");
|
||||
btnSortByUpdated.on("click", function(e) {
|
||||
this.myDataTable.sortColumn(this.myDataTable.getColumn(5));
|
||||
var request = YAHOO.util.Connect.asyncRequest('POST', "?func=setSort;sort=lastUpdated");
|
||||
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=lastUpdated");
|
||||
},this,true);
|
||||
|
||||
var myCallback = function() {
|
||||
|
|
@ -77,6 +77,15 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
btnCompare.on("click", function(e) {
|
||||
window.document.forms['doCompare'].submit();
|
||||
},this,true);
|
||||
var btnCompare2 = new YAHOO.widget.Button("compare2",{disabled:true,id:"compareButton2"});
|
||||
btnCompare2.on("click", function(e) {
|
||||
window.document.forms['doCompare'].submit();
|
||||
},this,true);
|
||||
|
||||
var btnSearch = new YAHOO.widget.Button("search");
|
||||
btnSearch.on("click", function(e) {
|
||||
window.location.href = matrixUrl + '?func=search';
|
||||
},this,true);
|
||||
|
||||
window.compareDataTable = this.myDataTable;
|
||||
|
||||
|
|
@ -92,8 +101,10 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
}
|
||||
if (checked > 1 && checked < maxComparisons){
|
||||
btnCompare.set("disabled",false);
|
||||
btnCompare2.set("disabled",false);
|
||||
}else{
|
||||
btnCompare.set("disabled",true);
|
||||
btnCompare2.set("disabled",true);
|
||||
}
|
||||
var elements = window.compareDataTable.getRecordSet().getRecords();
|
||||
for(j=0; j<elements.length; j++){
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
var hideStickies = 0;
|
||||
|
||||
this.formatStickied = function(elCell, oRecord, oColumn, sData) {
|
||||
if(oRecord.getData("fieldType") != 'category'){
|
||||
if(!(oRecord.getData("fieldType") in {'category':'','lastUpdated':''})){
|
||||
var innerHTML = "<input type='checkBox' class='stickieCheckbox' id='" + oRecord.getData("attributeId") + "_stickied' name='" + oRecord.getData("attributeId") + "' onChange='setStickied(this)'";
|
||||
if(typeof(oRecord.getData("checked")) != 'undefined' && oRecord.getData("checked") == 'checked'){
|
||||
innerHTML = innerHTML + " checked='checked'";
|
||||
|
|
@ -15,20 +15,25 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
};
|
||||
|
||||
this.formatColors = function(elCell, oRecord, oColumn, sData) {
|
||||
if(oRecord.getData("fieldType") != 'category'){
|
||||
if(!(oRecord.getData("fieldType") in {'category':'','lastUpdated':''})){
|
||||
var colorField = oColumn.key + "_compareColor";
|
||||
var color = oRecord.getData(colorField);
|
||||
if(color){
|
||||
Dom.setStyle(elCell.parentNode, "background-color", color);
|
||||
}
|
||||
elCell.innerHTML = sData;
|
||||
}else{
|
||||
elCell.innerHTML = sData;
|
||||
}
|
||||
};
|
||||
this.formatLabel = function(elCell, oRecord, oColumn, sData) {
|
||||
if(oRecord.getData("fieldType") == 'category'){
|
||||
elCell.innerHTML = "<b>" +sData + "</b>";
|
||||
}else{
|
||||
elCell.innerHTML = sData;
|
||||
elCell.innerHTML = sData;
|
||||
if(oRecord.getData("description")){
|
||||
elCell.innerHTML = elCell.innerHTML + "<div class='wg-hoverhelp'>" + oRecord.getData("description") +"</div>";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -52,10 +57,19 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
uri = uri+';listingId='+listingIds[i];
|
||||
}
|
||||
|
||||
var initAttributeHoverHelp = function() {
|
||||
initHoverHelp('compareList');
|
||||
}
|
||||
|
||||
var myDataTable = new YAHOO.widget.DataTable("compareList", myColumnDefs,
|
||||
this.myDataSource, {initialRequest:uri});
|
||||
myDataTable.subscribe("initEvent", initAttributeHoverHelp);
|
||||
|
||||
|
||||
window.removeListing = function(key) {
|
||||
myDataTable.hideColumn(myDataTable.removeColumn(key));
|
||||
}
|
||||
|
||||
this.myDataSource.doBeforeParseData = function (oRequest, oFullResponse) {
|
||||
myDataTable.getRecordSet().reset();
|
||||
myDataTable.refreshView();
|
||||
|
|
@ -72,6 +86,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
|
||||
for (var i = 0; i < len; i++) {
|
||||
var c = oFullResponse.ColumnDefs[i];
|
||||
oFullResponse.ColumnDefs[i].label = "<a href='"+ oFullResponse.ColumnDefs[i].url +"'>" + oFullResponse.ColumnDefs[i].label + "</a> <a href='javascript:removeListing(\""+oFullResponse.ColumnDefs[i].key+"\")'><img src='/extras/toolbar/bullet/delete.gif' border='0'></a>"
|
||||
myDataTable.insertColumn(c);
|
||||
}
|
||||
}
|
||||
|
|
@ -79,8 +94,9 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
}
|
||||
|
||||
var myCallback = function() {
|
||||
this.set("sortedBy", null);
|
||||
this.onDataReturnAppendRows.apply(this,arguments);
|
||||
this.set("sortedBy", null);
|
||||
this.onDataReturnAppendRows.apply(this,arguments);
|
||||
initHoverHelp('compareList');
|
||||
};
|
||||
|
||||
var callback2 = {
|
||||
|
|
@ -91,8 +107,8 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
|
||||
var btnCompare = new YAHOO.widget.Button("compare",{disabled:true,id:"compareButton"});
|
||||
btnCompare.on("click", function(e) {
|
||||
var uri = "func=getCompareListData";
|
||||
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;
|
||||
|
|
@ -101,6 +117,23 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
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;
|
||||
}
|
||||
}
|
||||
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() {
|
||||
var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input');
|
||||
var checked = 0;
|
||||
|
|
@ -111,8 +144,10 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
}
|
||||
if (checked > 1 && checked < maxComparisons){
|
||||
btnCompare.set("disabled",false);
|
||||
btnCompare2.set("disabled",false);
|
||||
}else{
|
||||
btnCompare.set("disabled",true);
|
||||
btnCompare2.set("disabled",true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -122,7 +157,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
if(hideStickies == 0){
|
||||
// hide non-selected attributes
|
||||
for(i=0; i<elements.length; i++){
|
||||
if(elements[i].getData('fieldType') != 'category'){
|
||||
if(!(elements[i].getData('fieldType') in {'category':'','lastUpdated':''})){
|
||||
var attributeId = elements[i].getData('attributeId');
|
||||
var checkBox = Dom.get(attributeId+"_stickied");
|
||||
if (checkBox.checked == false){
|
||||
|
|
@ -135,7 +170,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
}else{
|
||||
// show all attributes
|
||||
for(i=0; i<elements.length; i++){
|
||||
if(elements[i].getData('fieldType') != 'category'){
|
||||
if(!(elements[i].getData('fieldType') in {'category':'','lastUpdated':''})){
|
||||
var attributeId = elements[i].getData('attributeId');
|
||||
var checkBox = Dom.get(attributeId+"_stickied");
|
||||
if (checkBox.checked == false){
|
||||
|
|
@ -147,7 +182,6 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
hideStickies = 0;
|
||||
}
|
||||
},this,true);
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,22 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
if(oRecord.getData("fieldType") == 'category'){
|
||||
elCell.innerHTML = "<b>" +sData + "</b>";
|
||||
}else{
|
||||
elCell.innerHTML = sData + "<div class='wg-hoverhelp'>" + oRecord.getData("description") +"</div>";
|
||||
}
|
||||
};
|
||||
this.formatColors = function(elCell, oRecord, oColumn, sData) {
|
||||
if(oRecord.getData("fieldType") != 'category'){
|
||||
var color = oRecord.getData("compareColor");
|
||||
if(color){
|
||||
Dom.setStyle(elCell.parentNode, "background-color", color);
|
||||
}
|
||||
elCell.innerHTML = sData;
|
||||
}
|
||||
};
|
||||
|
||||
var myColumnDefs = [
|
||||
{key:"stickied",formatter:this.formatStickied,label:""},
|
||||
{key:"label",formatter:this.formatLabel,label:""},
|
||||
{key:"value",label:""}
|
||||
{key:"value",label:"",formatter:this.formatColors}
|
||||
];
|
||||
|
||||
this.myDataSource = new YAHOO.util.DataSource("?");
|
||||
|
|
@ -32,13 +40,18 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
this.myDataSource.connXhrMode = "queueRequests";
|
||||
this.myDataSource.responseSchema = {
|
||||
resultsList: "ResultSet.Result",
|
||||
fields: ["label","value","attributeId","fieldType","checked"]
|
||||
fields: ["label","value","attributeId","fieldType","checked","description","compareColor"]
|
||||
};
|
||||
|
||||
var uri = "func=getAttributes";
|
||||
|
||||
var initAttributeHoverHelp = function() {
|
||||
initHoverHelp('attributes');
|
||||
}
|
||||
|
||||
var myDataTable = new YAHOO.widget.DataTable("attributes", myColumnDefs,
|
||||
this.myDataSource, {initialRequest:uri});
|
||||
myDataTable.subscribe("initEvent", initAttributeHoverHelp);
|
||||
|
||||
|
||||
this.myDataSource.doBeforeParseData = function (oRequest, oFullResponse) {
|
||||
|
|
|
|||
|
|
@ -16,10 +16,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
|
||||
var myColumnDefs = [
|
||||
{key:"assetId",label:"",sortable:false, formatter:this.formatCheckBox},
|
||||
{key:"title", label:"Name", sortable:true, formatter:this.formatUrl},
|
||||
{key:"views", sortable:true},
|
||||
{key:"clicks", sortable:true},
|
||||
{key:"compares", sortable:true}
|
||||
{key:"title", label:"Name", sortable:true, formatter:this.formatUrl}
|
||||
];
|
||||
|
||||
var uri = "func=getCompareFormData";
|
||||
|
|
@ -34,7 +31,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
|||
this.myDataSource.connXhrMode = "queueRequests";
|
||||
this.myDataSource.responseSchema = {
|
||||
resultsList: "ResultSet.Result",
|
||||
fields: ["title","views","clicks","compares","checked","url","assetId"]
|
||||
fields: ["title","checked","url","assetId"]
|
||||
};
|
||||
|
||||
var myDataTable = new YAHOO.widget.DataTable("compareForm", myColumnDefs,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ if (typeof Survey === "undefined") {
|
|||
}
|
||||
|
||||
(function(){
|
||||
|
||||
|
||||
var CLASS_INVALID = 'survey-invalid'; // For elements that fail input validation
|
||||
var CLASS_INVALID_MARKER = 'survey-invalid-marker'; // For default '*' invalid field marker
|
||||
|
||||
var multipleChoice = {
|
||||
'Multiple Choice': 1,
|
||||
'Gender': 1,
|
||||
|
|
@ -90,12 +93,20 @@ if (typeof Survey === "undefined") {
|
|||
}
|
||||
}
|
||||
}
|
||||
var node = document.getElementById(i + 'required');
|
||||
var q_parent_node = YAHOO.util.Dom.getAncestorByClassName(node, 'question');
|
||||
if (!answered) {
|
||||
submit = 0;
|
||||
document.getElementById(i + 'required').innerHTML = "<font color=red>*</font>";
|
||||
|
||||
// Apply CLASS_INVALID to the parent question div for people who want to skin Survey
|
||||
YAHOO.util.Dom.addClass(q_parent_node, CLASS_INVALID);
|
||||
|
||||
// Insert default '*' marker (can be hidden via CSS for those who want something different)
|
||||
node.innerHTML = "<span class='" + CLASS_INVALID_MARKER + "'>*</span>";
|
||||
}
|
||||
else {
|
||||
document.getElementById(i + 'required').innerHTML = "";
|
||||
YAHOO.util.Dom.removeClass(q_parent_node, CLASS_INVALID);
|
||||
node.innerHTML = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -174,9 +185,7 @@ if (typeof Survey === "undefined") {
|
|||
|
||||
function sliderTextSet(event, objs){
|
||||
this.value = this.value * 1;
|
||||
if (this.value === 'NaN') {
|
||||
this.value = 0;
|
||||
}
|
||||
this.value = YAHOO.lang.isValue(this.value) ? this.value : 0;
|
||||
sliders[this.id].setValue(Math.round(this.value * sliders[this.id].scale));
|
||||
}
|
||||
|
||||
|
|
@ -338,14 +347,14 @@ if (typeof Survey === "undefined") {
|
|||
//YAHOO.util.Event.addListener("testB", "click", function(){Survey.Comm.callServer('','loadQuestions');});
|
||||
|
||||
if (qs[0]) {
|
||||
if (lastSection !== s.id || s.everyPageTitle > 0) {
|
||||
if (lastSection !== s.id || s.everyPageTitle === '1') {
|
||||
document.getElementById('headertitle').style.display = 'block';
|
||||
}
|
||||
if (lastSection !== s.id || s.everyPageText > 0) {
|
||||
if (lastSection !== s.id || s.everyPageText === '1') {
|
||||
document.getElementById('headertext').style.display = 'block';
|
||||
}
|
||||
|
||||
if (lastSection !== s.id && s.questionsOnSectionPage !== 1) {
|
||||
|
||||
if (lastSection !== s.id && s.questionsOnSectionPage !== '1') {
|
||||
var span = document.createElement("div");
|
||||
span.innerHTML = "<input type=button id='showQuestionsButton' value='Continue'>";
|
||||
span.style.display = 'block';
|
||||
|
|
@ -353,10 +362,10 @@ if (typeof Survey === "undefined") {
|
|||
document.getElementById('survey-header').appendChild(span);
|
||||
YAHOO.util.Event.addListener("showQuestionsButton", "click", function(){
|
||||
document.getElementById('showQuestionsButton').style.display = 'none';
|
||||
if (s.everyPageTitle === 0) {
|
||||
if (s.everyPageTitle !== '1') {
|
||||
document.getElementById('headertitle').style.display = 'none';
|
||||
}
|
||||
if (s.everyPageText === 0) {
|
||||
if (s.everyPageText !== '1') {
|
||||
document.getElementById('headertext').style.display = 'none';
|
||||
}
|
||||
document.getElementById('questions').style.display = 'inline';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if (typeof Survey == "undefined") {
|
|||
Survey.Data = new function(){
|
||||
var lastDataSet = {};
|
||||
var focus;
|
||||
|
||||
var lastId = -1;
|
||||
|
||||
this.dragDrop = function(did){
|
||||
var type;
|
||||
|
|
@ -46,6 +46,13 @@ YAHOO.log(first.id+' '+data.id);
|
|||
|
||||
this.loadData = function(d){
|
||||
focus = d.address;//What is the current highlighted item.
|
||||
var showEdit = 1;
|
||||
if(lastId.toString() == d.address.toString()){
|
||||
showEdit = 0;
|
||||
lastId = -1;
|
||||
}else{
|
||||
lastId = d.address;
|
||||
}
|
||||
document.getElementById('sections').innerHTML=d.ddhtml;
|
||||
|
||||
//add event handlers for if a tag is clicked
|
||||
|
|
@ -72,7 +79,11 @@ YAHOO.log('adding handler for '+ d.ids[x]);
|
|||
button.on("click", this.addAnswer,d.buttons['answer']);
|
||||
}
|
||||
|
||||
this.loadObjectEdit(d.edithtml,d.type);
|
||||
if(showEdit == 1){
|
||||
this.loadObjectEdit(d.edithtml,d.type);
|
||||
}else{
|
||||
document.getElementById('edit').innerHTML = "";
|
||||
}
|
||||
lastDataSet = d;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Survey.ObjectTemplate = new function(){
|
|||
var butts = [
|
||||
{ text:"Submit", handler:function(){this.submit();}, isDefault:true },
|
||||
{ text:"Copy", handler:function(){document.getElementById('copy').value = 1; this.submit();}},
|
||||
{ text:"Cancel", handler:function(){this.cancel();}},
|
||||
{ text:"Cancel", handler:function(){this.cancel(); Survey.Comm.loadSurvey('-');}},
|
||||
{ text:"Delete", handler:function(){document.getElementById('delete').value = 1; this.submit();}}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -83,3 +83,8 @@ input.mcbutton-selected{
|
|||
background-image: url(/extras/wobject/Survey/gradient-glossy.png);
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
|
||||
/* By default the marker for invalid (required) fields is a red '*' */
|
||||
.survey-invalid-marker {
|
||||
color: #FF0000;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue