kdyby / boilerplate Goto Github PK
View Code? Open in Web Editor NEW[UNSTABLE]
Home Page: www.kdyby.org
License: Other
[UNSTABLE]
Home Page: www.kdyby.org
License: Other
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 [^;]*)
Netestovatelné, přepsat!
Allow apps to extend and/or replace current entities in framework.
v TemplateFactory::createTemplate() nema byt $this->getParamId() ale $presenter->getParamId()
tento kod
$frm->addCheckboxList("name", "description", array(1=>"foo", 20 => "bar"));
vrací po odeslání
name = array(
0 => 0,
1 => 1
)
Implement some.
There is big need to add many classes to inputs in Bootstrap forms.
It would be nice to add them in {pair} macro. Example:
{pair name input-class => 'input-large'}
Provide simple, automated way to audit entities. Nothing more than simple annotation
@Kdyby\Doctrine\Audit\Auditable()
shouldn't be required.
Inspiration: http://www.jasny.net/articles/versioning-mysql-data/
Apply macros aways, but check dynamicly the $_form
.
Pokud chci pridat k checkboxu class inline, tak se prepise sablonou na samotny checkbox
Ad: nejdou upravit class vsech formularovych prvku (input, textarea...)
Fix handling of Control Items in test
Ve zdrojácích je uváděna licenční adresa http://www.kdyby.org/license, která je nedostupná.
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).
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');
});
}
They are now merged alltogether at the end.
Implement automatic adjustment of entity to tree (closure table), by using only one(!) annotation
@Kdyby\ClosureTable()
Implement manipulation behavior in single wrapper over DAO
$tree = new Kdyby\Doctrine\ClosureTable($dao)
notes:
http://blog.voracek.net/databaze/closure-table-stromy-v-mysql-trochu-jinak/
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 :)
https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Components/Grinder/Columns/Column.php#L143
https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Components/Grinder/Columns/Column.php#L144
Quick fix:
...
} elseif ($value instanceof \DateTime) { // DateTime -> \DateTime or Nette\DateTime
return $this->getRenderer()->renderDateTime($value, $this->dateTimeFormat); // not $column->dateTimeFormat
}
This line sometimes returns nothing. Why? How to fix it? Figure out blocking.
For now, it's wery rare and is handled by retring.
$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.
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
self-explainatory, used in HttpCookies::compile().
zaktualizuj si vendors.php - mas tam stale doctrine 2.1
Write own migrations, similar to Doctrine\DBAL\Migrations, but with better support for packages.
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;
}
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!
It ignores the option in combination with BootstrapRenderer.
pokud chci pouzivat inline checkboxy, tak nemuzu protoze se label obaluje jeste divem, pokud jej odstranim, vse je v poradku
File upload
kdyby:
entities: FALSE
or
kdyby:
entities:
acl: TRUE
security: FALSE
domain: FALSE
media: TRUE
etc...
In Kdyby\Application\Application is used deprecated function setProductionMode
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.
Integrate & refactor https://github.com/HosipLan/cURL-wrapper
V https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Security/RBAC/UserPermission.php#L39 je uvedeno IRole místo IIdentity
Pokud kliknu na label pole, vždy je focus na správný prvek ale první výskyt komponenty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.