mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-29 19:20:52 -04:00
Merge branch 'master' into talmdal_dev
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
|
||||
/* In-place edit ~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-inplace-edit-form ul {
|
||||
#g-in-place-edit-form ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,22 +35,22 @@ class InPlaceEdit_Core {
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function add_action($action) {
|
||||
public function action($action) {
|
||||
$this->action = $action;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function add_rules($rules) {
|
||||
public function rules($rules) {
|
||||
$this->rules += $rules;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function add_messages($messages) {
|
||||
public function messages($messages) {
|
||||
$this->messages += $messages;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function add_callback($callback) {
|
||||
public function callback($callback) {
|
||||
$this->callback = $callback;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -444,11 +444,11 @@ class Item_Model extends ORM_MPTT {
|
||||
|
||||
$position = $db->from("items")
|
||||
->where("parent_id", $this->id)
|
||||
->where("$sort_column < ", $child->$sort_column)
|
||||
->where("$sort_column $comp ", $child->$sort_column)
|
||||
->where($where)
|
||||
->count_records();
|
||||
|
||||
// We stopped short of our target value in the sort (notice that we're using a < comparator
|
||||
// We stopped short of our target value in the sort (notice that we're using a < comparator
|
||||
// above) because it's possible that we have duplicate values in the sort column. An
|
||||
// equality check would just arbitrarily pick one of those multiple possible equivalent
|
||||
// columns, which would mean that if you choose a sort order that has duplicates, it'd pick
|
||||
|
||||
@@ -232,6 +232,7 @@ class Item_Model_Test extends Unit_Test_Case {
|
||||
$this->assert_equal("resize", file_get_contents($photo->resize_path()));
|
||||
$this->assert_equal("file", file_get_contents($photo->file_path()));
|
||||
}
|
||||
|
||||
public function move_album_fails_invalid_target_test() {
|
||||
// Create an album with a photo in it
|
||||
$root = ORM::factory("item", 1);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<?= form::open($action, array("method" => "post", "id" => "g-inplace-edit-form", "class" => "g-short-form"), $hidden) ?>
|
||||
<?= form::open($action, array("method" => "post", "id" => "g-in-place-edit-form", "class" => "g-short-form"), $hidden) ?>
|
||||
<ul>
|
||||
<li <? if (!empty($errors["input"])): ?> class="g-error"<? endif ?>>
|
||||
<?= form::input("input", $form["input"], " class='textbox'") ?>
|
||||
@@ -11,6 +11,6 @@
|
||||
</ul>
|
||||
<?= form::close() ?>
|
||||
<? if (!empty($errors["input"])): ?>
|
||||
<div id="g-inplace-edit-message" class="g-error"><?= $errors["input"] ?></div>
|
||||
<div id="g-in-place-edit-message" class="g-error"><?= $errors["input"] ?></div>
|
||||
<? endif ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user