Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7654900
Update _record_finder_form.htm
damanic Feb 4, 2014
71b2086
Update activerecord.php
damanic Feb 11, 2014
93b9dc3
Update _list_head_rows.htm
damanic Feb 18, 2014
584b1ac
Enabled cancel/null of frm_record_finder input after a selection has …
damanic Feb 25, 2014
1ce766b
Enabled cancel/null of frm_record_finder input after a selection has …
damanic Feb 25, 2014
d31238d
Bug: the commented out //tinyint was causing case 'int' to roll throu…
damanic Feb 28, 2014
41c7f5f
added trailing slash to uploaded file url. Otherwise ending in a file…
damanic Mar 6, 2014
ece4d81
added trailing slash to uploaded file url. Otherwise ending in a file…
damanic Mar 6, 2014
fa6cd27
added trailing slash to uploaded file url. Otherwise ending in a file…
damanic Mar 6, 2014
c371a02
fixed preview of on/off switcher
damanic Mar 6, 2014
6a810c5
Fixed DB Error logging.
damanic Oct 27, 2014
41860cb
Allows for model/db TIME fields. Previously PHPR would treat database…
damanic Nov 19, 2014
0e71657
Fixes to Phpr_Time
damanic Nov 19, 2014
c6fff7d
Update allows admin users to set their own timezone for datetime display
damanic Nov 19, 2014
2597420
Speed up slow timezone array fetch by storing it in session cache
damanic Nov 19, 2014
115d1af
timezone checks for user caused issues in cron, timezone checking mor…
damanic Dec 5, 2014
1868136
added event for cron fail
damanic Dec 5, 2014
36aa6f0
updated phpmailer to latest version to fix some smtp issues
damanic Feb 16, 2015
16cfe01
Added \File\PDF
damanic Mar 16, 2015
de04538
ActiveRecord typecasting
damanic Mar 26, 2015
4700c26
- Updated Jquery UI to latest 1.10 stable (1.10.4 from 1.10.3)
damanic Apr 29, 2015
78b06a0
- Added moment.js which is required for jquery.ui.daterangepicker
damanic Apr 29, 2015
e1059b6
- added list_name hidden field to list if list is form enabled. This …
damanic May 11, 2015
128d02d
- added list capability to search by date interval
damanic May 11, 2015
50f0f0b
- added list capability to search by date interval. Use `list_date_se…
damanic May 11, 2015
b194dff
- removed some debug trace_log()
damanic May 11, 2015
4fff818
- Added to_array() function to activerecord.
damanic Jul 29, 2015
9a2730c
- Allow for optgroups
damanic Aug 11, 2015
c6bc6a9
- Allow for optgroups
damanic Aug 11, 2015
ad8398d
- fix issue with host_name, server_name usage
damanic Oct 9, 2015
a0380d4
- active_record::form_tab_id() now sets both the <li> id and the <a>…
damanic Oct 22, 2015
6133d7b
- bugfix: namespace issue when resolving site URL in PDF file class
damanic Oct 25, 2015
9b7d53b
- bugfix: $config['ERROR_REPORTING'] include/excludes errors from di…
damanic Nov 23, 2015
c879a08
- bugfix: $config['ERROR_REPORTING'] include/excludes errors from di…
damanic Nov 23, 2015
0e2ab38
- bugfix: $config['ERROR_REPORTING'] include/excludes errors from di…
damanic Nov 23, 2015
a44a5a2
- bugfix: form redirect on edit_on_save()
damanic Dec 11, 2015
cc26aed
- bugfix: single image delete
damanic Dec 11, 2015
ca81f33
- undo previous change to edit_on_save redirect
damanic Dec 11, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30,287 changes: 15,466 additions & 14,821 deletions assets/scripts/js/jquery-ui.js

Large diffs are not rendered by default.

3,083 changes: 3,083 additions & 0 deletions assets/scripts/js/moment.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/exceptions.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,110 +1,113 @@
.clearfix {
*zoom: 1;
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
line-height: 0;
display: table;
content: "";
line-height: 0;
}
.clearfix:after {
clear: both;
clear: both;
}
.hide-text {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.input-block-level {
display: block;
width: 100%;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: block;
width: 100%;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.filters {
padding-bottom: 15px;
position: relative;
top: -2px;
padding-bottom: 15px;
position: relative;
top: -2px;
}
.filters .filter-content {
padding: 8px 10px;
border: 1px dashed #ddd;
font-size: 12px;
color: #555555;
padding: 8px 10px;
border: 1px dashed #ddd;
font-size: 12px;
color: #555555;
}
.filters ul {
margin: 0;
padding: 0;
margin: 0;
padding: 0;
}
.filters ul li {
margin: 0;
padding: 0 0 5px 13px;
display: block;
background: transparent url('../../images/filter-bullet.png') no-repeat -3px 0;
font-size: 12px;
color: #333333;
margin: 0;
padding: 0 0 5px 13px;
display: block;
background: transparent url('../../images/filter-bullet.png') no-repeat -3px 0;
font-size: 12px;
color: #333333;
}
.filters ul li span.filter-title {
color: #666666;
color: #666666;
}
.filters ul li span.modify-filter {
font-size: 11px;
font-size: 11px;
}
.filters ul li.last {
padding-bottom: 0;
padding-bottom: 0;
}
.list_filter_container .filters {
padding-bottom: 10px;
padding-bottom: 10px;
}
div.filter-list .list-icon i {
color: #46a546;
color: #46a546;
}
div.available-filter-list.with-filters-applied {
padding-top: 5px;
padding-top: 5px;
}
div.cancel-filter-list {
padding-top: 5px;
padding-top: 5px;
}
div.added-filter-list {
max-height: 150px;
margin-bottom: 5px;
overflow: auto;
border: 1px solid #cccccc;
position: relative;
max-height: 150px;
margin-bottom: 5px;
overflow: auto;
border: 1px solid #cccccc;
position: relative;
}
div.added-filter-list table.list-table {
border-right: none;
border-left: none;
border-bottom: none;
border-right: none;
border-left: none;
border-bottom: none;
}
div.added-filter-list table.list-table tbody tr:last-child td {
border-bottom: 1px solid #eaeaea;
border-bottom: 1px solid #eaeaea;
}
ul.filter-switchers {
margin: 0;
padding: 0;
background: #fff;
padding: 3px 5px 5px 10px;
margin: 5px 0 3px 0;
border: 1px solid #cfcfcf;
margin: 0;
padding: 0;
background: #fff;
padding: 3px 5px 5px 10px;
margin: 5px 0 3px 0;
border: 1px solid #cfcfcf;
}
ul.filter-switchers li {
background: transparent;
padding: 0;
margin-top: 2px;
background: transparent;
padding: 0;
margin-top: 2px;
}
ul.filter-switchers li input {
margin-left: -2px;
margin-left: -2px;
margin-right:5px;
float:left;
}
ul.filter-switchers li label {
font-size: 12px;
color: #666666;
font-size: 12px;
color: #666666;
padding:3px;
}
td.filter-icon a,
a.filter-control {
text-indent: 0!important;
text-indent: 0!important;
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
<?
$options = $this->form_field_get_options($form_field->db_name, $this->view_data['form_model']);
$db_name = $this->form_get_field_db_name($form_field->db_name, $this->view_data['form_model']);
$options = $this->form_field_get_options($form_field->db_name, $this->view_data['form_model']);
$db_name = $this->form_get_field_db_name($form_field->db_name, $this->view_data['form_model']);
?>

<select autocomplete="off" <? if ($form_field->disabled) echo 'disabled="disabled"' ?> id="<?=$this->form_get_element_id($form_model_class.'_'.$db_name) ?>" name="<?=$form_model_class ?>[<?=$db_name?>]">
<? if ($form_field->empty_option !== null): ?>
<option value=""><?=h($form_field->empty_option) ?></option>
<? endif ?>
<?
<? if ($form_field->empty_option !== null): ?>
<option value=""><?=h($form_field->empty_option) ?></option>
<? endif ?>

<?
$field_name = $form_field->db_name;
foreach ($options as $value=>$name):
$level = 0;
if (is_array($name))
{
if (!array_key_exists('level', $name))
{
$keys = array_keys($name);
$name = !count($keys) ? $value : $keys[0];
} else
{
$level = $name['level'];
$name = $name[0];
foreach ($options as $value=>$name):
$level = 0;
if (is_array($name))
{
$keys = array_keys($name);
if (array_key_exists('level', $name))
{
$level = $name['level'];
$name = $name[0];
} else if (!count($keys)) {
$level = $name['level'];
$name = $name[0];
} else {
$opt_title = $value;
$opt_values = $name;
?>
<optgroup label="<?=$opt_title?>">
<?
foreach($opt_values as $opt_value => $opt_name){
?>
<option <?=Phpr_Form::option_state( $opt_value, $form_model->$db_name ) ?> value="<?=h($opt_value) ?>"><?=$form_field->options_html_encode ? h($opt_name) : $opt_name ?></option>
<?
}
?>
</optgroup>
<?
continue;
}
}
?>
<option <?=Phpr_Form::option_state( $value, $form_model->$db_name ) ?> value="<?=h($value) ?>"><?=str_repeat('&nbsp;&nbsp;&nbsp;', $level) ?><?=$form_field->options_html_encode ? h($name) : $name ?></option>
<? endforeach ?>
<option <?=Phpr_Form::option_state( $value, $form_model->$db_name ) ?> value="<?=h($value) ?>"><?=str_repeat('&nbsp;&nbsp;&nbsp;', $level) ?><?=$form_field->options_html_encode ? h($name) : $name ?></option>
<? endforeach ?>
</select>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?
$form_file_list = $form_model->{$form_field->db_name};
$base_url = $form_field->file_download_base_url ? $form_field->file_download_base_url : '/admin/files/get/';
$base_url = $form_field->file_download_base_url ? $form_field->file_download_base_url : url('/admin/files/get/');
?>

<? if ($form_file_list->count): ?>
<ul class="file-list">
<? foreach ($form_file_list as $file): ?>
<li>
<a href="<?=$base_url.$file->id.'/'.urlencode($file->name) ?>" target="_blank"><?=h($file->name) ?></a>
<a href="<?=$base_url.$file->id.'/'.urlencode($file->name).'/' ?>" target="_blank"><?=h($file->name).'/' ?></a>
(<?=File::size_from_bytes($file->size) ?>)
</li>
<? endforeach ?>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
<?
$db_name = $this->form_get_field_db_name($form_field->db_name, $this->view_data['form_model']);
$state = $form_field->checkbox_on_state == $form_model->$db_name ? h($form_field->checkbox_on_state) : null;
$field_id = $this->form_get_element_id($form_model_class.'_'.$form_field->db_name);
$hiddenFieldId = $this->form_get_element_id($form_model_class.'_'.$form_field->db_name.'hidden');
$db_name = $this->form_get_field_db_name($form_field->db_name, $this->view_data['form_model']);
$state = $form_field->checkbox_on_state == $form_model->$db_name ? h($form_field->checkbox_on_state) : null;

$field_id = $this->form_get_element_id($form_model_class.'_'.$form_field->db_name);
$hidden_field_id = $this->form_get_element_id($form_model_class.'_'.$form_field->db_name.'hidden');
?>

<div id="<?=$field_id ?>" class="<?=$state === null ? 'off' : 'on' ?>"></div>
<input type="hidden" id="<?=$hidden_field_id ?>" name="<?=$form_model_class ?>[<?=$db_name ?>]" value="<?=$state ?>"/>

<input disabled="disabled"
type="checkbox"
name="<?=$form_model_class ?>_<?=$db_name ?>_checkbox"
class="switch-checkbox"
id="<?=$field_id ?>" <?=$state !== null ? 'checked':''?> />

<label class="switch-label" for="<?=$field_id ?>">
<div class="switch-inner">
<div class="switch-active"><div class="switch-switch">ON</div></div>
<div class="switch-inactive"><div class="switch-switch">OFF</div></div>
</div>
</label>


Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?
$column_definition = $form_field->get_col_definition();
?>

<?= $this->form_render_partial('form_preview_value', array('value'=>h($form_model->display_field($form_field->db_name)), 'type'=>$column_definition->type)) ?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?
$column_definition = $form_field->get_col_definition();
$columnInfo = $column_definition->get_column_info();

$max_length = $columnInfo->length !== null ? 'maxlength="'.$columnInfo->length.'"' : null;
?>

<input type="time" step="any" autocomplete="off" <? if ($form_field->disabled) echo 'disabled="disabled"' ?> <?=$max_length ?> value="<?=h($form_model->display_field($form_field->db_name)) ?>" class="<?=$column_definition->type ?>" id="<?=$this->form_get_element_id($form_model_class.'_'.$form_field->db_name) ?>" name="<?=$form_model_class ?>[<?=$form_field->db_name ?>]" placeholder="<?=h($form_field->get_placeholder())?>" />
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?
$list_container_id = $this->form_get_element_id('form_attachments_container_'.get_class($form_model).'_'.$db_name);
$base_url = $form_field->file_download_base_url ? $form_field->file_download_base_url : '/admin/files/get/';
$base_url = $form_field->file_download_base_url ? $form_field->file_download_base_url : url('/admin/files/get/');
// $base_url = root_url('uploaded/public');
?>

Expand All @@ -9,7 +9,7 @@
<ul>
<? foreach ($form_file_list as $file): ?>
<li>
<a href="<?=$base_url.$file->id.'/'.urlencode($file->name) ?>" target="_blank" class="file-link">
<a href="<?=$base_url.$file->id.'/'.urlencode($file->name).'/' ?>" target="_blank" class="file-link">
<i class="icon-save"></i> <?=h($file->name) ?>
</a>
<span class="file-size">(<?=File::size_from_bytes($file->size) ?>)</span> |
Expand Down
2 changes: 1 addition & 1 deletion modules/db/behaviors/form_behavior/partials/_form_form.htm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<? foreach ($form_elements as $tab_caption => $elements): ?>
<li <?=array_key_exists($tab_caption, $form_model->form_tab_ids) ? 'id="'.$form_model->form_tab_ids[$tab_caption].'"' : null ?>
class="<?= $index == 0 ? 'active' : null ?> <?=(array_key_exists($tab_caption, $form_model->form_tab_visibility) && !$form_model->form_tab_visibility[$tab_caption]) ? 'hidden' : null ?>">
<a href="#<?='tab_'.($index+1) ?>" onclick="return false">
<a href="#<?=array_key_exists($tab_caption, $form_model->form_tab_ids) ? $form_model->form_tab_ids[$tab_caption] : 'tab_'.($index+1) ?>" onclick="return false">
<?=h($tab_caption) ?>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?
$list_container_id = $this->form_get_element_id('form_attachments_container_'.get_class($form_model).'_'.$db_name);

$base_url = $form_field->file_download_base_url ? $form_field->file_download_base_url : '/admin/files/get/';
$base_url = $form_field->file_download_base_url ? $form_field->file_download_base_url : url('/admin/files/get/');

if (isset($form_field->render_options['allow_delete']) && $form_field->render_options['allow_delete'] !== false)
$allow_delete = true;
Expand All @@ -12,7 +12,7 @@
<? if ($form_file_list->count):
$file = $form_file_list[0];
?>
<p>Uploaded file: <a href="<?=$base_url.$file->id.'/'.urlencode($file->name) ?>" target="_blank"><?=h($file->name) ?></a> (<?=File::size_from_bytes($file->size) ?>) <span id="file_custom_message_<?=get_class($form_model) ?>_<?=$db_name ?>"></span>
<p>Uploaded file: <a href="<?=$base_url.$file->id.'/'.urlencode($file->name).'/' ?>" target="_blank"><?=h($file->name) ?></a> (<?=File::size_from_bytes($file->size) ?>) <span id="file_custom_message_<?=get_class($form_model) ?>_<?=$db_name ?>"></span>
<? if ($allow_delete): ?>
| <a href="javascript:;" class="file-delete" onclick="return $(this).phpr().post('<?=$this->get_event_handler('on_delete_file') ?>', {
data: { db_name: '<?=$db_name ?>', file_id: '<?=$file->id ?>'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<? if ($form_file_list->count): ?>
<? foreach ($form_file_list as $file): ?>
<a href="<?=$base_url.'/'.urlencode($file->disk_name) ?>" target="_blank"><img src="<?=$file->get_thumbnail_path($field_definition->image_thumb_size, $field_definition->image_thumb_size) ?>" alt="<?=h($file->name) ?>"/></a>
<a href="javascript:;" onclick="return $(this).phpr().send('<?=$this->get_event_handler('on_delete_file') ?>', {
<a href="javascript:;" onclick="return $(this).phpr().post('<?=$this->get_event_handler('on_delete_file') ?>', {
data: { db_name: '<?=$db_name ?>', file_id: '<?=$file->id ?>' },
confirm: 'Do you really want to delete this file?',
update: '#<?=$list_container_id ?>',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ <h2><?= $title?></h2>
update: '#<?= $this->form_get_record_finder_container_id(get_class($model), post('db_name')) ?>',
loadIndicator: { show: true, injectInElement: true },
success: function() {
$(window).trigger('phpr_recordfinder_update', ['<?= $column_name ?>']);
cancelPopup();
},
complete: function(){
$(window).trigger('phpr_recordfinder_update', ['<?= $column_name ?>']);
}
}).send();

Expand All @@ -55,4 +57,4 @@ <h2><?= $title?></h2>
<? endif ?>
</form>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?
<?
// @TODO apply external style and cancel handler to element class 'recordfinder-cancel'

$db_name = $this->form_get_field_db_name($form_field->db_name, $this->view_data['form_model']);

$id = $this->form_get_element_id($form_model_class.'_'.$db_name);
Expand All @@ -21,7 +23,8 @@

<div class="record-reference <?=$target_record ? null : 'empty' ?>">
<? if ($target_record): ?>
<?=h($target_record->$display_name_field) ?>
<i class="icon-remove recordfinder-cancel" style="cursor: pointer" onclick="$('#<?=$id?>').removeAttr('value');$(this).parent().closest('div').html('<?=h($prompt)?>');"></i>
<?=h($target_record->$display_name_field) ?>
<? if ($display_description_field && strlen($target_record->$display_description_field)): ?>
<small><?=h($target_record->$display_description_field) ?></small>
<? endif ?>
Expand Down
Loading