Jump to content
TNG Community

Having the "Add New" window open full


wkenddad

Recommended Posts

I normal enter info into the lower portion of the "Add New" dialog box and it is inconvenient to have to click the "More" every time.
How would I modify the code to default to the "More" mode upon opening?

And while I'm asking; the bulk of my entries are "Census (Cens)" what code needs to be modified for this to be the default.

And changing the length of the "Add New" dialog box to show all the full form would also be nice.

Darrin had helped me several version ago, but the code has changed and I cant find the proper locations.

 

Screen Shot 2015-11-15 at 12.30.33.png

Screen Shot 2015-11-15 at 12.31.15.png

Edited by wkenddad
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Darrin pointed me to the correct code.

The code for that is in admin_newevent.php, but to change the
dimensions of the box, you have to do that at the point where the
window is invoked, which is in js/selectutils.js at line 192.
 
I still need to modify the code in  admin_newevent.php to force the "More" option to default open.
Any Ideas? I believe it's around line 158 or so
Link to comment
Share on other sites

  • 4 weeks later...
Hi Ray,
 
You must also change this line and remove the style="display:none" code:
 
<div id="more" style="display:none">
 
Darrin
 
 
On Thu, Jan 7, 2016 at 8:38 AM, Raymond Cervenka
On October 25, 2015 at 9:36 AM, JRobison said:

Mouseover of what??

wrote:
Darrin,
I located the code to automatically activate the “More” button.
But, not matter how I change the code it doe snot automatically display the
full content.
I believe it should be in the highlighted line, but no changes to the RED
result in the Blue being displayed without hitting the “More” button
Where am I going wrong?
 
<table border="0" cellpadding="2" class="normal">
<tr><td valign="top"><span class="normal"><?php echo $admtext['eventtype'];
?>:</span></td>
<td>
<span class="normal">
<select name="eventtypeID">
<option value=""></option>
<?php
$query = "SELECT * FROM $eventtypes_table WHERE type = \"$prefix\" ORDER BY
tag";
$evresult = tng_query($query);
 
$events = array();
while ( $eventtype = tng_fetch_assoc( $evresult ) ) {
$display = getEventDisplay( $eventtype['display'] );
$option = $display . ($eventtype['tag'] != "EVEN" ? " ({$eventtype['tag']})"
: "");
$optionlen = strlen($option);
$option = substr($option,0,40);
if($optionlen > strlen($option))
$option .= "&hellip;";
$events[$display] = "<option
value=\"{$eventtype['eventtypeID']}\">$option</option>\n";
}
tng_free_result($evresult);
 
ksort($events);
foreach($events as $event)
echo $event;
?>
</select>
</span>
</td>
</tr>
<tr><td><?php echo $admtext['eventdate']; ?>:</td><td><input type="text"
name="eventdate" onBlur="checkDate(this);"> <span class="normal"><?php echo
$admtext['dateformat']; ?>:</span></td></tr>
<tr><td><?php echo $admtext['eventplace']; ?>:</td><td valign="top"><input
type="text" name="eventplace" id="eventplace" size="40"> &nbsp;<?php echo
$admtext['text_or']; ?>&nbsp;
<a href="#" onclick="return openFindPlaceForm('eventplace');"><img
src="img/tng_find.gif" class="alignmiddle" title="<?php echo
$admtext['find']; ?>" alt="<?php echo $admtext['find']; ?>" <?php echo
$dims; ?> /></a></td></tr>
<tr><td valign="top"><?php echo $admtext['detail']; ?>:</td><td><textarea
name="info" rows="4" cols="40"></textarea></td></tr>
</table>
<?php echo displayToggle("plus9",1,"more",$admtext['more'],""); ?>
<br />
<div id="more" style="display:none">
<table border="0" cellpadding="2" class="normal">
<tr><td><?php echo $admtext['age']; ?>:</td><td><input type="text"
name="age" size="12" maxlength="12"></td></tr>
<tr><td><?php echo $admtext['agency']; ?>:</td><td><input type="text"
name="agency" size="40"></td></tr>
<tr><td><?php echo $admtext['cause']; ?>:</td><td><input type="text"
name="cause" size="40"></td></tr>
<tr><td><?php echo $admtext['address1']; ?>:</td><td><input type="text"
name="address1" size="40"></td></tr>
<tr><td><?php echo $admtext['address2']; ?>:</td><td><input type="text"
name="address2" size="40"></td></tr>
<tr><td><?php echo $admtext['city']; ?>:</td><td><input type="text"
name="city" size="40"></td></tr>
<tr><td><?php echo $admtext['stateprov']; ?>:</td><td><input type="text"
name="state" size="40"></td></tr>
<tr><td><?php echo $admtext['zip']; ?>:</td><td><input type="text"
name="zip" size="20"></td></tr>
<tr><td><?php echo $admtext['countryaddr']; ?>:</td><td><input type="text"
name="country" size="40"></td></tr>
<tr><td><?php echo $admtext['phone']; ?>:</td><td><input type="text"
name="phone" size="30"></td></tr>
<tr><td><?php echo $admtext['email']; ?>:</td><td><input type="text"
name="email" size="50"></td></tr>
<tr><td><?php echo $admtext['website']; ?>:</td><td><input type="text"
name="www" size="50"></td></tr>
</table>
 
Link to comment
Share on other sites

  • 4 months later...

Okay,
I was able to get the New Event Dialog Box to open fully.

Now, which module opens the "Edit Existing Event Dialog" and where is the code I need to have it respond like the New Event?

It appears to be of a similar code format.
Also do I need to alter one of the .JS file as I did with the New Event mod?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...