JQuery
change Jquery css on TABLE_edit.php/2 SAVE BUTTON
On my TABLE_Edit.php file, it has a [save] button that was generated. This [save] button has an id of "#C13". Because of shared server, it takes a long time to perform save. So I want to disable button.
As you can see from the jQuery code that was generated below, it already has attached a $j("#c13").on("click", function(event, ui) {...} code to the [save] button with an css id of "#c13"
QUESTION:
How, and more importantly WHERE, do I modify this jQuery code to:
change the text from [Save] to [Save in Progress]
and disable (+ make color:grey) both the [save] and the [cancel] buttons.
JQUERY CODE GENERATED:
<script type="text/javascript">$j(document).ready(function() {
qc.imageAssets = "/cgi-bin/qcubed_2_1_0/assets/_core/images";
qc.cssAssets = "/cgi-bin/qcubed_2_1_0/assets/_core/css";
qc.phpAssets = "/cgi-bin/qcubed_2_1_0/assets/_core/php";
qc.jsAssets = "/cgi-bin/qcubed_2_1_0/assets/_core/js";
qc.baseDir = "/cgi-bin/qcubed_2_1_0";
qc.loadJavaScriptFile("date_time_picker.js", function() {
$j("#c13").on("click", function(event, ui){
event.preventDefault(); qc.pA('GenericMastersTblEditForm', 'c13', 'QClickEvent', '', '');
});QCubed 1.1.1 + jquery = IE7 and IE8 errors
Hello. I hope someone can help me here.
I'm using QCubed 1.1.1 and need to include JQuery 1.4.2 in my project. As soon as I include the JQuery library I get some error when I click on button with AjaxAction when using IE7 or IE8. There is no problem using FF or Chrome.
This is the error IE8 show up
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322)
Timestamp: Thu, 1 Jul 2010 14:11:45 UTC
Message: Object doesn't support this property or method
Line: 153
Char: 5
Code: 0
URI: http://192.168.10.79/~brynjar/myproject/assets/_core/js/post.js
Here is the minimal code to replicate the problem.
The form: test.php
<?php
require('includes/prepend.inc.php');
class Test extends QForm {
public $btnTest;
protected function Form_Create(){
$this->btnTest = new QButton($this);
$this->btnTest->Text = 'Click me';
$this->btnTest->AddAction(new QClickEvent(), new QAjaxAction('btnTest_Click'));
}
public function btnTest_Click(){}
}
Test::Run('Test');
?>And the template file: test.tpl.php
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<?php $this->RenderBegin() ?>
<?php $this->btnTest->Render(); ?>
<?php $this->RenderEnd() ?>
</body>;
</html>Any ideas? Maybe this it is some local problem. My development environment is Linux and I'm using Apache as web server.
Thanks for your help.
Brynjar
jQuery sortable fails with overflow auto
For the past month or so, I've been developing several programs, using jQuery Sortable option, which is now working very well. However, when I uploaded it to a hosted site, I experienced a problem. I have overflow: auto; set for the div that contains the sortable list. If the list has enough entries to cause scrolling, all. the jQuery controls and general javascripts, including Ajax action buttons, no longer work. Firebug shows none of the jQuery scripts are included and the iframs are missing for the QFCKEditor, which is included in the form. Again, this is only if the sortable list is long enough to cause scrolling. Also, no errors are indicated by Firebug.
If the list only has a few items in it, so scrolling isn't triggered, sortable and all other jQuery and javascript are present and work perfectly. Also, the iFrames are present and the QFCKEditor control works perfectly.
Again, this problem is only occurring on the hosted website. I made certain everything was properly, by re-downloading everything and testing the downloaded code on my local WAMP. Also, I'm using the same workstation and browser, while working on both the local and hosted installations. The hosted site is running the same version of PHP (5.3.0). However, it's CentOs.
If anyone has any ideas on this, it would be greatly appreciated.
Interesting addition... I expanded the vertical size of the container QPanel to accommodate at least three lines more than are in my test case and the it still doesn't sort. It seems I must reduce the number of entries to 5 in order to make sortable work. In testing on my local WAMP, I have added additional lines and, even with the scroll handle, it remains sortable. So, there must be some configurable setting that's causing the problem.
Custom Plugin works with QServer not with QAjax
Hi folks,
i'm working on a qcubed plugin (QProgressBar) which will make use of jquery progress bar.
the plugin works good with QServer but i can't make it goes with QAjax mode here's the class
<?php
class QProgressBar extends QControl {
protected $intValue;
public function __construct($objParentObject, $strControlId = null) {
if ($objParentObject) {
parent::__construct($objParentObject, $strControlId);
}
$this->setFiles();
}
private function setFiles() {
$this->AddJavascriptFile(__JQUERY_BASE__);
$this->AddPluginJavascriptFile("QProgressBar", "jquery.ui.core.js");
$this->AddPluginJavascriptFile("QProgressBar", "jquery.ui.widget.js");
$this->AddPluginJavascriptFile("QProgressBar", "ui.progress.js");
$this->AddPluginCssFile("QProgressBar", "progressbar.css");
/*if (QApplication::IsBrowser(QBrowserType::InternetExplorer)) {
$this->AddPluginCssFile("QProgress", "Progress_ie.css");
}*/
}
protected function GetControlHtml() {
$strHtml = sprintf('<div id="progress_%s" class="%s"></div>',
$this->ControlId,
$this->CssClass);
$this->intValue = ($this->intValue) ? $this->intValue : 0;
$strJsProgress = sprintf('
$(document).ready(function(){
$("#progress_%s").progressbar({ value:%s});
$("#progress_%s").progressbar( "option", "value", %s );
});',
$this->ControlId,
$this->intValue,
$this->ControlId,
$this->intValue);
QApplication::ExecuteJavaScript($strJsProgress);
return $strHtml ;
}
public function GetEndScript() {
return null;
}
public function ParsePostData() {
return true;
}
public function Validate(){
return true;
}
public function __get($strName) {
switch ($strName) {
// APPEARANCE
case "Value":
return $this->intValue;
default:
try {
return parent::__get($strName);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
}
public function __set($strName, $mixValue) {
switch ($strName) {
// APPEARANCE
case "Value":
try {
$this->intValue = QType::Cast($mixValue, QType::Float);
break;
} catch (QInvalidCastException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
try {
parent::__set($strName, $mixValue);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
break;
}
}
}
?>Any help will be much appreciated as soon as this is fixed i'll clean the code and contribute the plugin.
Thanks
Kent
jquery dialog
I wanted to change all my dialog boxes so that they would use jquery ui dialog. I even succeeded, but it took me additional wrapper panel. I thought I ask here whether I might do it somehow differently.
What I currently have is QJqDialog class, which extends QPanel. It has a child QPanel, which is wrapper panel. And this panel itself has a child QPanel, which is content itself. Ideally, I thought that it should be similar to QDialogBox, which doesn't need wrapper.
New Plugins : QSlider, QProgressBar and QEmailTextBox
Hello people
After couple issues trying to build my own plug-ins http://trac.qcu.be/projects/qcubed/ticket/301 and http://trac.qcu.be/projects/qcubed/ticket/305
Finally today I've time to create the script to crate plug-in zip package on Linux systems, check out here http://trac.qcu.be/projects/qcubed/browser/plugins/QEmailTextBox/tools/m...
After that I could share with the community my two cents for plug-ins sections
QAutoCompleteTextBox enhancement
I created a ticket for improve QAutoCompleteTextBox. This can be found here: http://trac.qcu.be/projects/qcubed/ticket/258
Wanted to make forum thread, if it makes it easier to discuss (may-be someone doesn't check trac etc).
Anyways, I'm currently using autocomplete in some of my projects and need some additional functionality. I already have implemented something (which I also uploaded to the ticket). If you have any comments/suggestions, let me know.
QPanel Animation Help
I think I have exhausted my options for how I can do this with built in QCubed controls, but I thought I'd give it one last shot by opening it up to you geniuses here at QCubed. I have a QPanel that I need to do some animation on. Basically, when a control is clicked, the QPanel needs to fade out. While the QPanel is completely invisible, the QPanel needs to get content through an Ajax call. After the QPanel is updated with the latest content, the QPanel needs to fade back in with the new content. So here it is in a nutshell: Fade Out QPanel -> Update QPanel Contents -> Fade QPanel In.
