Giter VIP home page Giter VIP logo

atk4-addons's Introduction

Agile Toolkit - Web UI Toolkit

Join the chat at https://gitter.im/atk4/atk4

Agile Toolkit is a Web UI framework and collection of usable widgets. It allows you to develop rich web applications by writing only PHP code. Agile Toolkit is inspired by Desktop GUI Toolkits and is a fully-object oriented development environment.

Overview

Agile Toolkit has introduced three new principles in web development:

  • A Complete UI solution for PHP developers
  • Unique integration between jQuery events and chains and PHP
  • Innovative Object Relational Manager with support for joins, sub-selects and expression abstraction.

All the features are delivered in a unique close-coupled environment - Similarly to Cocoa or Qt - all objects of Agile Toolkit are based off one common ancestor and are constructed under the guidance of the top-level Application object.

Installing

To start a new web application in Agile Toolkit, download a bundle from http://agiletoolkit.org/ and follow instructions. Alternatively, if you are a very hardcore developer, add the following code inside your composer.json file:

"require": {
    "atk4/atk4": "4.3.*@dev"
}

Example

To help you understand some key principles of Agile Toolkit, copy the following example into page/index.php and place inside the init() method.

Message to Romans

Source:

$form = $this->add('Form');
$form->addField('line', 'subject')->validateNotNull();
$form->addField('password','password');
$form->addSubmit();

if ($form->isSubmitted()) {
    $this->js()->univ()
        ->dialogOK('Hello World','Subject: '.$form['subject'])
        ->execute();
}

Congratulations. You have now created a fully AJAX / PHP form, fully protected from SQL / HTML / JS injection, based on jQuery UI theme and Bootstrap-compatible 12-column flexible grid system.

License

Agile Toolkit is distributed under MIT License.

Your support will ensure the longevity of Agile Toolkit

atk4-addons's People

Contributors

agilestas avatar borderlessnomad avatar cordje avatar darkside666 avatar gowrav-vishwakarma avatar herizo avatar jancha avatar kgordeev avatar oleksiiostapets avatar qambar avatar romaninsh avatar si4dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atk4-addons's Issues

Drilldown field don't save values on POST

atk4-addons / misc / lib / Form / Field / drilldown.php

Line 52 should be changed from

return $res+$this->drill($m);
to
return $this->value_list = $res+$this->drill($m);
otherwise $this->value_list don't get correct values set and field validation gives and error.

ATK4Addons.php - what's this?

What is this file in root of addons? I believe it's not needed because it's not implemented and not used anywhere.

autocomplete not working

This code

$f=$this->add('Form');
$name=$f->addField('autocomplete','name','Contact')->setModel('Contact');
$f->getElement('name')->js('change',$f->js()->submit());

Results in

Exception_Logic

Method is not defined for this object

Additional information:

class: Form_Field_autocomplete
method: allowAdd
arguments: Array ( )

Comment_cnt instead of comment_cnt

BaseException

Model field was not loaded

Additional information:

Raised by object: Object Model_Comment(elexu_forum_discussion_view_commenttree_model_comment)
id: 14
field: Comment_cnt

ref 31 is not solved still: reopen

the above code do not work also:

sql looks like this: select SQL_CALC_FOUND_ROWS name,(select name from region where region.region_id = region.id ) region,id,region_id from region order by (select name from region where region.region_id = region.id ) limit 0, 25 []

my code:

class Model_Region extends Model_Table {
public $table='region';
function init(){
parent::init();
$this->addField('name')->mandatory('true');
$this->hasOne('Region_Parent','region_id');
}
}

class Model_Region_Parent extends Model_Region {
public $alias='region_parent';
}

class page_region extends Page {
function init(){
parent::init();
$crud=$this->add('CRUD');
$model = $crud->setModel('Model_Region');
$model->debug();
if($crud->grid){
$crud->grid->addPaginator();
$crud->grid->getColumn('name')->makeSortable();
$crud->grid->getColumn('region')->makeSortable();
$crud->grid->addQuickSearch(array('region','name'));
}
}
}

ModelGenerator.php error

Issue by fatnjazzy
Thursday Aug 08, 2013 at 17:40 GMT
Originally opened as atk4/atk4#389


