Fix shortcut hoverhelp, javascript, and criteria builder usability. Fixes bug #11516
This commit is contained in:
parent
33c54b66b6
commit
982e5117f1
4 changed files with 36 additions and 20 deletions
|
|
@ -18,6 +18,7 @@
|
||||||
- fixed #11513: white text, broken account mgmt
|
- fixed #11513: white text, broken account mgmt
|
||||||
- fixed #11514: Added JS-type cancel button to edit view of WebGUI::Asset::Post (Bernd Kalbfuß-Zimmermann)
|
- fixed #11514: Added JS-type cancel button to edit view of WebGUI::Asset::Post (Bernd Kalbfuß-Zimmermann)
|
||||||
- fixed #11469: Survey Ruler
|
- fixed #11469: Survey Ruler
|
||||||
|
- fixed #11516: Shortcut Asset: Properties panel messed up in edit view
|
||||||
|
|
||||||
7.9.1
|
7.9.1
|
||||||
- fixed #11464: blank page after setting posts per page in Collaboration System to 0 (zero)
|
- fixed #11464: blank page after setting posts per page in Collaboration System to 0 (zero)
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ sub _drawQueryBuilder {
|
||||||
"AND" => $i18n->get("AND"),
|
"AND" => $i18n->get("AND"),
|
||||||
"OR" => $i18n->get("OR")},
|
"OR" => $i18n->get("OR")},
|
||||||
value=>["OR"],
|
value=>["OR"],
|
||||||
extras=>'class="qbselect"',
|
extras=>'class="qbselect" '. $self->{_disabled},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -87,7 +87,7 @@ sub _drawQueryBuilder {
|
||||||
name=>$opFieldName,
|
name=>$opFieldName,
|
||||||
uiLevel=>5,
|
uiLevel=>5,
|
||||||
options=>$operator{$fieldType},
|
options=>$operator{$fieldType},
|
||||||
extras=>'class="qbselect"'
|
extras=>'class="qbselect" '. $self->{_disabled},
|
||||||
});
|
});
|
||||||
# The value select field
|
# The value select field
|
||||||
my $valFieldName = "val_field".$i;
|
my $valFieldName = "val_field".$i;
|
||||||
|
|
@ -96,13 +96,14 @@ sub _drawQueryBuilder {
|
||||||
fieldType=>$fieldType,
|
fieldType=>$fieldType,
|
||||||
name=>$valFieldName,
|
name=>$valFieldName,
|
||||||
uiLevel=>5,
|
uiLevel=>5,
|
||||||
extras=>qq/title="$fields->{$field}{description}" class="qbselect"/,
|
extras=>qq/title="$fields->{$field}{description}" class="qbselect" /. $self->{_disabled},
|
||||||
options=>$options,
|
options=>$options,
|
||||||
);
|
);
|
||||||
# An empty row
|
# An empty row
|
||||||
$output .= qq|<tr><td></td><td></td><td></td><td></td><td class="qbtdright"></td></tr>|;
|
$output .= qq|<tr><td></td><td></td><td></td><td></td><td class="qbtdright"></td></tr>|;
|
||||||
|
|
||||||
# Table row with field info
|
# Table row with field info
|
||||||
|
my $disabled = $self->{_disabled};
|
||||||
$output .= qq|
|
$output .= qq|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="qbtdleft"><p class="qbfieldLabel">$fieldLabel</p></td>
|
<td class="qbtdleft"><p class="qbfieldLabel">$fieldLabel</p></td>
|
||||||
|
|
@ -114,7 +115,11 @@ sub _drawQueryBuilder {
|
||||||
</td>
|
</td>
|
||||||
<td class="qbtd"></td>
|
<td class="qbtd"></td>
|
||||||
<td class="qbtdright">
|
<td class="qbtdright">
|
||||||
|
<<<<<<< HEAD:lib/WebGUI/Asset/Shortcut.pm
|
||||||
<input class="qbButton" type=button value=Add onclick="addCriteria('$fieldLabel', this.form.$opFieldName, this.form.$valFieldName)"></td>
|
<input class="qbButton" type=button value=Add onclick="addCriteria('$fieldLabel', this.form.$opFieldName, this.form.$valFieldName)"></td>
|
||||||
|
=======
|
||||||
|
<input class="qbButton" type=button value=$addLabel onclick="addCriteria('$fieldLabel', this.form.$opFieldName, this.form.$valFieldName)" $disabled></td>
|
||||||
|
>>>>>>> f32f209... Fix shortcut hoverhelp, javascript, and criteria builder usability. Fixes bug #11516:lib/WebGUI/Asset/Shortcut.pm
|
||||||
</tr>
|
</tr>
|
||||||
|;
|
|;
|
||||||
$i++;
|
$i++;
|
||||||
|
|
@ -310,19 +315,12 @@ sub getEditForm {
|
||||||
);
|
);
|
||||||
if($self->session->setting->get("metaDataEnabled")) {
|
if($self->session->setting->get("metaDataEnabled")) {
|
||||||
$tabform->getTab("properties")->yesNo(
|
$tabform->getTab("properties")->yesNo(
|
||||||
-name=>"shortcutByCriteria",
|
-name => "shortcutByCriteria",
|
||||||
-value=>$self->getValue("shortcutByCriteria"),
|
-value => $self->getValue("shortcutByCriteria"),
|
||||||
-label=>$i18n->get("Shortcut by alternate criteria"),
|
-label => $i18n->get("Shortcut by alternate criteria"),
|
||||||
-hoverHelp=>$i18n->get("Shortcut by alternate criteria description"),
|
-hoverHelp=> $i18n->get("Shortcut by alternate criteria description"),
|
||||||
-extras=>q|onchange="
|
-extras => q|onchange="wgCriteriaDisable(this.form, this.form.shortcutByCriteria[0].checked)"|,
|
||||||
if (this.form.shortcutByCriteria[0].checked) {
|
);
|
||||||
this.form.resolveMultiples.disabled=false;
|
|
||||||
this.form.shortcutCriteria.disabled=false;
|
|
||||||
} else {
|
|
||||||
this.form.resolveMultiples.disabled=true;
|
|
||||||
this.form.shortcutCriteria.disabled=true;
|
|
||||||
}"|
|
|
||||||
);
|
|
||||||
$tabform->getTab("properties")->yesNo(
|
$tabform->getTab("properties")->yesNo(
|
||||||
-name=>"disableContentLock",
|
-name=>"disableContentLock",
|
||||||
-value=>$self->getValue("disableContentLock"),
|
-value=>$self->getValue("disableContentLock"),
|
||||||
|
|
|
||||||
|
|
@ -106,9 +106,9 @@ Most Recent will select the most recent asset that matches the shortcut criteria
|
||||||
},
|
},
|
||||||
|
|
||||||
'Criteria description' => {
|
'Criteria description' => {
|
||||||
message => q|A statement to determine what to mirror, in the form of "color = blue and weight != heavy". Multiple expressions may be joined with "and" and "or". <br />
|
message => q|A statement to determine what to mirror, in the form of "color = blue and weight != heavy". Multiple expressions may be joined with "and" and "or". A property or value must be quoted if it contains spaces.<br />
|
||||||
A property or value must be quoted if it contains spaces. Feel free to use the criteria builder to build your statements.|,
|
The statement may be entered by hand, or it can be built graphically using the Criteria builder. For each criteria that you want to enter, select the value for the metadata field and the operator. Then, use the conjunction field to choose how it works with the other criteria, and hit the Add button for the field you want to add.|,
|
||||||
lastUpdated => 1167190118,
|
lastUpdated => 1270581368,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,29 @@
|
||||||
|
function wgCriteriaDisable ( form, toDisable ) {
|
||||||
|
var new_state = toDisable ? false : true;
|
||||||
|
var elements = YAHOO.util.Dom.getElementsByClassName('qbselect');
|
||||||
|
var buttons = YAHOO.util.Dom.getElementsByClassName('qbButton');
|
||||||
|
form.resolveMultiples.disabled = new_state;
|
||||||
|
form.shortcutCriteria.disabled = new_state;
|
||||||
|
for(idx=0; idx < elements.length; idx++) {
|
||||||
|
elements[idx].disabled = new_state;
|
||||||
|
}
|
||||||
|
for(idx=0; idx < buttons.length; idx++) {
|
||||||
|
buttons[idx].disabled = new_state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function addCriteria ( fieldname, opform, valform ) {
|
function addCriteria ( fieldname, opform, valform ) {
|
||||||
var form = opform.form;
|
var form = opform.form;
|
||||||
var operator = getValue(opform);
|
var operator = getValue(opform);
|
||||||
var value = getValue(valform);
|
var value = getValue(valform);
|
||||||
var criteria = form.shortcutCriteria.value;
|
var criteria = form.shortcutCriteria.value;
|
||||||
var conjunction = "";
|
var conjunction = "";
|
||||||
|
if (form.shortcutCriteria.disabled == true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(! /^\s*$/.test(criteria)) {
|
if(! /^\s*$/.test(criteria)) {
|
||||||
conjunction = " " + getValue(form.conjunction) + " ";
|
conjunction = " " + getValue(form.conjunction) + " ";
|
||||||
}
|
}
|
||||||
//handle quotes
|
//handle quotes
|
||||||
if(/\s+/.test(fieldname)) {
|
if(/\s+/.test(fieldname)) {
|
||||||
fieldname = '"' + fieldname + '"';
|
fieldname = '"' + fieldname + '"';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue