Giter Club home page Giter Club logo

atk's People

Contributors

andreacattaneo avatar dalers avatar dangamba avatar ematrive avatar filippo597 avatar michelerota avatar ngjata avatar phrozenbyte avatar sanotto avatar wayneh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atk's Issues

How do we get started with ATK 9.2?

Thank you so much for the release of ATK 9.2!!!
The addition of AdminLte is a much welcomed component to ATK.
I migrated all my modules last year from ATK 6 to ATK 9.0 and it was a very involved but worthy effort.

I'm wondering about the process to upgrade from 9.0 to 9.2.
I looked at the CHANGES files of both and they're identical. Github shows that there are over 700,000 lines added to the latest release. When I downloaded the files from , I see the "src" directory.

Is the "src" directory shown in ATK 9.2 expected to be a straight replacement for "vendor/sintattica/atk/src" of ATK 9.0?

Where is the ATK 9.1 installation guide?

At some point last year, there was an installation guide for ATK 9.1 somewhere in here. I found it very useful to migrate from ATK 6 to ATK 9.1. For some reason I can't find it anymore. Any ideas where I could find a reference to it?

Change legacy reference in DataGrid

on vendor/sintattica/atk/src/DataGrid/DataGrid.php
    line 480

    replace:

        $this->addComponent('index', 'atk.datagrid.atkdgindex');
    with:
        $this->addComponent('index', __NAMESPACE__ . '\\DataGridIndex');

Pop-up Calendar on Date Fields not working

When using the AF_DATE_STRING flag, the Pop-up calendar doesn't show.
The problem is that the javascript that shows the calendar

onclick="return showCalendar('fecha_de_cierre[date]', 'fecha_de_cierre[date]', 'dd/mm/y', false, false);"
is using the "Name" attribute and it should be using the id attribute in order to specify the element.
The code uses:
onclick="return showCalendar('fecha_de_cierre[date]', 'fecha_de_cierre[date]', 'dd/mm/y', false, false);" type="button">

Refering to this element:
<input id="Ctacte_Maestro_fecha_de_cierre" class="atkdateattribute form-control" name="fecha_de_cierre[date]" value="" size="10" type="text">
The code should be:

onclick="return showCalendar('Ctacte_Maestro_fecha_de_cierre', 'Ctacte_Maestro_fecha_de_cierre', 'dd/mm/y', false, false);" type="button">
The compromised code is in Attributes/DateAttribute in method "draw"

Archiving of the @atkphpframework organization

Hi,

just want to let you guys know that I've just archived the @atkphpframework organization (I was in some sort of an tidying spree 😆). All repos of the @atkphpframework organization got archived and I asked the GitHub support to create an redirect from the "original" atkphpframework/atk repo to your repo. By doing so the fork connection got removed and Sintattica/atk is now the root of its own network. Together with large deprecation notices in the archived @atkphpframework repos I hope that all remaining users of the ATK Framework are redirected directly to you guys. This is just for your interest, you don't have to do anything 👍

Keep up the great work you do, I wish you all the best! ❤️

Greetings,
Daniel

PolymorphicOneToOneRelation default node handling problem

In PloymorphicOneToOneRelation the load method allway "builds" the destination URI, when the discriminator field is empty this leads to a URI in the form "module." (i.e. missing the node name).
When the field is empty it should direct you to the default node specified in the Class Creator.
The correct code for the load methos should be:

/**
     * Retrieve detail records from the database.
     *
     * Called by the framework to load the detail records.
     *
     * @param Db $db The database used by the node.
     * @param array $record The master record
     * @param string $mode The mode for loading (admin, select, copy, etc)
     *
     * @return array Sets the destination from the record and
     *               return the atkonetoone load function
     */
    public function load($db, $record, $mode)
    {
        if (!empty($record[$this->m_typefk][$this->m_discriminatorfield]))
        {
            $this->m_destination = $this->m_modulename.'.'.$record[$this->m_typefk][$this->m_discriminatorfield];
            $this->m_destInstance = $this->m_modulename.'.'.$record[$this->m_typefk][$this->m_discriminatorfield];
        }

        return parent::load($db, $record, $mode);
    }

