This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.action-success { | |
position: absolute; | |
z-index: 1000; | |
color: green; | |
border: 1px dashed green; | |
background-color: rgba(255,255,255,0.5); | |
font-size: 14px; | |
padding: 2px 4px; | |
border-radius: 8px; | |
text-align: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RegExp.escape = function (text) { | |
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); | |
} | |
if (!Math.sqr) { | |
Math.sqr = function (x) { | |
return x * x; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Autoload that works only with _ namespace | |
if (!spl_autoload_register(function ($class) { | |
if (substr($class, 0, 2) !== '_\\') | |
return; | |
$class = (string)str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 2)); | |
$file = ROOT_PATH . '/_core/' . $class . '.php'; | |
if (file_exists($file)) | |
include $file; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Router: | |
R::route('GET|POST', '/ajax', '\_\web\Ajax::processAjaxCall'); | |
# Handler method: | |
static function processAjaxCall() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace _\lang; | |
trait Classes | |
{ | |
static function fullClassName() | |
{ | |
return __CLASS__; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# API ACCESS | |
* Access Point: http://affiliatex.com/api | |
* All fields must be passed in POST variables; GET variables will be ignored. | |
* You will have to retrieve a secret key in order to use AffiliateX API. | |
# API RESPONSE FORMAT | |
The response will be always JSON-encoded. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace _\integrations; | |
use _\Curl; | |
use _\lang\Arr; | |
use _\lang\Lazy; | |
use RuntimeException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace _\lang; | |
use ReflectionFunction; | |
use RuntimeException; | |
/** | |
* Trait Lazy | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ActiveActsBranch() | |
{ | |
// { actTypes: ..., searchTree: ... } | |
var meta = null | |
this.load = function(callback) | |
{ | |
if (typeof activeActsBranchTimestamp !== "undefined" && activeActsBranchTimestamp && $.jStorage.storageAvailable()) | |
{ | |
var savedTimestamp = $.jStorage.get('activeActsBranchTimestamp', null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function AjaxItems($container, config) { | |
var defaultOpts = { | |
textNoItems: "Не знайдено", | |
removalActionClass: "actionRemove", | |
removalDialog: function(el) { return confirm('Видалити?') }, | |
showNoItems: function($container, message) { | |
$container.empty().append( $div().text(message) ) | |
}, | |
// If you want item removal to be handled, add an element with class .actionRemove (or another specified in removalActionClass option) | |
itemDom: function(el) { |
OlderNewer