actually that’s a known issue, I’m working on fix it it right now 😊
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
February 13, 2008 3:25pm
Subscribe [27]#106 / Mar 03, 2008 1:14am
actually that’s a known issue, I’m working on fix it it right now 😊
#107 / Mar 03, 2008 3:26am
what are you calling your date field? could you show us some code?
This is my YML Code
tanggal:
class: DateAnd this is my Controller
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
// CE Powered
include("codexcontroller.php");
class PenyebabPerceraian extends codexController {
function PenyebabPerceraian ()
{
codexController::codexController();
$this->load->library('spyc');
// manusiakan kode
$this->load->helper('inflector');
$config = array(
'db_table' => 'sidang',
'table_access_restriction'=>array('id_jenis'=>'3'),
'form_setup' => $this->spyc->YAMLLOAD('definitions/cerai_form.yml'),
'controller_name' => 'PenyebabPerceraian',
'list_text' => array('nomor_perkara','jenis_perkara','pemohon_penggugat','termohon_tergugat','keterangan_cerai'),
);
$this->setConfig($config);
$this->load->scaffolding('sidang');
}
}And this is my result in HTML code
<label for="tanggal">
Tanggal
</label>
<input class="text" type="text" id="tanggal_picker" value="" name="tanggal" >
$(document).ready(function() {$('#tanggal_picker').datepicker({dateFormat: 'yy-mm-dd'}); });<div class="clear"></div></div><div class="form-element">Please help me fix this problem.
#108 / Mar 03, 2008 5:01am
Another Question.
How to make the URL more better, like your live_preview? so the URL will add the ID if edit some form
example
<a href="http://blabla.com/index.php/post/edit/12">http://blabla.com/index.php/post/edit/12</a>How to do that?
#109 / Mar 03, 2008 10:01am
really, the only thing that looks suspicious in your code are the missing tags in the output HTML, it shouldn’t be doing that, did you modify the Date plugin?
As far as the URL’s, the preview uses different code because of IE problems, when RC8 comes along it’ll have the new layout and everything.
#110 / Mar 03, 2008 12:24pm
I believe this board strips out the script tags, which is why they’re not shown. My datepicker is ALSO not showing up, and when looking at the code, the script tags are in there.
When I did the default install I had this same problem, and at some point it magically went away. I think I reuploaded everything, and that fixed it. Since I did this new installation that I’m testing, I haven’t yet tried the date plugin… now that I have, I see it’s not working like the poster above. I’ll try a few things out and tell you if I make any progress.
#111 / Mar 03, 2008 1:16pm
time_test:
class: Time
params:
-on_updateWithout that in the YAML form, the datepicker doesn’t seem to work because the datepicker isn’t loaded. I looked at the date plugin, and the following needs to be added to the top of the getHTML method of the date plugin for it to work:
$CI = &get;_instance();
$CI->codextemplates->css('ui.datepicker.css');
$CI->codextemplates->js('ui.datepicker.js');#112 / Mar 03, 2008 1:18pm
Sorry. This was mentioned earlier in the thread:
http://ellislab.com/forums/viewreply/356004/
Oh well.
#113 / Mar 03, 2008 1:20pm
ah, yes you are absolutely correct, I forgot to add that when I created the codextemplates library, thanks for finding it mahuti 😊
EDIT: I actually didn’t notice it in the post you’re referencing, I suppose MaRKTD needs another thanks 😊
#114 / Mar 03, 2008 1:58pm
1. I think the next thing I’m interested in is an “add new” ajaxy option for DbDropDown. I may look into that over the next few days. I’m fascinated by jQuery, but I’ve never had the time required to really get into it. I’ve used it, but I just haven’t really gotten the hang of it yet… at least not without a lot of head bashing.
2. Also, I’ve yet to figure out how to set a DbDropDown’s default value to ‘blank’,‘null’ etc. I’ll have to look into the code for that.
3. The last major obstacle I see for real high-level utility for this is the lack of an arrow reorder function. I get clients all the time that want to set the order of items using arrows (up,down) I had planned to create a library / helper / plugin for my own admin efforts, maybe I’ll look into doing that for this system. Probably won’t get around to it for awhile though.
#115 / Mar 03, 2008 2:23pm
1) Well the OneToMany and ManyToMany plugins already do that, so you probably could just copy/paste that with some minimal modification. Although I’m guessing that there might be a bug cause you reported issues with multiple ManyToMany’s on one page.
2) That is a change I made for RC8 actually
3) I have actually contemplated that, I just haven’t implemented it, i plan on implementing it though.
#116 / Mar 03, 2008 9:54pm
time_test: class: Time params: -on_updateWithout that in the YAML form, the datepicker doesn’t seem to work because the datepicker isn’t loaded. I looked at the date plugin, and the following needs to be added to the top of the getHTML method of the date plugin for it to work:
$CI = &get;_instance(); $CI->codextemplates->css('ui.datepicker.css'); $CI->codextemplates->js('ui.datepicker.js');
How to add this code? which file that need to edit? so my date picker work?
I was found the solutions.
Thanks
#117 / Mar 03, 2008 10:00pm
Jauhari, you need to edit the Date.php file which is located in codex/application/plugins. Those three lines need to be added to the beginning of the getHTML function.
#118 / Mar 09, 2008 4:28am
just a quick update, i’ve updated the live preview (login with preview:preview), added some jquery to the overview page, also added the ability to configure a page in the YAML file directly. What this means is that you don’t need to create cumbersome controllers anymore if you don’t need to override CodexController 😊
The only thing left before RC8’s release, is a more polished ACL system, if you think you could implement it, please PM me and we’ll see what we can do. If you would like to help do some jquery work too, also PM me.
#119 / Mar 09, 2008 10:40am
Great work, jTaby.
I’m checking your progress on this everyday.
You could update your svn trunk so I could get my hands dirty. 😉 Can’t wait for RC8!
Thank you.
#120 / Mar 09, 2008 3:51pm
a simple bug:
in Image plugin, on the constructor, the last line:
if(substr($this->url_path,-1) !== DIRECTORY_SEPARATOR) $this->url_path .= DIRECTORY_SEPARATOR;
you can’t use DIRECTORY_SEPARATOR in this case, because this generates a URL Path, and this will bug in windows systems because the directory seperator will be “\” and this indicates root path, and the image will not display…
to correct this change line to
if(substr($this->url_path,-1) !== ‘/’) $this->url_path .= ‘/’;