ATK skeleton for 9.9.9

Hi,

I used ATK in the past (and I even fixed some bugs to use MSSQL as a database).

Now I would try it again, but I wish to start from the latest version (9.9.9).

Is it possible to have an atk-skeleton for that version?

Multilingual attributes, document templates and MetaNodes disappeared ?

Hello,

I've updated the atkdemo to a new demo for Atk9. I hit some regressions in Atk9, so I proposed patches (1, 2, 3 & 4)

But I was not able to reproduce lesson6 of the original demo (which was about MetaNodes, Nodes that get their Attributes based on the columns of the corresponding table, table name being guessed based on Node name), lesson7 (part with opendocument templates) and lesson8 (about Internationalization inside the database - row-based and column-based). These functionality disappeared ? If not, how to use them ?

Thanks for your wonderful work on Atk. Apart from this small difficulties, i consider atk9demo to be ready now. Would it be possible for you to take over it, or add a link into the documentation of Atk (or readme.md), after a review (as a beginner, I may not have done things "the right way") ? Thanks!

Update addToListArrayHeader in AggregatedColumn to match parent's definition

In:

atk/src/Attributes/AggregatedColumn.php

Update the following to match parent's definition:

public function addToListArrayHeader($action, &$arr, $fieldprefix, $flags, $atksearch, $atkorderby)

add:

use Sintattica\Atk\DataGrid\DataGrid;

Change to this:
public function addToListArrayHeader($action, &$arr, $fieldprefix, $flags, $atksearch, $atkorderby, DataGrid $grid = null, $column = '*')

atk 9 render table

we are migrating an application from atk 6 to atk 9, we have did most of the changes but one its difficult to resolve. in the application have many reports and we use:
$tr = &atknew("atk.utils.atktablerenderer"); $output.= $tr->render($tableData, TBL_DATA, "recordlist"); return $output;
to create an html table, we try this on atk 9 but dosen't work:
$tr = new Ui(); $output .= $tr->renderList($tableData,'utenti'); return $output;

what wrong?
thanks

javascript function atksubmit does not work properly on chrome

The function function atkSubmit(target, standardSubmit) in formsubmit.js does not work properly on chrome (Versión 60.0.3112.113 (Build oficial) (32 bit) ) the code

    // call global submit function, which doesn't get called automatically
    // when we call entryform.submit manually.
    globalSubmit(document.entryform, standardSubmit);
    document.entryform.submit();

Should be

    // call global submit function, which doesn't get called automatically
    // when we call entryform.submit manually.
    globalSubmit(document.entryform, standardSubmit);
    //document.entryform.submit();
    var ef = document.getElementById("entryform");
    ef.submit();

Fix to add default action template to renderAction()

When confirmAction() is called with a non-default action, the system crashes. The way legacy ATK dealt with this was by using the default template "action.tlp". Below is the fix for this for ATK 9.1+:

File: vendor/sintattica/atk/src/Ui/Ui.php

public function renderAction($action, $vars, $module = '')
{
    // Start: Added by Jorge Garifuna from legacy ATK and using "$this->m_smarty->templateExists" instead of "$this->m_theme->tplPath"
    $tpl = "action_$action.tpl";
    if (!$this->m_smarty->templateExists($tpl)) // no specific theme for this action
    {
        $tpl = "action.tpl";
    }

    // old code: return $this->render("action_$action.tpl", $vars, $module);
    return $this->render($tpl, $vars, $module);
}

FilEditor.php is not functional

Function select returns an array instead of a selector.
A new FileEditorSelector inheriting selector wiht getAllRows, getRowsCount overloaded is needed to make the class function properly.
Utils.zip

Proposal, add new node flag NF_ADD_BUTTON

