mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
Fixes to handle the newer framework and jquery assets
double check the web/assets folder is writable by your web server... so, jquery-ui bundled in this framework is now the v1.10.4 and jquery at the v1.11.1
This commit is contained in:
parent
9c96f5012f
commit
c9c7a27dcf
16 changed files with 59 additions and 29 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -15,3 +15,6 @@ web/yaamp/runtime/*
|
||||||
cookies/
|
cookies/
|
||||||
bin/blocknotif
|
bin/blocknotif
|
||||||
web/serverconfig.php
|
web/serverconfig.php
|
||||||
|
web/assets/
|
||||||
|
*.rej
|
||||||
|
*.orig
|
||||||
|
|
0
web/assets/.yii
Normal file
0
web/assets/.yii
Normal file
|
@ -29,6 +29,7 @@ return array(
|
||||||
),
|
),
|
||||||
'jquery.ui'=>array(
|
'jquery.ui'=>array(
|
||||||
'js'=>array('jui/js/jquery-ui.min.js'),
|
'js'=>array('jui/js/jquery-ui.min.js'),
|
||||||
|
// 'js'=>array('/extensions/jquery/js/jquery-ui-1.9.1.custom.min.js'),
|
||||||
'depends'=>array('jquery'),
|
'depends'=>array('jquery'),
|
||||||
),
|
),
|
||||||
'bgiframe'=>array(
|
'bgiframe'=>array(
|
||||||
|
|
|
@ -75,7 +75,7 @@ class CheckupCommand extends CConsoleCommand
|
||||||
{
|
{
|
||||||
$root = $this->basePath;
|
$root = $this->basePath;
|
||||||
|
|
||||||
//self::isDirWritable("$root/protected/data/.");
|
self::isDirWritable("$root/assets/.");
|
||||||
self::isDirWritable("$root/yaamp/runtime/.");
|
self::isDirWritable("$root/yaamp/runtime/.");
|
||||||
self::isDirWritable(YAAMP_LOGS."/.");
|
self::isDirWritable(YAAMP_LOGS."/.");
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ class CUFHtml extends CHtml
|
||||||
{
|
{
|
||||||
$realAttribute=$attribute;
|
$realAttribute=$attribute;
|
||||||
self::resolveName($model,$attribute); // strip off square brackets if any
|
self::resolveName($model,$attribute); // strip off square brackets if any
|
||||||
$htmlOptions['required']=$model->isAttributeRequired($attribute,self::$scenario);
|
$htmlOptions['required']=$model->isAttributeRequired($attribute);
|
||||||
return self::activeLabel($model,$realAttribute,$htmlOptions);
|
return self::activeLabel($model,$realAttribute,$htmlOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,24 @@
|
||||||
* @link http://www.hramov.info
|
* @link http://www.hramov.info
|
||||||
* @version 0.1
|
* @version 0.1
|
||||||
*/
|
*/
|
||||||
class UniForm extends CWidget
|
//Yii::import('zii.widgets.jui.CJuiWidget');
|
||||||
|
|
||||||
|
class UniForm extends CWidget /* or CJuiWidget */
|
||||||
{
|
{
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
|
parent::init();
|
||||||
|
|
||||||
echo CHtml::cssFile('/yaamp/ui/css/uni-form.css');
|
echo CHtml::cssFile('/yaamp/ui/css/uni-form.css');
|
||||||
// echo CHtml::scriptFile('sansspace/ui/js/uni-form.jquery.js');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
$cs = Yii::app()->getClientScript();
|
||||||
|
$cs->registerCoreScript("jquery");
|
||||||
|
$cs->registerCoreScript("jquery.ui");
|
||||||
|
$cs->registerScriptFile('/yaamp/ui/js/uni-form.jquery.js', CClientScript::POS_END);
|
||||||
|
|
||||||
CHtml::$requiredCss = '';
|
CHtml::$requiredCss = '';
|
||||||
CHtml::$afterRequiredLabel='';
|
CHtml::$afterRequiredLabel='';
|
||||||
CHtml::$beforeRequiredLabel='<em>*</em> ';
|
CHtml::$beforeRequiredLabel='<em>*</em> ';
|
||||||
|
|
|
@ -4,7 +4,7 @@ if (!$coin) return;
|
||||||
|
|
||||||
$this->pageTitle = $coin->name." block explorer";
|
$this->pageTitle = $coin->name." block explorer";
|
||||||
|
|
||||||
$txid = getparam('txid');
|
$txid = getparam('txid', 'tssssssss');
|
||||||
|
|
||||||
echo <<<ENDJS
|
echo <<<ENDJS
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -25,6 +25,8 @@ $since = arraySafeVal($_REQUEST,'since', time() - (7*24*3600)); // one week
|
||||||
|
|
||||||
echo '<div id="main_actions">';
|
echo '<div id="main_actions">';
|
||||||
|
|
||||||
|
app()->clientScript->registerCoreScript('jquery.ui'); // dialog
|
||||||
|
|
||||||
/*
|
/*
|
||||||
echo "<br><a href='/site/makeconfigfile?id=$coin->id'><b>MAKE CONFIG & START</b></a>";
|
echo "<br><a href='/site/makeconfigfile?id=$coin->id'><b>MAKE CONFIG & START</b></a>";
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ echo getAdminSideBarLinks();
|
||||||
|
|
||||||
echo " - <a href='/site/coin?id={$coin->id}'>{$coin->name}</a><br/>";
|
echo " - <a href='/site/coin?id={$coin->id}'>{$coin->name}</a><br/>";
|
||||||
|
|
||||||
//include "current.php";
|
|
||||||
$this->widget('UniForm');
|
$this->widget('UniForm');
|
||||||
|
|
||||||
echo CUFHtml::beginForm();
|
echo CUFHtml::beginForm();
|
||||||
|
|
|
@ -131,7 +131,7 @@ function graph_price_data(data)
|
||||||
tooltipContentEditor: function(str, seriesIndex, pointIndex, jqPlot) {
|
tooltipContentEditor: function(str, seriesIndex, pointIndex, jqPlot) {
|
||||||
var pt = jqPlot.series[seriesIndex].data[pointIndex];
|
var pt = jqPlot.series[seriesIndex].data[pointIndex];
|
||||||
var dt = new Date(0+pt[0]);
|
var dt = new Date(0+pt[0]);
|
||||||
var date = $.datepicker.formatDate('dd M yy', dt);
|
var date = $.jsDate.strftime(dt, '%d %b');
|
||||||
var time = $.jsDate.strftime(dt, '%H:%M');
|
var time = $.jsDate.strftime(dt, '%H:%M');
|
||||||
return date+' '+time+' '+ t.labels[seriesIndex] + '<br/>' + pt[1]+' {$refSymbol}';
|
return date+' '+time+' '+ t.labels[seriesIndex] + '<br/>' + pt[1]+' {$refSymbol}';
|
||||||
},
|
},
|
||||||
|
@ -146,7 +146,7 @@ function graph_price_data(data)
|
||||||
for (var i=0; i < x2ticks.length; i++) {
|
for (var i=0; i < x2ticks.length; i++) {
|
||||||
if (i % tickInterval == 0) {
|
if (i % tickInterval == 0) {
|
||||||
var dt = new Date(0+x2ticks[i].value);
|
var dt = new Date(0+x2ticks[i].value);
|
||||||
day = '<b>'+$.datepicker.formatDate('dd M', dt)+'</b>';
|
day = '<b>'+$.jsDate.strftime(dt, '%#d %b')+'</b>';
|
||||||
if (x2ticks.length > 500 && day == lastDay) label = '';
|
if (x2ticks.length > 500 && day == lastDay) label = '';
|
||||||
else label = (day == lastDay) ? $.jsDate.strftime(dt, '%H:%M') : day;
|
else label = (day == lastDay) ? $.jsDate.strftime(dt, '%H:%M') : day;
|
||||||
lastDay = day;
|
lastDay = day;
|
||||||
|
@ -211,7 +211,7 @@ function graph_balance_data(data)
|
||||||
tooltipContentEditor: function(str, seriesIndex, pointIndex, jqPlot) {
|
tooltipContentEditor: function(str, seriesIndex, pointIndex, jqPlot) {
|
||||||
var pt = jqPlot.series[seriesIndex].data[pointIndex];
|
var pt = jqPlot.series[seriesIndex].data[pointIndex];
|
||||||
var dt = new Date(0+pt[0]);
|
var dt = new Date(0+pt[0]);
|
||||||
var date = $.datepicker.formatDate('dd M yy', dt);
|
var date = $.jsDate.strftime(dt, '%d %b');
|
||||||
var time = $.jsDate.strftime(dt, '%H:%M');
|
var time = $.jsDate.strftime(dt, '%H:%M');
|
||||||
return date+' '+time+' '+ t.labels[seriesIndex] + '<br/>' + pt[1]+' {$coin->symbol}';
|
return date+' '+time+' '+ t.labels[seriesIndex] + '<br/>' + pt[1]+' {$coin->symbol}';
|
||||||
},
|
},
|
||||||
|
@ -226,7 +226,7 @@ function graph_balance_data(data)
|
||||||
for (var i=0; i < x2ticks.length; i++) {
|
for (var i=0; i < x2ticks.length; i++) {
|
||||||
if (i % tickInterval == 0) {
|
if (i % tickInterval == 0) {
|
||||||
var dt = new Date(0+x2ticks[i].value);
|
var dt = new Date(0+x2ticks[i].value);
|
||||||
day = '<b>'+$.datepicker.formatDate('dd M', dt)+'</b>';
|
day = '<b>'+$.jsDate.strftime(dt, '%#d %b')+'</b>';
|
||||||
if (x2ticks.length > 500 && day == lastDay) label = '';
|
if (x2ticks.length > 500 && day == lastDay) label = '';
|
||||||
else label = (day == lastDay) ? $.jsDate.strftime(dt, '%H:%M') : day;
|
else label = (day == lastDay) ? $.jsDate.strftime(dt, '%H:%M') : day;
|
||||||
lastDay = day;
|
lastDay = day;
|
||||||
|
@ -239,4 +239,4 @@ function graph_balance_data(data)
|
||||||
</script>
|
</script>
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// JavascriptReady("$(window).resize(graph_resized);");
|
// JavascriptReady("$(window).resize(graph_resized);");
|
||||||
|
|
|
@ -17,14 +17,14 @@ $count = $count? $count: 50;
|
||||||
WriteBoxHeader("Last $count Blocks ($algo)");
|
WriteBoxHeader("Last $count Blocks ($algo)");
|
||||||
|
|
||||||
$criteria = new CDbCriteria();
|
$criteria = new CDbCriteria();
|
||||||
$criteria->condition = "blocks.category NOT IN ('stake','generated')";
|
$criteria->condition = "t.category NOT IN ('stake','generated')";
|
||||||
$criteria->condition .= " AND IFNULL(coin.visible,1)=1"; // ifnull for rental
|
$criteria->condition .= " AND IFNULL(coin.visible,1)=1"; // ifnull for rental
|
||||||
if($algo != 'all') {
|
if($algo != 'all') {
|
||||||
$criteria->condition .= " AND blocks.algo=:algo";
|
$criteria->condition .= " AND t.algo=:algo";
|
||||||
$criteria->params = array(':algo'=>$algo);
|
$criteria->params = array(':algo'=>$algo);
|
||||||
}
|
}
|
||||||
$criteria->limit = $count;
|
$criteria->limit = $count;
|
||||||
$criteria->order = 'blocks.time DESC';
|
$criteria->order = 't.time DESC';
|
||||||
$db_blocks = getdbolistWith('db_blocks', 'coin', $criteria);
|
$db_blocks = getdbolistWith('db_blocks', 'coin', $criteria);
|
||||||
|
|
||||||
echo "<table class='dataGrid2'>";
|
echo "<table class='dataGrid2'>";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('framework-1.0.8/yii.php');
|
//require_once('framework-1.0.8/yii.php');
|
||||||
|
require_once('framework-1.1.17/yii.php');
|
||||||
require_once('yaamp/include.php');
|
require_once('yaamp/include.php');
|
||||||
|
|
||||||
$app = Yii::createWebApplication('yaamp/config.php');
|
$app = Yii::createWebApplication('yaamp/config.php');
|
||||||
|
|
|
@ -3,9 +3,8 @@
|
||||||
*
|
*
|
||||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||||
* @link http://www.yiiframework.com/
|
* @link http://www.yiiframework.com/
|
||||||
* @copyright Copyright © 2008 Yii Software LLC
|
* @copyright 2008-2010 Yii Software LLC
|
||||||
* @license http://www.yiiframework.com/license/
|
* @license http://www.yiiframework.com/license/
|
||||||
* @version $Id: jquery.yii.js 1289 2009-08-06 15:33:57Z qiang.xue $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($) {
|
;(function($) {
|
||||||
|
@ -20,12 +19,16 @@ $.yii = {
|
||||||
f.style.display = 'none';
|
f.style.display = 'none';
|
||||||
element.parentNode.appendChild(f);
|
element.parentNode.appendChild(f);
|
||||||
f.method = 'POST';
|
f.method = 'POST';
|
||||||
};
|
}
|
||||||
if (typeof url == 'string' && url != '') {
|
if (typeof url == 'string' && url != '') {
|
||||||
f.action = url;
|
f.action = url;
|
||||||
};
|
}
|
||||||
|
if (element.target != null) {
|
||||||
|
f.target = element.target;
|
||||||
|
}
|
||||||
|
|
||||||
var inputs = [];
|
var inputs = [];
|
||||||
jQuery.each(params, function(name, value) {
|
$.each(params, function(name, value) {
|
||||||
var input = document.createElement("input");
|
var input = document.createElement("input");
|
||||||
input.setAttribute("type", "hidden");
|
input.setAttribute("type", "hidden");
|
||||||
input.setAttribute("name", name);
|
input.setAttribute("name", name);
|
||||||
|
@ -34,11 +37,15 @@ $.yii = {
|
||||||
inputs.push(input);
|
inputs.push(input);
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(f).trigger('submit');
|
// remember who triggers the form submission
|
||||||
|
// this is used by jquery.yiiactiveform.js
|
||||||
|
$(f).data('submitObject', $(element));
|
||||||
|
|
||||||
for (input in inputs) {
|
$(f).trigger('submit');
|
||||||
f.removeChild(inputs[input]);
|
|
||||||
}
|
$.each(inputs, function() {
|
||||||
|
f.removeChild(this);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,10 @@ echo CHtml::cssFile('/yaamp/ui/css/main.css');
|
||||||
echo CHtml::cssFile('/yaamp/ui/css/table.css');
|
echo CHtml::cssFile('/yaamp/ui/css/table.css');
|
||||||
//echo CHtml::scriptFile('/yaamp/ui/js/jquery.tablesorter.js');
|
//echo CHtml::scriptFile('/yaamp/ui/js/jquery.tablesorter.js');
|
||||||
|
|
||||||
echo CHtml::scriptFile('/extensions/jquery/js/jquery-1.8.3-dev.js');
|
//echo CHtml::scriptFile('/extensions/jquery/js/jquery-1.8.3-dev.js');
|
||||||
echo CHtml::scriptFile('/extensions/jquery/js/jquery-ui-1.9.1.custom.min.js');
|
//echo CHtml::scriptFile('/extensions/jquery/js/jquery-ui-1.9.1.custom.min.js');
|
||||||
|
|
||||||
|
$cs = app()->getClientScript();
|
||||||
|
$cs->registerCoreScript('jquery.ui');
|
||||||
|
|
||||||
echo "</head>";
|
echo "</head>";
|
||||||
|
|
|
@ -28,8 +28,13 @@ echo CHtml::cssFile("/extensions/jquery/themes/ui-lightness/jquery-ui.css");
|
||||||
echo CHtml::cssFile('/yaamp/ui/css/main.css');
|
echo CHtml::cssFile('/yaamp/ui/css/main.css');
|
||||||
echo CHtml::cssFile('/yaamp/ui/css/table.css');
|
echo CHtml::cssFile('/yaamp/ui/css/table.css');
|
||||||
|
|
||||||
echo CHtml::scriptFile('/extensions/jquery/js/jquery-1.8.3-dev.js');
|
//echo CHtml::scriptFile('/extensions/jquery/js/jquery-1.8.3-dev.js');
|
||||||
echo CHtml::scriptFile('/extensions/jquery/js/jquery-ui-1.9.1.custom.min.js');
|
//echo CHtml::scriptFile('/extensions/jquery/js/jquery-ui-1.9.1.custom.min.js');
|
||||||
|
|
||||||
|
$cs = app()->getClientScript();
|
||||||
|
$cs->registerCoreScript('jquery.ui');
|
||||||
|
//$cs->registerScriptFile('/yaamp/ui/js/jquery.tablesorter.js', CClientScript::POS_END);
|
||||||
|
|
||||||
echo CHtml::scriptFile('/yaamp/ui/js/jquery.tablesorter.js');
|
echo CHtml::scriptFile('/yaamp/ui/js/jquery.tablesorter.js');
|
||||||
|
|
||||||
// if(!controller()->admin)
|
// if(!controller()->admin)
|
||||||
|
|
|
@ -14,7 +14,8 @@ defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
|
||||||
|
|
||||||
defined('YII_DEBUG') or define('YII_DEBUG',true);
|
defined('YII_DEBUG') or define('YII_DEBUG',true);
|
||||||
|
|
||||||
require_once('framework-1.0.8'.'/yii.php');
|
//require_once('framework-1.0.8'.'/yii.php');
|
||||||
|
require_once('framework-1.1.17'.'/yii.php');
|
||||||
|
|
||||||
if(isset($config))
|
if(isset($config))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue