Giter Club home page Giter Club logo

boilerplate's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar

boilerplate's Issues

HttpCookies (Curl) raises notice when parsing cookie with keys that contain empty values

Kdyby\Extension\Curl\HttpCookies::readCookie() - když se tam dosadí něco jako "user_info=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT", vyhodí to notice, protože v reguláru to nematchne a klíč v poli neexistuje. Jestli je to podle RFC nebo není jsem nezkoumal. Řešení:

nahradit

if (!$m = Strings::matchAll($cookie, '~(?P<name>[^;=\s]+)(?:=(?P<value>[^;]+))?~i')) {

za

if (!$m = Strings::matchAll($cookie, '~(?P<name>[^;=\s]+)(?:=(?P<value>[^;]*))?~i')) {

(změna [^;]+ na [^;]*)

typo in TemplateFactory

v TemplateFactory::createTemplate() nema byt $this->getParamId() ale $presenter->getParamId()

Translator

Implement some.

  • Database based
  • Bridges that read the database, cache somehow & provide translations
    • Standard PO files
    • Bridge for CMS to group the translations for each page

BaseEntity's new behaviour disables own getters and setters

Magické metody __get() a __set() jsou fajn, jenže přidáním podpory čtení/zápisu do protected properties PŘED vlastní detekci getterů/setterů totálně pohřbilo možnost ovlivnění vlastní hodnoty property getterem nebo setterem (nebo třeba provedením validace). Věřím, že to není záměrné. Mělo by to vyřešit prohození částí kódu v __get() a __set() (netestováno).

BootstrapRenderer not compatible with Replicator

Continuation from: http://forum.nette.org/cs/12046-kdyby-replicator-nefunguje-s-kdyby-bootstraprenderer

At Kdyby/FormsBootstrapRendererExtension@bce1db2 it is possible to add/remove Replicator container but it works just 1 time (even when the inputs are all filled).

At Kdyby/FormsBootstrapRendererExtension@373b285 the BootstrapRenderer seems not to work. Following exeption is thrown: "Argument 1 passed to Kdyby\Extension\Forms\BootstrapRenderer{closure}() must be an instance of Nette\Forms\Controls\BaseControl, instance of Nette\Iterators\Filter given" at line 267

/**
 * @param \Nette\Forms\Container $container
 * @return \Iterator
 */
public function findControls(Nette\Forms\Container $container = NULL)
{
    $container = $container ?: $this->form; // line 266
    return new Filter($container->getControls(), function (Controls\BaseControl $control) { //line 267
        return !$control->getOption('rendered');
    });
}

BootstrapRenderer: group - html class

It should be there a possibility of setting class for html elements like group (which renders fieldset, now finally with id). I need it sometimes :)

$form->addDynamic does not work when it's first element in form

$form->addDynamic() does not work as expected... Use case:

for($i = 0; $i < 3; $i++) {
    $replicator = $form->addDynamic('users_' . $i, function (\Nette\ComponentModel\Container $user) {
        $user->addText('name', 'Jméno');
        $user->addText('surname', 'Příjmení');
    });
    $replicator->addSubmit('add_' . $i, 'Přidat usera ' . $i)
        ->setValidationScope(false)
        ->onClick[] = function(\Nette\Forms\Controls\SubmitButton $button) {
        $button->parent->createOne();
    };
}

Then it generates three buttons as expected. However, when clicking button with id 1 or 2 it works - when clicking the very first button, the user is visible only for the first load and does not persist.

It can be easily fixed by adding hidden input in front of the whole thing, that basically.. does nothing ;)

$form->addHidden('null');
for($i = 0; $i < 3; $i++) {
// ....

Not sure why this is happening though.

Nette-addDynamic sandbox - problem with composer instalation

I'm not sure where to put this issue, I hope it fits here.

Situation: Nette-addDynamic sandbox cloned, I run composer install, autoload files were generated. When trying to run the sandbox, all I get was white screen. No error, no error in error log, nothing.

Finally I found this - in /libs/composer/autoload_real.php I've to manually edit these lines to have Nette loader as the first one (composer generated Replicator loader on the first place):

require $vendorDir . '/nette/nette/Nette/loader.php';
require $vendorDir . '/kdyby/forms-replicator/Replicator.php';

I believe that the error came from the namespace used in Replicator, because the minimal Replicator file that broke it is

<?php

class Replicator extends \Nette\Forms\Container {
}

I tried to look in composer doc to find some clue how to influence the order, I haven't found it.

W7, PHP 5.4.6, 5.4.9, 5.3.19

Persistence: Migrations

Write own migrations, similar to Doctrine\DBAL\Migrations, but with better support for packages.

Application is inconfigurable through config.neon

Líbí se mi způsob použití Application v bootstrapu, takže se "inspiruju"... narazil jsem na problém - při použití injectu samotné Application do DI kontejneru neproběhne jakékoliv nastavení použité v config.neon, takže se nezaregistrují debug bar panely a nenastaví se případné catchExceptions / errorPresenter. Zatím to řeším takhle, ale nelíbí se mi to:

// Application.php
self::$instance = $this;
$container = $this->configurator->getContainer();
$container->addService('application', $this);
$container->avalon->createApplication();

// CompilerExtension
$application = $container->addDefinition($this->prefix('application'))
    ->setClass('Avalon\Application\Application')
    ->setFactory('Avalon\Application\Application::getInstance')
    ->setShared(FALSE);

$application->setup = $container->getDefinition('application')->setup;

Výsledný SystemContainer to vygeneruje cca takovýto (stejné setupy u createServiceApplication i mé vlastní továrničky):

/**
 * @return Nette\Application\Application
 */
protected function createServiceApplication()
{
    $service = new Nette\Application\Application($this->{'nette.presenterFactory'}, $this->router, $this->httpRequest, $this->httpResponse);
    $service->catchExceptions = FALSE;
    $service->errorPresenter = NULL;
    Nette\Application\Diagnostics\RoutingPanel::initializePanel($service);
    Nette\Diagnostics\Debugger::$bar->addPanel(new Nette\Application\Diagnostics\RoutingPanel($this->router, $this->httpRequest));
    return $service;
}


/**
 * @return Avalon\Application\Application
 */
public function createAvalon_application()
{
    $service = Avalon\Application\Application::getInstance();
    if (!$service instanceof Avalon\Application\Application) {
        throw new Nette\UnexpectedValueException('Unable to create service \'avalon.application\', value returned by factory is not Avalon\\Application\\Application type.');
    }
    $service->catchExceptions = FALSE;
    $service->errorPresenter = NULL;
    Nette\Application\Diagnostics\RoutingPanel::initializePanel($this->application);
    Nette\Diagnostics\Debugger::$bar->addPanel(new Nette\Application\Diagnostics\RoutingPanel($this->router, $this->httpRequest));
    return $service;
}

BootstrapRenderer Html label for chechbox

Hi, because compatibility with nette forms behavior I would allow creating \Nette\Utils\Html labels for chechboxes,
changing this

{label $name, class => 'checkbox'}{input $name}{$control->label->getText()}{/label}{$error}{$description}

to

{label $name, class => 'checkbox'}{input $name}{!$control->label->getHtml()}{/label}{$error}{$description}

should do it.

Thanks for great tool by the way!

Storage: Media

File upload

  • allow upload images & files
  • automatic resizing with requests

BootstrapRenderer: fails to render second form on page with macros

When rendering a control with macros from a second form in template it throws a 'Component with name 'xxx' does not exist' exception. The scopeVar method called from renderFormPart return the old form.

Adding {var $form = $_form = $presenter['xyzForm']} right after the {form} macro fixes the problem.

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.