* code for custom size in webapp.
This commit is contained in:
@@ -36,7 +36,12 @@ function toggleShowapp(webappID, webappName)
|
||||
function setSize(target)
|
||||
{
|
||||
$('.size').hide();
|
||||
if(target == 'popup') $('.size').show();
|
||||
$('.customSize').hide();
|
||||
if(target == 'popup')
|
||||
{
|
||||
$('.size').show();
|
||||
customSize($('#size').val());
|
||||
}
|
||||
}
|
||||
|
||||
function addView(webappID)
|
||||
|
||||
@@ -254,7 +254,7 @@ class webappModel extends model
|
||||
{
|
||||
$webapp = $this->getLocalAppByID($webappID);
|
||||
$data = fixer::input('post')->remove('files,customWidth,customHeight')->get();
|
||||
if($data->size == 'custom') $data->size = $this->post->customWidth . 'x' . $this->post->customHeight;
|
||||
if($data->size == 'custom') $data->size = (float)$this->post->customWidth . 'x' . (float)$this->post->customHeight;
|
||||
|
||||
$this->dao->update(TABLE_WEBAPP)->data($data)->where('id')->eq($webappID)->check('url', 'unique', "id != $webappID", false)->exec();
|
||||
|
||||
@@ -290,7 +290,7 @@ class webappModel extends model
|
||||
->add('addedDate', helper::now())
|
||||
->add('author', $this->app->user->account)
|
||||
->remove('files,customWidth,customHeight')->get();
|
||||
if($data->size == 'custom') $data->size = $this->post->customWidth . 'x' . $this->post->customHeight;
|
||||
if($data->size == 'custom') $data->size = (float)$this->post->customWidth . 'x' . (float)$this->post->customHeight;
|
||||
$this->dao->insert(TABLE_WEBAPP)->data($data)
|
||||
->autocheck()
|
||||
->batchCheck($this->config->webapp->create->requiredFields, 'notempty')
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</tr>
|
||||
<tr class="customSize hidden">
|
||||
<th align='left'><?php echo $lang->webapp->custom?></th>
|
||||
<td><?php echo html::input('customWidth', '', "class='w-40px'") . ' x ' . html::input('customHeight', '', "class='w-40px'");?></td>
|
||||
<td><?php echo html::input('customWidth', '', "class='w-40px'") . 'px X ' . html::input('customHeight', '', "class='w-40px'") . 'px';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='left'><?php echo $lang->webapp->abstract?></th>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</tr>
|
||||
<tr class="customSize <?php if($webapp->size != 'custom') echo 'hidden'?>">
|
||||
<th align='left'><?php echo $lang->webapp->custom?></th>
|
||||
<td><?php echo html::input('customWidth', $customWidth, "class='w-40px'") . ' x ' . html::input('customHeight', $customHeight, "class='w-40px'");?></td>
|
||||
<td><?php echo html::input('customWidth', $customWidth, "class='w-40px'") . 'px X ' . html::input('customHeight', $customHeight, "class='w-40px'") . 'px';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='left'><?php echo $lang->webapp->abstract?></th>
|
||||
|
||||
Reference in New Issue
Block a user