View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Adding a new parameter values list and use it - Page 2 - ProjeQtOr
 
 

Adding a new parameter values list and use it

More
17 Jun 2014 18:41 - 17 Jun 2014 18:42 #7 by Jean-Luc

babynus wrote:

And how add an icone in the menu ?
I have created iconCountry16.png, iconCountry22.png and iconCountry32.png in view/css/images, but noting appears…

Update /css/projectorIcon.css

Done with
.iconCountry32 { background-image: url(images/iconCountry32.png);  background-repeat: no-repeat; width: 32px; height: 32px; }
.iconCountry22 { background-image: url(images/iconCountry22.png);  background-repeat: no-repeat; width: 22px; height: 22px; }
.iconCountry16 { background-image: url(images/iconCountry16.png);  background-repeat: no-repeat; width: 16px; height: 16px; }
… but still nothing, even after close/reopne session.
(no error in data, pictures OK, all checked)

babynus wrote:

there as many lines per country as number of languages used. At now, two :
Country code 'de' is for Germany, but with two lines (id, code, lang, name) :
121 de en Germany
122 de fr Allemagne
i.e. country is identified by code, not by line id.
In future, there could be added also, p.e.
487 de de Deutchland
503 de nl Duitsland
733 de es Alemania
999 de gr Γερµανία
etc.

You complicated much too much, and will have to code correct list.
Just single list with translatable name would be easier : just have to define field $_isTranslatable in the class :whistle:

I don’t understand.
Where are the translations, then ? Must fill lang.js files ?
What values list table would be a good sample ?

Note : I've defined another table (currencies), exacty as other values lists :
CREATE TABLE IF NOT EXISTS `currency` (
  `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(3) DEFAULT NULL,
  `name` varchar(32) DEFAULT NULL,
  `idle` int(1) unsigned DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `currencyCode` (`code`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

INSERT INTO `currency` VALUES(1, 'EUR', 'Euro', 0);
INSERT INTO `currency` VALUES(2, 'USD', 'US Dollars', 0);
INSERT INTO `currency` VALUES(3, 'AUD', 'Australian Dollar', 0);
INSERT INTO `currency` VALUES(4, 'CAD', 'Canadian Dollar', 0);
INSERT INTO `currency` VALUES(5, 'CHF', 'Swiss Franc', 0);
INSERT INTO `currency` VALUES(6, 'GBP', 'British Pounds', 0);
INSERT INTO `currency` VALUES(7, 'JPY', 'Japanese Yen', 0);
INSERT INTO `currency` VALUES(8, 'SEK', 'Swedish Krona', 0);
Lang.js updated, module model/Currency.php created…
I can see and update this table, so it is OK.

Added a field in client table :
ALTER TABLE client ADD currency int(12) unsigned DEFAULT '0' ;
Defined in client.php :
public $idCurrency;
But for view/update a client, the fields is a normal input text, no combo box.
And when I put something in that field and record update :
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'idCurrency' in 'field list'
Something is wrong, but models viewed seem similar… WTF ?
Last edit: 17 Jun 2014 18:42 by Jean-Luc.

Please Log in or Create an account to join the conversation.

More
17 Jun 2014 18:48 #8 by babynus

… but still nothing, even after close/reopne session.
(no error in data, pictures OK, all checked)

Seems correct.
No idea why it does not work. :(

Where are the translations, then ? Must fill lang.js files ?

Yes

What values list table would be a good sample ?

Profile

Something is wrong, but models viewed seem similar… WTF ?

db field should be named idCurrency, not currency.

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
17 Jun 2014 19:03 - 17 Jun 2014 19:05 #9 by Jean-Luc

babynus wrote:

… but still nothing, even after close/reopne session.
(no error in data, pictures OK, all checked)

Seems correct.
No idea why it does not work. :(

Oops…
Too bad, but not blocking, so to be in-depth examinated later.

babynus wrote:

Where are the translations, then ? Must fill lang.js files ?

Yes

For countries, this will be a lot (around 200 countries !)

babynus wrote:

What values list table would be a good sample ?

Profile

OK. Have a look.
Not $_isTranslatable, but $_isNameTranslatable, no? Or $_isXxxxTranslatable? :unsure:
I think I will first test with 'currency' table. ;)

babynus wrote:

Something is wrong, but models viewed seem similar… WTF ?

db field should be named idCurrency, not currency.

Ah, OK. Changed, and… It works! :)
Last edit: 17 Jun 2014 19:05 by Jean-Luc.

Please Log in or Create an account to join the conversation.

More
19 Jun 2014 12:50 #10 by Jean-Luc

Jean-Luc wrote:

babynus wrote:

… but still nothing, even after close/reopne session.
(no error in data, pictures OK, all checked)

Seems correct.
No idea why it does not work. :(

Oops…
Too bad, but not blocking, so to be in-depth examinated later.

Appeared next day, after shutdown computer and reboot.
For another new table, I updated for icons BEFORE connect to Projeqtor. Result: visible at once!
So, certainly a cache story or so on. Case closed. :)

Jean-Luc wrote:

babynus wrote:

What values list table would be a good sample ?

Profile

OK. Have a look.
Not $_isTranslatable, but $_isNameTranslatable, no? Or $_isXxxxTranslatable? :unsure:
I think I will first test with 'currency' table. ;)

Done, all is now O.K. :)

Please Log in or Create an account to join the conversation.

More
22 Jan 2015 17:40 #11 by mdelgado
I created a table called "pipetapa" with fields id, name (int12 and varchar100),
I created the respective class copied from an existing call Pipetapa, and
I added the respective field in project.php called "public $ idPipetapa;".
Still not show me data in the combo list :-(
Perhaps, it is mandatory to create the option on the menu for a combo list shows the data ?. It's access permissions problem?

what I missed? Thank you very much !!!!!!

Manuel

Please Log in or Create an account to join the conversation.

More
22 Jan 2015 18:04 #12 by mdelgado
I found mi mistake.

Thanks for your very good software

Manuel

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.045 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.