From f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be Mon Sep 17 00:00:00 2001
From: Patrick Anders <p.anders@timmehosting.de>
Date: Wed, 10 Dec 2014 08:44:26 -0500
Subject: [PATCH] add Spdy option - http://en.wikipedia.org/wiki/SPDY
---
interface/web/js/scrigo.js.php | 88 +++++++++++++++++++++++++++++++------------
1 files changed, 63 insertions(+), 25 deletions(-)
diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php
index 6ac4510..fd29930 100644
--- a/interface/web/js/scrigo.js.php
+++ b/interface/web/js/scrigo.js.php
@@ -1,5 +1,4 @@
<?php
-session_start();
include '../../lib/config.inc.php';
header('Content-Type: text/javascript; charset=utf-8'); // the config file sets the content type header so we have to override it here!
require_once '../../lib/app.inc.php';
@@ -94,7 +93,15 @@
<?php
if($server_config_array['misc']['use_combobox'] == 'y'){
?>
- $('#pageContent').find("select:not(.chosen-select)").combobox();
+
+
+ $('#pageContent').find("select:not(.chosen-select)").combobox({
+ select: function (event, ui) {
+ if (jQuery(".panel #Filter").length > 0) {
+ jQuery(".panel #Filter").trigger('click');
+ }
+ }
+ });
$('.chosen-select').chosen({no_results_text: "<?php echo $wb['globalsearch_noresults_text_txt']; ?>", width: '300px'});
<?php
}
@@ -439,6 +446,8 @@
}
function changeTab(tab,target,force) {
+ if(requestsRunning > 0) return false;
+
//document.forms[0].next_tab.value = tab;
document.pageForm.next_tab.value = tab;
@@ -580,6 +589,8 @@
pass_message['color'] = "green";
pass_messages[5] = pass_message;
+var special_chars = "`~!@#$%^&*()_+|\=-[]}{';:/?.>,<\" ";
+
function pass_check(password) {
var length = password.length;
var points = 0;
@@ -592,20 +603,29 @@
pass_result(1);
return;
}
-
+
+ var different = 0;
+
+ if (pass_contains(password, "abcdefghijklnmopqrstuvwxyz")) {
+ different += 1;
+ }
+
if (pass_contains(password, "ABCDEFGHIJKLNMOPQRSTUVWXYZ")) {
points += 1;
+ different += 1;
}
if (pass_contains(password, "0123456789")) {
points += 1;
+ different += 1;
}
- if (pass_contains(password, "`~!@#$%^&*()_+|\=-[]}{';:/?.>,<\" ")) {
+ if (pass_contains(password, special_chars)) {
points += 1;
+ different += 1;
}
- if (points == 0) {
+ if (points == 0 || different < 3) {
if (length >= 5 && length <=6) {
pass_result(1);
} else if (length >= 7 && length <=8) {
@@ -743,27 +763,45 @@
return rv;
}
-function password(minLength, special){
- var iteration = 0;
- var password = "";
- var randomNumber;
+function password(minLength, special, num_special){
minLength = minLength || 10;
+ if(minLength < 8) minLength = 8;
var maxLength = minLength + 5;
var length = getRandomInt(minLength, maxLength);
- if(special == undefined){
- var special = false;
+
+ var alphachars = "abcdefghijklmnopqrstuvwxyz";
+ var upperchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ var numchars = "1234567890";
+ var specialchars = "!@#_";
+
+ if(num_special == undefined) num_special = 0;
+ if(special != undefined && special == true) {
+ num_special = Math.floor(Math.random() * (length / 4)) + 1;
}
- while(iteration < length){
- randomNumber = (Math.floor((Math.random() * 100)) % 94) + 33;
- if(!special){
- if ((randomNumber >=33) && (randomNumber <=47)) { continue; }
- if ((randomNumber >=58) && (randomNumber <=64)) { continue; }
- if ((randomNumber >=91) && (randomNumber <=96)) { continue; }
- if ((randomNumber >=123) && (randomNumber <=126)) { continue; }
- }
- iteration++;
- password += String.fromCharCode(randomNumber);
+ var numericlen = getRandomInt(1, 2);
+ var alphalen = length - num_special - numericlen;
+ var upperlen = Math.floor(alphalen / 2);
+ alphalen = alphalen - upperlen;
+ var password = "";
+
+ for(i = 0; i < alphalen; i++) {
+ password += alphachars.charAt(Math.floor(Math.random() * alphachars.length));
}
+
+ for(i = 0; i < upperlen; i++) {
+ password += upperchars.charAt(Math.floor(Math.random() * upperchars.length));
+ }
+
+ for(i = 0; i < num_special; i++) {
+ password += specialchars.charAt(Math.floor(Math.random() * specialchars.length));
+ }
+
+ for(i = 0; i < numericlen; i++) {
+ password += numchars.charAt(Math.floor(Math.random() * numchars.length));
+ }
+
+ password = password.split('').sort(function() { return 0.5 - Math.random(); }).join('');
+
return password;
}
@@ -779,9 +817,9 @@
var newPWField = oldPWField.clone();
newPWField.attr('type', 'text').attr('id', 'tmp'+passwordFieldID).insertBefore(oldPWField);
oldPWField.remove();
- var pword = password(<?php echo $min_password_length ?>, false);
+ var pword = password(<?php echo $min_password_length; ?>, false, 1);
jQuery('#'+repeatPasswordFieldID).val(pword);
- newPWField.attr('id', passwordFieldID).val(pword).trigger('keyup');
+ newPWField.attr('id', passwordFieldID).val(pword).trigger('keyup').select();
}
var funcDisableClick = function(e) { e.preventDefault(); return false; };
@@ -816,13 +854,13 @@
return Math.floor(Math.random() * (max - min + 1)) + min;
}
-jQuery('.addPlaceholder').live("click", function(){
+jQuery(document).on("click", ".addPlaceholder", function(){
var placeholderText = jQuery(this).text();
var template = jQuery(this).siblings(':input');
template.insertAtCaret(placeholderText);
});
-jQuery('.addPlaceholderContent').live("click", function(){
+jQuery(document).on("click", ".addPlaceholderContent", function(){
var placeholderContentText = jQuery(this).find('.addPlaceholderContent').text();
var template2 = jQuery(this).siblings(':input');
template2.insertAtCaret(placeholderContentText);
--
Gitblit v1.9.1