Missing argument 1 for Page_ModelGenerator::findModels(), called in C:\projects\wamp\atk4\atk4-addons\mvc\Page\ModelGenerator.php on line 15 and defined

findModels signature is:
function findModels($dir, &$models, $prefix = null);

but you call it like this:
$this->findModels();

ModelGenerator does not work

I am trying to use agile tookit model generator. As described in the documentation I am deriving my page class from Page_ModelGenerator: My page is defined like this

<?php
class page_ModelGeneratorAre extends Page_ModelGenerator {
}

But I am getting the following error:

/volume1/web/sportin/atk4-addons/mvc/Page/ModelGenerator.php:55 [2] Missing argument 1 for Page_ModelGenerator::findModels(), called in /volume1/web/sportin/atk4-addons/mvc/Page/ModelGenerator.php on line 15 and defined
/volume1/web/sportin/atk4-addons/mvc/Page/ModelGenerator.php:55 [2] Missing argument 2 for Page_ModelGenerator::findModels(), called in /volume1/web/sportin/atk4-addons/mvc/Page/ModelGenerator.php on line 15 and defined
Application Error: Method is not defined for this object

Exception_Logic, code: 0

Additional information:

class: DB
method: getAll
arguments:
0: show tables
/volume1/web/sportin/atk4/lib/AbstractObject.php:783

Warning! Potential security vulnerability and data loss.

addons/mvc/lib/Model/Table.php

we have method there
function dsql($instance=null,$select_mode=true,$entity_code=null)

if one wants to use $model->dsql() and then perform non-select
operation (e.g. do_delete()), false should be set as first param, as else tables are appended with table aliases and thus create illegal sql query.

$dq = $model->dsql(null, false);

now, if you previously in the model initialisation had used

$this->setMasterField($field, $value) //e.g. "user", "1"

and then if you have a method, which is performing cleanup in following
way:

$dq->do_delete(); //assuming, that setMasterField is there

then you will have delete operation performed WITHOUT master field conditions.

if $select_mode is set to false, then conditions to dsql are not
applied. thus do_delete would clean up all records in the db :)

this is what happened in the test environment in gradpool. so not big
deal, but just be informed that setMasterField is dangerous!!!

potential solution:

  1. add new method
    function applyMasterConditions($dq){
    if ($this->init_where){
    foreach ($this->init_where as $k => $v){
    $dq->where($k, $v);
    }
    }
    return $dq;
    }
  2. if you are using $model->dsql(null, false), then either inside function new_dsql() automate execution of applyMasterConditions, or add to manual to execute this manually. Obviously, if we have "Secure by default", this should happen automatically.

AgileToolkit OAuth add-on error 500 at facebook's mobile site

Reported here:
http://stackoverflow.com/questions/16451460/agiletoolkit-oauth-add-on-error-500-at-facebooks-mobile-site

Description:

I am using the OAuth Facebook controller add-on for ATK4.

  • It works as expected when authenticating with Facebook from a regular desktop browser.
  • It works when authenticating using a mobile browser that is telling face book that it's a desktop browser.
  • It does not work when Facebook detects a mobile browser and redirects to m.facebook.com/dialog/oath.

What's more, is that it works fine for signups from mobile browsers (ie, when Facebook asks the user to give permission to the app).

The login flow stops with an Error 500 at: https://m.facebook.com/dialog/oauth?redirect_uri={my_url_encoded_landing_page_where_the_OAuth_controller_lives}&scope=email&client_id={fb_app_id}

What the hell is going on here? There isn't some difference between the Facebook mobile service and the regular one that the addon isn't taking care of, or is there?

highChard doesn't work

i've tried to use the example code in ui.highcharts.js, but i've received a blank page. The JS libraries are correctly acquired (i see an highchart.com link on the bottom of the blank graph).

model with recursive reference does not work

CRUD displays a table where region field is not visible. Create new and update works, only list is not working properly

class Model_Region extends Model_Table {
    public $entity_code='region';
    function init(){
        parent::init();
        $this->addField('name')->mandatory('true');
        $this->hasOne('Region');
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.