Hallo,
wie kann man es einbinden, dass bei Datum/Zeit-Feldern die Uhrzeit nicht nur in 15 Minuten Intervallen erfasst werden kann, sondern die Minuten-Selectbox die Werte von 00 - 59 beinhaltet?
Danke für eine kurze Antwort!
Viele Grüße
Timo
Hallo,
wie kann man es einbinden, dass bei Datum/Zeit-Feldern die Uhrzeit nicht nur in 15 Minuten Intervallen erfasst werden kann, sondern die Minuten-Selectbox die Werte von 00 - 59 beinhaltet?
Danke für eine kurze Antwort!
Viele Grüße
Timo
Das ist mehr oder weniger hardcodiert in Meeting.php und Call.php. Es gibt noch Einstellungen in TemplateDatetimecombo.php.
Stefan Ulrich Sauer
System Analyst
Devoteam Danet GmbH
Gutenbergstraße 10
D-64331 Weiterstadt
Germany
email: Stefan-Ulrich.Sauer@devoteam.com
http://www.devoteam.de
Hallo,
danke für die Antwort! Habe jetzt testweise sowohl die Call.php (Array $minutes_values) als auch die TemplateDateTimeCombo.php (Array $minutesStrings) angepasst und um weitere Werte erweitert.
Trotzdem stehen in der Anrufmaske die Minuten nur in 15-Min-Schritten zur Auswahl. Stehe gerade voll auf dem Schlauch und finde einfach nicht wo ich die Anpassung vornehmen muss...
LG Timo
Ich habe das jetzt auf die Schnelle auch nicht hinbekommen. Ohne genauere Codeanalyse kann man hier wohl nichts machen.
Bei CallsQuickCreate.php z.B. gibt es eine Codepassage, bei der explizit die Zeiten auf Viertelstundenwerte gesetzt werden. Es steckt also offenbar ein Konzept dahinter, nur viertelstündliche Werte zuzulassen. Wieso das so ist entzieht sich allerdings meiner Kenntnis:
Code:if ($time_start_minutes > 0 && $time_start_minutes < 15) { $time_start_minutes = "15"; } else if ($time_start_minutes > 15 && $time_start_minutes < 30) { $time_start_minutes = "30"; } else if ($time_start_minutes > 30 && $time_start_minutes < 45) { $time_start_minutes = "45"; } else if ($time_start_minutes > 45) { $time_start_hour += 1; $time_start_minutes = "00"; }
Stefan Ulrich Sauer
System Analyst
Devoteam Danet GmbH
Gutenbergstraße 10
D-64331 Weiterstadt
Germany
email: Stefan-Ulrich.Sauer@devoteam.com
http://www.devoteam.de
Hallo,
genau - über die Codestelle bin ich auch gestolpert. Hab an zig Stellen debug-Ausgaben eingegeben - andere Werte waren dann in dem minutes_values-Array schon enthalten. Nur wurden sie im Form leider nicht ausgegeben.
Warum auch immer - vielleicht hat ja noch jemand einen Tipp für mich???
LG Timo
Habe jetzt eine js-Datei gefunden, die vielversprechend aussieht:
include\SugarFields\Fields\Datetimecombo\Datetimec ombo.js
Hier gibt es eine Passage, in der die Auswahlelemente gesetzt werden (hardcodiert :-( ):
Wenn man hier zusätzliche Elemente einfügt werden diese tatsächlich angezeigt und stehen zur Auswahl zur Verfügung.Code:text+='\n<option value="00" '+(this.mins==0?"SELECTED":"")+'>00</option>';text+='\n<option value="15" '+(this.mins==15?"SELECTED":"")+'>15</option>';text+='\n<option value="30" '+(this.mins==30?"SELECTED":"")+'>30</option>';text+='\n<option value="45" '+(this.mins==45?"SELECTED":"")+'>45</option>';text+='\n</select>';
Weiter oben im Text ist noch dieses hier zu finden. Da muss man evtl. auch noch etwas machen, damit es auch wirklich rund läuft:
Code:if(this.mins>0&&this.mins<15){this.mins=15;}else if(this.mins>15&&this.mins<30){this.mins=30;}else if(this.mins>30&&this.mins<45){this.mins=45;}else if(this.mins>45){this.hrs+=1;this.mins=0;}
Stefan Ulrich Sauer
System Analyst
Devoteam Danet GmbH
Gutenbergstraße 10
D-64331 Weiterstadt
Germany
email: Stefan-Ulrich.Sauer@devoteam.com
http://www.devoteam.de
Hallo,
vielen Dank für Deine Antwort!
Es sieht so aus als ob die Änderung in der JS-Datei funktioniert.
Falls jemand daran Interesse hat (und sich Schreibarbeit sparen möchte): In der Datei Datetimecombo.js unter include/SugarFields/Fields/Datetimecombo die folgenden Optionen einfügen (bei mir ab Zeile 159):
Danach müssen unter Admin --> Reperatur noch die komprimierten JSDateien neu aufgebaut werden.Code:text += '\n<option value="00" ' + (this.mins == 0 ? "SELECTED" : "") + '>00</option>'; text += '\n<option value="01" ' + (this.mins == 1 ? "SELECTED" : "") + '>01</option>'; text += '\n<option value="02" ' + (this.mins == 2 ? "SELECTED" : "") + '>02</option>'; text += '\n<option value="03" ' + (this.mins == 3 ? "SELECTED" : "") + '>03</option>'; text += '\n<option value="04" ' + (this.mins == 4 ? "SELECTED" : "") + '>04</option>'; text += '\n<option value="05" ' + (this.mins == 5 ? "SELECTED" : "") + '>05</option>'; text += '\n<option value="06" ' + (this.mins == 6 ? "SELECTED" : "") + '>06</option>'; text += '\n<option value="07" ' + (this.mins == 7 ? "SELECTED" : "") + '>07</option>'; text += '\n<option value="08" ' + (this.mins == 8 ? "SELECTED" : "") + '>08</option>'; text += '\n<option value="09" ' + (this.mins == 9 ? "SELECTED" : "") + '>09</option>'; text += '\n<option value="10" ' + (this.mins == 10 ? "SELECTED" : "") + '>10</option>'; text += '\n<option value="11" ' + (this.mins == 11 ? "SELECTED" : "") + '>11</option>'; text += '\n<option value="12" ' + (this.mins == 12 ? "SELECTED" : "") + '>12</option>'; text += '\n<option value="13" ' + (this.mins == 13 ? "SELECTED" : "") + '>13</option>'; text += '\n<option value="14" ' + (this.mins == 14 ? "SELECTED" : "") + '>14</option>'; text += '\n<option value="15" ' + (this.mins == 15 ? "SELECTED" : "") + '>15</option>'; text += '\n<option value="16" ' + (this.mins == 16 ? "SELECTED" : "") + '>16</option>'; text += '\n<option value="17" ' + (this.mins == 17 ? "SELECTED" : "") + '>17</option>'; text += '\n<option value="18" ' + (this.mins == 18 ? "SELECTED" : "") + '>18</option>'; text += '\n<option value="19" ' + (this.mins == 19 ? "SELECTED" : "") + '>19</option>'; text += '\n<option value="20" ' + (this.mins == 20 ? "SELECTED" : "") + '>20</option>'; text += '\n<option value="21" ' + (this.mins == 21 ? "SELECTED" : "") + '>21</option>'; text += '\n<option value="22" ' + (this.mins == 22 ? "SELECTED" : "") + '>22</option>'; text += '\n<option value="23" ' + (this.mins == 23 ? "SELECTED" : "") + '>23</option>'; text += '\n<option value="24" ' + (this.mins == 24 ? "SELECTED" : "") + '>24</option>'; text += '\n<option value="25" ' + (this.mins == 25 ? "SELECTED" : "") + '>25</option>'; text += '\n<option value="26" ' + (this.mins == 26 ? "SELECTED" : "") + '>26</option>'; text += '\n<option value="27" ' + (this.mins == 27 ? "SELECTED" : "") + '>27</option>'; text += '\n<option value="28" ' + (this.mins == 28 ? "SELECTED" : "") + '>28</option>'; text += '\n<option value="29" ' + (this.mins == 29 ? "SELECTED" : "") + '>29</option>'; text += '\n<option value="30" ' + (this.mins == 30 ? "SELECTED" : "") + '>30</option>'; text += '\n<option value="31" ' + (this.mins == 31 ? "SELECTED" : "") + '>31</option>'; text += '\n<option value="32" ' + (this.mins == 32 ? "SELECTED" : "") + '>32</option>'; text += '\n<option value="33" ' + (this.mins == 33 ? "SELECTED" : "") + '>33</option>'; text += '\n<option value="34" ' + (this.mins == 34 ? "SELECTED" : "") + '>34</option>'; text += '\n<option value="35" ' + (this.mins == 35 ? "SELECTED" : "") + '>35</option>'; text += '\n<option value="36" ' + (this.mins == 36 ? "SELECTED" : "") + '>36</option>'; text += '\n<option value="37" ' + (this.mins == 37 ? "SELECTED" : "") + '>37</option>'; text += '\n<option value="38" ' + (this.mins == 38 ? "SELECTED" : "") + '>38</option>'; text += '\n<option value="39" ' + (this.mins == 39 ? "SELECTED" : "") + '>39</option>'; text += '\n<option value="40" ' + (this.mins == 40 ? "SELECTED" : "") + '>40</option>'; text += '\n<option value="41" ' + (this.mins == 41 ? "SELECTED" : "") + '>41</option>'; text += '\n<option value="42" ' + (this.mins == 42 ? "SELECTED" : "") + '>42</option>'; text += '\n<option value="43" ' + (this.mins == 43 ? "SELECTED" : "") + '>43</option>'; text += '\n<option value="44" ' + (this.mins == 44 ? "SELECTED" : "") + '>44</option>'; text += '\n<option value="45" ' + (this.mins == 45 ? "SELECTED" : "") + '>45</option>'; text += '\n<option value="46" ' + (this.mins == 46 ? "SELECTED" : "") + '>46</option>'; text += '\n<option value="47" ' + (this.mins == 47 ? "SELECTED" : "") + '>47</option>'; text += '\n<option value="48" ' + (this.mins == 48 ? "SELECTED" : "") + '>48</option>'; text += '\n<option value="49" ' + (this.mins == 49 ? "SELECTED" : "") + '>49</option>'; text += '\n<option value="50" ' + (this.mins == 50 ? "SELECTED" : "") + '>50</option>'; text += '\n<option value="51" ' + (this.mins == 51 ? "SELECTED" : "") + '>51</option>'; text += '\n<option value="52" ' + (this.mins == 52 ? "SELECTED" : "") + '>52</option>'; text += '\n<option value="53" ' + (this.mins == 53 ? "SELECTED" : "") + '>53</option>'; text += '\n<option value="54" ' + (this.mins == 54 ? "SELECTED" : "") + '>54</option>'; text += '\n<option value="55" ' + (this.mins == 55 ? "SELECTED" : "") + '>55</option>'; text += '\n<option value="56" ' + (this.mins == 56 ? "SELECTED" : "") + '>56</option>'; text += '\n<option value="57" ' + (this.mins == 57 ? "SELECTED" : "") + '>57</option>'; text += '\n<option value="58" ' + (this.mins == 58 ? "SELECTED" : "") + '>58</option>'; text += '\n<option value="59" ' + (this.mins == 59 ? "SELECTED" : "") + '>59</option>'; text += '\n</select>';
Nochmal danke!!!
LG Timo
Wie kann ich das bei sugarondemand ändern?
Ich vermute, dann mal gar nicht oder?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks