Changeset 10611 for modules/branches/2.9/core
- Timestamp:
- 11/23/10 15:19:53 (2 years ago)
- Files:
-
- modules/branches/2.9/core/page.routing.php (modified) (8 diffs)
- modules/branches/2.9/core/page.trunks.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/core/page.routing.php
r10159 r10611 534 534 $mp_tit = _("match pattern"); 535 535 $ci_tit = _("CallerId"); 536 537 $dpt_title_class = 'dpt-title dpt-display'; 536 538 foreach ($dialpattern_array as $idx => $pattern) { 537 539 $tabindex++; 538 $dpt_class = $pattern['prepend_digits'] == '' ? 'dpt-title' : 'dpt-value'; 540 if ($idx == 50) { 541 $dpt_title_class = 'dpt-title dpt-nodisplay'; 542 } 543 $dpt_class = $pattern['prepend_digits'] == '' ? $dpt_title_class : 'dpt-value'; 539 544 echo <<< END 540 545 <tr> … … 543 548 END; 544 549 $tabindex++; 545 $dpt_class = $pattern['match_pattern_prefix'] == '' ? 'dpt-title': 'dpt-value';550 $dpt_class = $pattern['match_pattern_prefix'] == '' ? $dpt_title_class : 'dpt-value'; 546 551 echo <<< END 547 552 <input title="$pf_tit" type="text" size="6" id="pattern_prefix_$idx" name="pattern_prefix[$idx]" class="$dpt_class" value="{$pattern['match_pattern_prefix']}" tabindex="$tabindex"> | 548 553 END; 549 554 $tabindex++; 550 $dpt_class = $pattern['match_pattern_pass'] == '' ? 'dpt-title': 'dpt-value';555 $dpt_class = $pattern['match_pattern_pass'] == '' ? $dpt_title_class : 'dpt-value'; 551 556 echo <<< END 552 557 [<input title="$mp_tit" type="text" size="16" id="pattern_pass_$idx" name="pattern_pass[$idx]" class="$dpt_class" value="{$pattern['match_pattern_pass']}" tabindex="$tabindex"> / 553 558 END; 554 559 $tabindex++; 555 $dpt_class = $pattern['match_cid'] == '' ? 'dpt-title': 'dpt-value';560 $dpt_class = $pattern['match_cid'] == '' ? $dpt_title_class : 'dpt-value'; 556 561 echo <<< END 557 562 <input title="$ci_tit" type="text" size="10" id="match_cid_$idx" name="match_cid[$idx]" class="$dpt_class" value="{$pattern['match_cid']}" tabindex="$tabindex">] … … 567 572 <tr> 568 573 <td colspan="2"> 569 (<input title="<?php echo $pp_tit?>" type="text" size="8" id="prepend_digit_<?php echo $next_idx?>" name="prepend_digit[<?php echo $next_idx?>]" class="dial-pattern dpt-title " value="" tabindex="<?php echo ++$tabindex;?>">) +570 <input title="<?php echo $pf_tit?>" type="text" size="6" id="pattern_prefix_<?php echo $next_idx?>" name="pattern_prefix[<?php echo $next_idx?>]" class="dpt-title " value="" tabindex="<?php echo ++$tabindex;?>"> |571 [<input title="<?php echo $mp_tit?>" type="text" size="16" id="pattern_pass_<?php echo $next_idx?>" name="pattern_pass[<?php echo $next_idx?>]" class="dpt-title " value="" tabindex="<?php echo ++$tabindex;?>"> /572 <input title="<?php echo $ci_tit?>" type="text" size="10" id="match_cid_<?php echo $next_idx?>" name="match_cid[<?php echo $next_idx?>]" class="dpt-title " value="" tabindex="<?php echo ++$tabindex;?>">]574 (<input title="<?php echo $pp_tit?>" type="text" size="8" id="prepend_digit_<?php echo $next_idx?>" name="prepend_digit[<?php echo $next_idx?>]" class="dial-pattern dpt-title dpt-display" value="" tabindex="<?php echo ++$tabindex;?>">) + 575 <input title="<?php echo $pf_tit?>" type="text" size="6" id="pattern_prefix_<?php echo $next_idx?>" name="pattern_prefix[<?php echo $next_idx?>]" class="dpt-title dpt-display" value="" tabindex="<?php echo ++$tabindex;?>"> | 576 [<input title="<?php echo $mp_tit?>" type="text" size="16" id="pattern_pass_<?php echo $next_idx?>" name="pattern_pass[<?php echo $next_idx?>]" class="dpt-title dpt-display" value="" tabindex="<?php echo ++$tabindex;?>"> / 577 <input title="<?php echo $ci_tit?>" type="text" size="10" id="match_cid_<?php echo $next_idx?>" name="match_cid[<?php echo $next_idx?>]" class="dpt-title dpt-display" value="" tabindex="<?php echo ++$tabindex;?>">] 573 578 <img src="images/trash.png" style="float:none; margin-left:0px; margin-bottom:-3px;cursor:pointer;" alt="<?php echo _("remove")?>" title="<?php echo _("Click here to remove this pattern")?>" onclick="patternsRemove(<?php echo _("$next_idx") ?>)"> 574 579 … … 777 782 addCustomField('','','',''); 778 783 }); 779 $(".dpt- title").toggleVal({784 $(".dpt-display").toggleVal({ 780 785 populateFrom: "title", 781 786 changedClass: "text-normal", 782 787 focusClass: "text-normal" 788 }); 789 $(".dpt-nodisplay").mouseover(function(){ 790 $(this).toggleVal({ 791 populateFrom: "title", 792 changedClass: "text-normal", 793 focusClass: "text-normal" 794 }).removeClass('dpt-nodisplay').addClass('dpt-display').unbind('mouseover'); 783 795 }); 784 796 }); … … 795 807 var tabindex2 = tabindex + 3; 796 808 var tabindex3 = tabindex + 4; 797 var dpt_prepend_digit = prepend_digit == '' ? 'dpt-title' : 'dpt-value'; 798 var dpt_pattern_prefix = pattern_prefix == '' ? 'dpt-title' : 'dpt-value'; 799 var dpt_pattern_pass = pattern_pass == '' ? 'dpt-title' : 'dpt-value'; 800 var dpt_match_cid = match_cid == '' ? 'dpt-title' : 'dpt-value'; 809 var dpt_title = 'dpt-title dpt-display'; 810 var dpt_prepend_digit = prepend_digit == '' ? dpt_title : 'dpt-value'; 811 var dpt_pattern_prefix = pattern_prefix == '' ? dpt_title : 'dpt-value'; 812 var dpt_pattern_pass = pattern_pass == '' ? dpt_title : 'dpt-value'; 813 var dpt_match_cid = match_cid == '' ? dpt_title : 'dpt-value'; 801 814 802 815 var new_insert = $("#last_row").before('\ … … 880 893 881 894 function clearPatterns() { 882 $(".dpt- title").each(function() {895 $(".dpt-display").each(function() { 883 896 if($(this).val() == $(this).data("defText")) { 884 897 $(this).val(""); … … 894 907 defaultEmptyOK = false; 895 908 896 $(".dpt- title, .dpt-value").each(function() {909 $(".dpt-display, .dpt-value").each(function() { 897 910 if ($.trim($(this).val()) == '') { 898 911 } else if (!isDialpattern($(this).val())) { … … 913 926 // now we have to put it back... 914 927 // do I have to turn it off first though? 915 $(".dpt- title").each(function() {928 $(".dpt-display").each(function() { 916 929 if ($.trim($(this).val()) == '') { 917 930 $(this).toggleVal({ modules/branches/2.9/core/page.trunks.php
r10454 r10611 571 571 $pf_tit = _("prefix"); 572 572 $mp_tit = _("match pattern"); 573 $dpt_title_class = 'dpt-title dpt-display'; 573 574 foreach ($dialpattern_array as $idx => $pattern) { 574 575 $tabindex++; 575 $dpt_class = $pattern['prepend_digits'] == '' ? 'dpt-title' : 'dpt-value'; 576 if ($idx == 50) { 577 $dpt_title_class = 'dpt-title dpt-nodisplay'; 578 } 579 $dpt_class = $pattern['prepend_digits'] == '' ? $dpt_title_class : 'dpt-value'; 576 580 echo <<< END 577 581 <tr> … … 580 584 END; 581 585 $tabindex++; 582 $dpt_class = $pattern['match_pattern_prefix'] == '' ? 'dpt-title': 'dpt-value';586 $dpt_class = $pattern['match_pattern_prefix'] == '' ? $dpt_title_class : 'dpt-value'; 583 587 echo <<< END 584 588 <input title="$pf_tit" type="text" size="6" id="pattern_prefix_$idx" name="pattern_prefix[$idx]" class="dp-prefix $dpt_class" value="{$pattern['match_pattern_prefix']}" tabindex="$tabindex"> | 585 589 END; 586 590 $tabindex++; 587 $dpt_class = $pattern['match_pattern_pass'] == '' ? 'dpt-title': 'dpt-value';591 $dpt_class = $pattern['match_pattern_pass'] == '' ? $dpt_title_class : 'dpt-value'; 588 592 echo <<< END 589 593 <input title="$mp_tit" type="text" size="16" id="pattern_pass_$idx" name="pattern_pass[$idx]" class="dp-match $dpt_class" value="{$pattern['match_pattern_pass']}" tabindex="$tabindex"> … … 599 603 <tr> 600 604 <td colspan="2"> 601 (<input title="<?php echo $pp_tit?>" type="text" size="10" id="prepend_digit_<?php echo $next_idx?>" name="prepend_digit[<?php echo $next_idx?>]" class="dp-prepend dial-pattern dpt-title " value="" tabindex="<?php echo ++$tabindex;?>">) +602 <input title="<?php echo $pf_tit?>" type="text" size="6" id="pattern_prefix_<?php echo $next_idx?>" name="pattern_prefix[<?php echo $next_idx?>]" class="dp-prefix dpt-title " value="" tabindex="<?php echo ++$tabindex;?>"> |603 <input title="<?php echo $mp_tit?>" type="text" size="16" id="pattern_pass_<?php echo $next_idx?>" name="pattern_pass[<?php echo $next_idx?>]" class="dp-match dpt-title " value="" tabindex="<?php echo ++$tabindex;?>">605 (<input title="<?php echo $pp_tit?>" type="text" size="10" id="prepend_digit_<?php echo $next_idx?>" name="prepend_digit[<?php echo $next_idx?>]" class="dp-prepend dial-pattern dpt-title dpt-display" value="" tabindex="<?php echo ++$tabindex;?>">) + 606 <input title="<?php echo $pf_tit?>" type="text" size="6" id="pattern_prefix_<?php echo $next_idx?>" name="pattern_prefix[<?php echo $next_idx?>]" class="dp-prefix dpt-title dpt-display" value="" tabindex="<?php echo ++$tabindex;?>"> | 607 <input title="<?php echo $mp_tit?>" type="text" size="16" id="pattern_pass_<?php echo $next_idx?>" name="pattern_pass[<?php echo $next_idx?>]" class="dp-match dpt-title dpt-display" value="" tabindex="<?php echo ++$tabindex;?>"> 604 608 <img src="images/trash.png" style="cursor:pointer; float:none; margin-left:0px; margin-bottom:-3px;" alt="<?php echo _("remove")?>" title="<?php echo _("Click here to remove this pattern")?>" onclick="patternsRemove(<?php echo _("$next_idx") ?>)"> 605 609 … … 918 922 clearAllPatterns(); 919 923 }); 920 $(".dpt- title").toggleVal({924 $(".dpt-display").toggleVal({ 921 925 populateFrom: "title", 922 926 changedClass: "text-normal", 923 927 focusClass: "text-normal" 928 }); 929 $(".dpt-nodisplay").mouseover(function(){ 930 $(this).toggleVal({ 931 populateFrom: "title", 932 changedClass: "text-normal", 933 focusClass: "text-normal" 934 }).removeClass('dpt-nodisplay').addClass('dpt-display').unbind('mouseover'); 924 935 }); 925 936 }); … … 935 946 var tabindex1 = tabindex + 2; 936 947 var tabindex2 = tabindex + 3; 937 var dpt_prepend_digit = prepend_digit == '' ? 'dpt-title' : 'dpt-value'; 938 var dpt_pattern_prefix = pattern_prefix == '' ? 'dpt-title' : 'dpt-value'; 939 var dpt_pattern_pass = pattern_pass == '' ? 'dpt-title' : 'dpt-value'; 948 var dpt_title = 'dpt-title dpt-display'; 949 var dpt_prepend_digit = prepend_digit == '' ? dpt_title : 'dpt-value'; 950 var dpt_pattern_prefix = pattern_prefix == '' ? dpt_title : 'dpt-value'; 951 var dpt_pattern_pass = pattern_pass == '' ? dpt_title : 'dpt-value'; 940 952 941 953 var new_insert = $("#last_row").before('\ … … 960 972 961 973 function clearPatterns() { 962 $(".dpt- title").each(function() {974 $(".dpt-display").each(function() { 963 975 if($(this).val() == $(this).data("defText")) { 964 976 $(this).val(""); … … 969 981 970 982 function clearAllPatterns() { 971 $(".dpt-value").addClass('dpt-title').removeClass('dpt-value'); 972 $(".dpt-title").each(function() { 983 984 $(".dpt-value").addClass('dpt-title dpt-nodisplay').removeClass('dpt-value').mouseover(function(){ 985 $(this).toggleVal({ 986 populateFrom: "title", 987 changedClass: "text-normal", 988 focusClass: "text-normal" 989 }).removeClass('dpt-nodisplay').addClass('dpt-display').unbind('mouseover'); 990 }).each(function(){ 973 991 $(this).val(""); 974 992 }); 975 $(".dpt-title").toggleVal({ 976 populateFrom: "title", 977 changedClass: "text-normal", 978 focusClass: "text-normal" 979 }); 993 980 994 return true; 981 995 } … … 1029 1043 // now we have to put it back... 1030 1044 // do I have to turn it off first though? 1031 $(".dpt- title").each(function() {1045 $(".dpt-display").each(function() { 1032 1046 if ($.trim($(this).val()) == '') { 1033 1047 $(this).toggleVal({
