mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 14:37:20 +00:00
use data attribute instead of deselect class for select boxes
This commit is contained in:
parent
60035385e2
commit
080ef272b1
|
@ -35,18 +35,10 @@ $(document).ready( function() {
|
|||
$(ev.currentTarget).datepicker('hide');
|
||||
});
|
||||
|
||||
// $(".chzn-select").chosen({width: "95%"});
|
||||
// $(".chzn-select-deselect").chosen({allow_single_deselect:true});
|
||||
|
||||
$(".chzn-select").select2({
|
||||
width: '100%',
|
||||
templateResult: chzn_template_func
|
||||
});
|
||||
$(".chzn-select-deselect").select2({
|
||||
allowClear:true,
|
||||
width: '100%',
|
||||
templateResult: chzn_template_func
|
||||
});
|
||||
|
||||
/* change the color and length of the bar graph showing the password
|
||||
* strength on each change to the passwod field.
|
||||
|
@ -376,7 +368,6 @@ $(document).ready( function() {
|
|||
element.prepend('<div style="position: _absolute; overflow: hidden; background: #f7f7f7; z-index: 1000; height: 200px; width: '+element.width()+'px; opacity: 0.7; display: table;"><div style="display: table-cell;text-align: center; vertical-align: middle; "><img src="../views/bootstrap/images/ajax-loader.gif"></div>');
|
||||
$.get(url, function(data) {
|
||||
element.html(data);
|
||||
// $(".chzn-select").chosen();
|
||||
$(".chzn-select").select2({
|
||||
width: '100%',
|
||||
templateResult: chzn_template_func
|
||||
|
@ -424,7 +415,6 @@ $(document).ready( function() {
|
|||
element.prepend('<div style="position: absolute; overflow: hidden; background: #f7f7f7; z-index: 1000; height: '+element.height()+'px; width: '+element.width()+'px; opacity: 0.7; display: table;"><div style="display: table-cell;text-align: center; vertical-align: middle; "><img src="../views/bootstrap/images/ajax-loader.gif"></div>');
|
||||
$.get(url, function(data) {
|
||||
element.html(data);
|
||||
// $(".chzn-select").chosen();
|
||||
$(".chzn-select").select2({
|
||||
width: '100%',
|
||||
templateResult: chzn_template_func
|
||||
|
|
|
@ -372,8 +372,8 @@ $(document).ready(function() {
|
|||
'element'=>'select',
|
||||
'id'=>'workflow',
|
||||
'name'=>'workflow',
|
||||
'class'=>'chzn-select-deselect',
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_workflow'))),
|
||||
'class'=>'chzn-select',
|
||||
'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder', getMLText('select_workflow'))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
|
@ -390,8 +390,8 @@ $(document).ready(function() {
|
|||
'element'=>'select',
|
||||
'id'=>'workflow',
|
||||
'name'=>'workflow',
|
||||
'class'=>'chzn-select-deselect',
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_workflow'))),
|
||||
'class'=>'chzn-select',
|
||||
'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder', getMLText('select_workflow'))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
|
|
|
@ -200,7 +200,9 @@ $(document).ready(function() {
|
|||
array(
|
||||
'element'=>'select',
|
||||
'name'=>'userid',
|
||||
'id'=>'userid',
|
||||
'class'=>'chzn-select',
|
||||
'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder',getMLText('select_user'))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
|
@ -215,7 +217,7 @@ $(document).ready(function() {
|
|||
'element'=>'select',
|
||||
'name'=>'groupid',
|
||||
'class'=>'chzn-select',
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_group'))),
|
||||
'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder', getMLText('select_group'))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
|
|
|
@ -150,7 +150,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
|||
<tr>
|
||||
<td><?php printMLText("owner");?>:</td>
|
||||
<td>
|
||||
<select class="chzn-select-deselect" name="ownerid" data-placeholder="<?php printMLText('select_users'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<select class="chzn-select" name="ownerid" data-allow-clear="true" data-placeholder="<?php printMLText('select_users'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<option value="-1"></option>
|
||||
<?php
|
||||
foreach ($allUsers as $userObj) {
|
||||
|
@ -393,7 +393,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
|||
<tr>
|
||||
<td><?php printMLText("owner");?>:</td>
|
||||
<td>
|
||||
<select class="chzn-select-deselect" name="ownerid" data-placeholder="<?php printMLText('select_users'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<select class="chzn-select" name="ownerid" data-allow-clear="true" data-placeholder="<?php printMLText('select_users'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<option value="-1"></option>
|
||||
<?php
|
||||
foreach ($allUsers as $userObj) {
|
||||
|
|
|
@ -481,7 +481,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
case "categories":
|
||||
$categories = $dms->getDocumentCategories();
|
||||
if($categories) {
|
||||
echo "<select class=\"chzn-select".($allowempty ? "-deselect" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_category")."\">";
|
||||
echo "<select class=\"chzn-select".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_category")."\">";
|
||||
if($allowempty)
|
||||
echo "<option value=\"\"></option>";
|
||||
foreach($categories as $category) {
|
||||
|
@ -496,7 +496,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
case "users":
|
||||
$users = $dms->getAllUsers();
|
||||
if($users) {
|
||||
echo "<select class=\"chzn-select".($allowempty ? "-deselect" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_user")."\">";
|
||||
echo "<select class=\"chzn-select".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_user")."\">";
|
||||
if($allowempty)
|
||||
echo "<option value=\"\"></option>";
|
||||
foreach($users as $curuser) {
|
||||
|
@ -511,7 +511,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
case "groups":
|
||||
$recs = $dms->getAllGroups();
|
||||
if($recs) {
|
||||
echo "<select class=\"chzn-select".($allowempty ? "-deselect" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_group")."\">";
|
||||
echo "<select class=\"chzn-select".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_group")."\">";
|
||||
if($allowempty)
|
||||
echo "<option value=\"\"></option>";
|
||||
foreach($recs as $rec) {
|
||||
|
@ -526,7 +526,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
case "attributedefinitions":
|
||||
$recs = $dms->getAllAttributeDefinitions();
|
||||
if($recs) {
|
||||
echo "<select class=\"chzn-select".($allowempty ? "-deselect" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attribute_value")."\">";
|
||||
echo "<select class=\"chzn-select".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attribute_value")."\">";
|
||||
if($allowempty)
|
||||
echo "<option value=\"\"></option>";
|
||||
foreach($recs as $rec) {
|
||||
|
|
|
@ -642,7 +642,7 @@ console.log(element);
|
|||
<?php
|
||||
} else {
|
||||
?>
|
||||
<select class="_chzn-select-deselect span9" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
||||
<select class="_chzn-select span9" _data-allow-clear="true" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
||||
<?php
|
||||
$curworkflow = $latestContent->getWorkflow();
|
||||
foreach ($mandatoryworkflows as $workflow) {
|
||||
|
@ -657,7 +657,7 @@ console.log(element);
|
|||
}
|
||||
} else {
|
||||
?>
|
||||
<select class="_chzn-select-deselect span9" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
||||
<select class="_chzn-select span9" _data-allow-clear="true" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
||||
<?php
|
||||
$workflows=$dms->getAllWorkflows();
|
||||
print "<option value=\"\">"."</option>";
|
||||
|
|
Loading…
Reference in New Issue
Block a user