Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - pivar

2
Issues / SQLSTATE[42S02]: Base table or view not found: 1146 Table 'skladiste5.total_stan
Good day!

In one of the projects I use database_view named total_stanje. While working on localhost in development environment it all works fine but after moving to production (only database name is different) I get error 500:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'skladiste5.total_stanje' doesn't exist

All pages that do not have this view included work just fine on production.

Any advice is welcome!

Many thanks

Andrej
3
Questions / ColumnWidthOrClass
Good day!

When in list view ColumnWidthOrClass is specified, it is added only to TH element but not to all TD elements with data.
If I for instance want to align text to the right for complete column and add "text-right" to ColumnWidthOrClass it only aligns right TH text. How to apply it to TD as well?

Many thanks!
4
Questions / Error 500 on rawQuery()
On Add page, CustomView is added. In the code I try to use rawQuery but I get Error 500.

Code: [Select]
<?php echo ($db->rawQuery("SELECT sastojci_mit_id FROM sastojci WHERE sastojci_mit_id < 51000 ORDER by sastojci_mit_id DESC LIMIT 1")); ?>

Produces:
Error 500: Call to a member function rawQuery() on null

Shouldn't $db be allays available?

Many thanks!
5
Questions / Display label instead of value
I have simple Yes/No radiolist control on Add/Edit page, source is not table but hand input list:
Value: 1, Label: Yes
Value: 0, Label No

On view page, on load, value is displayed. If inline edit is enabled after change label is displayed. Is there way to display Label on load based on Value without making DB table with these 2 entries? Is it possible without making page custom? Maybe through HelpBlock?

Many thanks in advance!
8
Questions / Time picker
Please, what component is used for Time picker on Inline edit (List or View page), field defined as Time on Add/Edit page. 
Is it flatpickr? Where are default properties defined? I need to change it to 24hr format  but I have no luck for hours now.

Many thanks in advance!
9
Questions / Inline edit and validation
Is there input validation option for Inline edit? On edit page there are various built in options or RegExp, would like the same for same field on inline edit...
10
Bugs / Re: Error with checkbox
Not sure what might break with what I did, but after I changed code in bootstrap-editable.js is seems to work on inline edits on List pages:

Code: [Select]

        submit: function(e) {
            e.stopPropagation();
            e.preventDefault();
           
            //get new value from input
            var newValue = this.input.input2value();
// begin added code
if (newValue == ""){
newValue = null;
};
// end added code

11
Bugs / Error with checkbox
I do not know if it is just me but seems like a bug.

When field is set to Checkbox, database allows null value, record can be inserted with checkbox in unchecked state (database records NULL).
Once inserted, if you go to Edit page and check the checkbox and update record database records set value (same if you check it on Add page).
Then, if  you try to Edit again and uncheck the checkbox and submit, you get mandatory field error and can not update the record.

Basically, if user ever checks the checkbox (by mistake for instance) it can never be unchecked again....
13
Questions / Trigger Update single field in Controller.php
I'm trying to create ajax call to update single field in database. My code is:

Code: [Select]
	$.ajax({
  type: "POST",
  url: 'http://localhost/test_project/dnkuh_stavke/editfield/1',
  data: ({ name: 'dnkuh_stavke_order', value: '13', pk:'1' }),
  success: function() {
             alert('Success');
        },
        error: function() {
            alert('Error occured');
        }
});


Link and fieldname should be fine I guess (copied from source code), value is hardcoded for test purposes.
I can't get this work so please help with correct code.
14
Questions / Re: Stay on same page after add
Got it finaly...

Make Add page custom and add code:
Code: [Select]
$_SESSION["curpage"] = $comp_model->view->form_data["request_uri"];

In action After Add add code:
Code: [Select]
redirect_to_page($_SESSION["curpage"]);exit;

Hope this helps someone.
15
Questions / Stay on same page after add
Maybe it is simple but I struggle for few days now.

On View Page for master table record I have included Add Page for detail table. I prepopulate Add form through Field Value Data Bind. After submit I would like to stay on same View Page and keep master record id. What should I enter in Redirect To After Add?

Many thanks!