mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 09:27: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/
|
||||
bin/blocknotif
|
||||
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(
|
||||
'js'=>array('jui/js/jquery-ui.min.js'),
|
||||
// 'js'=>array('/extensions/jquery/js/jquery-ui-1.9.1.custom.min.js'),
|
||||
'depends'=>array('jquery'),
|
||||
),
|
||||
'bgiframe'=>array(
|
||||
|
|
|
@ -75,7 +75,7 @@ class CheckupCommand extends CConsoleCommand
|
|||
{
|
||||
$root = $this->basePath;
|
||||
|
||||
//self::isDirWritable("$root/protected/data/.");
|
||||
self::isDirWritable("$root/assets/.");
|
||||
self::isDirWritable("$root/yaamp/runtime/.");
|
||||
self::isDirWritable(YAAMP_LOGS."/.");
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class CUFHtml extends CHtml
|
|||
{
|
||||
$realAttribute=$attribute;
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,16 +6,24 @@
|
|||
* @link http://www.hramov.info
|
||||
* @version 0.1
|
||||
*/
|
||||
class UniForm extends CWidget
|
||||
//Yii::import('zii.widgets.jui.CJuiWidget');
|
||||
|
||||
class UniForm extends CWidget /* or CJuiWidget */
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
echo CHtml::cssFile('/yaamp/ui/css/uni-form.css');
|
||||
// echo CHtml::scriptFile('sansspace/ui/js/uni-form.jquery.js');
|
||||
}
|
||||
|
||||
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::$afterRequiredLabel='';
|
||||
CHtml::$beforeRequiredLabel='<em>*</em> ';
|
||||
|
|
|
@ -4,7 +4,7 @@ if (!$coin) return;
|
|||
|
||||
$this->pageTitle = $coin->name." block explorer";
|
||||
|
||||
$txid = getparam('txid');
|
||||
$txid = getparam('txid', 'tssssssss');
|
||||
|
||||
echo <<<ENDJS
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -25,6 +25,8 @@ $since = arraySafeVal($_REQUEST,'since', time() - (7*24*3600)); // one week
|
|||
|
||||
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>";
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ echo getAdminSideBarLinks();
|
|||
|
||||
echo " - <a href='/site/coin?id={$coin->id}'>{$coin->name}</a><br/>";
|
||||
|
||||
//include "current.php";
|
||||
$this->widget('UniForm');
|
||||
|
||||
echo CUFHtml::beginForm();
|
||||
|
|
|
@ -131,7 +131,7 @@ function graph_price_data(data)
|
|||
tooltipContentEditor: function(str, seriesIndex, pointIndex, jqPlot) {
|
||||
var pt = jqPlot.series[seriesIndex].data[pointIndex];
|
||||
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');
|
||||
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++) {
|
||||
if (i % tickInterval == 0) {
|
||||
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 = '';
|
||||
else label = (day == lastDay) ? $.jsDate.strftime(dt, '%H:%M') : day;
|
||||
lastDay = day;
|
||||
|
@ -211,7 +211,7 @@ function graph_balance_data(data)
|
|||
tooltipContentEditor: function(str, seriesIndex, pointIndex, jqPlot) {
|
||||
var pt = jqPlot.series[seriesIndex].data[pointIndex];
|
||||
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');
|
||||
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++) {
|
||||
if (i % tickInterval == 0) {
|
||||
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 = '';
|
||||
else label = (day == lastDay) ? $.jsDate.strftime(dt, '%H:%M') : day;
|
||||
lastDay = day;
|
||||
|
|
|
@ -17,14 +17,14 @@ $count = $count? $count: 50;
|
|||
WriteBoxHeader("Last $count Blocks ($algo)");
|
||||
|
||||
$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
|
||||
if($algo != 'all') {
|
||||
$criteria->condition .= " AND blocks.algo=:algo";
|
||||
$criteria->condition .= " AND t.algo=:algo";
|
||||
$criteria->params = array(':algo'=>$algo);
|
||||
}
|
||||
$criteria->limit = $count;
|
||||
$criteria->order = 'blocks.time DESC';
|
||||
$criteria->order = 't.time DESC';
|
||||
$db_blocks = getdbolistWith('db_blocks', 'coin', $criteria);
|
||||
|
||||
echo "<table class='dataGrid2'>";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?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');
|
||||
|
||||
$app = Yii::createWebApplication('yaamp/config.php');
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @link http://www.yiiframework.com/
|
||||
* @copyright Copyright © 2008 Yii Software LLC
|
||||
* @copyright 2008-2010 Yii Software LLC
|
||||
* @license http://www.yiiframework.com/license/
|
||||
* @version $Id: jquery.yii.js 1289 2009-08-06 15:33:57Z qiang.xue $
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
@ -20,12 +19,16 @@ $.yii = {
|
|||
f.style.display = 'none';
|
||||
element.parentNode.appendChild(f);
|
||||
f.method = 'POST';
|
||||
};
|
||||
}
|
||||
if (typeof url == 'string' && url != '') {
|
||||
f.action = url;
|
||||
};
|
||||
}
|
||||
if (element.target != null) {
|
||||
f.target = element.target;
|
||||
}
|
||||
|
||||
var inputs = [];
|
||||
jQuery.each(params, function(name, value) {
|
||||
$.each(params, function(name, value) {
|
||||
var input = document.createElement("input");
|
||||
input.setAttribute("type", "hidden");
|
||||
input.setAttribute("name", name);
|
||||
|
@ -34,11 +37,15 @@ $.yii = {
|
|||
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.removeChild(inputs[input]);
|
||||
}
|
||||
$(f).trigger('submit');
|
||||
|
||||
$.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::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-ui-1.9.1.custom.min.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');
|
||||
|
||||
$cs = app()->getClientScript();
|
||||
$cs->registerCoreScript('jquery.ui');
|
||||
|
||||
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/table.css');
|
||||
|
||||
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-1.8.3-dev.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');
|
||||
|
||||
// if(!controller()->admin)
|
||||
|
|
|
@ -14,7 +14,8 @@ defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
|
|||
|
||||
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))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue