Made client use Foundation.css

This commit is contained in:
Griatch 2015-06-07 19:06:43 +02:00
parent e4e9877ebd
commit fa370510da

View file

@ -61,7 +61,7 @@ toClass = function(divclass, data) {
break; break;
case "lookarea": case "lookarea":
// update the look text box // update the look text box
$(this).val(data); $(this).val($.trim(data));
break; break;
} }
}); });
@ -146,7 +146,7 @@ getHistory = function(obj, lastentry, step) {
return current; return current;
} }
hpos = Math.max(0, Math.min(hpos, lhist-1)); hpos = Math.max(0, Math.min(hpos, lhist-1));
console.log("lhist: " + lhist + " hpos: " + hpos + " current: " + obj.input_history.current); //console.log("lhist: " + lhist + " hpos: " + hpos + " current: " + obj.input_history.current);
obj.input_history.hpos = hpos; obj.input_history.hpos = hpos;
return history.store[hpos]; return history.store[hpos];
} }
@ -164,9 +164,10 @@ initialize = function() {
$(".input_singleline").on("submit", function(event) { $(".input_singleline").on("submit", function(event) {
// input from the single-line input field // input from the single-line input field
event.preventDefault(); // stop form from switching page event.preventDefault(); // stop form from switching page
var msg = $(this).children("input").val(); var field = $(this).find("input");
var msg = field.val();
addHistory(this, msg); addHistory(this, msg);
$(this).children("input").val(""); field.val("");
dataSend("inputfield", msg); dataSend("inputfield", msg);
if (echo_to_textarea) { if (echo_to_textarea) {
// echo to textfield // echo to textfield
@ -200,12 +201,14 @@ initialize = function() {
// textarea input // textarea input
$(".input_multiline").on("submit", function(event) { $(".input_multiline").on("submit", function(event) {
// input from the textarea input // input from the textarea input
event.preventDefault(); // stop form from switching page event.preventDefault(); // stop form from switching page
var msg = $(this).children("textarea").val(); var field = $(this).find("textarea");
var msg = field.val();
addHistory(this, msg); addHistory(this, msg);
$(this).children("textarea").val(""); field.val("");
dataSend("inputfield", msg); dataSend("inputfield", msg);
if (echo_to_textarea) { if (echo_to_textarea) {
// echo to textfield // echo to textfield
@ -240,6 +243,10 @@ initialize = function() {
} }
}); });
// make sure textarea fills surrounding div
//$('textarea').css({height:(300-$('form').height())+'px'});
//$('textarea').css({height:"inherit", resize:"vertical"});
// configurations // configurations
$(".echo").on("change", function(event) { $(".echo").on("change", function(event) {
// configure echo on/off checkbox button // configure echo on/off checkbox button