Similar to NF_ADD_LINK but renders a Button.
Implementation sugestions:
-Rename AF_NODE_SPECIFIC5 to NF_ADD_BUTTON (The NF_SPECIFIC* are only used in TreeNode only to NF_SPECIFIC4, so 5 is unused)

In Admin Handler's renderAdminPages Method:

 public function renderAdminPage()
    {
        $res = [];
        if ($this->m_node->hasFlag(Node::NF_NO_ADD) == false && $this->m_node->allowed('add')) {
                        if (!$this->m_node->hasFlag(Node::NF_ADD_LINK) and  !$this->m_node->hasFlag(Node::NF_ADD_BUTTON) ) { // otherwise, in adminPage, an add link will be added.
                // we could get here because of a reject.
                $record = $this->getRejectInfo();

                $res[] = $this->invoke('addPage', $record);
            }
        }
        $res[] = $this->invoke('adminPage');

        return $res;
    }```
in AdminHandler's getAddLinkMethod:

public function getAddLink()
{
$atk = Atk::getInstance();
$node = $atk->atkGetNode($this->invoke('getAddNodeType'));

    if (!$node->hasFlag(Node::NF_NO_ADD) && $node->allowed('add')) {
        $label = $node->text('link_'.$node->m_type.'_add', null, '', '', true);
        if (empty($label)) {
            // generic text
            $label = Tools::atktext('add', 'atk');
        }
        if ($node->hasFlag(Node::NF_ADD_LINK)) {
            $addurl = $this->invoke('getAddUrl', $node);
            return Tools::href($addurl, $label, SessionManager::SESSION_NESTED);
                    }
                    if ($node->hasFlag(Node::NF_ADD_BUTTON)) {
            $addurl = $this->invoke('getAddUrl', $node);
                            $label="<button type='button' class='btn btn_saveandclose atkdefaultbutton btn-primary'>".$label."</button>";
            return Tools::href($addurl, $label, SessionManager::SESSION_NESTED);
                    }



    }

    return '';
}
And in Node.php:

/**
* Specific node flag 4.
*/
const NF_SPECIFIC_4 = 268435456;

/**
 * Add Button.
 */
const NF_ADD_BUTTON = 536870912;

Fix to bug in atk/src/Relations/ManyToOneTreeRelation.php

    # in edit() method:
        # to avoid ambiguity error
        change:
            $recordset = $this->m_destInstance->select($this->m_destInstance->m_primaryKey[0])->includes($tmp2)->getAllRows(); // original

        to:
            $recordset = $this->m_destInstance->select($this->m_destInstance->getTable() . '.' . $this->m_destInstance->m_primaryKey[0])->includes($tmp2)->getAllRows(); // by Jorge Garifuna

        # to have the correct selected value in the drop down list
        change:             
            $this->m_current = $this->m_ownerInstance->primaryKey($record); // original

        to:
            $this->m_current = $this->m_ownerInstance->primaryKey($record[$this->fieldName()]); // by Jorge Garifuna

Fix to bug in DataGrid/DataGrid.php

/vendor/sintattica/atk/src/DataGrid/DataGrid.php

    line: 480
        change: 
            $this->addComponent('index', 'atk.datagrid.atkdgindex'); // original generates error

        to:
            $this->addComponent('index', __NAMESPACE__ . '\\DataGridIndex'); // by Jorge Garifuna

bootstrap theme breaks tooltips and field dependency

  1. Tooltips are broken because the relative jquery UI library is missing
  2. field dependency (addDependee, addDependency) is broken because it replace the HTML in the "TD" with the field that in bootstrap theme is empty, since the field is elsewhere (AFAIK from what i've quickly seen);

SETUP FOR Admin LTE Theme with 9.2 Version

I request guidance how to configure the theme for ark demo

I am able to install demo and work with demo but not able to get the theme set

I am running on IIS and php 7.2

My url is atkdemo.localhost

Please guide

Record Locking System

hi all, I'm wondering about the record locking system, i was involved in old atk projects and trying to learn and work on (maybe also help) your platform i cannot find any system to ensure data integrity for cuncurrent usage. thanks. PG

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.