Skip to content

Instantly share code, notes, and snippets.

View MihailoJoksimovic's full-sized avatar

Mihailo Joksimovic MihailoJoksimovic

View GitHub Profile
var store = Ext.create('Ext.data.Store', {
fields: ['extjs_state_user_data_id', 'user_id', 'name', 'value'],
autoSync: true,
proxy: {
type: 'ajax',
reader: {
type: 'json',
root: 'results'
},
writer: {
Ext.define('RfqSe.view.MaterialDetails', {
extend: 'Ext.panel.Panel',
alias: 'widget.materialdetails',
margin: '5 0',
rfq: null,
tabToOpen: 'general',
onSimulateOrdersClick: function(article) {
console.log("Simulating for article:");
console.log(article);
var me = this;
var articleId = article.get('article_id');
// First we have to load All data about article before proceeding any further.
addArticleToCart = function(articleId, quantity, opts){
var opts = opts || {},
success = opts.success || function(){},
failure = opts.failure || function(){},
callback = opts.callback || function(){},
scope = opts.scope || this;
Ext.Ajax.request({
url: p4t.rootPath + '/modules/eprocurement/Cart/addArticle',
params: {
private function getAddToCartPanel() {
$mainDiv = Ext::create('container');
$addToCartTextLabel = Ext::create('label');
$addToCartTextLabel->setText('To Cart:');
$addToCartTextLabel->setStyle('font-weight:bold; font-size: 16px; padding-left: 5px;');
$addToCartTextLabel->appendTo($mainDiv);
$addToCartButtonAndText = Ext::create('fieldcontainer');
$addToCartButtonAndText->setConfigByIndex('layout', array(
onBeforePagingPageChanges: function(pagingToolbar) {
var grid = pagingToolbar.up('grid[itemId="articlesListGrid"]');
this.storeSelectedGridRecords(grid);
},
/**
* Saves list of articles that were selected in given Grid.
*/
storeSelectedGridRecords: function(grid) {
U jeziku PHP, u objektno-orjentisanom maniru, napisati simulaciju relija Paris-Dakar. Reli
Paris-Dakar je simulacija utrke u kojoj učestvuju različita motorna vozila: automobili, kamioni i
motocikli. Svako vozilo ima svoje ime. Automobili mogu biti sportski i terenski, dok motocikli
mogu biti kros i sportske izvedbe. Rastojanje između starta i cilja iznosi 10.000 km. Maksimalna
brzina sportskih automobila iznosi 140 km/h, terenskih 100 km/h, kamiona 80 km/h, kros
dig@dev:tmp$ php test.php
Array
(
[pusis] => 1
[samo] => 1
[da!] => 1
[u] => 1
[ides] => 1
[da] => 2
[stefane] => 2
/**
* Attach a class to a server
*
* Accepts a class name to use when handling requests. Any additional
* arguments will be passed to that class' constructor when instantiated.
*
* See {@link setObject()} to set pre-configured object instances as request handlers.
*
* @param string|object $class Class name or object instance which executes
* SOAP Requests at endpoint.
this.getWebuserDetailsStore().sync({
failure: function(batch, options) {
var errorCode = this.getReader().jsonData.error_code;
switch(errorCode) {
case 11: // Duplicate email
var errorMessage = Translation.EmailAlreadyExistsPleaseUseAnother;
break;
default:
var errorMessage = Translation.AnErrorHasOccured;
break;